Principal phases and lunar age #7
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Depends on
#2 Instants, time scales and ΔT
jeff/zig-astro
Reference
jeff/zig-astro#7
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
Principal phases and lunar age, from ch. 49. Given an instant and a kind (new Moon, first quarter, full Moon, last quarter): the instant of the next one after it and of the previous one before it, and an iterator over every principal phase between two instants, in order. Results are instants in TT. Meeus's lunation number k stays internal.
Lunar age at an instant is the time since the previous new Moon as found by that search, in days.
Ch. 49 has series of its own and does not need the Moon's or the Sun's position.
The float-to-integer step that finds k must check its input first:
@intFromFloatpanics on NaN and on values out of range. A NaN or infinite instant gives NaN, never a panic.Acceptance criteria
f64Julian Day, including NaN, ±∞ and extreme finite valueszig build test,zig build check,zig fmt --exclude zig-pkg --check .andreuse lintpass