edu.nrao.sss.astronomy
Class PolynomialPosition

java.lang.Object
  extended by edu.nrao.sss.astronomy.PolynomialPosition
All Implemented Interfaces:
SkyPosition, SphericalPosition, Cloneable, Comparable<PolynomialPosition>

public class PolynomialPosition
extends Object
implements Comparable<PolynomialPosition>

A position of an astronomical source that is described by a collection of polynomial equations.

The viewpoint of this class is that the position of a source may be described by its location (right ascension, declination, and distance) at a particular reference time and a set of equations that describe the motions of the source away from that location.

Version Info:

$Revision: 1707 $
$Date: 2008-11-14 10:23:59 -0700 (Fri, 14 Nov 2008) $
$Author: dharland $

Since:
2006-03-24
Author:
David M. Harland

Constructor Summary
PolynomialPosition()
          Creates a new instance.
 
Method Summary
 PolynomialPosition clone()
          Returns a copy of this polynomial position.
 int compareTo(PolynomialPosition other)
          Compares this position to other for order.
 boolean equals(Object o)
          Returns true if o is equal to this position.
 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.
 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 getDistanceAtTimeZero()
          Returns the distance of this position as of the reference 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 getLatitudeAtTimeZero()
          Returns the latitude of this position as of the reference time.
 Polynomial getLatitudeMotion()
          Returns the polynomial, in delta-t, for calculating change in the latitude of this position since the reference time.
 Latitude getLatitudeUncertainty()
          Returns the uncertainty in the latitude of this position.
 AngularVelocityUnits getLatitudeVelocityUnits()
          Returns the units that will be used to interpret the the latitude motion polynomial.
 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 getLongitudeAtTimeZero()
          Returns the longitude of this position as of the reference time.
 Polynomial getLongitudeMotion()
          Returns the polynomial, in delta-t, for calculating change in the longitude of this position since the reference time.
 Longitude getLongitudeUncertainty()
          Returns the uncertainty in the longitude of this position.
 AngularVelocityUnits getLongitudeVelocityUnits()
          Returns the units that will be used to interpret the the longitude motion polynomial.
 String getOriginOfInformation()
          Returns the origin of this position's information.
 Polynomial getRadialMotion()
          Returns the polynomial, in delta-t, for calculating change in the distance of this position since the reference time.
 LinearVelocityUnits getRadialVelocityUnits()
          Returns the units that will be used to interpret the the distance motion polynomial.
 Date getReferenceTime()
          Returns the time at which the delta-t terms in the motion polynomials evaluate to zero.
 SkyPositionType getType()
          Provides a hint as to how this position stores its information.
 TimeInterval getValidTime()
          Returns the interval of time for which this position is valid.
 int hashCode()
          Returns a hash code value for this position.
 boolean isMoving()
          Returns true if this position has different properties at time T than it does at time U ≠ T.
 boolean isValidFor(Date time)
          Returns true if this position is valid for the given point in time.
 void reset()
          Resets this position to its initial state.
 void setCoordinateSystem(CelestialCoordinateSystem newSystem)
          Sets the system of latitude and longitude on which this position is based.
 void setDistanceAtTimeZero(Distance distance)
          Sets the distance of this position as of the reference time.
 void setDistanceUncertainty(Distance uncertainty)
          Sets the uncertainty level in the distance of this position.
 void setEpoch(Epoch newEpoch)
          Sets the epoch on which this position is based.
 void setLatitudeAtTimeZero(Latitude latitude)
          Sets the latitude of this position as of the reference time.
 void setLatitudeMotion(Polynomial latitudeEqn)
          Sets this position's latitude motion equation to latitudeEqn.
 void setLatitudeUncertainty(Latitude uncertainty)
          Sets the uncertainty level in the latitude of this position.
 void setLatitudeVelocityUnits(AngularVelocityUnits units)
          Sets the units that will be used to interpret the declination motion polynomial.
 void setLongitudeAtTimeZero(Longitude longitude)
          Sets the longitude of this position as of the reference time.
 void setLongitudeMotion(Polynomial longitudeEqn)
          Sets this position's longitude motion equation to longitudeEqn.
 void setLongitudeUncertainty(Longitude uncertainty)
          Sets the uncertainty level in the longitude of this position.
 void setLongitudeVelocityUnits(AngularVelocityUnits units)
          Sets the units that will be used to interpret the longitude motion polynomial.
 void setOriginOfInformation(String origin)
          Sets the origin of this position's information.
 void setRadialMotion(Polynomial distanceEquation)
          Sets this position's distance motion equation to distanceEquation.
 void setRadialVelocityUnits(LinearVelocityUnits units)
          Sets the units that will be used to interpret the distance motion polynomial.
 void setReferenceTime(Date referenceTime)
          Sets the time at which the delta-t terms in the motion polynomials evaluate to zero.
 void setValidTime(TimeInterval interval)
          Sets the interval of time for which this position is valid.
 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

