astro32
Class Astro32

java.lang.Object
  |
  +--astro32.Astro32

public class Astro32
extends java.lang.Object

Insert the type's description here. Creation date: (8/18/01 3:27:31 PM)


Field Summary
private static double aaha_aux_clat
           
private static double aaha_aux_last_lat
           
private static double aaha_aux_slat
           
static int DATE_DMY
           
static int DATE_LOCALTZ
           
static int DATE_MDY
           
static int DATE_UTCTZ
           
static int DATE_YMD
           
(package private) static short[] dpm
           
(package private) static double gst_utc_lastmjd
           
(package private) static double gst_utc_t0
           
static double J2000
           
static int JUPITER
           
(package private) static double last_dy
           
(package private) static double last_mjd
           
(package private) static int last_mn
           
(package private) static int last_yr
           
static int MARS
           
static int MERCURY
           
static double MJD0
           
static int MOON
           
static int NEPTUNE
           
static int NOBJ
           
static int OBJX
           
static int OBJY
           
static int OBJZ
           
static double PI
           
static int PLUTO
           
static int SATURN
           
static double SIDRATE
           
static double SPD
           
static int SUN
           
static int URANUS
           
(package private) static double utc_gst_lastmjd
           
(package private) static double utc_gst_t0
           
static int VENUS
           
 
Constructor Summary
Astro32()
           
 
Method Summary
static void aa_hadec(double lat, double alt, double az, utilities.DoubleRef ha, utilities.DoubleRef dec)
          given geodetic latitude (n+, radians), lat, altitude (up+, radians), alt, and azimuth (angle round to the east from north+, radians), return hour angle (radians), ha, and declination (radians), dec.
static void aaha_aux(double lat, double x, double y, utilities.DoubleRef p, utilities.DoubleRef q)
          Insert the method's description here.
static void cal_mjd(int mn, double dy, int yr, utilities.DoubleRef mjd)
          given a date in months, mn, days, dy, years, yr, return the modified Julian date (number of days elapsed since 1900 jan 0.5), *mjd.
static double deghr(double x)
          conversions among hours (of ra), degrees and radians Creation date: (8/19/01 4:26:06 PM)
static double degrad(double x)
          conversions among hours (of ra) or degrees and radians Creation date: (8/19/01 4:21:00 PM)
static boolean dst()
          Determines whether we are currently in Daylight Savings Time Creation date: (8/18/01 3:34:09 PM)
static java.lang.String fmt_mjd(double mjd, int pref)
          put the given modified Julian date, mjd, in out[] according to preference format.
static double get_mjd(int year, int month, int day, int hour, int minute, int second, java.util.TimeZone tz)
          Return the Modified Julian Date (mjd) for a given date t is seconds since 00:00:00 1/1/1970 UTC on UNIX systems; mjd was 25567.5 then.
static double gmst0(double mjd)
          gmst0() - return Greenwich Mean Sidereal Time at 0h UT; stern Creation date: (8/19/01 8:14:01 PM)
static void gst_utc(double mjd, double gst, utilities.DoubleRef utc)
          given a modified julian date, mjd, and a greenwich mean siderial time, gst, return UTC.
static void hadec_aa(double lat, double ha, double dec, utilities.DoubleRef alt, utilities.DoubleRef az)
          given geodetic latitude (n+, radians), lat, hour angle (radians), ha, and declination (radians), dec, return altitude (up+, radians), alt, and azimuth (angle round to the east from north+, radians), Creation date: (8/29/01 7:26:11 PM)
static double hrdeg(double x)
          conversions among hours (of ra), degrees and radians Creation date: (8/19/01 4:24:23 PM)
static double hrrad(double x)
          conversions among hours (of ra), degrees and radians Creation date: (8/19/01 4:31:14 PM)
static double mjd_2000()
          Insert the method's description here.
static void mjd_cal(double mjd, utilities.IntegerRef mn, utilities.DoubleRef dy, utilities.IntegerRef yr)
          given the modified Julian date (number of days elapsed since 1900 jan 0.5,), mjd, return the calendar date in months, *mn, days, *dy, and years, *yr.
