Determines where one body appears around the ecliptic plane as seen from Earth, relative to another body's apparent position.
Details
The returned angle is in the range [0, 360) degrees. The angle is 0 when the two bodies are at the same ecliptic longitude. The angle increases in the prograde direction (the direction planets orbit the Sun). When the angle is 180 degrees, the bodies appear on opposite sides of the sky.
Neither body1 nor body2 may be the Earth.
Examples
time <- as.POSIXct("2025-02-19 22:10:12", tz = "UTC")
astro_pair_longitude(astro_body["SUN"], astro_body["MOON"], time)
#> $angle
#> [1] 98.88367
#>