astro
Class SimpleSid

java.lang.Object
  extended by astro.SimpleSid
All Implemented Interfaces:
SiderealTiming, PI

public class SimpleSid
extends Object
implements SiderealTiming, PI

Class to calculate the sidereal time for a given location and Date. The algorithm is linear in time. Returned sid time is in radians!


Field Summary
protected static double[] Const
          Constants for linear tranformation of solar time into sidereal time.
 
Fields inherited from interface astro.SiderealTiming
SOL_TO_SID
 
Fields inherited from interface vec_math.PI
HOUR, PIHALF, PITWO, RADIAN
 
Constructor Summary
SimpleSid()
           
 
Method Summary
 double getLocalSidereal(Site site, Date time)
          The implementation of the SiderealTime interface.
protected  double getSid(double jdfjd)
          Rather simple sidereal time calculater.
 double getSiderealGMT(Date time)
          The implementation of the SiderealTime interface.
static void main(String[] arg)
          Prints the current sidereal time or the sidereal time of the given date.
 String toString()
          A simple string describing the algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Const

protected static double[] Const
Constants for linear tranformation of solar time into sidereal time.

Constructor Detail

SimpleSid

public SimpleSid()
Method Detail

getSid

protected double getSid(double jdfjd)
Rather simple sidereal time calculater. Uses a linear approximation in time.

Parameters:
jdfjd - The UTC time in julian date.
Returns:
The sidereal time in radians for Greenwich.
See Also:
SiderealTime

getSiderealGMT

public double getSiderealGMT(Date time)
The implementation of the SiderealTime interface. Converts the Date object into julian date using the Astro.JD(Date) method.

Specified by:
getSiderealGMT in interface SiderealTiming
Parameters:
time - The UTC-based time.

getLocalSidereal

public double getLocalSidereal(Site site,
                               Date time)
The implementation of the SiderealTime interface. Considers the longitude of the observer for calculating the sidereal time.

Specified by:
getLocalSidereal in interface SiderealTiming
Parameters:
site - The location of the observer.
time - The UTC-based time.

toString

public String toString()
A simple string describing the algorithm.

Overrides:
toString in class Object
Returns:
String

main

public static void main(String[] arg)
Prints the current sidereal time or the sidereal time of the given date.