HiRISE

HiRISE.HiPlan.SPICE
Class Time_Utilities

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

public class Time_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.

Most of these methods require at least a leapseconds kernel (LSK) and a spacecraft clock kernel (SCLK) to be loaded into the SPICE system prior to their invocation. These kernels may be loaded via Kernel_Utilities, SPICE_Menu, or JSpice.furnshc(StringBuffer), or they may be loaded via the instantiation of an MttLayer. If the kernel pool does not contain the required kernels, these methods will throw SPICE_Exceptions.

Version:
1.15
Author:
Christian Schaller - UA/PIRL

Nested Class Summary
static class Time_Utilities.LineTimeAssay
          A HiRISE line time and a list of messages that arose during its calculation.
 
Field Summary
static double DEFAULT_LINE_TIME
          The default line time in microseconds.
static String ID
          Class identification name with source code version and date.
 
Method Summary
static Time_Utilities.LineTimeAssay computeLineTime(Observation_Record observation)
          Computes the line time for a given observation.
static double ephemeris_time(Date scet)
          Converts the given time text into a SPICE ephemeris time.
static double ephemeris_time(String scet)
          Converts the given SCET text into a SPICE ephemeris time.
static double line_time(Date time, double roll_angle)
          Computes the line time for the observation given the time of the observation and the spacecraft roll angle.
static double line_time(Date time, double roll_angle, double elevation)
          Computes the line time for the observation given the time of the observation, the spacecraft roll angle, and the elevation of the target point.
static double line_time(double et, double roll_angle)
          Computes the line time for the observation given the ephemeris time of the observation and the spacecraft roll angle.
static double line_time(double et, double roll_angle, double elevation)
          Computes the line time for the observation given the ephemeris time of the observation, the spacecraft roll angle, and the elevation of the target point.
static double line_time(String time, double roll_angle)
          Computes the line time for the observation given the ephemeris time of the observation and the spacecraft roll angle.
static double line_time(String time, double roll_angle, double elevation)
          Computes the line time for the observation given the ephemeris time of the observation, the spacecraft roll angle, and the elevation of the target point.
 
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

DEFAULT_LINE_TIME

public static final double DEFAULT_LINE_TIME
The default line time in microseconds.

See Also:
Constant Field Values
Method Detail

ephemeris_time

public static double ephemeris_time(String scet)
                             throws SPICE_Exception
Converts the given SCET text into a SPICE ephemeris time. A leapseconds kernel is required for the conversion.

Parameters:
scet - the SCET text.
Returns:
the converted time.
Throws:
SPICE_Exception - if there is a problem converting the time.

ephemeris_time

public static double ephemeris_time(Date scet)
                             throws SPICE_Exception
Converts the given time text into a SPICE ephemeris time. A leapseconds kernel is required for the conversion.

Parameters:
scet - the SCET.
Returns:
the converted time.
Throws:
SPICE_Exception - if there is a problem converting the time.

line_time

public static double line_time(double et,
                               double roll_angle,
                               double elevation)
                        throws SPICE_Exception
Computes the line time for the observation given the ephemeris time of the observation, the spacecraft roll angle, and the elevation of the target point. The line time is calculated to the nearest HiRISE clock tick, Instrument.DELTA_LINE_TIME_TICK_NANOS.

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.

The current algorithm for calculating ground speed, which is needed to calculate line time, finds the point on the surface of Mars at which HiRISE is pointed at time et. It then finds the point at a time delta t later (0.05 seconds). The difference between the two, divided by the time difference, yields an approximation for ground speed.

Note: Line time is also known as scan exposure duration.

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

line_time

public static double line_time(double et,
                               double roll_angle)
                        throws SPICE_Exception
Computes the line time for the observation given the ephemeris time of the observation and the spacecraft roll angle. An elevation of 0 km is assumed for the target point. The line time is calculated to the nearest HiRISE clock tick, Instrument.DELTA_LINE_TIME_TICK_NANOS.

