Geocentric and barycentric state vectors read straight from SPK kernels.
This is the layer beneath EphCore.observe/4: it maps body atoms to NAIF IDs,
resolves the center chains DE440s uses (barycenters for the outer planets,
EMB for Earth and Moon, Sun-relative for Horizons asteroid kernels), and
returns ICRF/J2000 vectors in kilometres for a Terrestrial Time Julian date.
Requires the ephemeris kernels described in the README data setup; positions
for a body outside the loaded kernels' coverage return {:error, reason}.
Summary
Functions
Barycentric (SSB) position of body (km) at jd_tt, querying the body→SSB
chain directly.
Telemetry-free body_ssb_km/2 for the almanac hot path.
Telemetry-free geocentric_state_from_cache/2 for the almanac hot path.
Telemetry-free precompute_earth_ssb/1 for the almanac hot path.
Functions
Barycentric (SSB) position of body (km) at jd_tt, querying the body→SSB
chain directly.
Unlike precompute_earth_ssb/1 + geocentric_state_from_cache/2, this skips
reconstructing Earth/EMB state when only the body's SSB position is needed
(e.g. the light-time retarded epoch in EphCore.Corrections.ApparentPlace). For a
planet this is a single SPK query instead of three; Moon and asteroid chains
are preserved.
Telemetry-free body_ssb_km/2 for the almanac hot path.
@spec geocentric_state_from_cache( %{ seconds: float(), earth_ssb: {float(), float(), float()}, emb_ssb: {float(), float(), float()} }, atom() ) :: {:ok, %{ geocentric_position_km: {float(), float(), float()}, geocentric_range_km: float(), frame: atom(), query_seconds_past_j2000: float() }} | {:error, term()}
@spec geocentric_state_from_cache_fast( %{ seconds: float(), earth_ssb: {float(), float(), float()}, emb_ssb: {float(), float(), float()} }, atom() ) :: {:ok, %{ geocentric_position_km: {float(), float(), float()}, geocentric_range_km: float(), frame: atom(), query_seconds_past_j2000: float() }} | {:error, term()}
Telemetry-free geocentric_state_from_cache/2 for the almanac hot path.
@spec precompute_earth_ssb_fast(float()) :: {:ok, %{ seconds: float(), earth_ssb: {float(), float(), float()}, emb_ssb: {float(), float(), float()} }} | {:error, term()}
Telemetry-free precompute_earth_ssb/1 for the almanac hot path.