10 Commits

Author SHA1 Message Date
7c76ffc76c Track astrolock message 004: v0.10.0 comet RA/Dec + proximity queries 2026-02-23 14:07:56 -07:00
9158c7c55a Add v0.11.0: make_orbital_elements constructors + moon equatorial functions
6 new SQL functions (114 -> 120):
- make_orbital_elements(): construct from 9 floats, angles in radians
- make_orbital_elements_deg(): same with angles in degrees, matches
  text I/O convention and typical catalog column layouts
- galilean_equatorial(): geocentric RA/Dec for Io/Europa/Ganymede/Callisto
- saturn_moon_equatorial(): geocentric RA/Dec for Mimas through Hyperion
- uranus_moon_equatorial(): geocentric RA/Dec for Miranda through Oberon
- mars_moon_equatorial(): geocentric RA/Dec for Phobos/Deimos

Constructors requested by astrolock-api to replace fragile
format(9 args)::orbital_elements cast pattern. Moon equatorial
functions fill the last NULL RA/Dec gaps in their unified sky query.

All 20 regression suites pass.
2026-02-23 14:07:39 -07:00
db1f478e4f Update CLAUDE.md for v0.10.0, gitignore bench catalogs, add roadmap
- CLAUDE.md: 106 -> 114 functions, 18 -> 19 test suites, add aberration
  suite, DE apparent variants, equatorial spatial domain to tables
- .gitignore: ignore downloaded TLE catalogs in bench/ (alpha5, celestrak,
  satnogs, spacetrack, supgp, mega/merged, cookies)
- docs/TODO-v0.10.0.md: rewrite as post-v0.10.0 roadmap with next version
  candidates (make_orbital_elements, galilean_equatorial, equatorial GiST
  index, nutation, Delta T, rise/set)
- Track bench/build_catalog.py and agent thread message 001
2026-02-21 21:52:05 -07:00
b0741c553b Add v0.10.0: aberration, DE apparent, angular separation, stellar parallax
Annual stellar aberration (~20 arcsec) added to all 6 existing _apparent()
functions via classical first-order v/c projection (Ron & Vondrak). Earth
velocity sourced from VSOP87 xyz[3..5] (analytic) or DE numerical
differentiation.

New functions (106 -> 114):
- eq_angular_distance(): Vincenty formula, stable at 0 and 180 deg
- eq_within_cone(): cosine shortcut for fast cone-search predicate
- <-> operator on equatorial type
- 6 DE apparent variants with VSOP87 fallback:
  planet/sun/moon_observe_apparent_de(),
  planet/moon_equatorial_apparent_de(),
  small_body_observe_apparent_de()

Stellar parallax now functional in star_observe_pm() and
star_equatorial_pm() — Green (1985) Eq. 11.3 displacement using
Earth heliocentric position from VSOP87.

All 19 regression suites pass (18 existing + new aberration suite).
2026-02-21 21:47:42 -07:00
3a378f572a Reply to v0.9.0 thread: integration complete on both servers 2026-02-21 21:43:46 -07:00
3915d1784f Rename pg_orbit to pg_orrery
An existing product called PG Orbit (a mobile PostgreSQL client)
creates a naming conflict. pg_orrery — a database orrery built from
Keplerian parameters and SQL instead of brass gears.

Build system: control file, Makefile, Dockerfile, docker init script.
C source: GUC prefix, PG_FUNCTION_INFO_V1 symbol, header guards,
ereport prefixes, comments across ~30 files including vendored SGP4.
SQL: all 5 install/migration scripts, function name pg_orrery_ephemeris_info.
Tests: 9 SQL suites, 8 expected outputs, standalone DE reader test.
Documentation: CLAUDE.md, README.md, DESIGN.md, Starlight site infra,
36 MDX pages, OG renderer, logo SVG, docker-compose, agent threads.

All 13 regression suites pass. Docs site builds (37 pages).
2026-02-17 13:36:22 -07:00
28511a34a2 Close Craft integration thread — install instructions
Craft-side code is wired up. pg_orbit just needs to be installed on
the Craft database for satellites to appear in /api/sky/up.
2026-02-15 18:33:34 -07:00
2dc90a992e Reply to Craft test data package with verification results
All 8 suggested regression tests pass. Amateur satellite batch
(6 TLEs) propagates cleanly. Report includes 2-D GiST index
upgrade results showing inclination-based pruning with real
satellite data.
2026-02-15 18:26:39 -07:00
3fe11a5d7f Add test data package for Craft integration
ISS reference vectors, edge case TLEs (deep space, Molniya, decayed,
sun-sync, GEO), amateur satellite batch, Skyfield cross-verification
script, and 6 suggested regression SQL tests.
2026-02-15 18:24:59 -07:00
5552bf3280 Add convenience functions for Craft integration
Implements 5 new C functions requested by the Craft (Astrolock) API team:
- tle_from_lines(text, text): two-argument TLE constructor
- observer_from_geodetic(float8, float8, float8): numeric observer constructor
- observe(tle, observer, timestamptz): single-call propagate + topocentric
- sgp4_propagate_safe(tle, timestamptz): returns NULL on propagation error
- observe_safe(tle, observer, timestamptz): returns NULL on propagation error

Refactors do_propagate() into safe/unsafe variants to support NULL returns.
Adds regression test (convenience.sql) covering all new functions including
an equivalence test verifying observe() matches the manual two-step pipeline.
All 6 regression tests pass.
2026-02-15 17:44:41 -07:00