mhuss AstroLib 1.1.4a

com.mhuss.AstroLib
Class AstroOps

java.lang.Object
  |
  +--com.mhuss.AstroLib.AstroOps

public class AstroOps
extends java.lang.Object

AstroOps is a 'catch-all' class that performs some useful calculation functions that didn't fit anywhere else.


Constructor Summary
AstroOps()
           
 
Method Summary
static double greenwichSiderealTime(double jd)
          Calculates the sidereal UTC time.
static double meanObliquity(double t)
          Calculates the mean obliquity at a given time.
static double normalizeDegrees(double d)
          Reduce an angle in degrees to the range (0 <= deg < 360)
static double normalizeRadians(double r)
          Reduce an angle in radians to the range (0 <= rad < 2Pi)
static int quadrant(double radians)
          Returns the quadrant (0, 1, 2, or 3) of the specified angle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AstroOps

public AstroOps()
Method Detail

meanObliquity

public static double meanObliquity(double t)
Calculates the mean obliquity at a given time.

Parameters:
t - Time in julian centuries from J2000.
Valid range is the years -8000 to +12000 (t = -100 to 100).
Returns:
The mean obliquity (epsilon sub 0) in radians.

greenwichSiderealTime

public static double greenwichSiderealTime(double jd)
Calculates the sidereal UTC time. This function returns apparent Greenwich sidereal time for the given Julian day.

Returns:
Sidereal time in radians

normalizeDegrees

public static double normalizeDegrees(double d)
Reduce an angle in degrees to the range (0 <= deg < 360)

Returns:
The reduced degree value

normalizeRadians

public static double normalizeRadians(double r)
Reduce an angle in radians to the range (0 <= rad < 2Pi)

Returns:
The reduced radian value

quadrant

public static int quadrant(double radians)
Returns the quadrant (0, 1, 2, or 3) of the specified angle.

This function is useful in figuring out dates of lunar phases and solstices/equinoxes. If the solar longitude is in one quadrant at the start of a day, but in a different quadrant at the end of a day, then we know that there must have been a solstice or equinox during that day. Also, if (lunar longitude - solar longitude) changes quadrants between the start of a day and the end of a day, we know there must have been a lunar phase change during that day.

Parameters:
radians - Angle in Radians
Returns:
Quadrant of angle (0, 1, 2, or 3)

mhuss AstroLib 1.1.4a

bottom text