|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.astronomy.SolarSystemBodyPosition
public class SolarSystemBodyPosition
Position information for a solar system body.
Version Info:
$Revision: 1256 $ |
$Date: 2008-04-29 15:55:50 -0600 (Tue, 29 Apr 2008) $ |
$Author: dharland $ |
Constructor Summary | |
---|---|
SolarSystemBodyPosition(String nameOfBody)
Creates a new instance. |
Method Summary | |
---|---|
SolarSystemBodyPosition |
clone()
Returns a copy of this body. |
boolean |
equals(Object o)
Returns true if o is equal to this body. |
Angle |
getAngularSeparation(SphericalPosition other)
Calculates the current angular separation between this position and other . |
Angle |
getAngularSeparation(SphericalPosition other,
Date time)
Calculates current angular separation between this position and other at the given time. |
String |
getBodyName()
Returns the name of the solar system body this position represents. |
CelestialCoordinateSystem |
getCoordinateSystem()
Returns the coordinate system to use when interpreting the latitude and longitude values of this position. |
Distance |
getDistance()
Returns the current distance of this position. |
Distance |
getDistance(Date time)
Returns the distance of this position at the given point in time. |
Distance |
getDistanceUncertainty()
Returns the uncertainty in the distance of this position. |
Epoch |
getEpoch()
Returns the epoch on which this position is based. |
Latitude |
getLatitude()
Returns the current latitude of this position. |
Latitude |
getLatitude(Date time)
Returns the latitude of this position at the given point in time. |
Latitude |
getLatitudeUncertainty()
Returns the uncertainty in the latitude of this position. |
Longitude |
getLongitude()
Returns the current longitude of this position. |
Longitude |
getLongitude(Date time)
Returns the longitude of this position at the given point in time. |
Longitude |
getLongitudeUncertainty()
Returns the uncertainty in the longitude of this position. |
String |
getOriginOfInformation()
Returns the origin of this position's information. |
TimeDuration |
getRefreshRate()
Returns a copy of this position's refresh rate (see setRefreshRate(TimeDuration) for a description). |
SkyPositionType |
getType()
Provides a hint as to how this position stores its information. |
int |
hashCode()
Returns a hash code value for this body. |
boolean |
isMoving()
Returns true if this position has different properties at time T than it does at time U ≠ T. |
void |
reset()
Resets the internals of this position, except for its body name. |
void |
setLocator(SourceLocator newLocator)
Sets the locator that this position will use for determining the location of the object whose name is given by getBodyName() . |
void |
setRefreshRate(TimeDuration newRate)
Sets the refresh rate for this position to newRate . |
SkyPosition |
toPosition(CelestialCoordinateSystem system,
Epoch epoch,
EarthPosition observer,
LocalSiderealTime lst)
Returns a new position expressed in the given coordinate system and epoch that is equivalent to this position. |
SkyPosition |
toPosition(CelestialCoordinateSystem system,
Epoch epoch,
EarthPosition observer,
LocalSiderealTime lst,
CelestialCoordinateConverter converter)
Returns a new position expressed in the given coordinate system and epoch that is equivalent to this position. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SolarSystemBodyPosition(String nameOfBody)
Method Detail |
---|
public void reset()
public String getBodyName()
public void setLocator(SourceLocator newLocator)
getBodyName()
.
If newLocator
is null, this method does nothing.
newLocator
- the locator to use for getting position information
for this body.public void setRefreshRate(TimeDuration newRate)
newRate
.
If newRate
is null, the refresh rate will be set to
zero.
The refresh rate refers to the amount of time that must
pass before this position will request new information from its
source locator
. Each time the source
locator is successfully queried, the position and time of the query are
cached. If a subsequent request is made in the interval
[queryTime...queryTime + newRate] (or in the interval
[queryTime - newRate...queryTime], the reported position is the
cached position. Clients can ensure that cached values are never used by
setting the refresh rate to zero, which is the default state for this
object.
newRate
- the refresh rate for locating this body's position.public TimeDuration getRefreshRate()
setRefreshRate(TimeDuration)
for a description).
public boolean isMoving()
SkyPosition
The determination of motion will be made with respect to the coordinate system in which this position is expressed. For example, a position that is expressed in the equatorial system, and that is holding steady at its position in that system, will said to be not moving, even though in other coordinate systems it may be moving quite rapidly.
isMoving
in interface SkyPosition
public SkyPositionType getType()
SkyPosition
getType
in interface SkyPosition
public CelestialCoordinateSystem getCoordinateSystem()
SkyPosition
getCoordinateSystem
in interface SkyPosition
public Epoch getEpoch()
SkyPosition
getEpoch
in interface SkyPosition
public String getOriginOfInformation()
SkyPosition
getOriginOfInformation
in interface SkyPosition
public Longitude getLongitude()
The returned value is guaranteed to be non-null. Note that the object returned is not held internally by this position. This means that any changes made to the returned object by clients will not be reflected in this position.
getLongitude
in interface SphericalPosition
public Latitude getLatitude()
The returned value is guaranteed to be non-null. Note that the object returned is not held internally by this position. This means that any changes made to the returned object by clients will not be reflected in this position.
getLatitude
in interface SphericalPosition
public Distance getDistance()
The returned value is guaranteed to be non-null. Note that the object returned is not held internally by this position. This means that any changes made to the returned object by clients will not be reflected in this position.
getDistance
in interface SphericalPosition
public Longitude getLongitude(Date time)
The returned value is guaranteed to be non-null. Note that the object returned is not held internally by this position. This means that any changes made to the returned object by clients will not be reflected in this position.
getLongitude
in interface SkyPosition
time
- the point in time for which the longitude is sought.
public Latitude getLatitude(Date time)
The returned value is guaranteed to be non-null. Note that the object returned is not held internally by this position. This means that any changes made to the returned object by clients will not be reflected in this position.
getLatitude
in interface SkyPosition
time
- the point in time for which the latitude is sought.
public Distance getDistance(Date time)
The returned value is guaranteed to be non-null. Note that the object returned is not held internally by this position. This means that any changes made to the returned object by clients will not be reflected in this position.
getDistance
in interface SkyPosition
time
- the point in time for which the distance is sought.
public Longitude getLongitudeUncertainty()
The returned value is guaranteed to be non-null. Note that the object returned is not held internally by this position. This means that any changes made to the returned object by clients will not be reflected in this position.
getLongitudeUncertainty
in interface SphericalPosition
public Latitude getLatitudeUncertainty()
The returned value is guaranteed to be non-null. Note that the object returned is not held internally by this position. This means that any changes made to the returned object by clients will not be reflected in this position.
getLatitudeUncertainty
in interface SphericalPosition
public Distance getDistanceUncertainty()
The returned value is guaranteed to be non-null. Note that the object returned is not held internally by this position. This means that any changes made to the returned object by clients will not be reflected in this position.
getDistanceUncertainty
in interface SphericalPosition
public Angle getAngularSeparation(SphericalPosition other)
SphericalPosition
other
.
The distances of the positions from the center of the sphere are
not considered. The returned angle is the smallest possible
such angle. It is the angular size of the arc of a great circle that
passes through both the ray from the orgin to this position and the
ray from the origin to other
.
The returned value is never negative. This means that the returned angle does not contain directional information. That is, the angle from A to B is exactly equal to the angle from B to A.
getAngularSeparation
in interface SphericalPosition
other
- a position from which this one is separated by the
returned angle.
other
.public Angle getAngularSeparation(SphericalPosition other, Date time)
SkyPosition
other
at the given time.
The distances of the positions from the center of the sphere are
not considered. The returned angle is the smallest possible
such angle. It is the angular size of the arc of a great circle that
passes through both the ray from the orgin to this position and the
ray from the origin to other
.
The returned value is never negative. This means that the returned angle does not contain directional information. That is, the angle from A to B is exactly equal to the angle from B to A.
getAngularSeparation
in interface SkyPosition
other
- a position from which this one is separated by the
returned angle.time
- the point in time for which the separation is sought.
other
.public SkyPosition toPosition(CelestialCoordinateSystem system, Epoch epoch, EarthPosition observer, LocalSiderealTime lst) throws CoordinateConversionException
SkyPosition
toPosition
in interface SkyPosition
system
- the celestial coordinate system of the returned position.epoch
- the epoch of the returned position.observer
- the location of the observer. This value is used almost exclusively for
conversions to or from the HORIZONTAL (az/el) coordinate system.
If a given conversion does not require this parameter, a null
value will do no harm.lst
- the local sidereal time at the observer's location. This parameter
serves two purposes. First, it is integral in conversions to or from
the HORIZONTAL (az/el) coordinate system. Second, even for
conversions that do not depend on the observer's location, the conversion
method will use the UTC time represented by this LST to determine the
exact location of this position before converting it to another
system. When used this way the location associated with the LST is
immaterial. If this value is null it will be replaced with
the current time. Using a null value is not recommended when
dealing with the HORIZONTAL system because the LST may not
be for the location of interest.
system
, and
epoch of epoch
, and coordinates that represent a conversion
from those of this position.
CoordinateConversionException
- if anything goes wrong with the conversion.public SkyPosition toPosition(CelestialCoordinateSystem system, Epoch epoch, EarthPosition observer, LocalSiderealTime lst, CelestialCoordinateConverter converter) throws CoordinateConversionException
SkyPosition
toPosition
in interface SkyPosition
system
- the celestial coordinate system of the returned position.epoch
- the epoch of the returned position.observer
- the location of the observer. This value is used almost exclusively for
conversions to or from the HORIZONTAL (az/el) coordinate system.lst
- the local sidereal time at the observer's location. This parameter
serves two purposes. First, it is integral in conversions to or from
the HORIZONTAL (az/el) coordinate system. Second, even for
conversions that do not depend on the observer's location, the conversion
method will use the UTC time represented by this LST to determine the
exact location of this position before converting it to another
system. When used this way the location associated with the LST is
immaterial. If this value is null it will be replaced with
the current time. Using a null value is not recommended when
dealing with the HORIZONTAL system because the LST may not
be for the location of interest.converter
- the converter used to perform the transformation.
system
, and
epoch of epoch
, and coordinates that represent a conversion
from those of this position.
CoordinateConversionException
- if anything goes wrong with the conversion.public SolarSystemBodyPosition clone()
The object returned is almost a deep-copy of this position. The source locator used by the returned copy, however, is a reference to the same locator used by this position.
If anything goes wrong during the cloning procedure,
a RuntimeException
will be thrown.
clone
in interface SkyPosition
clone
in interface SphericalPosition
clone
in class Object
public boolean equals(Object o)
o
is equal to this body.
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |