Struct nyx_space::Spacecraft[][src]

pub struct Spacecraft {
    pub orbit: Orbit,
    pub dry_mass_kg: f64,
    pub fuel_mass_kg: f64,
    pub srp_area_m2: f64,
    pub drag_area_m2: f64,
    pub cr: f64,
    pub cd: f64,
    pub thruster: Option<Thruster>,
    pub mode: GuidanceMode,
}
Expand description

A spacecraft state

Fields

orbit: Orbit

Initial orbit the vehicle is in

dry_mass_kg: f64

Dry mass, i.e. mass without fuel, in kg

fuel_mass_kg: f64

Fuel mass (if fuel mass is negative, thrusting will fail, unless configured to break laws of physics)

srp_area_m2: f64

in m^2

drag_area_m2: f64

in m^2

cr: f64

coefficient of reflectivity, must be between 0.0 (translucent) and 2.0 (all radiation absorbed and twice the force is transmitted back).

cd: f64

coefficient of drag; (spheres are between 2.0 and 2.1, use 2.2 in Earth’s atmosphere).

thruster: Option<Thruster>mode: GuidanceMode

Guidance mode determines whether the thruster should fire or not

Implementations

Initialize a spacecraft state from all of its parameters

Initialize a spacecraft state from the SRP default 1.8 for coefficient of reflectivity (fuel mass and drag parameters nullified!)

Initialize a spacecraft state from the SRP default 1.8 for coefficient of drag (fuel mass and SRP parameters nullified!)

Initialize a spacecraft state from only a thruster and mass. Use this when designing control laws whilke ignoring drag and SRP.

Returns a copy of the state with a new dry mass

Returns a copy of the state with a new fuel mass

Returns a copy of the state with a new SRP area and CR

Returns a copy of the state with a new SRP area

Returns a copy of the state with a new coefficient of reflectivity

Returns a copy of the state with a new drag area and CD

Returns a copy of the state with a new SRP area

Returns a copy of the state with a new coefficient of drag

Returns the root sum square error between this spacecraft and the other, in kilometers for the position, kilometers per second in velocity, and kilograms in fuel

Sets the STM of this state of identity, which also enables computation of the STM for spacecraft navigation

Sets the STM of this state of identity, which also enables computation of the STM for trajectory optimization

Copies the current state but sets the STM to identity

Sets the STM of this state of identity

Unwraps this STM, or panics if unset.

Trait Implementations

Adds the provided state deviation to this orbit

The resulting type after applying the + operator.

Adds the provided state deviation to this orbit

The resulting type after applying the + operator.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Stop searching when the time has converged to less than 0.1 seconds

Finds the darkest part of an eclipse within 2% of penumbra (i.e. 98% in shadow)

Stop searching when the time has converged to less than 0.1 seconds

Finds the slightest penumbra within 2%(i.e. 98% in visibility)

Formats the value using the given formatter.

Formats the value using the given formatter.

Perform a measurement from the ground station to the receiver (rx).

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

WARNING: Currently the STM assumes that the fuel mass is constant at ALL TIMES!

Size of the state and its STM

Initialize an empty state

Return this state as a vector for the propagation/estimation

Set this state

Reconstruct a new State from the provided delta time in seconds compared to the current state and with the provided vector. Read more

Retrieve the Epoch

Set the Epoch

Shift this epoch by a duration (can be negative)

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

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

Should always be Self

Performance hack: Clone doesn’t get inlined for Copy types in debug mode, so make it inline anyway.

Tests if Self the same as the type T Read more

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

Checks if self is actually part of its subset T (and can be converted to it).

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

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.