static double mjd_day(double jd)
          given an mjd, truncate it to the beginning of the whole day Creation date: (8/19/01 4:41:52 PM)
static int mjd_dow(double mjd, utilities.IntegerRef dow)
          given an mjd, set *dow to 0..6 according to which day of the week it falls on (0=sunday).
static int mjd_dpm(double mjd)
          given a mjd, return the the number of days in the month.
static double mjd_hr(double jd)
          given an mjd, return the number of hours past midnight of the whole day Creation date: (8/19/01 4:44:18 PM)
static double mjd_year(double mjd)
          given a mjd, return the year as a double.
static double mjd0()
          Insert the method's description here.
static double mjd2000()
          Insert the method's description here.
static double now_lst(double lng)
          Return the Local Apparent Sidereal Time, hours, given the longitude, lng.
static double now_mjd()
          Return the Modified Julian Date (mjd) from the system clock t is seconds since 00:00:00 1/1/1970 UTC on UNIX systems; mjd was 25567.5 then.
static void nutation(double mjd, utilities.DoubleRef deps, utilities.DoubleRef dpsi)
          Given the Julian Day (measured in Julian centuries from the Epoch J2000), Calculates two values and returns them - nutation in longitude and nutation in obliquity..
static void obliquity(double mjd, utilities.DoubleRef eps)
          Insert the method's description here.
static double raddeg(double x)
          conversions among hours (of ra), degrees and radians Creation date: (8/19/01 4:22:33 PM)
static double radhr(double x)
          conversions among hours (of ra), degrees and radians Creation date: (8/19/01 4:32:29 PM)
static double range(double v, double r)
          insure 0 <= *v < r.
static void range(utilities.DoubleRef v, double r)
          insure 0 <= *v < r.
static void rnd_second(utilities.DoubleRef t)
          round a time in days, *t, to the nearest second, IN PLACE.
static void solve_sphere(double A, double b, double cc, double sc, utilities.DoubleRef cap)
          solve a spherical triangle: A / \ / \ c / \ b / \ / \ B ____________ C a given A, b, c find B and a in range 0..B..2PI and 0..a..PI, respectively..
static void solve_sphere(double A, double b, double cc, double sc, utilities.DoubleRef cap, utilities.DoubleRef Bp)
          solve a spherical triangle: A / \ / \ c / \ b / \ / \ B ____________ C a given A, b, c find B and a in range 0..B..2PI and 0..a..PI, respectively..
static long time()
          The time function returns the number of seconds elapsed since midnight (00:00:00), January 1, 1970, Universal Coordinated Time, according to the system clock.
static long time(int year, int month, int day, int hour, int minute, int second, java.util.TimeZone tz)
          The time function returns the number of seconds elapsed since midnight (00:00:00), January 1, 1970, Universal Coordinated Time, according to the system clock.
static long tz_name(utilities.StringRef buf, int tzpref)
          fill buf() with a timezone name, depending on tzpref, which can be: DATE_UTCTZ: UTC DATE_LOCALTZ Local timezone name Creation date: (8/18/01 4:03:00 PM)
static void utc_gst(double mjd, double utc, utilities.DoubleRef gst)
          given a modified julian date, mjd, and UTC return greenwich mean siderial time, *gst.
static double year_mjd(double y)
          given a decimal year, return mjd Creation date: (8/19/01 3:50:25 PM)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PI

public static final double PI
See Also:
Constant Field Values

SIDRATE

public static final double SIDRATE
See Also:
Constant Field Values

SPD

public static final double SPD
See Also:
Constant Field Values

MERCURY

public static final int MERCURY
See Also:
Constant Field Values

VENUS

public static final int VENUS
See Also:
Constant Field Values

MARS

public static final int MARS
See Also:
Constant Field Values

JUPITER

public static final int JUPITER
See Also:
Constant Field Values

SATURN

public static final int SATURN
See Also:
Constant Field Values

URANUS

public static final int URANUS
See Also:
Constant Field Values

NEPTUNE

public static final int NEPTUNE
See Also:
Constant Field Values

PLUTO

public static final int PLUTO
See Also:
Constant Field Values

SUN

public static final int SUN
See Also:
Constant Field Values

MOON

public static final int MOON
See Also:
Constant Field Values

