|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectastro.SunPosition
public class SunPosition
A class calculating the position of the moon. It is based on the AstroLib package provided by Mark Huss. He gives no hint about the precision of the formulas used, but from a first test I estimate an accuracy of down to one arc minute.
| Nested Class Summary | |
|---|---|
static class |
SunPosition.Test
Testing purpose mainly. |
| Nested classes/interfaces inherited from interface astro.SolarPosition |
|---|
SolarPosition.Plato |
| Field Summary | |
|---|---|
private static double |
ASUN
The constant coefficient. |
private static double |
BSUN
The linear coefficient. |
private Date |
when
The date for which the sun position is valid. |
| Constructor Summary | |
|---|---|
SunPosition()
Constructs a new moon position object. |
|
SunPosition(Date fordate)
Constructs a new moon position object for the given date. |
|
| Method Summary | |
|---|---|
double |
getDec()
Returns the declination of the moon for the center of the earth in radians. |
double |
getDistance()
|
double |
getEclipticalLongitude()
Returns the ecliptical longitude of the Sun 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final double ASUN
private static final double BSUN
private Date when
| Constructor Detail |
|---|
public SunPosition()
public SunPosition(Date fordate)
| Method Detail |
|---|
public void setDate(Date fordate)
setDate in interface SolarPositionpublic double getEclipticalLongitude()
getEclipticalLongitude in interface SolarPositionIllegalArgumentException - If no date was set.public double getDistance()
public double getRa()
getRa in interface SolarPositionIllegalArgumentException - If no date was set.public double getDec()
getDec in interface SolarPositionIllegalArgumentException - If no date was set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||