HiRISE

HiRISE.HiPlan.SPICE
Class Distance_Utilities

java.lang.Object
  extended by HiRISE.HiPlan.SPICE.Distance_Utilities

public class Distance_Utilities
extends Object

A utility class for manipulating and calculating HiRISE-related times. This class uses the NAIF SPICE toolkit via the ASU-developed JSPICE system.

Version:
1.8
Author:
Christian Schaller - UA/PIRL

Field Summary
static String ID
          Class identification name with source code version and date.
static double LIGHT_SECOND
          A light-second in astronomical units.
 
Method Summary
static double altitude(double et)
          Gets the altitude of the spacecraft above Mars given the ephemeris time of the observation.
static double altitude(double et, double elevation)
          Gets the altitude of the spacecraft above Mars given the ephemeris time of the observation and the elevation of the point below.
static double altitude(String time)
          Gets the altitude of the spacecraft above Mars given the ephemeris time of the observation.
static double altitude(String time, double elevation)
          Gets the altitude of the spacecraft above Mars given the ephemeris time of the observation and the elevation of the point below.
static double getGeocentricDistance(double et)
          Gets the geocentric distance for Mars at the given ephemeris time.
static double getGeocentricDistance(String time)
          Gets the geocentric distance for Mars at the given ephemeris time.
static double getHeliocentricDistance(double et)
          Gets the heliocentric distance for Mars at the given ephemeris time.
static double getHeliocentricDistance(String time)
          Gets the heliocentric distance for Mars at the given ephemeris time.
static double getOwlt(double et)
          Gets the one-way light time between Earth and Mars at the given ephemeris time.
static double getOwltFromDistance(double au)
          Gets the amount of time it takes for light to travel the indicated number of astronomical units.
static double target_distance(double et, double roll_angle)
          Gets the distance from the spacecraft to the observation target on the surface of Mars.
static double target_distance(double et, double roll_angle, double elevation)
          Gets the distance from the spacecraft to the observation target on the surface of Mars.
static double target_distance(String time, double roll_angle)
          Gets the distance from the spacecraft to the observation target on the surface of Mars.
static double target_distance(String time, double roll_angle, double elevation)
          Gets the distance from the spacecraft to the observation target on the surface of Mars.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
Class identification name with source code version and date.

See Also:
Constant Field Values

LIGHT_SECOND

public static final double LIGHT_SECOND
A light-second in astronomical units. This is the distance in AU that light travels in a second in a vacuum.

See Also:
Constant Field Values
Method Detail

target_distance

public static double target_distance(double et,
                                     double roll_angle,
                                     double elevation)
                              throws SPICE_Exception
Gets the distance from the spacecraft to the observation target on the surface of Mars. The ephemeris time of the observation, the spacecraft roll angle, and the elevation of the target point are required.

At present, this method uses the JS utilities from the ASU package. These utilities have some overhead unnecessary to the strict computation of line time for HiRISE: they use the JMARS configuration system and the JMARS logging system.

Parameters:
et - the ephemeris time of the center point of the observation.
roll_angle - the spacecraft roll angle for the observation.
elevation - the elevation of the center point of the observation target in km.
Returns:
the distance to the target in km.
Throws:
SPICE_Exception - if there is a problem computing the distance.

target_distance

public static double target_distance(double et,
                                     double roll_angle)
                              throws SPICE_Exception
Gets the distance from the spacecraft to the observation target on the surface of Mars. The ephemeris time of the observation and the spacecraft roll angle are requried. An elevation of 0 km is assumed.

Parameters:
et - the ephemeris time of the center point of the observation.
roll_angle - the spacecraft roll angle for the observation.
Returns:
the distance to the target in km.
Throws:
SPICE_Exception - if there is a problem computing the distance.
See Also:
target_distance(double,double,double)

target_distance

public static double target_distance(String time,
                                     double roll_angle,
                                     double elevation)
                              throws SPICE_Exception
Gets the distance from the spacecraft to the observation target on the surface of Mars. The ephemeris time of the observation, the spacecraft roll angle, and the elevation of the target point are required.

Parameters:
time - the ephemeris time text of the center point of the observation.
roll_angle - the spacecraft roll angle for the observation.
elevation - the elevation of the center point of the observation target in km.
Returns:
the distance to the target in km.
Throws:
SPICE_Exception - if there is a problem computing the distance.
See Also:
target_distance(double,double,double)

target_distance

public static double target_distance(String time,
                                     double roll_angle)
                              throws SPICE_Exception
Gets the distance from the spacecraft to the observation target on the surface of Mars. The ephemeris time of the observation and the spacecraft roll angle are requried. An elevation of 0 km is assumed.

