int = PlanetAtExtremalUpperTransit(nDate, nSunSourceIndex, nPlanetID)
This macro function identifies dates when the apparent altitude of the planet specified by nPlanetID at upper transit is greater than on both adjacent dates, or less than on both adjacent dates. It returns the time of that upper transit on nDate.
•The allowed values for nPlanetID range from n_MERCURY to n_PLUTO, and also include n_SUN and n_MOON.
•The sign of the result is negative if the planet has a minimal transit, and positive if the planet has a maximal transit, on nDate. If the date nDate does not correspond to either case, then the function returns 0.
•The absolute value of the result is the time of the day expressed in one millionth of a day (less than 1/10th of a second).
Note that this function normally uses the previous and following dates to determine if today is an extremum, but it will fall back to two days before or after when the corresponding adjacent date has no upper transit. These are local extrema, not necessarily the highest or lowest transit of the year.
Example
The macro code below checks whether the altitude at upper transit of any of the bodies from the Sun to Pluto is greater than on both adjacent dates, or less than on both adjacent dates, on the date of the incoming macro token.
sResult = ''
for nPlanetID = n_SUN to n_PLUTO step 1
sBuffer = ''
nCurResIdx = PlanetAtExtremalUpperTransit(n_TokenDate, 1, nPlanetID)
if nCurResIdx > 0
sBuffer = PlanetName(nPlanetID) + ' highest transit'
endif
if nCurResIdx < 0
sBuffer = PlanetName(nPlanetID) + ' lowest transit'
endif
// add the time it occurs in parentheses
if nCurResIdx <> 0
sBuffer = sBuffer + FormatTime('" ("hh:nn")"', Abs(nCurResIdx), true)
endif
if sBuffer <> ''
if sResult <> ''
sResult = sResult + ', '
endif
sResult = sResult + sBuffer
endif
endfor
This is an event that depends on the position of an observer on the Earth and of the position of the Earth, in contrast to PlanetAtExtremalLatitude which is independent of the position of an observer on the Earth and indeed is independent of the position of the Earth with respect to planet nPlanetID.
See also: planetary macro functions.
Topic 177600, last updated on 12-Oct-2026