pub enum ErrorControl {
RSSCartesianState,
RSSCartesianStep,
RSSState,
RSSStep,
LargestError,
LargestState,
LargestStep,
}
Expand description
The Error Control manages how a propagator computes the error in the current step.
Variants§
RSSCartesianState
An RSS state error control which effectively for the provided vector composed of two vectors of the same unit, both of size 3 (e.g. position + velocity).
RSSCartesianStep
An RSS step error control which effectively for the provided vector composed of two vectors of the same unit, both of size 3 (e.g. position + velocity).
RSSState
An RSS state error control: when in doubt, use this error controller, especially for high accurracy.
Here is the warning from GMAT R2016a on this error controller:
This is a more stringent error control method than [
rss_step
] that is often used as the default in other software such as STK. If you set [the] accuracy to a very small number, 1e-13 for example, and set the error control to [rss_step
], integrator performance will be poor, for little if any improvement in the accuracy of the orbit integration. For more best practices of these integrators (which clone those in GMAT), please refer to the GMAT reference. (Source)[https://github.com/ChristopherRabotin/GMAT/blob/37201a6290e7f7b941bc98ee973a527a5857104b/src/base/forcemodel/ODEModel.cpp#L3004]
RSSStep
An RSS step error control which effectively computes the L2 norm of the provided Vector of size 3
Note that this error controller should be preferably be used only with slices of a state with the same units. For example, one should probably use this for position independently of using it for the velocity. (Source)[https://github.com/ChristopherRabotin/GMAT/blob/37201a6290e7f7b941bc98ee973a527a5857104b/src/base/forcemodel/ODEModel.cpp#L3045]
LargestError
A largest error control which effectively computes the largest error at each component
This is a standard error computation algorithm, but it’s arguably bad if the state’s components have different units.
It calculates the largest local estimate of the error from the integration (error_est
)
given the difference in the candidate state and the previous state (state_delta
).
This error estimator is from the physical model estimator of GMAT
(Source)[https://github.com/ChristopherRabotin/GMAT/blob/37201a6290e7f7b941bc98ee973a527a5857104b/src/base/forcemodel/PhysicalModel.cpp#L987]
LargestState
A largest state error control
(Source)[https://github.com/ChristopherRabotin/GMAT/blob/37201a6290e7f7b941bc98ee973a527a5857104b/src/base/forcemodel/ODEModel.cpp#L3018]
LargestStep
A largest step error control which effectively computes the L1 norm of the provided Vector of size 3
Note that this error controller should be preferably be used only with slices of a state with the same units. For example, one should probably use this for position independently of using it for the velocity. (Source)[https://github.com/ChristopherRabotin/GMAT/blob/37201a6290e7f7b941bc98ee973a527a5857104b/src/base/forcemodel/ODEModel.cpp#L3033]
Implementations§
Source§impl ErrorControl
impl ErrorControl
Sourcepub fn estimate<N: DimName>(
self,
error_est: &OVector<f64, N>,
candidate: &OVector<f64, N>,
cur_state: &OVector<f64, N>,
) -> f64where
DefaultAllocator: Allocator<N>,
pub fn estimate<N: DimName>(
self,
error_est: &OVector<f64, N>,
candidate: &OVector<f64, N>,
cur_state: &OVector<f64, N>,
) -> f64where
DefaultAllocator: Allocator<N>,
Computes the actual error of the current step.
The error_est
is the estimated error computed from the difference in the two stages of
of the RK propagator. The candidate
variable is the candidate state, and cur_state
is
the current state. This function must return the error.
Trait Implementations§
Source§impl Clone for ErrorControl
impl Clone for ErrorControl
Source§fn clone(&self) -> ErrorControl
fn clone(&self) -> ErrorControl
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ErrorControl
impl Debug for ErrorControl
Source§impl Default for ErrorControl
impl Default for ErrorControl
Source§impl<'de> Deserialize<'de> for ErrorControl
impl<'de> Deserialize<'de> for ErrorControl
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ErrorControl
impl PartialEq for ErrorControl
Source§impl Serialize for ErrorControl
impl Serialize for ErrorControl
impl Copy for ErrorControl
impl Eq for ErrorControl
impl StructuralPartialEq for ErrorControl
Auto Trait Implementations§
impl Freeze for ErrorControl
impl RefUnwindSafe for ErrorControl
impl Send for ErrorControl
impl Sync for ErrorControl
impl Unpin for ErrorControl
impl UnwindSafe for ErrorControl
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> FromDhall for Twhere
T: DeserializeOwned,
impl<T> FromDhall for Twhere
T: DeserializeOwned,
fn from_dhall(v: &Value) -> Result<T, Error>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.