The Sun's apparent position #4

Closed
opened 2026-10-22 22:33:47 -05:00 by jeff · 0 comments
Owner

Part of #1

Parent

#1

What to build

astro.sun.position: the Sun's apparent position at an instant — ecliptic longitude and latitude, distance_au, right ascension and declination — from ch. 25's low-accuracy algorithm (about 0.01°, which the documentation states).

This ticket also sets up the JPL Horizons reference tables the rest of the work compares against: a data file checked into the repository together with the exact Horizons query that produced it, and a test that compares public results to it with a tolerance stated beside each quantity. It is seeded with the Sun's apparent position at sample instants spanning 1900–2100.

Acceptance criteria

  • Ch. 25's worked example passes to the printed precision
  • The Sun's position agrees with Horizons across 1900–2100 within the stated tolerance
  • The Horizons query is recorded so the data can be regenerated
  • Properties: every finite result is in its documented range; NaN or ±∞ in gives NaN out
  • Every new public declaration has a doc comment giving units, time scale and reference frame, and citing the chapter and equation of Meeus it implements
  • Every source used is in the README's references cited
  • zig build test, zig build check, zig fmt --exclude zig-pkg --check . and reuse lint pass
Part of #1 ## Parent #1 ## What to build `astro.sun.position`: the Sun's **apparent position** at an **instant** — ecliptic longitude and latitude, `distance_au`, right ascension and declination — from ch. 25's low-accuracy algorithm (about 0.01°, which the documentation states). This ticket also sets up the JPL Horizons reference tables the rest of the work compares against: a data file checked into the repository together with the exact Horizons query that produced it, and a test that compares public results to it with a tolerance stated beside each quantity. It is seeded with the Sun's apparent position at sample instants spanning 1900–2100. ## Acceptance criteria - [ ] Ch. 25's worked example passes to the printed precision - [ ] The Sun's position agrees with Horizons across 1900–2100 within the stated tolerance - [ ] The Horizons query is recorded so the data can be regenerated - [ ] Properties: every finite result is in its documented range; NaN or ±∞ in gives NaN out - [ ] Every new public declaration has a doc comment giving units, time scale and reference frame, and citing the chapter and equation of Meeus it implements - [ ] Every source used is in the README's references cited - [ ] `zig build test`, `zig build check`, `zig fmt --exclude zig-pkg --check .` and `reuse lint` pass
jeff self-assigned this 2026-10-22 23:43:16 -05:00
jeff closed this issue 2026-10-23 00:24:55 -05:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
jeff/zig-astro#4
No description provided.