|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectastro.Position
public class Position
A class defining a position in the sky via right ascension and declination. All angles are in radians if not stated otherwise.
| Field Summary | |
|---|---|
private double |
decrad
The declination in radians. |
private double |
rarad
The right ascension in radians. |
| Constructor Summary | |
|---|---|
protected |
Position()
Constructs a new position object. |
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private double rarad
private double decrad
| Constructor Detail |
|---|
protected Position()
| Method Detail |
|---|
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.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||