|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.layer.daynight.SunPosition
public class SunPosition
SunPosition calculates the latitude/longitude on the Earth that is closest to the Sun, the point on the Earth where the sun is directly overhead.
All of these calculations are based on an epoch, or a starting point where the Sun's position is known. From the reference book, the epoch is 1990 January 0.0.
Also, all of the equations, and understanding of this whole algorithm, was gained from a great book - Practical Astronomy with Your Calculator, by Peter Duffett-Smith, Third Edition, Cambridge University Press 1988.
Field Summary | |
---|---|
static double |
ECCENTRICITY
Eccentricity of orbit, from Duffett-Smith, chapter 46, table 6. |
static double |
ECLIPTIC_LONGITUDE_EPOCH
Ecliptic Longitude of earth at 1990 January epoch. |
static double |
ECLIPTIC_LONGITUDE_PERIGEE
Ecliptic Longitude of of perigee. |
static double |
el0
The algorithm representation for the moon MOON_EPOCH_MEAN_LONGITUDE, "l". |
static double |
EPOCH_JULIAN_DATE
Epoch Julian Date. |
static double |
EPOCH_TIME_SECS
Epoch start time in seconds. |
static double |
epsilon_g
Variable notation of ECLIPTIC_LONGITUDE_EPOCH from Duffett-Smith. |
static double |
eye
The algorithm representation for the moon MOON_ORBIT_INCLINATION, "i". |
static double |
MAJOR_AXIS_MOON_ORBIT
Moon parameter, from Duffett-Smith, chapter 65, table 10. |
static double |
MEAN_OBLIQUITY_OF_EPOCH
MEAN_OBLIQUITY_OF_EPOCH gives the mean obliquity of the ecliptic, which is the angle between the planes of the equator and the ecliptic. |
static double |
MOON_ANGULAR_SIZE
Moon parameter, from Duffett-Smith, chapter 65, table 10. |
static double |
MOON_ECCENTRICITY
Moon parameter, from Duffett-Smith, chapter 65, table 10. |
static double |
MOON_EPOCH_MEAN_LONGITUDE
Moon parameter, from Duffett-Smith, chapter 65, table 10. |
static double |
MOON_ORBIT_INCLINATION
Moon parameter, from Duffett-Smith, chapter 65, table 10. |
static double |
MOON_PARALLAX
Moon parameter, from Duffett-Smith, chapter 65, table 10. |
static double |
N0
The algorithm representation for the moon NODE_EPOCH_MEAN_LONGITUDE. |
static double |
NODE_EPOCH_MEAN_LONGITUDE
Moon parameter, from Duffett-Smith, chapter 65, table 10. |
static double |
omega_bar_g
Variable notation of ECLIPTIC_LONGITUDE_PERIGEE from Duffett-Smith. |
static double |
ORBIT_RADS_PER_DAY
Constant denoting the number of radians an object would travel if it orbited around the earth in a day. |
static double |
P0
The algorithm representation for the moon PERIGEE_EPOCH_MEAN_LONGITUDE. |
static double |
PERIGEE_EPOCH_MEAN_LONGITUDE
Moon parameter, from Duffett-Smith, chapter 65, table 10. |
Constructor Summary | |
---|---|
SunPosition()
|
Method Summary | |
---|---|
protected static double |
adjustWithin2PI(double num)
Little function that resets the input to be within 0 - 2*PI, by adding or subtracting 2PI as needed. |
static double |
calculateJulianDate(java.util.GregorianCalendar cal)
Given a date from a gregorian calendar, give back a julian date. |
static double |
eccentricAnomaly(double M)
Use Kepllers's equation to find the eccentric anomaly. |
protected static double |
eclipticToEquatorialAscension(double lambda,
double beta)
Conversion from ecliptic to equatorial coordinates for ascension. |
protected static double |
eclipticToEquatorialDeclination(double lambda,
double beta)
Conversion from ecliptic to equatorial coordinates for declination. |
static double |
greenwichSiderealTime(double julianDate,
java.util.GregorianCalendar time)
Calculate the greenwich sidereal time (GST). |
static void |
main(java.lang.String[] arg)
|
static LatLonPoint |
moonPosition(long mssue)
Given the number of milliseconds since the unix epoch, compute position on the earth (lat, lon) such that moon is directly overhead. |
protected static double |
sunEclipticLongitude(double M0)
Calculate the ecliptic longitude of sun, in radians. |
protected static double |
sunMeanAnomaly(double daysSinceEpoch)
Calculate the mean anomaly of sun, in radians. |
static LatLonPoint |
sunPosition(long mssue)
Given the number of milliseconds since the unix epoch, compute position on the earth (lat, lon) such that sun is directly overhead. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double EPOCH_JULIAN_DATE
public static final double EPOCH_TIME_SECS
public static double ORBIT_RADS_PER_DAY
public static final double ECLIPTIC_LONGITUDE_EPOCH
public static final double epsilon_g
public static final double ECLIPTIC_LONGITUDE_PERIGEE
public static final double omega_bar_g
public static final double ECCENTRICITY
public static final double MEAN_OBLIQUITY_OF_EPOCH
public static final double MOON_EPOCH_MEAN_LONGITUDE
public static final double el0
public static final double PERIGEE_EPOCH_MEAN_LONGITUDE
public static final double P0
public static final double NODE_EPOCH_MEAN_LONGITUDE
public static final double N0
public static final double MOON_ORBIT_INCLINATION
public static final double eye
public static final double MOON_ECCENTRICITY
public static final double MAJOR_AXIS_MOON_ORBIT
public static final double MOON_ANGULAR_SIZE
public static final double MOON_PARALLAX
Constructor Detail |
---|
public SunPosition()
Method Detail |
---|
public static double eccentricAnomaly(double M)
M
- the angle that the Sun has moved since it passed through
perigee.protected static double sunMeanAnomaly(double daysSinceEpoch)
daysSinceEpoch
- number of days since 1990 January epoch.protected static double sunEclipticLongitude(double M0)
M0
- sun's mean anomaly, calculated for the requested time relative
to the 1990 epoch.protected static double eclipticToEquatorialAscension(double lambda, double beta)
lambda
- ecliptic longitudebeta
- ecliptic latitudeprotected static double eclipticToEquatorialDeclination(double lambda, double beta)
lambda
- ecliptic longitudebeta
- ecliptic latitudepublic static double calculateJulianDate(java.util.GregorianCalendar cal)
cal
- Gregorian calendar for requested date.
public static double greenwichSiderealTime(double julianDate, java.util.GregorianCalendar time)
julianDate
- julian date of requesttime
- calendar reflecting local time zone change to greenwich
public static LatLonPoint sunPosition(long mssue)
mssue
- milliseconds since unix epoch
public static LatLonPoint moonPosition(long mssue)
mssue
- milliseconds since unix epoch
protected static double adjustWithin2PI(double num)
num
- The number to be modified, if needed.public static void main(java.lang.String[] arg)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |