HiRISE

HiRISE.HiPlan.HiSEAS
Class Body

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

public class Body
extends Object

An observable body, such as a planet or a planetary satellite, represented as a triaxial ellipsoid. The body data are retrieved from the NAIF SPICE system via a NAIF body ID; doing so requires that the SPICE kernel pool contain the necessary kernel, usually in the form of a planetary constants kernel (PCK).

Use getInstance(int) to get an instance of a body with a particular NAIF ID; bodies are cached whenever the method is invoked.

Version:
1.4
Author:
Christian Schaller - UA/PIRL

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 getAAxis()
          Gets this body's A-axis.
 double getBAxis()
          Gets this body's B-axis.
 double getCAxis()
          Gets this body's C-axis.
 double getFlattening()
          Gets the flattening coefficient for this body.
static Body getInstance(int naifID)
          Gets an instance of a body with the given NAIF ID.
 int getNaifID()
          Gets this body's NAIF ID.
 String getName()
          Gets this body's name, as determined by its NAIF ID.
 double getPlanetocentricLatitude(double planetographicLatitude)
          Converts a planetographic latitude into a planetocentric latitude for this body.
 double getPlanetographicLatitude(double planetocentricLatitude)
          Converts a planetocentric latitude into a planetographic latitude for this body.
 int hashCode()
          Returns a hash code value for this stereo target.
static double normalizeLongitude(double longitude)
          Computes the normalized longitude from the input longitude.
 double[] radiiArray()
          Gets this body's radii as an array.
static double reverseLongitude(double longitude)
          Reverses a longitude from east-leading to west-leading or vice-versa.
 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

getNaifID

public final int getNaifID()
Gets this body's NAIF ID.

Returns:
the body's NAIF ID.

getName

public final String getName()
Gets this body's name, as determined by its NAIF ID.

Returns:
the body's name.

getAAxis

public final double getAAxis()
Gets this body's A-axis. The A-axis is the body's largest equatorial radius, which is the length of the semi-axis that contains the body's prime meridian.

Returns:
the body's A-axis in kilometers.

getBAxis

public final double getBAxis()
Gets this body's B-axis. The B-axis is the body's smallest equatorial radius.

Returns:
the body's B-axis in kilometers.

getCAxis

public final double getCAxis()
Gets this body's C-axis. The C-axis is the body's polar radius.

Returns:
the body's C-axis in kilometers.

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.

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

getFlattening

public double getFlattening()
Gets the flattening coefficient for this body. The flattening coefficient f is given by
f = 1.0 - (rp / re)

where rp is the polar radius and re is the equatorial radius.

Returns:
the flattening coefficient.

radiiArray

public double[] radiiArray()
Gets this body's radii as an array. The first element is the A-axis, the second is the B-axis, and the third is the C-axis.

Returns:
the body's radii.

getPlanetographicLatitude

public double getPlanetographicLatitude(double planetocentricLatitude)
Converts a planetocentric latitude into a planetographic latitude for this body.

Parameters:
planetocentricLatitude - the planetocentric latitude in radians.
Returns:
the planetographic latitude in radians.

getPlanetocentricLatitude

public double getPlanetocentricLatitude(double planetographicLatitude)
Converts a planetographic latitude into a planetocentric latitude for this body.

Parameters:
planetographicLatitude - the planetographic latitude in radians.
Returns:
the planetocentric latitude in radians.

normalizeLongitude

public static double normalizeLongitude(double longitude)
Computes the normalized longitude from the input longitude. The longitude is normalized to be in the range 0..2π.

Parameters:
longitude - the input longitude.
Returns:
the normalized longitude.

reverseLongitude

public static double reverseLongitude(double longitude)
Reverses a longitude from east-leading to west-leading or vice-versa. The longitude is assumed to be in radians, and it will be normalized to the range 0..2π.

Parameters:
longitude - the longitude to be reversed, in radians.
Returns:
the reversed longitude, in radians and normalized to 0..2π.

getInstance

public static Body getInstance(int naifID)
Gets an instance of a body with the given NAIF ID. Results are cached, so that repeated invocations of this method with a particular ID return the same body object.

Parameters:
naifID - the NAIF ID of the body.
Returns:
a body.
Throws:
edu.asu.jmars.layer.obs.mro.SpiceException - if the SPICE kernel pool contains no body data for naifID.

HiRISE

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