OBJX

public static final int OBJX
See Also:
Constant Field Values

OBJY

public static final int OBJY
See Also:
Constant Field Values

OBJZ

public static final int OBJZ
See Also:
Constant Field Values

NOBJ

public static final int NOBJ
See Also:
Constant Field Values

MJD0

public static final double MJD0
See Also:
Constant Field Values

J2000

public static final double J2000
See Also:
Constant Field Values

DATE_YMD

public static final int DATE_YMD
See Also:
Constant Field Values

DATE_MDY

public static final int DATE_MDY
See Also:
Constant Field Values

DATE_DMY

public static final int DATE_DMY
See Also:
Constant Field Values

DATE_UTCTZ

public static final int DATE_UTCTZ
See Also:
Constant Field Values

DATE_LOCALTZ

public static final int DATE_LOCALTZ
See Also:
Constant Field Values

aaha_aux_last_lat

private static double aaha_aux_last_lat

aaha_aux_slat

private static double aaha_aux_slat

aaha_aux_clat

private static double aaha_aux_clat

last_mjd

static double last_mjd

last_dy

static double last_dy

last_mn

static int last_mn

last_yr

static int last_yr

dpm

static short[] dpm

gst_utc_lastmjd

static double gst_utc_lastmjd

gst_utc_t0

static double gst_utc_t0

utc_gst_lastmjd

static double utc_gst_lastmjd

utc_gst_t0

static double utc_gst_t0
Constructor Detail

Astro32

public Astro32()
Method Detail

aa_hadec

public static void aa_hadec(double lat,
                            double alt,
                            double az,
                            utilities.DoubleRef ha,
                            utilities.DoubleRef dec)
given geodetic latitude (n+, radians), lat, altitude (up+, radians), alt, and azimuth (angle round to the east from north+, radians), return hour angle (radians), ha, and declination (radians), dec. Creation date: (8/29/01 7:30:57 PM)

Parameters:
lat - double
alt - double
az - double
ha - utilities.DoubleRef
dec - utilities.DoubleRef

aaha_aux

public static void aaha_aux(double lat,
                            double x,
                            double y,
                            utilities.DoubleRef p,
                            utilities.DoubleRef q)
Insert the method's description here. Creation date: (8/29/01 7:38:41 PM)

Parameters:
lat - double
x - double
y - double
p - utilities.DoubleRef
q - utilities.DoubleRef

cal_mjd

public static void cal_mjd(int mn,
                           double dy,
                           int yr,
                           utilities.DoubleRef mjd)
given a date in months, mn, days, dy, years, yr, return the modified Julian date (number of days elapsed since 1900 jan 0.5), *mjd. Creation date: (8/18/01 4:31:37 PM)


deghr

public static double deghr(double x)
conversions among hours (of ra), degrees and radians Creation date: (8/19/01 4:26:06 PM)

Parameters:
x - double
Returns:
double

degrad

public static double degrad(double x)
conversions among hours (of ra) or degrees and radians Creation date: (8/19/01 4:21:00 PM)

Parameters:
x - double
Returns:
double

dst

public static boolean dst()
Determines whether we are currently in Daylight Savings Time Creation date: (8/18/01 3:34:09 PM)

Returns:
boolean

fmt_mjd

public static java.lang.String fmt_mjd(double mjd,
                                       int pref)
put the given modified Julian date, mjd, in out[] according to preference format. Creation date: (8/18/01 4:05:33 PM)

Parameters:
pref - int

get_mjd

public static double get_mjd(int year,
                             int month,
                             int day,
                             int hour,
                             int minute,
                             int second,
                             java.util.TimeZone tz)
Return the Modified Julian Date (mjd) for a given date t is seconds since 00:00:00 1/1/1970 UTC on UNIX systems; mjd was 25567.5 then. Creation date: (8/18/01 3:43:49 PM)

Returns:
double

gmst0

public static double gmst0(double mjd)
gmst0() - return Greenwich Mean Sidereal Time at 0h UT; stern Creation date: (8/19/01 8:14:01 PM)

Parameters:
mjd - double
Returns:
double

gst_utc

public static void gst_utc(double mjd,
                           double gst,
                           utilities.DoubleRef utc)
