use crate::dynamics::DynamicsError;
pub use crate::dynamics::{Dynamics, NyxError};
use crate::io::{ConfigError, InputOutputError};
use crate::linalg::OVector;
use crate::md::trajectory::TrajError;
use crate::propagators::PropagationError;
use crate::time::Epoch;
pub use crate::{State, TimeTagged};
use anise::almanac::planetary::PlanetaryDataError;
use anise::errors::AlmanacError;
use hifitime::Duration;
use snafu::prelude::Snafu;
use std::sync::Arc;
pub mod filter;
pub use filter::Filter;
mod ground_station;
pub use ground_station::GroundStation;
pub mod estimate;
pub mod noise;
pub mod msr;
pub mod simulator;
pub mod process;
pub use simulator::TrackingDevice;
pub mod snc;
pub type SpacecraftODProcess<'a> = self::process::ODProcess<
'a,
crate::md::prelude::SpacecraftDynamics,
nalgebra::Const<2>,
nalgebra::Const<3>,
filter::kalman::KF<crate::Spacecraft, nalgebra::Const<3>, nalgebra::Const<2>>,
GroundStation,
>;
pub type SpacecraftODProcessSeq<'a> = self::process::ODProcess<
'a,
crate::md::prelude::SpacecraftDynamics,
nalgebra::Const<1>,
nalgebra::Const<3>,
filter::kalman::KF<crate::Spacecraft, nalgebra::Const<3>, nalgebra::Const<1>>,
GroundStation,
>;
#[allow(unused_imports)]
pub mod prelude {
pub use super::estimate::*;
pub use super::filter::kalman::*;
pub use super::ground_station::*;
pub use super::msr::*;
pub use super::noise::{GaussMarkov, StochasticNoise, WhiteNoise};
pub use super::process::*;
pub use super::simulator::TrackingArcSim;
pub use super::simulator::*;
pub use super::snc::*;
pub use super::*;
pub use crate::time::{Duration, Epoch, TimeUnits, Unit};
}
#[derive(Debug, PartialEq, Snafu)]
#[snafu(visibility(pub(crate)))]
pub enum ODError {
#[snafu(display("during an orbit determination, encountered {source}"))]
ODPropError { source: PropagationError },
#[snafu(display("during an orbit determination, encountered {source}"))]
ODDynamicsError { source: DynamicsError },
#[snafu(display("at least {need} measurements required for {action}"))]
TooFewMeasurements { need: usize, action: &'static str },
#[snafu(display("invalid step size: {step}"))]
StepSizeError { step: Duration },
#[snafu(display("filter iteration did not converge in {loops} iterations"))]
Diverged { loops: usize },
#[snafu(display("STM is singular"))]
SingularStateTransitionMatrix,
#[snafu(display("invalid measurement @ {epoch} = {val}"))]
InvalidMeasurement { epoch: Epoch, val: f64 },
#[snafu(display("sensitivity matrix must be updated before this call"))]
SensitivityNotUpdated,
#[snafu(display("Kalman gain is singular"))]
SingularKalmanGain,
#[snafu(display("noise matrix is singular"))]
SingularNoiseRk,
#[snafu(display("{kind} noise not configured"))]
NoiseNotConfigured { kind: String },
#[snafu(display("measurement sim error: {details}"))]
MeasurementSimError { details: String },
#[snafu(display("during an OD encountered {source}"))]
ODTrajError { source: TrajError },
#[snafu(display("OD failed because {source}"))]
ODConfigError { source: ConfigError },
#[snafu(display("OD failed because of an I/O error: {source}"))]
ODIOError { source: InputOutputError },
#[snafu(display("OD failed due to Almanac: {action} {source}"))]
ODAlmanac {
#[snafu(source(from(AlmanacError, Box::new)))]
source: Box<AlmanacError>,
action: &'static str,
},
#[snafu(display("OD failed due to planetary data in Almanac: {action} {source}"))]
ODPlanetaryData {
#[snafu(source(from(PlanetaryDataError, Box::new)))]
source: Box<PlanetaryDataError>,
action: &'static str,
},
#[snafu(display("not enough residuals to {action}"))]
ODNoResiduals { action: &'static str },
}