Horizontal coordinates #13

Closed
opened 2026-10-23 20:43:43 -05:00 by jeff · 1 comment
Owner

Part of #10

Parent

#10

What to build

Horizontal coordinates: a new coordinate type of azimuth, counted from north through east in [0°, 360°), and altitude in [−90°, +90°] (ch. 13, with the azimuth turned to north as ADR 0003 records). The topocentric result gains a horizontal field holding the azimuth and the airless altitude; no refraction is applied.

The README's table of modules gains observer, with a tested example of the Moon's altitude and azimuth from a named site.

Acceptance criteria

  • Meeus's example 13.b (Venus from Washington) passes to the printed precision, with his azimuth turned by 180° and his longitude's sign flipped
  • The airless azimuth and elevation of the Sun and the Moon agree with Horizons from Palomar, Tromsø and Cerro Paranal
  • Properties: azimuth in [0°, 360°), altitude in [−90°, +90°]; a body on the meridian is due north or due south
  • Fuzz seeds at the zenith, the nadir and the poles
  • The README example compiles and runs as a test
  • 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 Horizons tolerance is set only after measuring, with the worst error recorded beside it
  • 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

Blocked by

Part of #10 ## Parent #10 ## What to build **Horizontal coordinates**: a new coordinate type of azimuth, counted from north through east in [0°, 360°), and altitude in [−90°, +90°] (ch. 13, with the azimuth turned to north as ADR 0003 records). The topocentric result gains a `horizontal` field holding the azimuth and the **airless altitude**; no refraction is applied. The README's table of modules gains `observer`, with a tested example of the Moon's altitude and azimuth from a named site. ## Acceptance criteria - [ ] Meeus's example 13.b (Venus from Washington) passes to the printed precision, with his azimuth turned by 180° and his longitude's sign flipped - [ ] The airless azimuth and elevation of the Sun and the Moon agree with Horizons from Palomar, Tromsø and Cerro Paranal - [ ] Properties: azimuth in [0°, 360°), altitude in [−90°, +90°]; a body on the meridian is due north or due south - [ ] Fuzz seeds at the zenith, the nadir and the poles - [ ] The README example compiles and runs as a test - [ ] 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 Horizons tolerance is set only after measuring, with the worst error recorded beside it - [ ] 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 ## Blocked by - #12
jeff self-assigned this 2026-10-23 21:06:26 -05:00
jeff referenced this issue from a commit 2026-10-23 21:17:06 -05:00
jeff closed this issue 2026-10-23 21:17:06 -05:00
Author
Owner

Done in ff6998f. Example 13.b passes (with Meeus's longitude rounded to 5h08m15.7s as he works with it). Airless azimuth and altitude against Horizons from the three sites: 28.65″ (Sun) and 5.64″ (Moon) before 1962, when Horizons' UT is UT1; 37″ and 12″ after, when it is UTC. README example of the Moon from Palomar, tested.

Done in ff6998f. Example 13.b passes (with Meeus's longitude rounded to 5h08m15.7s as he works with it). Airless azimuth and altitude against Horizons from the three sites: 28.65″ (Sun) and 5.64″ (Moon) before 1962, when Horizons' UT is UT1; 37″ and 12″ after, when it is UTC. README example of the Moon from Palomar, tested.
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.

Blocks
#14 Refraction
jeff/zig-astro
Depends on
Reference
jeff/zig-astro#13
No description provided.