Terrenus HRPT v2.2

terrenus.orbit
Class SpacecraftLocator

java.lang.Object
  extended by terrenus.orbit.SpacecraftLocator

public class SpacecraftLocator
extends java.lang.Object

The SpacecraftLocator class models a spacecraft position and velocity relative to a WGS 72 earth model.


Constructor Summary
SpacecraftLocator(int id, java.util.Date date)
          Creates a new spacecraft using its NORAD orbital element ID.
SpacecraftLocator(java.lang.String line1, java.lang.String line2)
          Creates a new spacecraft from a set of two-line orbital elements.
 
Method Summary
 java.util.Date getEpoch()
          Gets the orbital element epoch used to initialize this locator.
 double getHourAngle()
          Gets the Greenwich hour angle.
 double[] getPosition(double[] output)
          Gets the position of the spacecraft in earth-centered inertial coordinates.
 double[] getVelocity(double[] output)
          Gets the velocity of the spacecraft in earth-centered inertial coordinates.
 boolean isWithinTolerance(java.util.Date date)
          Determines if a date is within tolerance based on the orbtial element epoch used to create this locator.
 void setDate(java.util.Date date)
          Sets the date object and performs the spacecraft position and velocity computation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpacecraftLocator

public SpacecraftLocator(java.lang.String line1,
                         java.lang.String line2)
Creates a new spacecraft from a set of two-line orbital elements.

Parameters:
line1 - two-line orbital element line 1.
line2 - two-line orbital element line 2.

SpacecraftLocator

public SpacecraftLocator(int id,
                         java.util.Date date)
Creates a new spacecraft using its NORAD orbital element ID.

Parameters:
id - the NORAD orbital element ID.
date - the date for orbital element retrieval.
Method Detail

getEpoch

public java.util.Date getEpoch()
Gets the orbital element epoch used to initialize this locator.


isWithinTolerance

public boolean isWithinTolerance(java.util.Date date)
Determines if a date is within tolerance based on the orbtial element epoch used to create this locator.

Parameters:
date - the date to check.
Returns:
true if the date is within tolerance or false if not.

getHourAngle

public double getHourAngle()
Gets the Greenwich hour angle.

Returns:
the Greenwich hour angle in radians.

setDate

public void setDate(java.util.Date date)
Sets the date object and performs the spacecraft position and velocity computation. This method must be called prior to using getPosition(double[]) or getVelocity(double[]).

Parameters:
date - the date for the spacecraft computations.

getPosition

public double[] getPosition(double[] output)
Gets the position of the spacecraft in earth-centered inertial coordinates.

Parameters:
output - the output position array to fill. If null, an output array is created.
Returns:
the output position array as [x,y,z] in kilometers.

getVelocity

public double[] getVelocity(double[] output)
Gets the velocity of the spacecraft in earth-centered inertial coordinates.

Parameters:
output - the output velocity array to fill. If null, an output array is created.
Returns:
the output velocity array as [x,y,z] in kilometers/second.

Terrenus HRPT v2.2