tpt-sci-astro 0.1.0

Orbital mechanics and coordinate-frame primitives for the tpt-science pillar (built from scratch)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Error types for `tpt-sci-astro`.

use thiserror::Error;

/// Errors produced by the astrodynamics primitives.
#[derive(Debug, Clone, PartialEq, Error)]
pub enum AstroError {
    /// An input failed a physical/mathematical invariant (e.g. `a ≤ 0`,
    /// `e ∉ [0, 1)`, non-finite angle, or `μ ≤ 0`).
    #[error("invalid orbital elements: {0}")]
    InvalidElements(String),
    /// The input geometry was degenerate and could not be transformed
    /// (e.g. zero position magnitude, zero angular momentum, or a
    /// non-elliptical orbit).
    #[error("degenerate geometry: {0}")]
    DegenerateGeometry(String),
}