Expand description
Compression codecs and artifact packing helpers for ephemeris data.
The current implementation defines a small, deterministic artifact format
with explicit versioning, checksums, artifact capability profiles, and
quantized polynomial segments. Optional residual-correction channels are
also supported so denser artifacts can keep a compact base fit while
layering deterministic corrections on top. The format is intentionally
simple enough to audit while still exercising the same segmented lookup flow
and random-access body/segment helpers that later, denser artifacts will use.
See spec/data-compression.md for the stored-vs-derived output contract and
docs/time-observer-policy.md for the explicit packaged lookup policy that
keeps derived coordinates separate from observer-driven body-position modes.
Enable the optional serde feature to serialize compressed artifacts for
inspection or interchange workflows.
§Examples
use pleiades_compression::{ArtifactHeader, BodyArtifact, ChannelKind, CompressedArtifact,
PolynomialChannel, Segment, ARTIFACT_VERSION};
use pleiades_types::{CelestialBody, Instant, JulianDay, TimeScale};
let artifact = CompressedArtifact::new(
ArtifactHeader::new("demo", "synthetic example data"),
vec![BodyArtifact::new(
CelestialBody::Sun,
vec![Segment::new(
Instant::new(JulianDay::from_days(0.0), TimeScale::Tt),
Instant::new(JulianDay::from_days(1.0), TimeScale::Tt),
vec![PolynomialChannel::linear(ChannelKind::Longitude, 9, 10.0, 11.0)],
)],
)],
);
assert_eq!(artifact.header.version, ARTIFACT_VERSION);Structs§
- Artifact
Header - Describes the non-body metadata stored in a compressed artifact.
- Artifact
Profile - Capability/profile metadata for a compressed artifact.
- Artifact
Profile Coverage Summary - Structured body coverage attached to an artifact capability profile.
- Artifact
Residual Body Coverage Summary - Structured body coverage for residual-correction-bearing segments in a compressed artifact.
- Body
Artifact - All segments for a single body.
- Cartesian
State - Cartesian ecliptic state: position and velocity (all in AU and AU/day).
- Compressed
Artifact - A compressed ephemeris artifact.
- Compression
Error - A structured compression error.
- Polynomial
Channel - Quantized polynomial coefficients for one channel of a time segment.
- Segment
- A single time segment for a specific body.
- Spherical
State - Spherical ecliptic state: position (lon, lat, dist) plus velocity rates (all in AU and rad/day).
Enums§
- Artifact
Output - Artifact-level output semantics for fields that are not raw segment channels.
- Artifact
Output Support - Describes how a high-level artifact output is represented by the profile.
- Channel
Kind - The kind of ecliptic channel carried by a segment.
- Compression
Error Kind - Error categories for compression and artifact parsing.
- Endian
Policy - Describes the byte-order policy encoded by a compressed artifact.
- Speed
Policy - Declares how motion/speed values are represented by an artifact.
- Stored
Frame - The coordinate frame a body’s stored channels are expressed in.
Constants§
- ARTIFACT_
VERSION - Current artifact format version.
Functions§
- cartesian_
au_ to_ ecliptic - Converts ecliptic Cartesian (AU) back to ecliptic spherical. Longitude is
normalized to [0, 360) by
Longitude::from_degrees. - cartesian_
state_ to_ spherical - Converts a Cartesian ecliptic state back to spherical using the inverse chain rule.
- ecliptic_
to_ cartesian_ au - Converts ecliptic spherical (deg, deg, AU) to ecliptic Cartesian (AU).
Returns
Nonewhen distance is absent — recombination requires a radius. - geocentric_
from_ heliocentric - Reconstructs geocentric ecliptic from a planet’s heliocentric ecliptic and
the geocentric Sun:
P_geo = P_helio + S_geo(vector add in ecliptic-of-date). - heliocentric_
from_ geocentric - Derives a planet’s heliocentric ecliptic from its geocentric ecliptic and
the geocentric Sun:
P_helio = P_geo − S_geo(vector subtract in ecliptic-of-date). - join_
display - Joins displayable values into a compact comma-separated list.
- spherical_
state_ to_ cartesian - Converts a spherical ecliptic state to Cartesian using the chain rule.