Observer, and the topocentric Sun and Moon #12

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

Part of #10

Parent

#10

What to build

A new astro.observer module. An Observer is a plain struct of geodetic latitude, longitude positive east, and height in meters above the WGS 84 ellipsoid (ADR 0003). A generic conversion takes an instant, an observer, any apparent geocentric equatorial position and its distance in kilometers, and returns a topocentric result holding the topocentric equatorial and ecliptic coordinates, the hour angle and the distance in kilometers, using Meeus's rigorous parallax (ch. 11, eqs. 40.6 and 40.7). sun.topocentric and moon.topocentric pass their apparent positions through it.

Diurnal aberration, polar motion, UT1 − UTC and deflection of the vertical are left out and named in the doc comments. A latitude beyond ±90° gives NaN; finite longitudes wrap; finite heights of any sign are accepted.

The Horizons tooling gains topocentric targets for the Sun and the Moon from Palomar, Tromsø and Cerro Paranal, with geodetic site coordinates, at 201 instants over 1900–2100; the tables carry the existing Horizons REUSE annotation.

Acceptance criteria

  • Meeus's examples 11.a (Palomar's ρ sin φ′ and ρ cos φ′, with WGS 84 constants) and 40.a (Mars from Palomar, through the generic conversion, with his longitude's sign flipped) pass to the printed precision
  • The topocentric right ascension, declination and distance of the Sun and the Moon agree with Horizons from all three sites
  • Properties: the topocentric shift stays within the parallax bound; the distance changes by no more than the Earth's radius plus the height; non-finite instants and out-of-range latitudes give NaN
  • Fuzz targets for the topocentric Sun and Moon, seeded at the poles and the antimeridian
  • 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 A new `astro.observer` module. An **Observer** is a plain struct of **geodetic latitude**, longitude positive east, and height in meters above the WGS 84 ellipsoid (ADR 0003). A generic conversion takes an instant, an observer, any apparent geocentric equatorial position and its distance in kilometers, and returns a **topocentric** result holding the topocentric equatorial and ecliptic coordinates, the **hour angle** and the distance in kilometers, using Meeus's rigorous parallax (ch. 11, eqs. 40.6 and 40.7). `sun.topocentric` and `moon.topocentric` pass their apparent positions through it. Diurnal aberration, polar motion, UT1 − UTC and deflection of the vertical are left out and named in the doc comments. A latitude beyond ±90° gives NaN; finite longitudes wrap; finite heights of any sign are accepted. The Horizons tooling gains topocentric targets for the Sun and the Moon from Palomar, Tromsø and Cerro Paranal, with geodetic site coordinates, at 201 instants over 1900–2100; the tables carry the existing Horizons REUSE annotation. ## Acceptance criteria - [ ] Meeus's examples 11.a (Palomar's ρ sin φ′ and ρ cos φ′, with WGS 84 constants) and 40.a (Mars from Palomar, through the generic conversion, with his longitude's sign flipped) pass to the printed precision - [ ] The topocentric right ascension, declination and distance of the Sun and the Moon agree with Horizons from all three sites - [ ] Properties: the topocentric shift stays within the parallax bound; the distance changes by no more than the Earth's radius plus the height; non-finite instants and out-of-range latitudes give NaN - [ ] Fuzz targets for the topocentric Sun and Moon, seeded at the poles and the antimeridian - [ ] 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 - #11
jeff closed this issue 2026-10-23 21:06:19 -05:00
Author
Owner

Done in 03977e1. Examples 11.a and 40.a pass. Against Horizons from Palomar, Tromsø and Paranal the parallax shift agrees to 0.46″ (diurnal aberration, left out), and positions are as good as the geocentric ones; through the wrappers, up to the last measured ΔT. WGS 84 (NIMA TR8350.2) added to the references.

Done in 03977e1. Examples 11.a and 40.a pass. Against Horizons from Palomar, Tromsø and Paranal the parallax shift agrees to 0.46″ (diurnal aberration, left out), and positions are as good as the geocentric ones; through the wrappers, up to the last measured ΔT. WGS 84 (NIMA TR8350.2) added to the references.
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 Depends on
#11 Sidereal time
jeff/zig-astro
Reference
jeff/zig-astro#12
No description provided.