libnova  v 0.16.0
Functions
Lunar

Functions

double LIBNOVA_EXPORT ln_get_lunar_sdiam (double JD)
 Calculate the semidiameter of the Moon in arc seconds. More...
 
int LIBNOVA_EXPORT ln_get_lunar_rst (double JD, struct ln_lnlat_posn *observer, struct ln_rst_time *rst)
 Calculate the time of rise, set and transit for the Moon. More...
 
void LIBNOVA_EXPORT ln_get_lunar_geo_posn (double JD, struct ln_rect_posn *moon, double precision)
 Calculate the rectangular geocentric lunar cordinates. More...
 
void LIBNOVA_EXPORT ln_get_lunar_equ_coords_prec (double JD, struct ln_equ_posn *position, double precision)
 Calculate lunar equatorial coordinates. More...
 
void LIBNOVA_EXPORT ln_get_lunar_equ_coords (double JD, struct ln_equ_posn *position)
 Calculate lunar equatorial coordinates. More...
 
void LIBNOVA_EXPORT ln_get_lunar_ecl_coords (double JD, struct ln_lnlat_posn *position, double precision)
 Calculate lunar ecliptical coordinates. More...
 
double LIBNOVA_EXPORT ln_get_lunar_phase (double JD)
 Calculate the phase angle of the Moon. More...
 
double LIBNOVA_EXPORT ln_get_lunar_disk (double JD)
 Calculate the illuminated fraction of the Moons disk. More...
 
double LIBNOVA_EXPORT ln_get_lunar_earth_dist (double JD)
 Calculate the distance between the Earth and the Moon. More...
 
double LIBNOVA_EXPORT ln_get_lunar_bright_limb (double JD)
 Calculate the position angle of the Moon's bright limb. More...
 
double LIBNOVA_EXPORT ln_get_lunar_long_asc_node (double JD)
 Calculate the longitude of the Moon's mean ascending node. More...
 
double LIBNOVA_EXPORT ln_get_lunar_long_perigee (double JD)
 Calculate the longitude of the Moon's mean perigee. More...
 

Detailed Description

Functions relating to the Moon.

All angles are expressed in degrees.

Function Documentation

double ln_get_lunar_bright_limb ( double  JD)

Calculate the position angle of the Moon's bright limb.

Calculate the position angle of the Moon's bright limb.

Calculates the position angle of the midpoint of the illuminated limb of the moon, reckoned eastward from the north point of the disk.

Parameters
JDJulian Day
Returns
The position angle in degrees. The angle is near 270 deg for first quarter and near 90 deg after a full moon. The position angle of the cusps are +90 deg and -90 deg.

References ln_equ_posn::dec, ln_deg_to_rad(), ln_get_lunar_equ_coords(), ln_get_solar_equ_coords(), ln_rad_to_deg(), ln_range_radians(), and ln_equ_posn::ra.

double ln_get_lunar_disk ( double  JD)

Calculate the illuminated fraction of the Moons disk.

Calculate the illuminated fraction of the moons disk

Calculates the illuminated fraction of the Moon's disk.

Parameters
JDJulian Day
Returns
Illuminated fraction. (Value between 0 and 1)

References ln_deg_to_rad(), and ln_get_lunar_phase().

double ln_get_lunar_earth_dist ( double  JD)

Calculate the distance between the Earth and the Moon.

Parameters
JDJulian Day
Returns
The distance between the Earth and Moon in km.

Calculates the distance between the centre of the Earth and the centre of the Moon in km.

References ln_get_lunar_geo_posn(), ln_rect_posn::X, ln_rect_posn::Y, and ln_rect_posn::Z.

Referenced by ln_get_lunar_phase(), and ln_get_lunar_sdiam().

void ln_get_lunar_ecl_coords ( double  JD,
struct ln_lnlat_posn position,
double  precision 
)

Calculate lunar ecliptical coordinates.

Parameters
JDJulian Day
positionPointer to a struct ln_lnlat_posn to store result.
precisionThe truncation level of the series in radians for longitude and latitude and in km for distance. (Valid range 0 - 0.01, 0 being highest accuracy)

Calculate the lunar longitude and latitude for Julian day JD. Accuracy is better than 10 arcsecs in longitude and 4 arcsecs in latitude.

References ln_lnlat_posn::lat, ln_get_lunar_geo_posn(), ln_rad_to_deg(), ln_range_degrees(), ln_lnlat_posn::lng, ln_rect_posn::X, ln_rect_posn::Y, and ln_rect_posn::Z.

