org.gjt.universe
Class GlieseCatalog

java.lang.Object
  |
  +--org.gjt.universe.GlieseCatalog

public class GlieseCatalog
extends java.lang.Object


Field Summary
private  int bytesRead
           
private static int CBUF_MAX
          Length of longest string we'll be reading in
private static int COMPONENTS
           
private static int DEC_DEGREES
           
private static int DEC_MINUTES
           
private static int DEC_SIGN
           
private static int DEGREES
           
private  double distance
          Distance from Sol to the star.
private static byte DM
           
private static int DM_NUMBER
           
private  boolean done
           
private static byte DWARF
           
private static byte GICLAS
           
private static int GICLAS_NUMBER
           
private static byte GLIESE
           
private static java.lang.String GLIESE_CATALOG
           
private  java.io.BufferedReader glieseFile
           
private static byte HD
           
private static int HD_DESIGNATION
           
private static int HOURS
           
private static int IDENTIFIER
           
private static byte LATIN
           
private static byte LHS
           
private static int LHS_NUMBER
           
private  java.util.Vector lines
           
private static byte LP
           
private static byte LTT
           
private static byte LUYTEN
           
private  double magnitude
           
private static int MAGNITUDE
           
private static double maxRadius
           
private static int MINUTES
           
private static java.lang.String name
          The name (or numeric designation) of the star.
private  byte nameValue
           
private static boolean negativeDeclination
          Is the declination negative?
private  java.lang.String nextString
           
private static byte NO_NAME
           
private static int noNameCount
          In rare cases, a star will have to be given a default name which includes this value.
private static int OTHER_DESIGNATION
           
private static int PARALLAX
           
private static double phi
          Right ascension as an angle
private static java.lang.String PROGRESS_MSG
           
private static java.lang.String PROGRESS_TITLE
           
private static int RA_HOURS
           
private static int RA_MINUTES
           
private static int RA_SECONDS
           
private static double RADIANS
          Convenience declaration
private static int REMARKS
           
private static byte ROSS
           
private static int SECONDS
           
private static int SPECTRAL_TYPE
           
protected  java.lang.String spectralType
           
private static java.lang.String STAR_NAME_MAP
           
(package private) static StarNames StarNameList
           
private static double theta
          Declination angle
private  int totalBytesInFile
           
private static byte UGPMF
           
private static java.lang.String USTATUS_MSG
           
private static byte VYSSOTSKY
           
private static byte WOLF
           
private static byte WOOLEY
           
private  java.lang.Thread worker
           
private  double x
          The X coordinate of the star in 3-space (Sol = 0,0,0)
private  double y
          The Y coordinate of the star in 3-space (Sol = 0,0,0)
private  double z
          The Z coordinate of the star in 3-space (Sol = 0,0,0)
 
Constructor Summary
(package private) GlieseCatalog(double radius)
          The designated constructor for instances of this class.
 
Method Summary
private  void calculateXYZ()
           
private static double charToDouble(char[] cbuf)
           
private  void createWorkerThread()
           
private  void distance(char[] cbuf)
           
 GlieseLine get(int index)
           
private static java.lang.String getIDString(java.lang.String s)
           
 java.util.Vector getLines()
           
 int numofStars()
           
private  void openGliese(java.lang.String name)
           
private  void parseLine(java.lang.String str)
           
private static void phi(char[] cbuf, int flag)
           
private  void resolveName(char[] cbuf, int source)
          Function to try and resolve a name for the star.
private static void theta(char[] cbuf, int flag)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROGRESS_TITLE

private static final java.lang.String PROGRESS_TITLE
See Also:
Constant Field Values

PROGRESS_MSG

private static final java.lang.String PROGRESS_MSG
See Also:
Constant Field Values

USTATUS_MSG

private static final java.lang.String USTATUS_MSG
See Also:
Constant Field Values

GLIESE_CATALOG

private static final java.lang.String GLIESE_CATALOG
See Also:
Constant Field Values

STAR_NAME_MAP

private static final java.lang.String STAR_NAME_MAP
See Also:
Constant Field Values

lines

private java.util.Vector lines

StarNameList

static StarNames StarNameList

glieseFile

private java.io.BufferedReader glieseFile

bytesRead

private int bytesRead

done

private boolean done

nextString

private java.lang.String nextString

maxRadius

private static double maxRadius

totalBytesInFile

private int totalBytesInFile

worker

private java.lang.Thread worker

IDENTIFIER

private static final int IDENTIFIER
See Also:
Constant Field Values

COMPONENTS

private static final int COMPONENTS
See Also:
Constant Field Values

RA_HOURS

private static final int RA_HOURS
See Also:
Constant Field Values

RA_MINUTES

private static final int RA_MINUTES
See Also:
Constant Field Values

RA_SECONDS

private static final int RA_SECONDS
See Also:
Constant Field Values

DEC_SIGN

private static final int DEC_SIGN
See Also:
Constant Field Values

DEC_DEGREES

private static final int DEC_DEGREES
See Also:
Constant Field Values

DEC_MINUTES

private static final int DEC_MINUTES
See Also:
Constant Field Values

SPECTRAL_TYPE

private static final int SPECTRAL_TYPE
See Also:
Constant Field Values

MAGNITUDE

private static final int MAGNITUDE
See Also:
Constant Field Values

PARALLAX

private static final int PARALLAX
See Also:
Constant Field Values

HD_DESIGNATION

private static final int HD_DESIGNATION
See Also:
Constant Field Values

DM_NUMBER

private static final int DM_NUMBER
See Also:
Constant Field Values