PolynomialPosition

public PolynomialPosition()
Creates a new instance.

Method Detail

reset

public void reset()
Resets this position to its initial state. A reset position has the same state as one created via the PolynomialPosition() constructor.


isMoving

public boolean isMoving()
Description copied from interface: SkyPosition
Returns true if this position has different properties at time T than it does at time U ≠ T.

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.

Specified by:
isMoving in interface SkyPosition
Returns:
true if this position is moving.

getType

public SkyPositionType getType()
Description copied from interface: SkyPosition
Provides a hint as to how this position stores its information.

Specified by:
getType in interface SkyPosition
Returns:
a hint as to how this position stores its information.

setReferenceTime

public void setReferenceTime(Date referenceTime)
Sets the time at which the delta-t terms in the motion polynomials evaluate to zero.

The motion polynomials are returned by the methods getLatitudeMotion(), getLongitudeMotion(), and getRadialMotion(). At the reference time t0, these equations should evaluate to zero.

If referenceTime is null, an IllegalArgumentException will be thrown.

Parameters:
referenceTime - t0 for the motion terms.

getReferenceTime

public Date getReferenceTime()
Returns the time at which the delta-t terms in the motion polynomials evaluate to zero. See setReferenceTime(Date) for more information.

Returns:
t0 for the motion terms.

setValidTime

public void setValidTime(TimeInterval interval)
Sets the interval of time for which this position is valid.

If interval is null, it will be treated as an non-null interval of zero length.

Parameters:
interval - the interval of time for which this position is valid.

getValidTime

public TimeInterval getValidTime()
Returns the interval of time for which this position is valid.

Returns:
the interval of time for which this position is valid.

isValidFor

public boolean isValidFor(Date time)
Returns true if this position is valid for the given point in time.

Parameters:
time - the point in time to be checked.

getLongitudeMotion

public Polynomial getLongitudeMotion()
Returns the polynomial, in delta-t, for calculating change in the longitude of this position since the reference time.

The independent variable should be delta-t, with time measured in units determined by the value sent to setLongitudeVelocityUnits(AngularVelocityUnits).

The polynomial returned is the one held by this source position, so any changes made to it will be reflected here. Note that this means that client objects need never use the set method. Instead, they may just use this method and manipulate the polynomial.

Returns:
the equation for calculating the change in the longitude of this position since the reference time.

setLongitudeMotion

public void setLongitudeMotion(Polynomial longitudeEqn)
Sets this position's longitude motion equation to longitudeEqn.

See getLongitudeMotion() for an explanation of the independent variable and its coefficients.

This method will save a reference to longitudeEqn; it will not make and store a clone. This means that any changes made to longitudeEqn after calling this method will be reflected in this position. Note that it is not necessary to use this set method; clients may choose to interact only with the get method and manipulate the returned polynomial.

If longitudeEqn is null, a new empty polynomial will be created and used for this motion.

Parameters:
longitudeEqn - the longitude motion equation for this position.

getLatitudeMotion

public Polynomial getLatitudeMotion()
Returns the polynomial, in delta-t, for calculating change in the latitude of this position since the reference time.

The independent variable should be delta-t, with time measured in units determined by the value sent to setLatitudeVelocityUnits(AngularVelocityUnits).

The polynomial returned is the one held by this source position, so any changes made to it will be reflected here. Note that this means that client objects need never use the set method. Instead, they may just use this method and manipulate the polynomial.

Returns:
the equation for calculating the change in the latitude of this position since the reference time.

setLatitudeMotion

public void setLatitudeMotion(Polynomial latitudeEqn)
Sets this position's latitude motion equation to latitudeEqn.

See getLatitudeMotion() for an explanation of the independent variable and its coefficients.

This method will save a reference to latitudeEqn; it will not make and store a clone. This means that any changes made to latitudeEqn after calling this method will be reflected in this position. Note that it is not necessary to use this set method; clients may choose to interact only with the get method and manipulate the returned polynomial.

If latitudeEqn is null, a new empty polynomial will be created and used for this motion.

Parameters:
latitudeEqn - the latitude motion equation for this position.

getRadialMotion

public Polynomial getRadialMotion()
Returns the polynomial, in delta-t, for calculating change in the distance of this position since the reference time.

