public class Target
extends java.lang.Object
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.
Modifier and Type | Class and Description |
---|---|
static class |
Target.Builder
A builder for an immutable target object.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID
Class identification name with source code version and date.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.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.
|
java.lang.String |
getComment()
Gets an optional comment describing this target.
|
java.lang.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.
|
java.lang.String |
toString()
Gets a string representation of this stereo target.
|
public static final java.lang.String ID
public Body getBody()
public double getLongitude()
public double getLatitude()
public double getAltitude()
public java.lang.String getLabel()
public java.lang.String getComment()
public Triplet getRectangularCoords()
public double getPlanetographicLatitude()
body
is used to derive the planetographic latitude from the
planetocentric
latitude.public double getPlanetocentricLatitude()
Note: This method returns the same result as getLatitude()
.
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)
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.
equals
in class java.lang.Object
o
- the object to which this object is compared.Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona