Please enable JavaScript to view this site.

 

int = SolarEclipsePositionMax(nDate, bLatitude, nSunDataSourceIndex)

 

This macro function returns the latitude or longitude of the location on Earth where the solar eclipse occurring on nDate reaches its maximum, using the Sun data source of index nSunDataSourceIndex.

 

➢The result is the requested coordinate in thousandths of a degree, rounded to the nearest integer.

➢Positive latitude indicates north and negative latitude indicates south; positive longitude indicates east and negative longitude indicates west.

➢If no solar eclipse reaches its global maximum on nDate in the selected Sun data source’s time zone, the function returns -1. To reserve this value for “no eclipse”, a coordinate that would otherwise round to -1 (−0.001°) is returned as 0.

 

To get the latitude and longitude of a solar eclipse, you need to call the function SolarEclipsePositionMax twice, with different parameters, as shown in the macro code below.

nComboResult = SolarEclipseOnDate(n_TokenDate, 1)
if nComboResult >= 0
    nEclipseType = nComboResult div 1000000
    nLat = SolarEclipsePositionMax(n_TokenDate, true, 1)
    nLon = SolarEclipsePositionMax(n_TokenDate, false, 1)
    sEclipseTypeName = SolarEclipseTypeName(nEclipseType)
    sEclipsePosition = SolarEclipsePositionName(n_TokenDate, 1)
    sResult = sEclipseTypeName + ' at longitude ' + IntToStr(nLon)
    sResult = sResult + ', latitude ' + IntToStr(nLat)
    sResult = sResult + ' (coordinates in thousandths of a degree)'
    sResult = sResult + ' (' + sEclipsePosition + ')'
else
    sResult = 'No solar eclipse today'
endif

See also: SolarEclipseOnDate, SolarEclipsePositionName, SolarEclipseTypeName, Solar Eclipse Types.

 


Topic 180045, last updated on 11-Oct-2026