HiRISE

HiRISE.HiPlan.HiSEAS
Class Target

java.lang.Object
  extended by HiRISE.HiPlan.HiSEAS.Target

public class Target
extends Object

A target site for a stereo observation.

To instantiate a new target site, use the Target.Builder. Instantiate a new builder with the target body and coordinates, optionally set a label and/or comment, and invoke the Target.Builder.build() method. For example, to create a new target site in the center of Aram Chaos (on Mars), use the following code:

        Target aramChaos = new Target.Builder (
                Body.getInstance (499),
                Math.toRadians (338.5),
                Math.toRadians (2.57),
                -4.5
        ).label ("Aram Chaos").comment ("The center of Aram Chaos.").build ();

499 is the NAIF body ID code for Mars.

Coordinates are planetocentric, east-leading and are in radians. Altitude is in kilometers.

Version:
1.7
Author:
Christian Schaller - UA/PIRL

Nested Class Summary
static class Target.Builder
          A builder for an immutable target object.
 
Field Summary
static String ID
          Class identification name with source code version and date.
 
Method Summary
 boolean equals(Object o)
          Indicates whether some other object is "equal to" this one.
 double getAltitude()
          Gets the altitude of the target in kilometers above the target body's reference ellipsoid.
 Body getBody()
          Gets the target body.
 String getComment()
          Gets an optional comment describing this target.
 String getLabel()
          Gets an optional label identifying this target.
 double getLatitude()
          Gets the target's planetocentric latitude in radians.
 double getLongitude()
          Gets the target's east-leading longitude in radians.
 double getPlanetocentricLatitude()
          Gets the target's planetocentric latitude in radians.
 double getPlanetographicLatitude()
          Gets the target's planetographic latitude in radians.
 Triplet getRectangularCoords()
          Gets the rectangular coordinates of the target site.
 int hashCode()
          Returns a hash code value for this stereo target.
 String toString()
          Gets a string representation of this stereo target.
 
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

getBody

public Body getBody()
Gets the target body.

Returns:
the target body.

getLongitude

public double getLongitude()
Gets the target's east-leading longitude in radians.

Returns:
the target's east-leading longitude in radians.

getLatitude

public double getLatitude()
Gets the target's planetocentric latitude in radians.

Returns:
the target's planetocentric latitude in radians.

getAltitude

public double getAltitude()
Gets the altitude of the target in kilometers above the target body's reference ellipsoid.

Returns:
the target's altitude in km.

getLabel

public String getLabel()
Gets an optional label identifying this target.

Returns:
the target's label; may be null.

getComment

public String getComment()
Gets an optional comment describing this target.

Returns:
the target's comment; may be null.

getRectangularCoords

public Triplet getRectangularCoords()
Gets the rectangular coordinates of the target site.

Returns:
the rectangular coordinates of the target site in km.

getPlanetographicLatitude

public double getPlanetographicLatitude()
Gets the target's planetographic latitude in radians. The target's body is used to derive the planetographic latitude from the planetocentric latitude.

Returns:
the planetographic latitude in radians.

getPlanetocentricLatitude

public double getPlanetocentricLatitude()
Gets the target's planetocentric latitude in radians.

Note: This method returns the same result as getLatitude().

Returns:
the target's planetocentric latitude in radians.

toString

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

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

hashCode

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

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

equals

public boolean equals(Object o)
Indicates whether some other object is "equal to" this one.

Two targets are equal if and only if they have the same body, the same center coordinates, the same altitude, the same label, and the same comment.

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