nyx_space/md/trajectory/
mod.rs1use anise::math::interpolation::InterpolationError;
20use snafu::prelude::*;
21
22mod interpolatable;
23mod sc_traj;
24mod traj;
25mod traj_it;
26
27pub use interpolatable::Interpolatable;
28pub(crate) use interpolatable::INTERPOLATION_SAMPLES;
29pub use traj::Traj;
30
31pub use crate::io::ExportCfg;
32
33use super::StateParameter;
34use crate::time::{Duration, Epoch};
35
36#[derive(Clone, PartialEq, Debug, Snafu)]
37pub enum TrajError {
38 #[snafu(display("Event {event} not found between {start} and {end}"))]
39 EventNotFound {
40 start: Epoch,
41 end: Epoch,
42 event: String,
43 },
44 #[snafu(display("No interpolation data at {epoch}"))]
45 NoInterpolationData { epoch: Epoch },
46 #[snafu(display("Failed to create trajectory: {msg}"))]
47 CreationError { msg: String },
48 #[snafu(display("Probable bug: Requested epoch {req_epoch}, corresponding to an offset of {req_dur} in a spline of duration {spline_dur}"))]
49 OutOfSpline {
50 req_epoch: Epoch,
51 req_dur: Duration,
52 spline_dur: Duration,
53 },
54 #[snafu(display("Interpolation failed: {source}"))]
55 Interpolation { source: InterpolationError },
56}