ASTROCARTOGRAPHY_BACKEND_STANDARD - TheDaniel166/moira GitHub Wiki
Astrocartography Backend Standard
Version: 0.1
Date: 2026-06-11
Status: Active backend admission packet for Phase 10 REST evaluation
Scope: moira.astrocartography
This standard records the backend truth that may be exposed by the REST server for P10-01 Astrocartography. It is not a map-rendering standard and does not admit dense grid, contour, or tiled map products.
It is downstream of:
wiki/00_foundations/ENGINE_VS_SERVICE_BOUNDARY.mddocs/architecture/MOIRA_SERVER_ROUTE_ADMISSION_CHECKLIST.mddocs/architecture/MOIRA_SERVER_PHASE10_LEDGER.mdwiki/03_validation/VALIDATION_EXPERIMENTAL.md
1. Governing Object
The governing object is the AstroCartoGraphy geographic line family for one chart epoch:
- MC meridian
- IC meridian
- Ascendant sampled curve
- Descendant sampled curve
- subplanetary zenith point
- subplanetary nadir point
These are geographic products on Earth. They are not chart aspects, house cusps, map projections, or rendered graphics.
2. Public Engine Surface
Authoritative module:
moira/astrocartography.py
Public vessels:
ACGLineSubPlanetaryPoint
Public functions:
acg_lines(planet_ra_dec, gmst_deg, lat_step=2.0, jd_ut=None, refraction=False)acg_from_chart(chart, bodies=None, lat_step=2.0, refraction=False)subplanetary_points(planet_ra_dec, gmst_deg)subplanetary_from_chart(chart, bodies=None)
Facade exposure:
SpatialFacadeMixin.astrocartography(...)SpatialFacadeMixin.subplanetary_points(...)
3. Frame And Input Truth
Direct low-level inputs:
- body name
- apparent geocentric right ascension in degrees
- apparent geocentric declination in degrees
- Greenwich apparent sidereal time in degrees
- optional Julian Day for lunar topocentric handling
- optional latitude sampling step
- optional refraction flag
Chart-backed inputs:
ChartContext- optional selected bodies
- optional latitude sampling step
- optional refraction flag
Frame doctrine:
- RA/Dec are apparent geocentric equatorial coordinates of date unless the caller explicitly owns another direct-input source.
gmst_degis Greenwich apparent sidereal time in degrees.- MC/IC line longitudes are geographic longitudes.
- ASC/DSC points are sampled
(latitude, longitude)geographic pairs. - Subplanetary point latitude is WGS-84 geodetic latitude derived from the geocentric declination.
- Subplanetary point longitude is wrapped to
[-180, 180).
4. Result Semantics
ACGLine preserves:
planetline_typelongitudepoints
Line-type invariants:
MCandIClines uselongitudeand have no sampledpoints.ASCandDSClines use sampledpointsand have no singlelongitude.- One body yields four ACG lines.
SubPlanetaryPoint preserves:
planetpoint_typelatitudelongitude
Point-type invariants:
- one body yields one
Zenithpoint and oneNadirpoint - nadir latitude is the negative of zenith latitude
- nadir longitude is antipodal to zenith longitude
5. Bounded Output Policy
First REST admission may expose:
- bounded ACG line products
- bounded subplanetary point products
First REST admission must not expose:
- dense map grids
- rendered maps
- tiled map products
- contour extraction
- unbounded body catalogs
- fixed-star all-catalog ACG sweeps
Sampling policy:
lat_stepmust be finite and in(0, 178].- REST transport should use a stricter operational default and maximum body count before admission.
- ASC/DSC sampling is a line approximation, not a rendered cartographic path.
6. Validation And Evidence
Existing validation:
tests/unit/test_astrocartography.pytests/unit/test_session_fixes.pywiki/03_validation/VALIDATION_EXPERIMENTAL.md
Covered invariants include:
- four line vessels per body
- MC/IC antipodal meridian behavior
- zero-declination ASC/DSC meridian behavior
- high-declination circumpolar latitude skipping
- ASC/DSC symmetry around the MC meridian
- WGS-84 geodetic latitude conversion for subplanetary points
- chart wrapper delegation to apparent sidereal time and sky-position truth
- small-body subplanetary points through the admitted
planet_atsurface - rejection of invalid sampling and non-finite coordinate inputs
7. REST Admission Position
P10-01 Astrocartography is eligible to move from evaluation to transport design for bounded line and subplanetary products.
REST design must still decide:
- direct RA/Dec route shape
- chart-backed route shape
- maximum body count
- REST
lat_stepbounds - response provenance fields
- whether small bodies are admitted in first transport or constrained to chart-contained bodies only
Do not admit dense grid or map-rendering routes as part of first P10-01 transport.