int = SolarEclipsePositionMax(nDate, bLatitude, nSunDataSourceIndex)
This macro function calculates the latitude or longitude where the maximum of the the solar eclipse, as seen from any location on Earth, on nDate, using the Sun data source of index nSunDataSourceIndex.
➢If bLatitude is true, then the function returns 1000 times the latitude, otherwise it returns 1000 times the longitude.
➢If no solar eclipse occurs on nDate, then the function returns -1.
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.
if SolarEclipseOnDate(n_TokenDate, 1) > -1
nLat = SolarEclipsePositionMax(n_TokenDate, true, 1)
nLon = SolarEclipsePositionMax(n_TokenDate, false, 1)
sEclipseTypeName = SolarEclipseTypeName(EclipseType)
sEclipsePosition = SolarEclipsePositionName(n_TokenDate, 1)
sResult = EclipseTypeName + ' at ' + IntToStr(nLon) + ' lon and ' + IntToStr(nLat) + ' lat'
sResult = sResult + ' (' + sEclipsePosition + ')'
else
sResult = 'No Solar eclipse today'
endif
See also: SolarEclipseOnDate, SolarEclipsePositionName, SolarEclipseTypeName.
Topic 180045, last updated on 18-Apr-2020