net.grelf.astro
Class SkyVector

java.lang.Object
  extended by net.grelf.astro.SkyVector
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class SkyVector
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Represents a vector on the celestial sphere, eg between two SkyPoints.

See Also:
Serialized Form

Constructor Summary
SkyVector(Angle separation, Angle pa)
          The order of the parameters is like polar coordinates (r, theta).
SkyVector(double separationDegs, double paDegs)
          The order of the parameters is like polar coordinates (r, theta).
 
Method Summary
 SkyVector clone()
          Returns a new SkyVector object with the same data.
 boolean equals(java.lang.Object other)
           
 Angle getPa()
          Get position angle (anticlockwise from north).
 Angle getSeparation()
          Get spherical separation.
 int hashCode()
          Enable objects of this class to be used as hash keys.
 java.lang.String toString()
           
 java.lang.String toString(Angle.Units units)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SkyVector

public SkyVector(double separationDegs,
                 double paDegs)
The order of the parameters is like polar coordinates (r, theta). If separation is negative the sign is removed and 180 added to PA. PA is then converted, if necessary, to lie in range 0..360.


SkyVector

public SkyVector(Angle separation,
                 Angle pa)
The order of the parameters is like polar coordinates (r, theta). If separation is negative the sign is removed and 180 added to PA. PA is then converted, if necessary, to lie in range 0..360.

Method Detail

getSeparation

public Angle getSeparation()
Get spherical separation.


getPa

public Angle getPa()
Get position angle (anticlockwise from north).


equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Enable objects of this class to be used as hash keys.

Overrides:
hashCode in class java.lang.Object

clone

public SkyVector clone()
Returns a new SkyVector object with the same data.

Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toString

public java.lang.String toString(Angle.Units units)