public class RightAscension
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
double |
hours |
double |
minutes |
double |
seconds |
| Constructor and Description |
|---|
RightAscension(double decimal,
boolean IsInDegrees)
Class constructor, given the right ascension in decimal degrees or decimal hours
|
RightAscension(double hours,
double minutes,
double seconds)
Class constructor, given the right ascension in mixed format.
|
RightAscension(RightAscension ra)
Class copy constructor
|
| Modifier and Type | Method and Description |
|---|---|
double |
convertToDecimalDegrees()
Gets the right ascension in decimal degrees
|
double |
convertToDecimalHours()
Gets the right ascension in decimal hours
|
java.lang.String |
toString()
Gets a string representation of the right ascension.
|
java.lang.String |
toStringDecimalDegrees()
Gets a string representation of the right ascension in decimal degrees with 6 decimal digits
|
java.lang.String |
toStringDecimalHours()
Gets a string representation of the right ascension in decimal hours with 6 decimal digits
|
java.lang.String |
toStringFormatted()
Gets a string representation of the right ascension with superscript indication of the units.
|
java.lang.String |
toStringSemicolon()
Gets a string representation of the right ascension with semicolon delimiter.
|
public RightAscension(double hours,
double minutes,
double seconds)
hours - the hours part of the right ascensionminutes - the minutes part of the right ascensionseconds - the seconds part of the right ascensionpublic RightAscension(double decimal,
boolean IsInDegrees)
decimal - the right ascensionIsInDegrees - true for decimal degrees or false for decimal hourspublic RightAscension(RightAscension ra)
ra - public double convertToDecimalHours()
public double convertToDecimalDegrees()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toStringDecimalHours()
public java.lang.String toStringDecimalDegrees()
public java.lang.String toStringSemicolon()
public java.lang.String toStringFormatted()