driver.ted.astro
Class T_LunarCoords

java.lang.Object
  extended by driver.ted.astro.T_LunarCoords
All Implemented Interfaces:
java.io.Serializable

public class T_LunarCoords
extends java.lang.Object
implements java.io.Serializable

Title: T_LunarCoords Description: This file implements the T_LunarCoords class Copyright: (c) 2002 - 2006

Version:
1.3 Change from version 1.2: Now determine k differently...use the full jd instead of defining mid points for a given month. Change from version 1.1: Added code to determine the moon phase dates for new, first quarter, full and last quarter
Author:
Ted Driver
See Also:
Serialized Form

Field Summary
static int FIRST_QUARTER
          First Quarter identifier
static int FULL_MOON
          Full moon identifier
static int LAST_QUARTER
          Last quarter identifier
static int NEW_MOON
          New Moon identifier
 
Constructor Summary
T_LunarCoords()
          Constructor: initializes with current system time
T_LunarCoords(T_JulianDate J)
          Constructor: initializes with time defined by T_JulianDate object
 
Method Summary
 double getAlpha()
          Returns the apparent Right Ascension of the moon at the given time
 double getDelta()
          Return the apparent Declination
 double getEquatorialParallax()
          Returns the Moon's equatorial Parallax in Radians
 double getIllumination(T_JulianDate J)
          Public function to return a value between 0 and 1 representing the percent of the lit moon's face facing Earth.
 double getPhase(T_JulianDate today, double offset, int phaseType)
          Returns the time of the specified phase, including the specified time offset
static void main(java.lang.String[] args)
          Test program
 void setDateTime(T_JulianDate J)
          Sets the date and time for this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEW_MOON

public static final int NEW_MOON
New Moon identifier

See Also:
Constant Field Values

FIRST_QUARTER

public static final int FIRST_QUARTER
First Quarter identifier

See Also:
Constant Field Values

FULL_MOON

public static final int FULL_MOON
Full moon identifier

See Also:
Constant Field Values

LAST_QUARTER

public static final int LAST_QUARTER
Last quarter identifier

See Also:
Constant Field Values
Constructor Detail

T_LunarCoords

public T_LunarCoords()
Constructor: initializes with current system time


T_LunarCoords

public T_LunarCoords(T_JulianDate J)
Constructor: initializes with time defined by T_JulianDate object

Parameters:
J - The T_JulianDate object defining the time
Method Detail

setDateTime

public void setDateTime(T_JulianDate J)
Sets the date and time for this object

Parameters:
J - T_JulianDate object defining the new time.

getIllumination

public double getIllumination(T_JulianDate J)
Public function to return a value between 0 and 1 representing the percent of the lit moon's face facing Earth. The value 0 represents a new Moon, or 0% lit, and 1 represents a Full Moon or 100% lit.

Parameters:
J - The T_JulianDate to use for the calculation
Returns:
A double value between 0 and 1

main

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

Parameters:
args - args

getAlpha

public double getAlpha()
Returns the apparent Right Ascension of the moon at the given time

Returns:
Apparent Right Ascension

getDelta

public double getDelta()
Return the apparent Declination

Returns:
Apparent Declination

getEquatorialParallax

public double getEquatorialParallax()
Returns the Moon's equatorial Parallax in Radians

Returns:
equatorial parallax (radians)

getPhase

public double getPhase(T_JulianDate today,
                       double offset,
                       int phaseType)
Returns the time of the specified phase, including the specified time offset

Parameters:
today - The T_JulianDate object specifying the time
offset - The time offset in hours
phaseType - The type of phase requested - use one of the predefined objects in the class.
Returns:
Returns the Julian Date of the specified phase