Earth perihelion and aphelion

Almanac 0.11.0

Release Sky

Almanac 0.11.0 adds Earth perihelion and aphelion events in TypeScript, Swift, and Kotlin.

  • earthApsides(startUtc, endUtc) / earthApsides(from:to:) returns the sorted perihelion and aphelion events in a half-open window. Each carries its time, its kind (perihelion or aphelion; EarthApsisKind in Swift and Kotlin), and distanceKm, the geometric Sun–Earth centre distance at that instant.
  • The search brackets each root in fixed cells anchored at J2000, as the season and lunar apsis searches do, so every window containing an event reports the same millisecond.
  • The contract defines the model and tolerances, and the README shows the call in each language.

The search translates Astronomy Engine's SearchPlanetApsis for Earth. A pinned, independently compiled Astronomy Engine run is committed as an implementation oracle for all 302 events from 1950 through 2100. Every event matches, with a worst timing difference of 1.525 seconds and a distance difference below a millimeter, against tolerances of 2 seconds and 1 meter. This verifies the translation; it makes no separate physical-accuracy claim. Cross-port parity checks the new events in all three ports, and the release workflow verifies all three suites, Kotlin coverage and source consumption, and independent SwiftPM and packed npm consumers before publishing with provenance.

npm install @openwaters/almanac@0.11.0
import { earthApsides } from '@openwaters/almanac';
for (const { kind, time, distanceKm } of earthApsides(start, end)) console.log(kind, time.toISOString(), distanceKm);
.package(url: "https://github.com/openwatersio/almanac.git", exact: "0.11.0")

Kotlin consumers can pin the v0.11.0 source checkout using the installation guide. No Maven artifact is published.

Earth apsides: #82. CI Node versions from mise: #80. Release preparation: #83.

Full changelog.