public abstract class StarChartLoader
Base for classes loading data for StarChart.
Particularly for calculating cartesian equatorial coordinates most
efficiently for each star.
Method of plotting:
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.
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.
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