GreenCal.Astro.Moon (GreenCal v0.2.0)

Copy Markdown View Source

Position of the Moon: truncated ELP-2000/82 theory as published by Meeus, Astronomical Algorithms (2nd ed.), chapter 47.

Complete tables 47.A and 47.B (60 terms in longitude/distance, 60 in latitude) plus the additive terms A₁/A₂/A₃. Accuracy stated by Meeus: ~10″ in longitude, ~4″ in latitude.

Every function takes a JDE (Julian day in Terrestrial Time). The UT → TT conversion is the caller's responsibility, see GreenCal.Astro.Time.jd_to_jde/2.

Summary

Types

Geocentric lunar position.

Functions

Altitude h₀ of the Moon's center at rise/set, in degrees.

Apparent geocentric position of the Moon for a JDE (Terrestrial Time).

Types

position()

@type position() :: %{
  longitude: float(),
  latitude: float(),
  distance_km: float(),
  parallax: float(),
  right_ascension: float(),
  declination: float(),
  semidiameter: float()
}

Geocentric lunar position.

  • :longitude / :latitudeapparent ecliptic coordinates (nutation applied), in degrees
  • :distance_km — center-to-center distance
  • :parallax — equatorial horizontal parallax π, in degrees
  • :right_ascension / :declination — apparent equatorial, in degrees
  • :semidiameter — geocentric apparent semidiameter, in degrees

Functions

horizon_altitude(map)

@spec horizon_altitude(position()) :: float()

Altitude h₀ of the Moon's center at rise/set, in degrees.

Meeus, ch. 15: h₀ = 0.7275·π − 34′. The 0.7275 factor absorbs the semidiameter and the parallax, the 34′ the standard atmospheric refraction. It differs from the Sun's −0.8333°: using the solar value for the Moon shifts rise times by several minutes.

position(jde)

@spec position(float()) :: position()

Apparent geocentric position of the Moon for a JDE (Terrestrial Time).

Meeus' example 47.a (1992 April 12, 0h TD):

iex> m = GreenCal.Astro.Moon.position(2_448_724.5)
iex> Float.round(m.longitude, 4)   # published: 133.167265
133.1672
iex> Float.round(m.latitude, 4)    # published: -3.229126
-3.2291
iex> Float.round(m.distance_km, 1) # published: 368409.7
368409.7