net.grelf.astro
Class StarChartLoader

java.lang.Object
  extended by net.grelf.astro.StarChartLoader
Direct Known Subclasses:
AstroGridGateway, Hipparcos, SimbadGateway, StarChart, Tycho

public abstract class StarChartLoader
extends java.lang.Object

Base for classes loading data for StarChart. Particularly for calculating cartesian equatorial coordinates most efficiently for each star.

 Method of plotting:

 (RA, Dec):

 Star S at (as, ds)
 Plot centre P at (ap, dp)

 Rotate all coordinates so that (ap, dp) becomes (90, 0) degrees
 ie, the plot area is out along the y axis

 1. Represent (as, ds) as cartesian coordinates:

 ( x ) = ( cos(as).cos(ds) )
 ( y )   ( sin(as).cos(ds) )
 ( z )   ( sin(ds)         )

 2. Rotate about 0z through 90 - ap:

 ( x' ) = ( cos(90-ap)  -sin(90-ap)   0 ) ( x )
 ( y' )   ( sin(90-ap)   cos(90-ap)   0 ) ( y )
 ( z' )   (     0             0       1 ) ( z )

 3. Then rotate about 0x through -dp:

 ( x" ) = (     1         0        0       ) ( x' )
 ( y" )   (     0      cos(-dp)  -sin(-dp) ) ( y' )
 ( z" )   (     0      sin(-dp)   cos(-dp) ) ( z' )

 so the combined rotation is

 ( x" ) = (     cos(90-ap)           -sin(90-ap)           0     ) ( x )
 ( y" )   ( cos(-dp).sin(90-ap)   cos(-dp).cos(90-ap)  -sin(-dp) ) ( y )
 ( z" )   ( sin(-dp).sin(90-ap)   sin(-dp).cos(90-ap)   cos(-dp) ) ( z )

 4. Then check that y" > 0 and that x" and z" are within range for the plot.


Field Summary
protected  double cos90ap
           
protected  double cosdp
           
protected  JulianDate epoch
           
protected  Epoch equinox
           
protected  double sin90ap
           
protected  double sindp
           
protected  double sinFieldRadius
           
 
Constructor Summary
StarChartLoader()
           
 
Method Summary
protected  void calculateChartCoordinates(Star star)
          This version is fine if the Star is already known to be within the required cone.
 JulianDate getEpoch()
           
 Epoch getEquinox()
           
protected  void initialiseChartCoordinates(SkyPoint plotCentre, double fieldRadius)
          Calculate certain fields just once so they do not have to be calculated for every star.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

equinox

protected Epoch equinox

epoch

protected JulianDate epoch

cos90ap

protected double cos90ap

sin90ap

protected double sin90ap

cosdp

protected double cosdp

sindp

protected double sindp

sinFieldRadius

protected double sinFieldRadius
Constructor Detail

StarChartLoader

public StarChartLoader()
Method Detail

getEquinox

public Epoch getEquinox()

getEpoch

public JulianDate getEpoch()

initialiseChartCoordinates

protected void initialiseChartCoordinates(SkyPoint plotCentre,
                                          double fieldRadius)
Calculate certain fields just once so they do not have to be calculated for every star. This needs to be called once a data set for a star chart has been obtained successfully but before retrieving the stars from it.


calculateChartCoordinates

protected void calculateChartCoordinates(Star star)
This version is fine if the Star is already known to be within the required cone. Loading from data files needs a different version, to do cone selection using lines shown in this source as commented out. This needs to be done after retrieving each star from the data set for the chart.