HiRISE

HiRISE.HiPlan.HiSEAS
Class SimpleStereoPair

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

public final class SimpleStereoPair
extends AbstractStereoPair

A simple, immutable implementation of the abstract stereo pair for a pair of observations.

To instantiate a new simple stereo pair, use the SimpleStereoPair.Builder. Create a new builder with the two observations, optionally set a label and/or comment, and invoke its build method. For example, to create a new simple stereo pair from the observations obs1 and obs2 (both of a Target called aramChaos), use the following code:

        SimpleStereoPair pair = new SimpleStereoPair.Builder (
                obs1,
                obs2
        ).label ("Aram Chaos Pair").comment ("Candidate pair of Aram Chaos").build ();

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

Version:
1.3
Author:
Christian Schaller - UA/PIRL

Nested Class Summary
static class SimpleStereoPair.Builder
          A builder for an immutable simple 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.
 String getComment()
          Gets the stereo pair's optional comment.
 String getLabel()
          Gets the stereo pair's optional label.
 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 simple 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.

toString

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

Overrides:
toString in class Object
Returns:
a string representation of this simple 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. A simple 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.

HiRISE

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