int = PlanetLongitude(nDate, nTimeOfDay, nPlanetID, nMoonSourceIndex)
A planet's longitude locates it along the ecliptic, the reference plane of the Earth's orbit. This macro function returns the topocentric ecliptic longitude of nPlanetID: its longitude as seen from the observer at the Moon data source selected by nMoonSourceIndex, on nDate at nTimeOfDay.
•The allowed values for nPlanetID range from n_MERCURY to n_PLUTO.
•Longitude is in the range 0° (inclusive) to 360° (exclusive). The function multiplies the longitude in degrees by 10000 and truncates the result to an integer from 0 to 3599999. For example, 2782548 represents 278.2548°.
•nDate and nTimeOfDay use the selected source's local time. Supply nTimeOfDay in millionths of a day, using MillionFromHMS to convert hours, minutes and seconds.
This calculation requires a calculated Moon data source. A data-table source returns -1; an undefined or unselected source causes an error. The macro has no parameter for selecting geocentric longitude.
See also: planetary macro functions.
Topic 180010, last updated on 18-Apr-2020