jsky.science
Class ProperMotion

java.lang.Object
  extended by jsky.science.AbstractScienceObject
      extended by jsky.science.ProperMotion
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable, java.util.EventListener, ScienceObjectModel, ReplaceablePropertyChangeListener

public class ProperMotion
extends AbstractScienceObject

The apparent motion of an object on the celestial sphere. ProperMotion is a change in right-ascension and declination in degrees per year. ProperMotion also includes an error for both values (+/- degrees).

This code was developed by NASA, Goddard Space Flight Center, Code 588 for the Scientist's Expert Assistant (SEA) project.

Version:
2000.05.03
Author:
J. Jones / 588
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class jsky.science.AbstractScienceObject
AbstractScienceObject.EventMonitor
 
Field Summary
static java.lang.String DECERROR_PROPERTY
           
static java.lang.String OFFSET_PROPERTY
           
static java.lang.String RAERROR_PROPERTY
           
 
Fields inherited from interface jsky.science.ScienceObjectModel
NAME_PROPERTY, PENDING_PROPERTY, VALID_PROPERTY
 
Constructor Summary
ProperMotion()
          Constructs and initializes a proper motion of 0, 0 degrees per year.
ProperMotion(double ra, double dec)
          Constructs and initializes a proper motion with the specified values in degrees.
ProperMotion(double ra, double dec, double raErr, double decErr)
          Constructs and initializes a proper motion with the specified values in degrees.
ProperMotion(double ra, double dec, double raErr, double decErr, java.lang.String units)
          Constructs and initializes a proper motion with the specified values in specified units
ProperMotion(double ra, double dec, java.lang.String units)
          Constructs and initializes a proper motion with the specified values in specified units.
ProperMotion(ProperMotion pm)
          Constructs and initializes a proper motion with the same values as the specified ProperMotion object.
 
Method Summary
 Coordinates computePosition(Coordinates oldPosition, double endYear)
          Computes a new position by taking an existing position and accounting for proper motion over the specified number of years.
 Coordinates computePosition(Coordinates oldPosition, double endYear, double startYear)
          Computes a new position by taking an existing position and accounting for proper motion over the specified number of years.
 boolean equals(java.lang.Object obj)
          Determines whether two proper motions are equal.
 double getDecError()
          Returns the declination component of proper motion error in degrees.
 CoordinatesOffset getOffset()
           
 double getRaError()
          Returns the right-ascension component of proper motion error in degrees.
 void setDecError(double err)
          Sets the proper motion Dec error in degrees.
 void setOffset(CoordinatesOffset offset)
           
 void setRaError(double err)
          Sets the proper motion RA error in degrees.
 java.lang.String toString()
          Returns a string representation of this proper motion's values.
 
Methods inherited from class jsky.science.AbstractScienceObject
addEventMonitor, addPropertyChangeListener, areNamesEqual, clearAllListeners, clone, compareTo, createDefaultName, firePropertyChange, firePropertyChange, fireReplaceObject, fireReplaceObject, fireReplaceObject, fireVetoableChange, fireVetoableChange, getException, getLabel, getName, getObjectIdString, getObjectIdString, getParent, isHolding, isPending, isTracing, isValid, notifyEventMonitors, propertyChange, removeEventMonitor, removePropertyChangeListener, replaceObject, replaceObjectNYI, setException, setHolding, setName, setParent, setTraceAll, setTracing, writeDebug, writeError
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OFFSET_PROPERTY

public static final java.lang.String OFFSET_PROPERTY

RAERROR_PROPERTY

public static final java.lang.String RAERROR_PROPERTY

DECERROR_PROPERTY

public static final java.lang.String DECERROR_PROPERTY
Constructor Detail

ProperMotion

public ProperMotion()
Constructs and initializes a proper motion of 0, 0 degrees per year.


ProperMotion

public ProperMotion(ProperMotion pm)
Constructs and initializes a proper motion with the same values as the specified ProperMotion object.


ProperMotion

public ProperMotion(double ra,
                    double dec)
Constructs and initializes a proper motion with the specified values in degrees.


ProperMotion

public ProperMotion(double ra,
                    double dec,
                    java.lang.String units)
Constructs and initializes a proper motion with the specified values in specified units.


ProperMotion

public ProperMotion(double ra,
                    double dec,
                    double raErr,
                    double decErr,
                    java.lang.String units)
Constructs and initializes a proper motion with the specified values in specified units


ProperMotion

public ProperMotion(double ra,
                    double dec,
                    double raErr,
                    double decErr)
Constructs and initializes a proper motion with the specified values in degrees.

Method Detail

getOffset

public CoordinatesOffset getOffset()

setOffset

public void setOffset(CoordinatesOffset offset)

getRaError

public double getRaError()
Returns the right-ascension component of proper motion error in degrees.


getDecError

public double getDecError()
Returns the declination component of proper motion error in degrees.


setRaError

public void setRaError(double err)
Sets the proper motion RA error in degrees.


setDecError

public void setDecError(double err)
Sets the proper motion Dec error in degrees.


computePosition

public Coordinates computePosition(Coordinates oldPosition,
                                   double endYear)
Computes a new position by taking an existing position and accounting for proper motion over the specified number of years. Uses the epoch of the oldPosition as the starting year.

Parameters:
oldPosition - start with this position
endYear - compute new position for this year
Returns:
position for the new year

computePosition

public Coordinates computePosition(Coordinates oldPosition,
                                   double endYear,
                                   double startYear)
Computes a new position by taking an existing position and accounting for proper motion over the specified number of years. Uses the startYear instead of the epoch of the oldPosition as the starting year.

Parameters:
oldPosition - start with this position
endYear - compute new position for this year
startYear - assume oldPosition measured on this year
Returns:
position for the new year

equals

public boolean equals(java.lang.Object obj)
Determines whether two proper motions are equal.

Overrides:
equals in class AbstractScienceObject

toString

public java.lang.String toString()
Returns a string representation of this proper motion's values.

Overrides:
toString in class AbstractScienceObject
Returns:
a string representation of this proper motion's values