org.stellarium.astro
Class Misc

java.lang.Object
  extended by org.stellarium.astro.Misc

 class Misc
extends java.lang.Object


Constructor Summary
Misc()
           
 
Method Summary
(package private) static double getMeanObliquity(double t)
          The obliquity formula (and all the magic numbers below) come from Meeus, Astro Algorithms.
(package private) static double rangeDegrees(double d)
          puts a large angle in the correct range 0 - 360 degrees
(package private) static double rangeRadians(double r)
          puts a large angle in the correct range 0 - 2PI radians
(package private) static java.util.Date strToDate(java.lang.String s1, java.lang.String s2)
          Obtains a ln_date from 2 strings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Misc

Misc()
Method Detail

rangeDegrees

static double rangeDegrees(double d)
puts a large angle in the correct range 0 - 360 degrees


rangeRadians

static double rangeRadians(double r)
puts a large angle in the correct range 0 - 2PI radians


getMeanObliquity

static double getMeanObliquity(double t)
The obliquity formula (and all the magic numbers below) come from Meeus, Astro Algorithms.

Parameters:
t - Time in julian day. Valid range is the years -8000 to +12000 (t = -100 to 100).
Returns:
Mean obliquity (epsilon sub 0) in degrees.

strToDate

static java.util.Date strToDate(java.lang.String s1,
                                java.lang.String s2)
Obtains a ln_date from 2 strings. Uses the current date if s1 is "today" and current time if s2 is "now"

Parameters:
s1 - date with the form dd/mm/yyyy
s2 - time with the form hh:mm:ss.s
Returns:
null if s1 or s2 is not valid.