A04 · Crossing times, bearings and event order

At 50° N, 0° longitude and sea level, we disabled refraction and compared the crossing solver with the spherical altitude equation. For a track of declination zero, the expected azimuths on a level skyline are 90° and 270°. We then raised the entire skyline to 5°, and finally raised only the eastern sector to 5° across the rising point. The table gives the returned azimuths in degrees clockwise from north.

Skyline Zero-declination rise Zero-declination set Mintaka rise Mintaka set
Level at 0° 90.00000 270.00000 89.53811 270.46193
Level at 5° 95.98482 264.01518 95.51882 264.48122
Eastern ridge only 95.98482 270.00000 95.51882 270.46193

The prescribed track exercised the internal crossing solver. The named-star cases exercised riseset() on 1 January 2000 UTC. Mintaka’s reference used its noon declination from the same ephemeris and an independent spherical calculation. Polaris returned missing rise and set records on the eastern-ridge profile. All 14 event checks passed. The maximum absolute azimuth discrepancy was below 0.000001° for the prescribed track and below 0.000022° for Mintaka, against a tolerance of 0.001°. The extended study added 137 assertions, all of which passed.

At latitudes 50° N and 35° S, we compared event counts, direction, order, times and bearings with a one-second scan and independently bisected roots on flat, uniformly raised, notched, ridge and step-like skylines. All 28 reference crossings were recovered with no extras. The maximum timing discrepancy was 0.00038 s against a tolerance of 0.02 s. Flat and raised times also agreed with the closed-form hour-angle solution. A constructed touch without a sign change produced no event; a two-second emergence produced both roots.

On 2 January 2000, a ridge at 50° N, 100° E produced rise, set and re-emergence for Mintaka. The public function selected the first rise and first set independently with refraction both on and off. Independent five-second ephemeris scans located the same events within the 1.1 s allowance for whole-second output. Polaris returned no events at either 50° N (always above) or 50° S (always below). A lunar rise after the next local midnight returned the following date in UTC−02:30.

At 35.90083° N, 14.34° E, we compared geometric centre crossings for the Sun and Moon with JPL Horizons. The reference interpolates airless topocentric direction vectors and solves for clearance above the skyline. We tested both scalar and profile representations of a flat skyline and an asymmetric profile. The largest discrepancies were 0.842 s and 0.00410°, within the 3 s and 0.015° comparison tolerances. Doubling the reference sampling interval from 10 to 20 minutes moved the reference times by less than 0.001 s. The tolerances allow for whole-second timestamps and differing ephemeris conventions. These are tests of centre crossings. First limb contact and naked-eye visibility require different definitions.

Download the reproduction scripts, input checksums and results for A04 and D02.

Function entries

riseset(), orbit(), body.position(), hor2alt(), star.phases().