jsky.util
Class SkyCalc

java.lang.Object
  extended by jsky.util.SkyCalc

public class SkyCalc
extends java.lang.Object

Uses a collection of utility routines ported from skycalc.v5.c (original C code by John Thorstensen, Dartmouth College) to calculate the altitude, azimuth, airmass, and parallactic angle for a given object, date, and site.


Field Summary
static java.util.TimeZone UT
          UT TimeZone
 
Constructor Summary
SkyCalc(SiteDesc site)
          Initialize for the given telescope site.
 
Method Summary
 void calculate(WorldCoords obj, java.util.Date date)
          Given the WCS position of an object, the time/date, and a description of the telescope location, calculate the altitude of the object above the horizon, the azimuth, parallactic angle and airmass for the given time.
 double getAirmass()
          Returns the airmass calculated in the last call to calculate(WorldCoords, Date)
static double getAirmass(double alt)
          Return the airmass for the given altitude in degrees.
 double getAltitude()
          Returns the altitude in degrees calculated in the last call to calculate(WorldCoords, Date)
 double getAzimuth()
          Returns the azimuth calculated in the last call to calculate(WorldCoords, Date)
 java.util.Date getLst(java.util.Date date)
          Return the LST time for the given UT time at the given site.
 double getParallacticAngle()
          Returns the parallactic angle in degrees calculated in the last call to calculate(WorldCoords, Date)
static void main(java.lang.String[] args)
          Test main.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UT

public static final java.util.TimeZone UT
UT TimeZone

Constructor Detail

SkyCalc

public SkyCalc(SiteDesc site)
Initialize for the given telescope site.

Parameters:
site - describes the location of the telescope
Method Detail

calculate

public void calculate(WorldCoords obj,
                      java.util.Date date)
Given the WCS position of an object, the time/date, and a description of the telescope location, calculate the altitude of the object above the horizon, the azimuth, parallactic angle and airmass for the given time. The results are available via properties of this class.

Parameters:
obj - a world coordinates position of an object
date - the date for the calculation

getLst

public java.util.Date getLst(java.util.Date date)
Return the LST time for the given UT time at the given site.


getAirmass

public static double getAirmass(double alt)
Return the airmass for the given altitude in degrees.


getAltitude

public double getAltitude()
Returns the altitude in degrees calculated in the last call to calculate(WorldCoords, Date)


getAzimuth

public double getAzimuth()
Returns the azimuth calculated in the last call to calculate(WorldCoords, Date)


getParallacticAngle

public double getParallacticAngle()
Returns the parallactic angle in degrees calculated in the last call to calculate(WorldCoords, Date)


getAirmass

public double getAirmass()
Returns the airmass calculated in the last call to calculate(WorldCoords, Date)


main

public static void main(java.lang.String[] args)
Test main.