#[derive(Debug, Clone, thiserror::Error, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum LambertError {
#[error("non-positive gravitational parameter ({0})")]
NonPositiveMu(f64),
#[error("non-positive time of flight ({0} s)")]
NonPositiveTof(f64),
#[error("zero-magnitude position vector")]
ZeroPosition,
#[error("collinear positions: chord cannot be resolved unambiguously")]
Collinear,
#[error("requested {requested} revolutions exceeds N_max = {max} for the given TOF")]
RevolutionsExceedNMax {
requested: u32,
max: u32,
},
#[error("Householder iteration failed to converge (residual = {residual:e})")]
DidNotConverge {
residual: f64,
},
}