public class Position extends Object
| Modifier and Type | Field and Description |
|---|---|
private double |
decrad
The declination in radians.
|
private double |
rarad
The right ascension in radians.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Position()
Constructs a new position object.
|
| Modifier and Type | Method and Description |
|---|---|
static Position |
fromDegrees(double rad,
double ded)
Creates a new position with ra and dec specified in degress.
|
static Position |
fromHourAndDegree(double rah,
double ded)
Creates a new position with ra in hours and dec in degrees.
|
static Position |
fromHourAndDegreeString(String ras,
String des)
Creates a new position with ra in dec specified as a string.
|
static Position |
fromRadians(double rar,
double der)
Creates a new position with ra and dec specified in radians.
|
double |
getDec()
Returns the declination in radians.
|
double |
getRa()
Returns the right ascension in radians.
|
protected void |
setDec(double de)
Sets the declination.
|
protected void |
setRa(double ra)
Sets the right ascension.
|
String |
toString()
Returns a string-description of the position.
|
private double rarad
private double decrad
protected Position()
public double getRa()
public double getDec()
public static Position fromRadians(double rar, double der)
public static Position fromDegrees(double rad, double ded)
public static Position fromHourAndDegree(double rah, double ded)
public static Position fromHourAndDegreeString(String ras, String des)
protected void setRa(double ra)
ra - The right ascension in radians.protected void setDec(double de)
dec - The declination in radians.