Instants, time scales and ΔT #2
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
#3 Angles, coordinates, nutation and obliquity
jeff/zig-astro
#7 Principal phases and lunar age
jeff/zig-astro
Reference
jeff/zig-astro#2
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #1
Parent
#1
What to build
astro.time: an instant that carries its time scale (TT or UT), and ΔT so that callers can work in civil time. An instant can be made from a Julian Day and a time scale, from a Unix timestamp (counted as UT), or from a calendar date and time of day in an explicitly chosen Julian or Gregorian calendar, and read back as each of those. It converts between TT and UT, using the Espenak–Meeus 2006 ΔT polynomials (with their documented extrapolation outside −1999…+3000) or a ΔT the caller supplies. The model's ΔT at an instant can be asked for directly.This ticket also sets up the property and fuzz testing the rest of the work uses: fuzz targets that are also ordinary tests on fixed seeds, a
zig build fuzzstep for--fuzz, and a test binary compiled with LLVM.Source: Meeus, Astronomical Algorithms, 2nd ed., ch. 7 and ch. 10; Espenak and Meeus's ΔT polynomials.
Acceptance criteria
f64Julian Day, and that NaN or ±∞ gives NaNzig build fuzz --fuzz=10Kruns and reports coveragezig build test,zig build check,zig fmt --exclude zig-pkg --check .andreuse lintpass