Search for relative longitude event between Earth and another planet
Source:R/oppositions_conjunctions.R
astro_search_relative_longitude.RdSearches for the next time when the relative longitude (angle measured in the ecliptic plane from one planet to another as seen from the Sun) reaches a specified target angle.
Details
Relative longitude defines several important astronomical events:
- 0°
Conjunction (inferior for Mercury/Venus, opposition for outer planets)
- 180°
Superior conjunction (planet on opposite side of Sun from Earth)
For planets orbiting closer to the Sun than Earth (Mercury, Venus), a relative longitude of 0° indicates inferior conjunction. For planets orbiting farther from the Sun, 0° indicates opposition (closest approach).
Examples
# Find next opposition of Mars after 2025-01-01
start <- as.POSIXct("2025-01-01", tz = "UTC")
astro_search_relative_longitude(astro_body["MARS"], 0, start)
#> [1] "2025-01-16 02:30:12 UTC"