HiRISE

HiRISE.HiPlan.HiSEAS
Class MroStereoPair

java.lang.Object
  extended by HiRISE.HiPlan.HiSEAS.AbstractStereoPair
      extended by HiRISE.HiPlan.HiSEAS.MroStereoPair
All Implemented Interfaces:
StereoPair

public final class MroStereoPair
extends AbstractStereoPair

An immutable stereo pair of MRO observations of Mars.

To instantiate a new MRO stereo pair, use the MroStereoPair.Builder. Create a new builder with the two MRO observations, optionally set a label and/or comment, and invoke its build method. For example, to create a new MRO stereo pair from two observations of a Target called aramChaos, one on orbit 13071 and the other on orbit 13137, use the following code:

        MroObservation
                obs1 = new MroObservation.Builder (
                        MroObservation.OrbitalData.findData (aramChaos, 13071)
                ).label ("ESP_013071_1825").comment ("Stereo-1 of Aram Chaos").build ();
        MroObservation
                obs2 = new MroObservation.Builder (
                        MroObservation.OrbitalData.findData (aramChaos, 13137)
                ).label ("ESP_013137_1825").comment ("Stereo-2 of Aram Chaos").build ();
        MroStereoPair
                pair = new MroStereoPair.Builder (
                        obs1,
                        obs2
                ).label ("Aram Chaos Pair").comment ("Candidate").build ();

The two observations must be of the same target site or an IllegalArgumentException is thrown at construction.

Version:
1.7
Author:
Christian Schaller - UA/PIRL

Nested Class Summary
static class MroStereoPair.Builder
          A builder for an immutable MRO stereo pair.
 
Field Summary
static String ID
          Class identification name with source code version and date.
 
Fields inherited from class HiRISE.HiPlan.HiSEAS.AbstractStereoPair
stereo1, stereo2
 
Method Summary
 boolean equals(Object o)
          Indicates whether some other object is "equal to" this one.
 boolean equivalent(MroStereoPair p)
          Indicates whether an MRO stereo pair is "equivalent to" this one.
 String getComment()
          Gets the stereo pair's optional comment.
 String getLabel()
          Gets the stereo pair's optional label.
 double getShadowTipChange()
          Gets the change in shadow tip position for a hypothetical unit-length pole between the stereo-1 observation and the stereo-2 observation.
 double getSolarSeparation()
          Gets the solar separation angle for the pair.
 double getStereoSeparation()
          Gets the stereo separation angle for the pair.
 int hashCode()
          Returns a hash code value for this stereo pair.
 String toString()
          Gets a string representation of this MRO stereo pair.
 
Methods inherited from class HiRISE.HiPlan.HiSEAS.AbstractStereoPair
getEmissionAngleDifference, getIncidenceAngleDifference, getPhaseAngleDifference, getSolarAzimuthChange, getSolarAzimuthDifference, getSolarLongitudeDifference, getStereo1, getStereo2, getSubsolarLatitudeChange
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, 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
Method Detail

getLabel

public String getLabel()
Gets the stereo pair's optional label. The label is guaranteed not to be null.

Specified by:
getLabel in interface StereoPair
Specified by:
getLabel in class AbstractStereoPair
Returns:
the stereo pair's optional label, which will not be null but which may be the empty string.

getComment

public String getComment()
Gets the stereo pair's optional comment. The comment is guaranteed not to be null.

Specified by:
getComment in interface StereoPair
Specified by:
getComment in class AbstractStereoPair
Returns:
the stereo pair's optional comment, which will not be null but which may be the empty string.

getStereoSeparation

public double getStereoSeparation()
Gets the stereo separation angle for the pair. The separation angle is the angle between the view vectors of the two observations. Mathematically, the angle, &theta, is computed as follows for vectors u (stereo-1) and v (stereo-2):
θ = acos ((u ⋅ v) / (||u|| ||v||))

The separation angle is also known as the stereo convergence angle.

Specified by:
getStereoSeparation in interface StereoPair
Overrides:
getStereoSeparation in class AbstractStereoPair
Returns:
the stereo separation angle in radians.
See Also:
AbstractStereoPair.getStereoSeparation()

getSolarSeparation

public double getSolarSeparation()
Gets the solar separation angle for the pair. The solar separation angle is the angle describing the change in the sun's position, as viewed from the target site, between the two observations.

Mathematically, the angle θ, is computed as follows. For solar altitude a and azimuth z, for observations 1 and 2, the separation is

θ = acos (cos a1 cos a2 cos (z1 - z2) + sin a1 sin a2)

(This equation is the same as for getStereoSeparation(), but for the sun's position in spherical coordinates with unit vectors described by a and z.)

Specified by:
getSolarSeparation in interface StereoPair
Overrides:
getSolarSeparation in class AbstractStereoPair
Returns:
the solar separation angle in radians.

getShadowTipChange

public double getShadowTipChange()
Gets the change in shadow tip position for a hypothetical unit-length pole between the stereo-1 observation and the stereo-2 observation.

Returns:
the change in shadow tip position for a hypothetical unit-length pole.

toString

public String toString()
Gets a string representation of this MRO stereo pair.

Overrides:
toString in class Object
Returns:
a string representation of this MRO stereo pair.

hashCode

public int hashCode()
Returns a hash code value for this stereo pair.

Overrides:
hashCode in class Object
Returns:
a hash code value for this stereo pair.

equals

public boolean equals(Object o)
Indicates whether some other object is "equal to" this one. An MRO stereo pair is equal to another if and only if the two observations, the label, and the comment are the same.

Overrides:
equals in class Object
Parameters:
o - the object to which this object is compared.
Returns:
true if the objects are equal; false otherwise.

equivalent

public boolean equivalent(MroStereoPair p)
Indicates whether an MRO stereo pair is "equivalent to" this one. An MRO stereo pair is equivalent to another if they are equal, or if the stereo-1 and stereo-2 observations are reversed while the label and comment are the same.

Note that if two pairs are equivalent but not equal, signed differences between the two pairs will be opposite in sign. The AbstractStereoPair.getSolarAzimuthChange() method, in particular, will return oppositely signed results.

Parameters:
p - the MRO stereo pair to which this pair is compared.
Returns:
true if the pairs are equivalent; false otherwise.

HiRISE

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