How this calculation works
A rise or set event is a crossing of a defined altitude, not simply a change in the calendar date or the first moment a bright object can be seen. This calculator finds crossings in supplied time-and-altitude samples for the selected body and position. It makes the event threshold explicit rather than presenting a hidden astronomy model as authoritative.
Find threshold crossings by piecewise-linear interpolation of supplied altitude samples.A worked example
The prefilled example gives Threshold crossings found = 2. This demonstration uses supplied example data, not an approved vessel operating condition.
Good to know
Linearly interpolated SUPPLIED body-center altitude samples at a chosen position and UTC epoch. Threshold encodes selected sunrise/moonrise/twilight and refraction/horizon convention. No ephemeris generation; zero events describe only supplied time span, not an automatic polar-day assertion.
Reference: events (opens in a new tab) ↗
What a horizon-event calculation means
A rise or set event is a crossing of a defined altitude, not simply a change in the calendar date or the first moment a bright object can be seen. This calculator finds crossings in supplied time-and-altitude samples for the selected body and position. It makes the event threshold explicit rather than presenting a hidden astronomy model as authoritative.
The input samples carry the astronomical information. They must already describe the intended Sun, Moon or other body for the observation location and date. The calculator does not download an almanac or derive a current lunar orbit. That narrower boundary allows an auditable interpolation task while keeping synthetic examples clearly separate from actual ephemerides.
For a related navigation or vessel calculation, use the Marine compass deviation-curve and heading-error calculator. Compare the model and input conventions before combining results.
Read more: events (opens in a new tab) ↗
Choose the altitude convention first
A geometric center crossing at zero degrees differs from an apparent upper-limb sunrise. The latter includes the angular size of the Sun and an assumed atmospheric refraction. Civil, nautical and astronomical twilight instead use geometric solar-center thresholds of minus six, minus twelve and minus eighteen degrees. These are different definitions, not interchangeable accuracy settings for one event.
Moonrise needs its own treatment because lunar semidiameter and horizontal parallax vary. Reusing the usual solar threshold without checking the lunar coordinate convention can create a systematic error. Record whether the supplied altitudes are geometric or apparent, topocentric or geocentric, and center or limb values before choosing a threshold that matches those samples.
Interpolation between supplied observations
Within each pair of adjacent samples, this version treats altitude as a straight-line function of elapsed UTC time. If the threshold lies between their altitudes, the crossing fraction is threshold minus first altitude divided by the altitude change. Applying that fraction to the time interval produces the event time within the supplied bracket.
The sign of the altitude change distinguishes a rising from a falling crossing. Repeated samples exactly on the threshold need a separate plateau convention so one event is not counted several times. The method never extrapolates beyond the input coverage, and a row of samples is not evidence that an unsampled interval could not contain an additional event.
An exact synthetic crossing example
Take samples at elapsed hours zero, one and two, with geometric center altitudes minus ten, plus ten and minus ten degrees. Choose a zero-degree threshold. On the first interval the threshold lies halfway between the two altitudes, giving a rising crossing at hour 0.5. On the second interval the corresponding falling crossing is at hour 1.5.
The represented interval above the threshold therefore lasts one hour. These deliberately simple samples test interpolation and crossing classification independently; they are not a real Sun or Moon ephemeris. Their large, linear altitude changes make the expected answer obvious so that the arithmetic can be checked before a date-specific observation series is entered.
Coverage and missing-event interpretation
If every supplied altitude is above the threshold, the represented data contains no crossing and remains above it throughout its sampled linear model. That does not automatically establish polar day, especially when the coverage is short or the samples are sparse. A genuine no-rise or no-set astronomical statement requires adequate ephemeris coverage and a suitable model of the body's motion.
Likewise, an event at the first or final timestamp belongs to the boundary of the entered interval. Decide whether adjacent daily tables share that boundary before combining their event lists. Keeping full UTC timestamps rather than clock time alone prevents the same event from being assigned to the wrong day when the represented series crosses midnight.
Sampling density and physical visibility
Near a shallow horizon crossing, a small altitude error can become a large timing error. Linear interpolation may also miss an altitude tangent that touches a threshold and reverses between samples. Denser samples and a validated ephemeris are needed when such behavior matters; simply printing more decimal places on the interpolated timestamp does not improve the source data.
Atmospheric refraction, horizon obstructions, cloud and observer height affect actual visibility. A threshold based on average assumptions cannot guarantee that an observer will see a disk or a usable horizon at the computed instant. The output describes the selected altitude model, not a forecast of sky conditions or a confirmation that an observation can be made.
Keep the ephemeris boundary visible
Save the body, position, date, altitude convention, sample source and event threshold with the result. A list of times without those details is difficult to review and can be confused with a different rise/set definition. For a tutorial example, label the samples as synthetic rather than attaching them to a current date or an actual port.
Use this page for educational event interpolation and comparison of explicitly supplied data. It does not replace a validated nautical almanac, navigational observations or an operational visibility assessment. Its value is a transparent crossing calculation with declared coverage and assumptions, allowing the astronomical source and the local observing conditions to be evaluated separately. Linearly interpolated SUPPLIED body-center altitude samples at a chosen position and UTC epoch. Threshold encodes selected sunrise/moonrise/twilight and refraction/horizon convention. No ephemeris generation; zero events describe only supplied time span, not an automatic polar-day assertion.
A few questions, answered
Does the calculator generate current Sun and Moon positions?
No. It uses the supplied altitude samples, which must already represent the intended body, date and location.
Why not use zero degrees for every sunrise definition?
A geometric center horizon crossing differs from apparent upper-limb sunrise, which includes limb size and an atmospheric-refraction convention.
Does no crossing prove polar day or polar night?
No. It means no crossing is represented inside the supplied coverage and interpolation model; adequate astronomical coverage is needed for a polar-event claim.
Can a sparse table miss an event?
Yes. An altitude tangent or multiple crossings can occur between widely spaced samples even when the endpoints do not bracket a threshold.