Note: Line time is also known as scan exposure duration.

Parameters:
et - the ephemeris time of the center point of the observation.
roll_angle - the spacecraft roll angle for the observation, in degrees.
Returns:
the line time in microseconds.
Throws:
SPICE_Exception - if there is a problem computing the line time.
See Also:
line_time(double,double,double)

line_time

public static double line_time(String time,
                               double roll_angle,
                               double elevation)
                        throws SPICE_Exception
Computes the line time for the observation given the ephemeris time of the observation, the spacecraft roll angle, and the elevation of the target point. The line time is calculated to the nearest HiRISE clock tick, Instrument.DELTA_LINE_TIME_TICK_NANOS.

Note: Line time is also known as scan exposure duration.

Parameters:
time - the ephemeris time text of the center point of the observation.
roll_angle - the spacecraft roll angle for the observation, in degrees.
elevation - the elevation of the center point of the observation target in km.
Returns:
the line time in microseconds.
Throws:
SPICE_Exception - if there is a problem computing the line time or if the time text cannot be parsed.
See Also:
line_time(double,double,double)

line_time

public static double line_time(String time,
                               double roll_angle)
                        throws SPICE_Exception
Computes the line time for the observation given the ephemeris time of the observation and the spacecraft roll angle. An elevation of 0 km is assumed for the target point. The line time is calculated to the nearest HiRISE clock tick, Instrument.DELTA_LINE_TIME_TICK_NANOS.

Note: Line time is also known as scan exposure duration.

Parameters:
time - the ephemeris time text of the center point of the observation.
roll_angle - the spacecraft roll angle for the observation, in degrees.
Returns:
the line time in microseconds.
Throws:
SPICE_Exception - if there is a problem computing the line time or if the time text cannot be parsed.
See Also:
line_time(double,double,double)

line_time

public static double line_time(Date time,
                               double roll_angle,
                               double elevation)
                        throws SPICE_Exception
Computes the line time for the observation given the time of the observation, the spacecraft roll angle, and the elevation of the target point. The line time is calculated to the nearest HiRISE clock tick, Instrument.DELTA_LINE_TIME_TICK_NANOS.

Note: Line time is also known as scan exposure duration.

Parameters:
time - the time of the center point of the observation.
roll_angle - the spacecraft roll angle for the observation, in degrees.
elevation - the elevation of the center point of the observation target in km.
Returns:
the line time in microseconds.
Throws:
SPICE_Exception - if there is a problem computing the line time or if the time text cannot be parsed.
See Also:
line_time(double,double,double)

line_time

public static double line_time(Date time,
                               double roll_angle)
                        throws SPICE_Exception
Computes the line time for the observation given the time of the observation and the spacecraft roll angle. An elevation of 0 km is assumed for the target point. The line time is calculated to the nearest HiRISE clock tick, Instrument.DELTA_LINE_TIME_TICK_NANOS.

Note: Line time is also known as scan exposure duration.

Parameters:
time - the time of the center point of the observation.
roll_angle - the spacecraft roll angle for the observation, in degrees.
Returns:
the line time in microseconds.
Throws:
SPICE_Exception - if there is a problem computing the line time or if the time text cannot be parsed.
See Also:
line_time(double,double,double)

computeLineTime

public static Time_Utilities.LineTimeAssay computeLineTime(Observation_Record observation)
Computes the line time for a given observation.

If the observation uses manual delay, its predict time is offset appropriately based on the delay duration. Otherwise, the predict time is used directly. Note that if the predict time is null, the resulting line time is also null, regardless of the delay settings.

The offset center altitude of the target site is used, if non-null; otherwise the altitude is used. If both altitudes are null, an altitude of 0 km is assumed.

The roll angle is used directly; if null, the roll angle is assumed to be 0.

Parameters:
observation - the observation for which line time is to be computed; may not be null, although its relevant parameters may be.
Returns:
an line time assay, including the line time if possible.

HiRISE

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