Parameters:
time - the ephemeris time text of the center point of the observation.
roll_angle - the spacecraft roll angle for the observation.
Returns:
the distance to the target in km.
Throws:
SPICE_Exception - if there is a problem computing the distance.
See Also:
target_distance(double,double,double)

altitude

public static double altitude(double et,
                              double elevation)
                       throws SPICE_Exception
Gets the altitude of the spacecraft above Mars given the ephemeris time of the observation and the elevation of the point below. This result is the same as target_distance(double, double, double) when roll_angle is 0 degrees.

Parameters:
et - the ephemeris time of the center point of the observation.
elevation - the elevation of the center point of the observation target in km.
Returns:
the spacecraft altitude in km.
Throws:
SPICE_Exception - if there is a problem computing the altitude.
See Also:
target_distance(double,double,double)

altitude

public static double altitude(double et)
                       throws SPICE_Exception
Gets the altitude of the spacecraft above Mars given the ephemeris time of the observation. An elevation of 0 km is assumed. This result is the same as target_distance(double, double, double) when roll_angle is 0 degrees.

Parameters:
et - the ephemeris time of the center point of the observation.
Returns:
the spacecraft altitude in km.
Throws:
SPICE_Exception - if there is a problem computing the altitude.
See Also:
target_distance(double,double,double)

altitude

public static double altitude(String time,
                              double elevation)
                       throws SPICE_Exception
Gets the altitude of the spacecraft above Mars given the ephemeris time of the observation and the elevation of the point below. This result is the same as target_distance(double, double, double) when roll_angle is 0 degrees.

Parameters:
time - the ephemeris time text of the center point of the observation.
elevation - the elevation of the center point of the observation target in km.
Returns:
the spacecraft altitude in km.
Throws:
SPICE_Exception - if there is a problem computing the altitude.
See Also:
target_distance(double,double,double)

altitude

public static double altitude(String time)
                       throws SPICE_Exception
Gets the altitude of the spacecraft above Mars given the ephemeris time of the observation. An elevation of 0 km is assumed. This result is the same as target_distance(double, double, double) when roll_angle is 0 degrees.

Parameters:
time - the ephemeris time text of the center point of the observation.
Returns:
the spacecraft altitude in km.
Throws:
SPICE_Exception - if there is a problem computing the altitude.
See Also:
target_distance(double,double,double)

getHeliocentricDistance

public static double getHeliocentricDistance(double et)
                                      throws SPICE_Exception
Gets the heliocentric distance for Mars at the given ephemeris time. The distance is given in astronomical units.

Parameters:
et - the ephemeris time for the heliocentric distance.
Returns:
the heliocentric distance for Mars in AU.
Throws:
SPICE_Exception - if there is a problem computing the distance.

getHeliocentricDistance

public static double getHeliocentricDistance(String time)
                                      throws SPICE_Exception
Gets the heliocentric distance for Mars at the given ephemeris time. The distance is given in astronomical units.

Parameters:
time - the ephemeris time text for the heliocentric distance.
Returns:
the heliocentric distance for Mars in AU.
Throws:
SPICE_Exception - if there is a problem computing the distance or if the time text cannot be parsed.

getGeocentricDistance

public static double getGeocentricDistance(double et)
                                    throws SPICE_Exception
Gets the geocentric distance for Mars at the given ephemeris time. The distance is given in astronomical units.

Parameters:
et - the ephemeris time for the geocentric distance.
Returns:
the geocentric distance for Mars in AU.
Throws:
SPICE_Exception - if there is a problem computing the distance.

getGeocentricDistance

public static double getGeocentricDistance(String time)
                                    throws SPICE_Exception
Gets the geocentric distance for Mars at the given ephemeris time. The distance is given in astronomical units.

Parameters:
time - the ephemeris time text for the geocentric distance.
Returns:
the geocentric distance for Mars in AU.
Throws:
SPICE_Exception - if there is a problem computing the distance or if the time text cannot be parsed.

getOwlt

public static double getOwlt(double et)
                      throws SPICE_Exception
Gets the one-way light time between Earth and Mars at the given ephemeris time. The time is given in seconds.

Parameters:
et - the ephemeris time.
Returns:
the one-way light time in seconds.
Throws:
SPICE_Exception - if there is a problem computing the OWLT.

getOwltFromDistance

public static double getOwltFromDistance(double au)
Gets the amount of time it takes for light to travel the indicated number of astronomical units. A light-second is 0.00200399 AU. This function is similar to getOwlt(double), except it does not use SPICE and can be used with any distance in AU.

Parameters:
au - the distance in AU.
Returns:
the one-way light time in seconds.

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona