The Sun, Moon, any planet other than the Earth, or a user-defined star that was created by a call to DefineStar.
Specifies the geographic coordinates and elevation above sea level of the observer.
Either +1 to find when the body ascends through the altitude, or -1 for when the body descends through the altitude. Any other value will cause an exception to be thrown.
The date and time after which the specified altitude event is to be found.
Limits how many days to search for the body reaching the altitude angle,
and defines the direction in time to search. When limitDays is positive, the
search is performed into the future, after dateStart.
When negative, the search is performed into the past, before dateStart.
To limit the search to the same day, you can use a value of 1 day.
In cases where you want to find the altitude event no matter how far
in the future (for example, for an observer near the south pole), you can
pass in a larger value like 365.
The desired altitude angle of the body's center above (positive) or below (negative) the observer's local horizon, expressed in degrees. Must be in the range [-90, +90].
The date and time of the altitude event, or null if no such event occurs within the specified time window.
Finds the next time the center of a body passes through a given altitude.
Finds when the center of the given body ascends or descends through a given altitude angle, as seen by an observer at the specified location on the Earth. By using the appropriate combination of
directionandaltitudeparameters, this function can be used to find when civil, nautical, or astronomical twilight begins (dawn) or ends (dusk).Civil dawn begins before sunrise when the Sun ascends through 6 degrees below the horizon. To find civil dawn, pass +1 for
directionand -6 foraltitude.Civil dusk ends after sunset when the Sun descends through 6 degrees below the horizon. To find civil dusk, pass -1 for
directionand -6 foraltitude.Nautical twilight is similar to civil twilight, only the
altitudevalue should be -12 degrees.Astronomical twilight uses -18 degrees as the
altitudevalue.By convention for twilight time calculations, the altitude is not corrected for atmospheric refraction. This is because the target altitudes are below the horizon, and refraction is not directly observable.
SearchAltitudeis not intended to find rise/set times of a body for two reasons: (1) Rise/set times of the Sun or Moon are defined by their topmost visible portion, not their centers. (2) Rise/set times are affected significantly by atmospheric refraction. Therefore, it is better to use SearchRiseSet to find rise/set times, which corrects for both of these considerations.SearchAltitudewill not work reliably for altitudes at or near the body's maximum or minimum altitudes. To find the time a body reaches minimum or maximum altitude angles, use SearchHourAngle.