given a modified julian date, mjd, and a greenwich mean siderial time, gst, return UTC. N.B. mjd must be at the beginning of the day. Creation date: (8/19/01 8:07:02 PM)

Parameters:
mjd - double
gst - double
utc - utilities.DoubleRef

hadec_aa

public static void hadec_aa(double lat,
                            double ha,
                            double dec,
                            utilities.DoubleRef alt,
                            utilities.DoubleRef az)
given geodetic latitude (n+, radians), lat, hour angle (radians), ha, and declination (radians), dec, return altitude (up+, radians), alt, and azimuth (angle round to the east from north+, radians), Creation date: (8/29/01 7:26:11 PM)

Parameters:
lat - double
ha - double
dec - double
alt - utilities.DoubleRef
az - utilities.DoubleRef

hrdeg

public static double hrdeg(double x)
conversions among hours (of ra), degrees and radians Creation date: (8/19/01 4:24:23 PM)

Parameters:
x - double
Returns:
double

hrrad

public static double hrrad(double x)
conversions among hours (of ra), degrees and radians Creation date: (8/19/01 4:31:14 PM)

Parameters:
x - double
Returns:
double

mjd_2000

public static double mjd_2000()
Insert the method's description here. Creation date: (8/19/01 4:46:34 PM)

Returns:
double

mjd_cal

public static void mjd_cal(double mjd,
                           utilities.IntegerRef mn,
                           utilities.DoubleRef dy,
                           utilities.IntegerRef yr)
given the modified Julian date (number of days elapsed since 1900 jan 0.5,), mjd, return the calendar date in months, *mn, days, *dy, and years, *yr. Creation date: (8/18/01 4:57:39 PM)


mjd_day

public static double mjd_day(double jd)
given an mjd, truncate it to the beginning of the whole day Creation date: (8/19/01 4:41:52 PM)

Parameters:
jd - double
Returns:
double

mjd_dow

public static int mjd_dow(double mjd,
                          utilities.IntegerRef dow)
given an mjd, set *dow to 0..6 according to which day of the week it falls on (0=sunday). return 0 if ok else -1 if can't figure it out. Creation date: (8/18/01 5:34:47 PM)

Returns:
int

mjd_dpm

public static int mjd_dpm(double mjd)
given a mjd, return the the number of days in the month. Creation date: (8/18/01 5:42:09 PM)

Returns:
int

mjd_hr

public static double mjd_hr(double jd)
given an mjd, return the number of hours past midnight of the whole day Creation date: (8/19/01 4:44:18 PM)

Parameters:
jd - double
Returns:
double

mjd_year

public static double mjd_year(double mjd)
given a mjd, return the year as a double. Creation date: (8/19/01 3:35:52 PM)

Parameters:
mjd - double
Returns:
double

mjd0

public static double mjd0()
Insert the method's description here. Creation date: (8/18/01 3:35:23 PM)

Returns:
double

mjd2000

public static double mjd2000()
Insert the method's description here. Creation date: (8/18/01 3:36:10 PM)

Returns:
double

now_lst

public static double now_lst(double lng)
Return the Local Apparent Sidereal Time, hours, given the longitude, lng. - is West WARNING - Astro32:now_lst is not yet compensating for obliquity and nutation Creation date: (8/13/01 9:58:58 PM)

Parameters:
lng - double The longitude in radians
Returns:
double

now_mjd

public static double now_mjd()
Return the Modified Julian Date (mjd) from the system clock t is seconds since 00:00:00 1/1/1970 UTC on UNIX systems; mjd was 25567.5 then. Creation date: (8/18/01 3:43:49 PM)

Returns:
double

nutation

public static void nutation(double mjd,
                            utilities.DoubleRef deps,
                            utilities.DoubleRef dpsi)
Given the Julian Day (measured in Julian centuries from the Epoch J2000), Calculates two values and returns them - nutation in longitude and nutation in obliquity.. Creation date: (1/30/02 7:53:33 PM)

Parameters:
mjd - double
deps - utilities.DoubleRef nutation in obliquity
dpsi - utilities.DoubleRef nutation in longitude

obliquity

