int = PlanetsNearOnRA(nDate, nSunDataSourceIndex, nPlanet1, nPlanet2)
This macro function identifies a “near” event by finding when two bodies have the same geocentric right ascension on nDate. Right ascension is their east–west coordinate measured around the celestial equator, as seen from the centre of the Earth. The function uses coordinate alignment to identify an approach; it does not impose a maximum separation.
Use the same parameters, supported bodies, calculated Sun data source and observing-condition filter as PlanetsNearOn. The packed return value is also the same: declination difference in tenths of a degree multiplied by 1000000, plus local time in millionths of a day. A result of -1 means no qualifying event; test for >= 0 before decoding. The differences are:
•At equal geocentric right ascension, the absolute geocentric declination difference is also the full angular separation on the sky. The encoded value is rounded to tenths of a degree.
•The time is the instant of equal right ascension, not necessarily the instant of closest approach. The observer's location is used for the visibility checks, not for the alignment coordinates.
See also: PlanetsNearOn, PlanetLongitude.
Topic 189990, last updated on 12-Oct-2026