GICLAS_NUMBER

private static final int GICLAS_NUMBER
See Also:
Constant Field Values

LHS_NUMBER

private static final int LHS_NUMBER
See Also:
Constant Field Values

OTHER_DESIGNATION

private static final int OTHER_DESIGNATION
See Also:
Constant Field Values

REMARKS

private static final int REMARKS
See Also:
Constant Field Values

spectralType

protected java.lang.String spectralType

magnitude

private double magnitude

nameValue

private byte nameValue

phi

private static double phi
Right ascension as an angle


theta

private static double theta
Declination angle


negativeDeclination

private static boolean negativeDeclination
Is the declination negative?


distance

private double distance
Distance from Sol to the star. Based on parallax.


x

private double x
The X coordinate of the star in 3-space (Sol = 0,0,0)


y

private double y
The Y coordinate of the star in 3-space (Sol = 0,0,0)


z

private double z
The Z coordinate of the star in 3-space (Sol = 0,0,0)


name

private static java.lang.String name
The name (or numeric designation) of the star.


noNameCount

private static int noNameCount
In rare cases, a star will have to be given a default name which includes this value.


RADIANS

private static final double RADIANS
Convenience declaration

See Also:
Constant Field Values

CBUF_MAX

private static final int CBUF_MAX
Length of longest string we'll be reading in

See Also:
Constant Field Values

HOURS

private static final int HOURS
See Also:
Constant Field Values

MINUTES

private static final int MINUTES
See Also:
Constant Field Values

SECONDS

private static final int SECONDS
See Also:
Constant Field Values

DEGREES

private static final int DEGREES
See Also:
Constant Field Values

NO_NAME

private static final byte NO_NAME
See Also:
Constant Field Values

UGPMF

private static final byte UGPMF
See Also:
Constant Field Values

LHS

private static final byte LHS
See Also:
Constant Field Values

LP

private static final byte LP
See Also:
Constant Field Values

LTT

private static final byte LTT
See Also:
Constant Field Values

DWARF

private static final byte DWARF
See Also:
Constant Field Values

DM

private static final byte DM
See Also:
Constant Field Values

GICLAS

private static final byte GICLAS
See Also:
Constant Field Values

GLIESE

private static final byte GLIESE
See Also:
Constant Field Values

HD

private static final byte HD
See Also:
Constant Field Values

VYSSOTSKY

private static final byte VYSSOTSKY
See Also:
Constant Field Values

WOOLEY

private static final byte WOOLEY
See Also:
Constant Field Values

WOLF

private static final byte WOLF
See Also:
Constant Field Values

ROSS

private static final byte ROSS
See Also:
Constant Field Values

LUYTEN

private static final byte LUYTEN
See Also:
Constant Field Values

LATIN

private static final byte LATIN
See Also:
Constant Field Values
Constructor Detail

GlieseCatalog

GlieseCatalog(double radius)
        throws java.lang.InterruptedException
The designated constructor for instances of this class. Returns an instance of the interpreted Gliese Catalog which contains all known stars out to the maximum given radius from Sol.

Parameters:
radius - The maximum radius from Sol to which stars are to be included.
Throws:
java.lang.InterruptedException - If access to the catalog data file is interrupted mid-read.
Method Detail

get

public GlieseLine get(int index)

numofStars

public int numofStars()

getLines

public java.util.Vector getLines()

createWorkerThread

private void createWorkerThread()

openGliese

private void openGliese(java.lang.String name)

parseLine

private void parseLine(java.lang.String str)

resolveName

private final void resolveName(char[] cbuf,
                               int source)
Function to try and resolve a name for the star. This may get called numerous times during the reading of a line, so a value system has been imposed on the possible names in order to try and get some sort of consistently "nice" output. The value ranking, from least to most desirable, is as follows (ties are broken in favour of the first element listed): - No name (E.g. NN 12345) -- We don't really want invented names in a "realistic" list -(tie_1) LHS catalog -- Much the same reasoning, the numbers are more interesting, but... -(tie_1) UGPMF catalog -- An ugly collection of letters, the lowest of the low - LP catalog == The lowest of the low in a previous version (v1.4) of this class. -(tie_2) LHS catalog -- The second lowest catalog in version 1.4 -(tie_2) W (or white dwarf) catalog -- White dwarfs might be interesting. -(tie_3) DM catalog -- The Durchmusterung is a known catalog, plus the numbers are interesting -(tie_3) Giclas catalog -- probably not a well known catalog, but it's pronouncable -(tie_4) Gliese and Gliese/Jahreiss catalogs -- pronouncable names, a good comprimise level -(tie_4) HD catalog -- the is probably the best known of the listed catalogs -(tie_5) Vyssotsky catalog -- probably obscure, but I like the name -(tie_5) Wooley catalog -- There don't appear to be many of these, let 'em shine, says I. -(tie_6) Wolf catalog -- It's a known catalog (E.g. Wolf 359 of _Star Trek_ fame) -(tie_6) Ross catalog -- Again, it's a pronouncable name. -(tie_6) Luyten catalog -- Yet another pronouncable name. - Constellation names (e.g. Alpha Centauri) -- If people will think they recognize it, good.


getIDString

private static final java.lang.String getIDString(java.lang.String s)

calculateXYZ

private final void calculateXYZ()

phi

private static final void phi(char[] cbuf,
                              int flag)

theta

private static final void theta(char[] cbuf,
                                int flag)

distance

private final void distance(char[] cbuf)

charToDouble

private static final double charToDouble(char[] cbuf)


Copyright © 2001 Universe Dev Team All Rights Reserved.