public static void obliquity(double mjd,
                             utilities.DoubleRef eps)
Insert the method's description here. Creation date: (1/30/02 7:51:14 PM)

Parameters:
mjd - double
eps - utilities.DoubleRef

raddeg

public static double raddeg(double x)
conversions among hours (of ra), degrees and radians Creation date: (8/19/01 4:22:33 PM)

Parameters:
x - double
Returns:
double

radhr

public static double radhr(double x)
conversions among hours (of ra), degrees and radians Creation date: (8/19/01 4:32:29 PM)

Parameters:
x - double
Returns:
double

range

public static double range(double v,
                           double r)
insure 0 <= *v < r. Creation date: (8/19/01 4:48:43 PM)

Parameters:
v - java.lang.Double value
r - double range

range

public static void range(utilities.DoubleRef v,
                         double r)
insure 0 <= *v < r. Creation date: (8/19/01 4:48:43 PM)

Parameters:
v - java.lang.DoubleRef value
r - double range

rnd_second

public static void rnd_second(utilities.DoubleRef t)
round a time in days, *t, to the nearest second, IN PLACE. Creation date: (8/19/01 4:00:51 PM)

Parameters:
t - java.lang.Double

solve_sphere

public static void solve_sphere(double A,
                                double b,
                                double cc,
                                double sc,
                                utilities.DoubleRef cap)
solve a spherical triangle: A / \ / \ c / \ b / \ / \ B ____________ C a given A, b, c find B and a in range 0..B..2PI and 0..a..PI, respectively.. Bp may be NULL if not interested in B. N.B. we pass in cos(c) and sin(c) because in many problems one of the sides remains constant for many values of A and b. Creation date: (8/29/01 7:52:15 PM)

Parameters:
A - double
b - double
cc - double
sc - double
cap - utilities.DoubleRef

solve_sphere

public static void solve_sphere(double A,
                                double b,
                                double cc,
                                double sc,
                                utilities.DoubleRef cap,
                                utilities.DoubleRef Bp)
solve a spherical triangle: A / \ / \ c / \ b / \ / \ B ____________ C a given A, b, c find B and a in range 0..B..2PI and 0..a..PI, respectively.. Bp may be NULL if not interested in B. N.B. we pass in cos(c) and sin(c) because in many problems one of the sides remains constant for many values of A and b. Creation date: (8/29/01 7:52:15 PM)

Parameters:
A - double
b - double
cc - double
sc - double
cap - utilities.DoubleRef
Bp - utilities.DoubleRef

time

public static long time()
The time function returns the number of seconds elapsed since midnight (00:00:00), January 1, 1970, Universal Coordinated Time, according to the system clock. The system time is adjusted according to the _timezone system variable, which is explained under _tzset. Return Value The time function returns the time in elapsed seconds. There is no error return. Creation date: (8/22/01 8:37:21 PM)


time

public static long time(int year,
                        int month,
                        int day,
                        int hour,
                        int minute,
                        int second,
                        java.util.TimeZone tz)
The time function returns the number of seconds elapsed since midnight (00:00:00), January 1, 1970, Universal Coordinated Time, according to the system clock. The system time is adjusted according to the _timezone system variable, which is explained under _tzset. Return Value The time function returns the time in elapsed seconds. There is no error return. Creation date: (8/22/01 8:37:21 PM)


tz_name

public static long tz_name(utilities.StringRef buf,
                           int tzpref)
fill buf() with a timezone name, depending on tzpref, which can be: DATE_UTCTZ: UTC DATE_LOCALTZ Local timezone name Creation date: (8/18/01 4:03:00 PM)

Parameters:
buf - char[]
tzpref - int
Returns:
long

utc_gst

public static void utc_gst(double mjd,
                           double utc,
                           utilities.DoubleRef gst)
given a modified julian date, mjd, and UTC return greenwich mean siderial time, *gst. N.B. mjd must be at the beginning of the day! Creation date: (8/19/01 8:00:52 PM)

Parameters:
mjd - double
utc - double
gst - utilities.DoubleRef

year_mjd

public static double year_mjd(double y)
given a decimal year, return mjd Creation date: (8/19/01 3:50:25 PM)

Parameters:
y - double
Returns:
double