public class MoonPosition extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
MoonPosition.Test
Testing purpose mainly.
|
| Modifier and Type | Field and Description |
|---|---|
private double |
dec
The declination of the moon.
|
private Lunar |
moon
The helper object calculating the moon position.
|
private double |
ra
The right ascension of the moon.
|
private boolean |
radecvalid
True if ra,dec are valid.
|
private Date |
when
The date for which the moon position is valid.
|
| Constructor and Description |
|---|
MoonPosition()
Constructs a new moon position object.
|
MoonPosition(Date fordate)
Constructs a new moon position object for the given date.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
calcRaDec()
Calculates the right ascension and the declination of the moon.
|
double |
getDec()
Returns the declination of the moon for the center of the earth
in radians.
|
double |
getDistance()
Returns the distance to the moon in kilometers.
|
double |
getIlluminatedFraction() |
double |
getLatitude()
Returns the ecliptical latitude of the moon for the center of the earth
in radians.
|
double |
getLongitude()
Returns the ecliptical longitude of the moon for the center of the earth
in radians.
|
double |
getRa()
Returns the right ascension of the moon for the center of the earth
in radians.
|
void |
setDate(Date fordate)
Sets a (new) date for the moon position object.
|
private Date when
private Lunar moon
private double ra
private double dec
private boolean radecvalid
public MoonPosition()
public MoonPosition(Date fordate)
public void setDate(Date fordate)
public double getLongitude()
IllegalArgumentException - If no date was set.public double getLatitude()
IllegalArgumentException - If no date was set.public double getRa()
IllegalArgumentException - If no date was set.public double getDec()
IllegalArgumentException - If no date was set.public double getDistance()
IllegalArgumentException - If no date was set.public double getIlluminatedFraction()
private void calcRaDec()