public static final class MroObservation.OrbitalData
extends java.lang.Object
Instances of the orbital data are obtained via one of the findData
methods, each of which requires a Target
site and an estimate of a
time at which the target site can be observed. These methods compute the
geometry necessary to view the target using on a cross-track roll only,
generating the ephemeris time of the observation and the roll angle such
that the target is observed in a plane perpendicular to the orbit vector,
within the allowable roll limit of 30°. If the target cannot be observed
within that estimate of time, the methods return a null orbital
data model.
In each case, the targeting algorithm uses the JPL NAIF SPICE library to compute the data. The SPICE kernel pool must therefore be loaded with the necessary leap second kernel, spacecraft clock kernel, planetary (target) and spacecraft (observer) ephemeris kernels, and planetary constants kernels. The means by which the kernel pool is managed is not generally important.
The preferred method is findData(Target,int)
, which takes a
candidate orbit number as the estimate of time. To use this method, the MTT
(Mars Target Tool) data layer (MttLayer
) must be instantiated with
an MRO state file. Doing so loads the kernel pool with the state file's
kernels, and it adds the contents of the state file's OPTG (orbit
propagation, timing, and geometry) to the static data layer's OPTG set. The
OPTG is the means by which an ephemeris time estimate is obtained from the
simple orbit number; this method thus ensures that the orbit number is tied
to the ephemeris time, which is not true of the other findData
methods.
For example, to get the orbital data for an observation of a target called aramChaos on orbit 13071 using the state file state_066b01_1_long_v3.nk, use the following code:
MttLayer mtt = new MttLayer ("state_066b01_1_long_v3.nk"); MroObservation.OrbitalData data1 = MroObservation.OrbitalData.findData ( aramChaos, 13071 );
Note that the MTT data layer is not directly needed; the instantiation is the only means of adding the OPTG to the static OPTG set, which is required by this version of the method.
Alternatively, one may use the findData methods that take an MroObservation.Orbit
and an estimate of the ephemeris time or ephemeris
time range. These methods do not require the use of the MTT data layer,
although they do require the SPICE kernel pool to be loaded with the
necessary kernels. The disadvantage of using these methods is that there is
no guarantee or requirement that the orbit and ephemeris time be related;
the orbit is used only to set the value of the orbit in the resulting
orbital data model.
For example, to get the orbital data for an observation of a target called
aramChaos on MroObservation.Orbit
13071a at approximately 295272514.0,
use the following code, assuming the kernel pool is appropriately loaded:
MroObservation.OrbitalData data2 = MroObservation.OrbitalData.findData ( aramChaos, Orbit.valueOf ("13071a"), 295272514.0 );
Modifier and Type | Field and Description |
---|---|
static double |
ET_ESTIMATE_MARGIN
The margin used for finding the ephemeris time from an initial estimate.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.
|
static java.util.List<MroObservation.OrbitalData> |
findAllData(Target target,
edu.asu.jmars.layer.obs.mro.MttLayer mttLayer)
Finds all orbital data models on which the target is observable within a
period defined by the MTT data layer.
|
static MroObservation.OrbitalData |
findData(Target target,
int orbitNumber)
Finds the orbital data model for an observation of the given target on the
specified orbit number.
|
static MroObservation.OrbitalData |
findData(Target target,
MroObservation.Orbit orbit,
double estimatedEt)
Finds the orbital data model for an observation of the given target on the
specified orbit with the initial estimate of ephemeris time.
|
static MroObservation.OrbitalData |
findData(Target target,
MroObservation.Orbit orbit,
double etRangeMin,
double etRangeMax)
Finds the orbital data model for an observation of the given target on the
specified orbit within the given ephemeris time range.
|
double |
getEt()
Gets this model's ephemeris time.
|
MroObservation.Orbit |
getOrbit()
Gets this model's orbit.
|
double |
getRollAngle()
Gets this model's roll angle.
|
Target |
getTarget()
Gets this model's target.
|
int |
hashCode()
Returns a hash code value for this orbital data model.
|
java.lang.String |
toString()
Gets a string representation of this orbital data model.
|
public static final double ET_ESTIMATE_MARGIN
public MroObservation.Orbit getOrbit()
public Target getTarget()
public double getEt()
target
is observable with the roll
angle
.public double getRollAngle()
target
at the ephemeris time
.public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the object to which this object is compared.public static MroObservation.OrbitalData findData(Target target, int orbitNumber)
This method requires that the MTT data layer
be initialized
with an OPTG that defines the orbit number in question. It also requires
that the SPICE kernel pool be loaded with the necessary SPICE kernels to
compute the geometry; initializing the MTT data layer with an applicable
state file, however, also loads the kernel pool.
target
- the target site, which must be on Mars.orbitNumber
- the orbit number in question.java.lang.NullPointerException
- if the target is null.java.lang.IllegalArgumentException
- if the target body is not Mars.public static MroObservation.OrbitalData findData(Target target, MroObservation.Orbit orbit, double estimatedEt)
The ephemeris time parameter is merely an estimate of the time at which the
target is actually observable with only a cross-track roll of up to 30°.
The resulting data model may not have the same ephemeris
time
. If the target is not observable within ET_ESTIMATE_MARGIN
seconds of the estimate, a null is returned instead. This method
requires that the SPICE kernel pool be loaded with the SPICE kernels
necessary to compute the geometry.
Note that this method does not make direct use of the input orbit; it is merely descriptive and copied directly to the resulting data model. There is no guarantee that the resulting model's ephemeris time matches this orbit number.
target
- the target site, which must be on Mars.orbit
- the orbit on which the target is to be observed.estimatedEt
- the initial estimate of the model's ephemeris time.java.lang.NullPointerException
- if the target or orbit is null.java.lang.IllegalArgumentException
- if the target body is not Mars.public static MroObservation.OrbitalData findData(Target target, MroObservation.Orbit orbit, double etRangeMin, double etRangeMax)
The ephemeris time range is a limit on the time during which the observation can occur. If the target is not observable within this range, a null is returned instead. This method requires that the SPICE kernel pool be loaded with the SPICE kernels necessary to compute the geometry.
Note that this method does not make direct use of the input orbit; it is merely descriptive and copied directly to the resulting data model. There is no guarantee that the resulting model's ephemeris time matches this orbit number.
target
- the target site, which must be on Mars.orbit
- the orbit on which the target is to be observed.etRangeMin
- the minimum ephemeris time for the search.etRangeMax
- the maximum ephemeris time for the search.java.lang.NullPointerException
- if the target or orbit is null.java.lang.IllegalArgumentException
- if the target body is not Mars or if
etRangeMin > etRangeMax.public static java.util.List<MroObservation.OrbitalData> findAllData(Target target, edu.asu.jmars.layer.obs.mro.MttLayer mttLayer)
If no orbits are found, the method returns an empty list.
target
- the target site, which must be on Mars.mttLayer
- the MTT data layer describing the period of coverage.java.lang.NullPointerException
- if the target or MTT data layer is
null.java.lang.IllegalArgumentException
- if the target body is not Mars.Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona