Please enable JavaScript to view this site.


int = PlanetInConstellationID(nDate, nTimeOfDay, nPlanetID, nMoonSourceIndex, bTopocentric)


This macro function returns the ID of the astronomical constellation in which the planet nPlanetID is, at nTimeOfDay on nDate, for an observer using the Moon data source of index nMoonDataSourceIndex.


The allowed values for nPlanetID range from n_MERCURY to n_PLUTO, and also include n_SUN and n_MOON.

The ID being returned by this function is an internal ID, which follows the order in which they are listed on the International Astronomical Union (IAU) website, but only the names and abbreviations are official .

The value of the parameter nTimeOfDay must be supplied to the function in one millionth of a day (less than 1/10th of a second), preferably using the function MillionFromHMS to avoid any error.


Note that this is an astronomical function based on the real position of the planets in the sky (as opposed to the astrological signs which are simple divisions on the longitude angles).


See also: PlanetInConstellationAbbreviation and PlanetInConstellationName.


Topic 179950, last updated on 18-Apr-2020