pub struct PropSettings {
pub gravity_degree: u16,
pub gravity_order: u16,
pub abs_error: f64,
pub rel_error: f64,
pub use_spaceweather: bool,
pub use_sun_gravity: bool,
pub use_moon_gravity: bool,
pub enable_interp: bool,
pub precomputed: Option<Precomputed>,
}Expand description
Propagation settings
These include
gravity_degree- maximum degree of spherical harmonic gravity model. Default is 4gravity_order- maximum order of spherical harmonic gravity model. Default is same asgravity_degree. Must be ≤gravity_degree.abs_error- the maximum absolute error for the infinity norm of the state in Runge-Kutta integrator. Default is 1e-8rel_error- the maximum relative error for the infinity norm of the state in Runge-Kutta integrator. Default is 1e-8use_spaceweather- Do we use space weather when computing the atmospheric density. Default is trueuse_sun_gravity- Do we include sun third-body gravitational perturbation. Default is trueuse_moon_gravity- Do we include moon third-body gravitational perturbation. Default is trueenable_interp- Do we enable interpolation of the state between begin and end times. Default is true slight computation savings if set to false
Fields§
§gravity_degree: u16§gravity_order: u16§abs_error: f64§rel_error: f64§use_spaceweather: bool§use_sun_gravity: bool§use_moon_gravity: bool§enable_interp: bool§precomputed: Option<Precomputed>Implementations§
Source§impl PropSettings
impl PropSettings
Sourcepub fn precompute_terms<T: TimeLike>(
&mut self,
begin: &T,
end: &T,
) -> Result<()>
pub fn precompute_terms<T: TimeLike>( &mut self, begin: &T, end: &T, ) -> Result<()>
Precompute terms between begin and end instants
§Arguments
begin- Begin instantend- End instant
Pre-computes inertial to earth-fixed rotation vector (used for Earth gravity calculation), sun, and moon positions between the begin and end instants. These are used in the force model when propagating orbits
Pre-computing these terms means the settings can be used for multiple propagations between the same begin and end instants without needing to recompute these terms each time. (significant speedup when propagating many orbits over the same time span)
§Errors
Returns error if precomputation fails
§Example
use satkit::orbitprop::PropSettings;
use satkit::Instant;
let begin = Instant::now();
let end = begin + satkit::Duration::from_hours(1.0);
let mut props = PropSettings::default();
props.precompute_terms(&begin, &end).unwrap();
pub fn precompute_terms_with_step<T: TimeLike>( &mut self, begin: &T, end: &T, step_secs: f64, ) -> Result<()>
Trait Implementations§
Source§impl Clone for PropSettings
impl Clone for PropSettings
Source§fn clone(&self) -> PropSettings
fn clone(&self) -> PropSettings
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PropSettings
impl Debug for PropSettings
Source§impl Default for PropSettings
impl Default for PropSettings
Auto Trait Implementations§
impl Freeze for PropSettings
impl RefUnwindSafe for PropSettings
impl Send for PropSettings
impl Sync for PropSettings
impl Unpin for PropSettings
impl UnsafeUnpin for PropSettings
impl UnwindSafe for PropSettings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.