public class CoordinateConversion extends Object
Constructor and Description |
---|
CoordinateConversion()
Start a new instance of the CoordinateConversion Loads the Pal Library.
|
CoordinateConversion(char in,
char out)
The main constuctor, loads the Pal Library.
|
Modifier and Type | Method and Description |
---|---|
String |
convert(AngleDR ra)
Convert the angle into the output system.
|
String |
convert(String data)
Convert the coordinates
|
AngleDR |
normalize(AngleDR ra)
Normalize the input angle to FK5.
|
void |
setDegrees()
Set input and output angles to degrees format.
|
void |
setHigh()
Set High precision results.
|
void |
setHours()
Set input and output angles to hours format ( ie H M S ).
|
void |
setInEpoch(String ep)
Set the input Epoch.
|
void |
setInEquinox(String eq)
Set the input Equinox.
|
void |
setInSystem(char in)
Set the input System.
|
void |
setLow()
Set Low precision results.
|
void |
setMedium()
Set Medium precision results.
|
void |
setOutEpoch(String ep)
Set the output Epoch.
|
void |
setOutEquinox(String eq)
Set the output Equinox.
|
void |
setOutSystem(char out)
Set the output System.
|
void |
setPrecision(char prec) |
void |
setPrecision(String prec)
Set the precision.
|
void |
setUnits(char unit) |
void |
setUnits(String unit)
Set the RA mode.
|
AngleDR |
validate(String value)
Validate a coordinate string.
|
public CoordinateConversion()
public CoordinateConversion(char in, char out)
in
- The input system codeout
- The Output System codepublic String convert(String data)
data
- The Coordinates to convertpublic void setInSystem(char in)
in
- The input system.
Allowable systems are:
public void setInEpoch(String ep)
ep
- The epoch, eg. 1984.53 or 1983 2 26.4public void setInEquinox(String eq)
eq
- The eqinox, eg. 1950 (optional B or J prefix)public void setOutSystem(char out)
out
- The output system.
Allowable systems are:
public void setOutEpoch(String ep)
ep
- The epoch, eg. 1984.53 or 1983 2 26.4public void setOutEquinox(String eq)
eq
- The equinox, eg. 1950 (optional B or J prefix)public void setHigh()
public void setMedium()
public void setLow()
public void setPrecision(String prec)
prec
- Precision of results, either 'H', 'M' (default) or 'L'public void setPrecision(char prec)
public void setDegrees()
public void setHours()
public void setUnits(String unit)
unit
- The RA Mode, either 'D' or 'H' (default).public void setUnits(char unit)
public AngleDR validate(String value)
value
- The coordinate string.public AngleDR normalize(AngleDR ra)
ra
- The angle in specified input system.Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.