net.grelf.astro
Class RA

java.lang.Object
  extended by net.grelf.Angle
      extended by net.grelf.astro.RA
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<Angle>

public class RA
extends Angle
implements java.lang.Cloneable, java.io.Serializable

Representation of Right Ascension (celestial longitude).

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class net.grelf.Angle
Angle.Units
 
Field Summary
 
Fields inherited from class net.grelf.Angle
DEGREE_SYMBOL, FOUR_PI, TWO_PI, valueRadians
 
Constructor Summary
RA(Angle angle)
           
RA(double degrees)
           
RA(double degrees, double sigmaDegs)
           
RA(double hour, double min, double sec)
          Can pass in fractional hours or minutes but will be held in normalised form with integer hours and minutes plus fractional seconds.
RA(double hour, double min, double sec, double sigmaDegs)
          Can pass in fractional hours or minutes but will be held in normalised form with integer hours and minutes plus fractional seconds.
 
Method Summary
 RA clone()
          Returns a new RA object with the same data.
 boolean equals(java.lang.Object other)
           
 byte getHour()
          Range 0..23
 byte getMinute()
          Range 0..59
 float getSecond()
          Range 0.0..59.99999
 int hashCode()
          Enable objects of this class to be used as hash keys.
 double toDegrees()
           
 double toHours()
           
 java.lang.String toString()
          Units are radians.
 
Methods inherited from class net.grelf.Angle
acos, add, angleStatistics, angleStatistics, asin, atan, atan2, compareTo, cos, difference, getDegrees, getHours, getRadians, getStdErrDegrees, getStdErrHours, getStdErrRadians, in360, multiply, sin, subtract, tan, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RA

public RA(double hour,
          double min,
          double sec,
          double sigmaDegs)
Can pass in fractional hours or minutes but will be held in normalised form with integer hours and minutes plus fractional seconds.


RA

public RA(double hour,
          double min,
          double sec)
Can pass in fractional hours or minutes but will be held in normalised form with integer hours and minutes plus fractional seconds.


RA

public RA(double degrees,
          double sigmaDegs)

RA

public RA(double degrees)

RA

public RA(Angle angle)
Method Detail

getHour

public byte getHour()
Range 0..23


getMinute

public byte getMinute()
Range 0..59


getSecond

public float getSecond()
Range 0.0..59.99999


toHours

public double toHours()

toDegrees

public double toDegrees()

equals

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

hashCode

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

Overrides:
hashCode in class Angle

clone

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

Overrides:
clone in class Angle

toString

public java.lang.String toString()
Description copied from class: Angle
Units are radians.

Overrides:
toString in class Angle