Releases: openwatersio/almanac
Release list
v0.2.1
Almanac 0.2.1 reduces repeated astronomy work in TypeScript and Swift, with the same public API and fixture tolerances.
- Reuse Moon geometry for illumination and flatten the Moon model's scratch arrays.
- Share solar crossing probes, skip crossings before the requested window, and accelerate altitude refinement with a verified bracket and bisection fallback.
- Reuse peak shadow geometry when calculating eclipse contacts.
- Expand the shared performance harness to 15 workloads, including an empty eclipse window that exercises latitude pruning, and document how to reproduce comparisons in the README.
The hosted CI comparison measured these reductions in median query time versus the 0.2.0 astronomy code:
| Workload | TypeScript | Swift |
|---|---|---|
| Sky track / 228 hours | 40.0% | 42.4% |
| Sun events / 228 hours | 39.3% | 40.2% |
| Moon events / 228 hours | 39.1% | 35.1% |
| Previous lunar eclipse | 26.0% | 36.6% |
| Lunar eclipses / 1950–2100 | 26.4% | 23.4% |
Both revisions used the same harness and toolchain within each port, with seven interleaved process pairs and 300 ms warmup. Build/startup time is excluded; timings vary by machine. All 15 workloads pass the 20% regression gate in both ports.
Refined rise/set and twilight times can shift by up to 600 ms after quantization; event counts and kinds are unchanged, and existing accuracy and parity tolerances are preserved. Validation includes 86 TypeScript tests, 91 Swift release tests, and the shared fixture checks.
npm install @openwaters/almanac@0.2.1.package(url: "https://github.com/openwatersio/almanac.git", exact: "0.2.1")Performance changes: #10.
v0.2.0
Almanac 0.2.0 adds backward and range lunar eclipse searches in TypeScript and Swift.
previousLunarEclipse(before:)/previousLunarEclipse(before)finds the previous eclipse directly, retaining the 100 ms same-eclipse band used by next searches.lunarEclipses(from:to:)/lunarEclipses(from, to)returns eclipse peaks in a sorted, half-open[from, to)window. Visibility remains a separate observer query.- Stable peak calculations and Swift date normalization allow adjacent windows to split at a returned peak. The root solver also rejects narrow intervals without a crossing.
- A shared performance harness compares both ports against the base revision in CI, with macOS benchmarks gated on the cheaper TypeScript job.
Compared with the previous consumer loops, CI measured previous searches about 86% faster and 228-hour range searches 65–99% faster. Stable boundary handling adds about 0.1 ms to next searches (8–11%); all workloads pass the 20% regression gate.
Validated against all 344 catalog eclipses, with 86 TypeScript tests, 91 Swift tests, and unchanged fixture/parity tolerances.
npm install @openwaters/almanac@0.2.0.package(url: "https://github.com/openwatersio/almanac.git", exact: "0.2.0")