Referenced by ln_get_lunar_equ_coords_prec(), and ln_get_lunar_phase().

void ln_get_lunar_equ_coords ( double  JD,
struct ln_equ_posn position 
)

Calculate lunar equatorial coordinates.

Parameters
JDJulian Day
positionPointer to a struct ln_lnlat_posn to store result.

Calculate the lunar RA and DEC for Julian day JD. Accuracy is better than 10 arcsecs in right ascension and 4 arcsecs in declination.

References ln_get_lunar_equ_coords_prec().

Referenced by ln_get_lunar_bright_limb(), and ln_get_lunar_rst().

void ln_get_lunar_equ_coords_prec ( double  JD,
struct ln_equ_posn position,
double  precision 
)

Calculate lunar equatorial coordinates.

Parameters
JDJulian Day
positionPointer to a struct ln_lnlat_posn to store result.
precisionThe truncation level of the series in radians for longitude and latitude and in km for distance. (Valid range 0 - 0.01, 0 being highest accuracy)

Calculate the lunar RA and DEC for Julian day JD. Accuracy is better than 10 arcsecs in right ascension and 4 arcsecs in declination.

References ln_get_equ_from_ecl(), and ln_get_lunar_ecl_coords().

Referenced by ln_get_lunar_equ_coords().

void ln_get_lunar_geo_posn ( double  JD,
struct ln_rect_posn pos,
double  precision 
)

Calculate the rectangular geocentric lunar cordinates.

Parameters
JDJulian day.
posPointer to a geocentric position structure to held result.
precisionThe truncation level of the series in radians for longitude and latitude and in km for distance. (Valid range 0 - 0.01, 0 being highest accuracy)

Calculate the rectangular geocentric lunar coordinates to the inertial mean ecliptic and equinox of J2000. The geocentric coordinates returned are in units of km.

This function is based upon the Lunar Solution ELP2000-82B by Michelle Chapront-Touze and Jean Chapront of the Bureau des Longitudes, Paris.

References ln_rect_posn::X, ln_rect_posn::Y, and ln_rect_posn::Z.

Referenced by ln_get_lunar_earth_dist(), and ln_get_lunar_ecl_coords().

double ln_get_lunar_long_asc_node ( double  JD)

Calculate the longitude of the Moon's mean ascending node.

Parameters
JDJulian Day.
Returns
Longitude of ascending node in degrees.

Calculate the mean longitude of the Moons ascening node for the given Julian day.

double ln_get_lunar_long_perigee ( double  JD)

Calculate the longitude of the Moon's mean perigee.

Parameters
JDJulian Day
Returns
Longitude of Moons mean perigee in degrees.

Calculate the longitude of the Moon's mean perigee.

double ln_get_lunar_phase ( double  JD)

Calculate the phase angle of the Moon.

Parameters
JDJulian Day
Returns
Phase angle. (Value between 0 and 180)

Calculates the angle Sun - Moon - Earth.

References ln_lnlat_posn::lat, ln_deg_to_rad(), ln_get_earth_solar_dist(), ln_get_lunar_earth_dist(), ln_get_lunar_ecl_coords(), ln_get_solar_ecl_coords(), ln_rad_to_deg(), and ln_lnlat_posn::lng.

Referenced by ln_get_lunar_disk().

double ln_get_lunar_rst ( double  JD,
struct ln_lnlat_posn observer,
struct ln_rst_time rst 
)

Calculate the time of rise, set and transit for the Moon.

Parameters
JDJulian day
observerObservers position
rstPointer to store Rise, Set and Transit time in JD
Returns
0 for success, else 1 for circumpolar.
Todo:
Improve lunar standard altitude for rst

Calculate the time the rise, set and transit (crosses the local meridian at upper culmination) time of the Moon for the given Julian day.

Note: this functions returns 1 if the Moon is circumpolar, that is it remains the whole day either above or below the horizon.

References ln_get_body_rst_horizon(), and ln_get_lunar_equ_coords().

double ln_get_lunar_sdiam ( double  JD)

Calculate the semidiameter of the Moon in arc seconds.

Parameters
JDJulian day
Returns
Semidiameter in arc seconds
Todo:
Use Topocentric distance.

Calculate the semidiameter of the Moon in arc seconds for the given julian day.

References ln_get_lunar_earth_dist().