The independent variable should be delta-t, with time measured in units determined by the value sent to setRadialVelocityUnits(LinearVelocityUnits).

The polynomial returned is the one held by this source position, so any changes made to it will be reflected here. Note that this means that client objects need never use the set method. Instead, they may just use this method and manipulate the polynomial.

Returns:
the equation for calculating the change in the distance of this position since the reference time.

setRadialMotion

public void setRadialMotion(Polynomial distanceEquation)
Sets this position's distance motion equation to distanceEquation.

See getRadialMotion() for an explanation of the independent variable and its coefficients.

This method will save a reference to distanceEquation; it will not make and store a clone. This means that any changes made to distanceEquation after calling this method will be reflected in this position. Note that it is not necessary to use this set method; clients may choose to interact only with the get method and manipulate the returned polynomial.

If distanceEquation is null, a new empty polynomial will be created and used for this motion.

Parameters:
distanceEquation - the distance motion equation for this position.

setLongitudeVelocityUnits

public void setLongitudeVelocityUnits(AngularVelocityUnits units)
Sets the units that will be used to interpret the longitude motion polynomial. The default value of this property is AngularVelocityUnits.MILLI_ARC_SECONDS_PER_YEAR.

This property will be used by the getLongitude methods. Those methods will assume that all terms will be based on the logical extension of these units.

Parameters:
units - the units to use when interpreting the longitude motion polynomial. If units is null, this method will do nothing.

setLatitudeVelocityUnits

public void setLatitudeVelocityUnits(AngularVelocityUnits units)
Sets the units that will be used to interpret the declination motion polynomial. The default value of this property is AngularVelocityUnits.MILLI_ARC_SECONDS_PER_YEAR.

This property will be used by the getLatitude methods. Those methods will assume that all terms will be based on the logical extension of these units.

Parameters:
units - the units to use when interpreting the declination motion polynomial. If units is null, this method will do nothing.

setRadialVelocityUnits

public void setRadialVelocityUnits(LinearVelocityUnits units)
Sets the units that will be used to interpret the distance motion polynomial. The default value of this property is LinearVelocityUnits.KILOMETERS_PER_SECOND.

This property will be used by the getDistance methods. Those methods will assume that all terms will be based on the logical extension of these units.

Parameters:
units - the units to use when interpreting the distance motion polynomial. If units is null, it will be replaced by a non-null default type.

getLongitudeVelocityUnits

public AngularVelocityUnits getLongitudeVelocityUnits()
Returns the units that will be used to interpret the the longitude motion polynomial.

See Also:
setLongitudeVelocityUnits(AngularVelocityUnits)

getLatitudeVelocityUnits

public AngularVelocityUnits getLatitudeVelocityUnits()
Returns the units that will be used to interpret the the latitude motion polynomial.

See Also:
setLatitudeVelocityUnits(AngularVelocityUnits)

getRadialVelocityUnits

public LinearVelocityUnits getRadialVelocityUnits()
Returns the units that will be used to interpret the the distance motion polynomial.

See Also:
setRadialVelocityUnits(LinearVelocityUnits)

setLongitudeAtTimeZero

public void setLongitudeAtTimeZero(Longitude longitude)
Sets the longitude of this position as of the reference time.

This method will save a reference to longitude; it will not make and store a clone. This means that any changes made to longitude after calling this method will be reflected in this position.

Parameters:
longitude - the longitude of this position as of the reference time. If this value is null it will be treated as a new longitude built via the no-argument constructor.

getLongitudeAtTimeZero

public Longitude getLongitudeAtTimeZero()
Returns the longitude of this position as of the reference time.

Returns:
the longitude of this position as of the reference time. This value is guaranteed to be non-null.

setLatitudeAtTimeZero

public void setLatitudeAtTimeZero(Latitude latitude)
Sets the latitude of this position as of the reference time.

This method will save a reference to latitude; it will not make and store a clone. This means that any changes made to latitude after calling this method will be reflected in this position.

Parameters:
latitude - the latitude of this position as of the reference time. If this value is null it will be treated as a new latitude built via the no-argument constructor.

getLatitudeAtTimeZero

public Latitude getLatitudeAtTimeZero()
Returns the latitude of this position as of the reference time.

Returns:
the latitude of this position as of the reference time. This value is guaranteed to be non-null.

setDistanceAtTimeZero

public void setDistanceAtTimeZero(Distance distance)
Sets the distance of this position as of the reference time.

This method will save a reference to distance; it will not make and store a clone. This means that any changes made to distance after calling this method will be reflected in this position.

Parameters:
distance - the distance of this position as of the reference time. If this value is null it will be treated as a new distance built via the no-argument constructor.

getDistanceAtTimeZero

public Distance getDistanceAtTimeZero()
Returns the distance of this position as of the reference time.

Returns:
the distance of this position as of the reference time. This value is guaranteed to be non-null.

getLongitude

public Longitude getLongitude(Date time)
Returns the longitude of this position at the given point in 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.

Specified by:
getLongitude in interface SkyPosition
Parameters:
time - the point in time for which the longitude is sought.
Returns:
the longitude of this position at the given point in time.

getLatitude

public Latitude getLatitude(Date time)
Returns the latitude of this position at the given point in 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.

Specified by:
getLatitude in interface SkyPosition
Parameters:
time - the point in time for which the latitude is sought.
Returns:
the latitude of this position at the given point in time.

getDistance

public Distance getDistance(Date time)
Returns the distance of this position at the given point in 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.

Specified by:
getDistance in interface SkyPosition
Parameters:
time - the point in time for which the distance is sought.
Returns:
the distance of this position at the given point in time.

setLongitudeUncertainty

public void setLongitudeUncertainty(Longitude uncertainty)
Sets the uncertainty level in the longitude of this position.

Note that, unless uncertainty is null, this position will hold a reference to uncertainty. That is, this method will not make a copy of uncertainty. This means that any changes made to uncertainty will be reflected here. Note, too, that this method is not strictly required. Clients could instead call getLongitudeUncertainty() and operate on the returned object.

Parameters:
uncertainty - the uncertainty level in the longitude of this position. An uncertainty of null will be treated as an uncertainty of zero.

setLatitudeUncertainty

public void setLatitudeUncertainty(Latitude uncertainty)
Sets the uncertainty level in the latitude of this position.

Note that, unless uncertainty is null, this position will hold a reference to uncertainty. That is, this method will not make a copy of uncertainty. This means that any changes made to uncertainty will be reflected here. Note, too, that this method is not strictly required. Clients could instead call getLatitudeUncertainty() and operate on the returned object.

Parameters:
uncertainty - the uncertainty level in the latitude of this position. An uncertainty of null will be treated as an uncertainty of zero.

setDistanceUncertainty

public void setDistanceUncertainty(Distance uncertainty)
Sets the uncertainty level in the distance of this position.

Note that, unless uncertainty is null, this position will hold a reference to uncertainty. That is, this method will not make a copy of uncertainty. This means that any changes made to uncertainty will be reflected here. Note, too, that this method is not strictly required. Clients could instead call getDistanceUncertainty() and operate on the returned object.

Parameters:
uncertainty - the uncertainty level in the distance of this position. An uncertainty of null will be treated as an uncertainty of zero.

getLongitudeUncertainty

public Longitude getLongitudeUncertainty()
Returns the uncertainty in the longitude of this position.

The returned object is guaranteed to be non-null and is also a reference to the internal uncertainty held by this position. This means any changes made by clients to the returned object will be reflected in this position.

Specified by:
getLongitudeUncertainty in interface SphericalPosition
Returns:
the uncertainty in the longitude of this position.

getLatitudeUncertainty

public Latitude getLatitudeUncertainty()
Returns the uncertainty in the latitude of this position.

The returned object is guaranteed to be non-null and is also a reference to the internal uncertainty held by this position. This means any changes made by clients to the returned object will be reflected in this position.

Specified by:
getLatitudeUncertainty in interface SphericalPosition
Returns:
the uncertainty in the latitude of this position.

getDistanceUncertainty

public Distance getDistanceUncertainty()
Returns the uncertainty in the distance of this position.

The returned object is guaranteed to be non-null and is also a reference to the internal uncertainty held by this position. This means any changes made by clients to the returned object will be reflected in this position.

Specified by:
getDistanceUncertainty in interface SphericalPosition
Returns:
the uncertainty in the distance of this position.

clone

public PolynomialPosition clone()
Returns a copy of this polynomial position.

If anything goes wrong during the cloning procedure, a RuntimeException will be thrown.

Specified by:
clone in interface SkyPosition
Specified by:
clone in interface SphericalPosition
Returns:
a copy of this sky position.

equals

public boolean equals(Object o)
Returns true if o is equal to this position.


hashCode

public int hashCode()
Returns a hash code value for this position.


compareTo

public int compareTo(PolynomialPosition other)
Compares this position to other for order.

One position is deemed to be "less than" the other if it has a valid time range that is less than that of the other. In the case that two positions have the same valid time range, the reference time is used as a tie-breaker. If these are the same other attributes are compared until a difference is found. If none are found, the return value is zero.

