HiRISE

HiRISE.HiPlan.HiSEAS
Class Observer

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

public class Observer
extends Object

An observer for an observation.

To instantiate a new observer, use the Observer.Builder. Instantiate a new builder with the observer's NAIF ID and reference frame, optionally set a label and/or comment, and invoke the Observer.Builder.build() method. For example, to create a new MRO observer in the IAU-defined body-fixed Mars reference frame, use the following code:

        Observer mro = new Observer.Builder (
                -74,
                "IAU_MARS"
        ).label ("MRO").comment ("MRO in the IAU body-fixed Mars frame.").build ();

-74 is the NAIF ID code for MRO.

If the builder's label was not set, or if it is set to null, the observer's label will be set at construction to the observer's name, which is derived from its NAIF ID.

Version:
1.4
Author:
Christian Schaller - UA/PIRL

Nested Class Summary
static class Observer.Builder
          A builder for an immutable observer 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.
 String getComment()
          Gets an optional comment describing this observer.
 int getHighPrecisionNaifID()
          Gets this observer's high-precision NAIF ID.
 String getLabel()
          Gets the label describing this observer.
 int getNaifID()
          Gets this observer's NAIF ID.
 String getName()
          Gets this observer's name as determined by its NAIF ID.
 String getReferenceFrame()
          Gets this observer's reference frame name.
 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

getNaifID

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

Returns:
the NAIF ID for this observer.

getHighPrecisionNaifID

public int getHighPrecisionNaifID()
Gets this observer's high-precision NAIF ID. This ID is used in high-precision spacecraft clock kernels (for instance); it may not be appropriate for all observers.

The high-precision ID is naifID * 1000 - 999. For MRO, for example, which has -74, the high-precision ID is -74999.

Returns:
the high-precision NAIF ID for this observer.

getName

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

Returns:
this observer's name.

getReferenceFrame

public String getReferenceFrame()
Gets this observer's reference frame name.

Returns:
the name of this observer's reference frame.

getLabel

public String getLabel()
Gets the label describing this observer. If the label was not specified at construction (via the Observer.Builder), it will be the same as this observer's name.

Returns:
this observer's label.

getComment

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

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

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 observers are equal if and only if they have the same NAIF ID, the same reference frame, 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