Please enable JavaScript to view this site.

 

int = LunarOccultationOnDate(nDate, nMoonDataSourceIndex, nPlanetOrStar)

 

This macro function calculates the time of the lunar occultation of the body nPlanetOrStar, on nDate, if visible based on the observer position corresponding to the Moon data source of index nMoonDataSourceIndex.

 

The result is the time of the day expressed in one millionth of a day (less than 1/10th of a second).

If no lunar occultation occurs on nDate, then the function returns -1.

 

The macro code below checks for the lunar occultation of any of the planets, including Pluto, on the date of the incoming macro token.

sOccultationsBuffer = ''
for nPlanet = n_MERCURY to n_PLUTO step 1
    sBuffer = ''
    nComboResult = LunarOccultationOnDate(n_TokenDate, 1, nPlanet)
    if nComboResult > -1
        nTime = nComboResult mod 1000000
        sBuffer = 'Lunar occultation of ' + PlanetName(nPlanet)
        sBuffer = sBuffer + ' at ' + FormatTime('hh:nn', nTime, true)
        sOccultationsBuffer = sOccultationsBuffer + chr(13) + sBuffer
    endif
endfor

See also: LunarEclipseTypeName, SolarEclipseOnDate.

 


Topic 180065, last updated on 18-Apr-2020