net.grelf.astro
Class Dec

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

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

Representation of declination (celestial latitude).

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
Dec(Angle angle)
           
Dec(double degrees)
           
Dec(double degrees, double sigmaDegrees)
           
Dec(double degrees, double mins, double secs)
          Can pass in fractional degrees or minutes but will be held in normalised form with integer degrees and minutes plus fractional seconds.
10.2.1 Important change: previously the degrees part could be negative but min and sec were expected to be positive (as from a user dialogue).
Dec(double degrees, double mins, double secs, double sigmaDegrees)
          Can pass in fractional degrees or minutes but will be held in normalised form with integer degrees and minutes plus fractional seconds.
10.2.1 Important change: previously the degrees part could be negative but min and sec were expected to be positive (as from a user dialogue).
 
Method Summary
 Dec clone()
          Returns a new Dec object with the same data.
 boolean equals(java.lang.Object other)
           
 byte getDegree()
          Range -90..+90
 byte getMinute()
          Range -59..59
 float getSecond()
          Range -59.99999..59.99999
 int hashCode()
          Enable objects of this class to be used as hash keys.
 double toDegrees()
           
 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

Dec

public Dec(double degrees,
           double mins,
           double secs,
           double sigmaDegrees)
Can pass in fractional degrees or minutes but will be held in normalised form with integer degrees and minutes plus fractional seconds.
10.2.1 Important change: previously the degrees part could be negative but min and sec were expected to be positive (as from a user dialogue). BUT that will not work if the degrees part is zero. So...
VERY IMPORTANT: If the declination is negative every field in this constructor must be negative. Note that in a user dialogue (eg, in net.grelf.astro.StarChart) it can be different because each text field holds a String rather than a number so the sign is detectable on "-0".


Dec

public Dec(double degrees,
           double mins,
           double secs)
Can pass in fractional degrees or minutes but will be held in normalised form with integer degrees and minutes plus fractional seconds.
10.2.1 Important change: previously the degrees part could be negative but min and sec were expected to be positive (as from a user dialogue). BUT that will not work if the degrees part is zero. So...
VERY IMPORTANT: If the declination is negative every field in this constructor must be negative. Note that in a user dialogue (eg, in net.grelf.astro.StarChart) it can be different because each text field holds a String rather than a number so the sign is detectable on "-0".


Dec

public Dec(double degrees,
           double sigmaDegrees)

Dec

public Dec(double degrees)

Dec

public Dec(Angle angle)
Method Detail

getDegree

public byte getDegree()
Range -90..+90


getMinute

public byte getMinute()
Range -59..59


getSecond

public float getSecond()
Range -59.99999..59.99999


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 Dec clone()
Returns a new Dec 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