Specified by:
compareTo in interface Comparable<PolynomialPosition>
Parameters:
other - the time interval to which this one is compared.
Returns:
a negative integer, zero, or a positive integer as this interval is less than, equal to, or greater than the other interval.

setCoordinateSystem

public void setCoordinateSystem(CelestialCoordinateSystem newSystem)
Sets the system of latitude and longitude on which this position is based. If newSystem is null, this method does nothing.

Parameters:
newSystem - the system of latitude and longitude on which this position is based.

getCoordinateSystem

public CelestialCoordinateSystem getCoordinateSystem()
Description copied from interface: SkyPosition
Returns the coordinate system to use when interpreting the latitude and longitude values of this position.

Specified by:
getCoordinateSystem in interface SkyPosition
Returns:
the system of latitude and longitude used by this position.

setEpoch

public void setEpoch(Epoch newEpoch)
Sets the epoch on which this position is based. If newEpoch is null, this method does nothing.

Parameters:
newEpoch - the epoch on which this position is based.

getEpoch

public Epoch getEpoch()
Description copied from interface: SkyPosition
Returns the epoch on which this position is based.

Specified by:
getEpoch in interface SkyPosition
Returns:
the epoch on which this position is based.

setOriginOfInformation

public void setOriginOfInformation(String origin)
Sets the origin of this position's information.

Parameters:
origin - the origin of this position's information. A value of null will be replaced by a non-null default value.

getOriginOfInformation

public String getOriginOfInformation()
Description copied from interface: SkyPosition
Returns the origin of this position's information.

Specified by:
getOriginOfInformation in interface SkyPosition
Returns:
the origin of this position's information.

getLongitude

public Longitude getLongitude()
Returns the current longitude of this position.

This is convenience method equivalent to getLongitude(new Date()). As such, whether or not the returned longitude is a reference to an internally held object depends upon the behavior of getLongitude(Date).

Specified by:
getLongitude in interface SphericalPosition
Returns:
the current longitude of this position.

getLatitude

public Latitude getLatitude()
Returns the current latitude of this position.

This is convenience method equivalent to getLatitude(new Date()). As such, whether or not the returned latitude is a reference to an internally held object depends upon the behavior of getLatitude(Date).

Specified by:
getLatitude in interface SphericalPosition
Returns:
the current latitude of this position.

getDistance

public Distance getDistance()
Returns the current distance of this position.

This is convenience method equivalent to getDistance(new Date()). As such, whether or not the returned distance is a reference to an internally held object depends upon the behavior of getDistance(Date).

Specified by:
getDistance in interface SphericalPosition
Returns:
the current distance of this position.

toPosition

public SkyPosition toPosition(CelestialCoordinateSystem system,
                              Epoch epoch,
                              EarthPosition observer,
                              LocalSiderealTime lst)
                       throws CoordinateConversionException
Description copied from interface: SkyPosition
Returns a new position expressed in the given coordinate system and epoch that is equivalent to this position. This position is not changed by this method.

Specified by:
toPosition in interface SkyPosition
Parameters:
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.
Returns:
a new position with a coordinate system of system, and epoch of epoch, and coordinates that represent a conversion from those of this position.
Throws:
CoordinateConversionException - if anything goes wrong with the conversion.

toPosition

public SkyPosition toPosition(CelestialCoordinateSystem system,
                              Epoch epoch,
                              EarthPosition observer,
                              LocalSiderealTime lst,
                              CelestialCoordinateConverter converter)
                       throws CoordinateConversionException
Description copied from interface: SkyPosition
Returns a new position expressed in the given coordinate system and epoch that is equivalent to this position. This position is not changed by this method.

Specified by:
toPosition in interface SkyPosition
Parameters:
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.
Returns:
a new position with a coordinate system of system, and epoch of epoch, and coordinates that represent a conversion from those of this position.
Throws:
CoordinateConversionException - if anything goes wrong with the conversion.

getAngularSeparation

public Angle getAngularSeparation(SphericalPosition other)
Description copied from interface: SphericalPosition
Calculates the current angular separation between this position and 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.

Specified by:
getAngularSeparation in interface SphericalPosition
Parameters:
other - a position from which this one is separated by the returned angle.
Returns:
the angle of separation between this position and other.

getAngularSeparation

public Angle getAngularSeparation(SphericalPosition other,
                                  Date time)
Description copied from interface: SkyPosition
Calculates current angular separation between this position and 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.

Specified by:
getAngularSeparation in interface SkyPosition
Parameters:
other - a position from which this one is separated by the returned angle.
time - the point in time for which the separation is sought.
Returns:
the angle of separation between this position and other.


Copyright © 2009. All Rights Reserved.