Skip to main content

SphericalHarmonicGravity

Struct SphericalHarmonicGravity 

Source
pub struct SphericalHarmonicGravity { /* private fields */ }
Expand description

Fully normalized spherical-harmonic gravity perturbation.

The force is perturbation-only: degree 0 and degree 1 rows are ignored, and acceleration sums begin at degree 2.

Implementations§

Source§

impl SphericalHarmonicGravity

Source

pub fn egm96_degree_order_36() -> Result<SphericalHarmonicGravity, PropagationError>

Build the embedded EGM96 degree and order 36 model.

Source

pub fn egm96_truncated( max_degree: u16, max_order: u16, ) -> Result<SphericalHarmonicGravity, PropagationError>

Build the embedded EGM96 model truncated to max_degree and max_order.

Source

pub fn earth_egm96_truncated( max_degree: u16, max_order: u16, ) -> Result<SphericalHarmonicGravity, PropagationError>

Build an Earth-constant model over the embedded EGM96 coefficient table.

Source

pub fn from_normalized_coefficients( mu_km3_s2: f64, reference_radius_km: f64, max_degree: u16, max_order: u16, coefficients: &[SphericalHarmonicCoefficient], ) -> Result<SphericalHarmonicGravity, PropagationError>

Build from caller-supplied fully normalized coefficients.

Coefficients above the requested degree or order are ignored. Degree 0 and 1 coefficients are ignored because this force contains only the perturbation sum from degree 2 upward.

Source

pub fn from_normalized_ascii_table( mu_km3_s2: f64, reference_radius_km: f64, max_degree: u16, max_order: u16, table: &str, ) -> Result<SphericalHarmonicGravity, PropagationError>

Build from an ASCII coefficient table.

Accepted data rows are either n m Cnm Snm ... or gfc n m Cnm Snm .... Blank lines and lines beginning with # are ignored.

Source

pub fn mu_km3_s2(&self) -> f64

Gravitational parameter, km^3/s^2.

Source

pub fn reference_radius_km(&self) -> f64

Reference equatorial radius, km.

Source

pub fn max_degree(&self) -> u16

Highest active degree.

Source

pub fn max_order(&self) -> u16

Highest active order.

Source

pub fn coefficient( &self, degree: u16, order: u16, ) -> Option<SphericalHarmonicCoefficient>

Return the coefficient at degree, order, if it lies inside the model.

Source

pub fn body_fixed_acceleration_km_s2( &self, position_body_fixed_km: [f64; 3], ) -> Result<[f64; 3], PropagationError>

Evaluate the perturbation acceleration in the body-fixed frame.

Trait Implementations§

Source§

impl Clone for SphericalHarmonicGravity

Source§

fn clone(&self) -> SphericalHarmonicGravity

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SphericalHarmonicGravity

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for SphericalHarmonicGravity

Source§

fn default() -> SphericalHarmonicGravity

Returns the “default value” for a type. Read more
Source§

impl ForceModel for SphericalHarmonicGravity

Source§

impl PartialEq for SphericalHarmonicGravity

Source§

fn eq(&self, other: &SphericalHarmonicGravity) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SphericalHarmonicGravity

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

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

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.