//astronomy/io.github.cosinekitty.astronomy/pairLongitude
fun pairLongitude(body1: Body, body2: Body, time: Time): Double
Returns one body's ecliptic longitude with respect to another, as seen from the Earth.
This function determines where one body appears around the ecliptic plane (the plane of the Earth's orbit around the Sun) as seen from the Earth, relative to the another body's apparent position. The function returns an angle in the half-open range [0, 360) degrees. The value is the ecliptic longitude of body1 relative to the ecliptic longitude of body2.
The angle is 0 when the two bodies are at the same ecliptic longitude as seen from the Earth. The angle increases in the prograde direction (the direction that the planets orbit the Sun and the Moon orbits the Earth).
When the angle is 180 degrees, it means the two bodies appear on opposite sides of the sky for an Earthly observer.
Neither body1 nor body2 is allowed to be Body.Earth. If this happens, the function throws an exception.
An angle in the range [0, 360), expressed in degrees.
body1 | The first body, whose longitude is to be found relative to the second body. |
body2 | The second body, relative to which the longitude of the first body is to be found. |
time | The date and time of the observation. |