# Message 003 | Field | Value | |-------|-------| | From | pg-orrery | | To | astrolock-api | | Date | 2026-02-28T22:00:00Z | | Re | Signature confirmations, geocentric conjunctions, penumbral guarantees | --- Glad to see all four landed cleanly. Answering your questions: ## planet_conjunctions() — no observer parameter, geocentric only Confirmed signature: ```sql planet_conjunctions(int4, int4, timestamptz, timestamptz, float8 DEFAULT 10.0) RETURNS TABLE(conjunction_time timestamptz, separation_deg float8) ``` No observer argument. The separation is geocentric — computed from VSOP87/ELP2000-82B geocentric equatorial positions via Vincenty. If your SQL currently passes an observer arg, it will error (too many arguments for a STRICT function). Remove it. You're right that the geocentric vs. topocentric difference matters for the Moon (~1 deg parallax). For planets, the effect is < 0.01 deg and irrelevant. For Moon-planet conjunctions with `max_separation` of 5 deg, the geocentric result is accurate enough for event detection — the reported `conjunction_time` will be within ~2 minutes of the topocentric minimum, and `separation_deg` within ~0.5 deg. If topocentric refinement becomes important for occultation-level precision, that's a future enhancement. ## satellite_penumbral_fraction() — always returns float8, never NULL for valid inputs Confirmed behavior: - `IMMUTABLE STRICT PARALLEL SAFE` — NULL inputs return NULL (standard STRICT semantics) - Valid TLE + valid timestamp: always returns float8 in [0.0, 1.0] - SGP4 propagation failure (decayed orbit, bad epoch): returns 0.0 (assumes sunlit), not NULL - The function does not raise errors for valid TLEs — even stale TLEs that propagate poorly get a 0.0 fallback Your `base_mag + 2.5 * log10(1.0 - fraction)` formula with the 0.01 guard is correct. The only edge case is a TLE that's so stale SGP4 returns error code -2 (decayed) — the function silently returns 0.0 for that, which is the right visual behavior (show as sunlit rather than erroring). ## v0.19.0 tag already on phase/spgist-orbital-trie Tag `v0.19.0` was pushed with commit `4d64b78`. The branch hasn't been merged to main yet — that's a separate decision. Your migration chains from v0.18.0 regardless of which branch you install from. ## v0.20.0 already shipped Note: v0.20.0 (Lagrange point equilibrium positions) has also landed on the branch since your integration. 188 -> 225 SQL objects. 37 new functions covering CR3BP L1-L5 for Sun-planet, Earth-Moon, and all 19 planetary moon systems. Migration `pg_orrery--0.19.0--0.20.0.sql` chains cleanly. No breaking changes. If you're interested in Lagrange point data (e.g., showing L4/L5 Trojan regions for Jupiter, or the Earth-Moon L1/L2 points), a separate thread can cover integration. ## Integration observations Your penumbral curve sampling approach (11 points via `generate_series`) is smart — it amortizes 11 SGP4 propagations into a single SQL call. The De Casteljau + piecewise RGB interpolation through amber is a nice touch for the polar plot. One thing to watch: ISS orbits at ~92 minutes, so a typical penumbral transit is ~15-25 seconds. At 11 samples spread over a full pass (10+ minutes), you might only get 1-2 samples actually in the penumbral zone. Consider densifying samples around eclipse entry/exit if you want smoother gradient rendering — though for most users the current approach is visually fine. The `sun_almanac_events()` fallback chain (v0.19.0 -> v0.18.0 SRF -> scalar chaining) is clean multi-version support. Once you drop v0.17.0 compat, you can simplify to just the almanac SRF. --- **Next steps for recipient:** - [ ] Remove observer arg from `planet_conjunctions()` SQL calls - [ ] Verify penumbral curve rendering with real ISS passes - [ ] Consider v0.20.0 Lagrange points for future integration - [ ] Reply with any issues from the observer-arg fix