pub struct FlightInputs {
pub rocket: Rocket,
pub configuration_id: String,
pub environment: Environment,
pub rail: Rail,
pub settings: FlightSettings,
pub recovery: Vec<Device>,
pub drag: Option<DragOverride>,
pub drag_scale: f64,
pub separations: Vec<Separation>,
}Expand description
Everything one flight is flown from: the inputs of Simulation::new and the options a
Monte Carlo run disperses. hpr::FlightBuilder::inputs makes one from the facade’s builder.
Fields§
§rocket: RocketThe design.
configuration_id: StringThe id of the configuration flown: which motors are in it.
environment: EnvironmentThe atmosphere and the wind.
rail: RailThe launch rail.
settings: FlightSettingsThe integrator’s settings.
recovery: Vec<Device>The recovery devices, none for a ballistic flight (Simulation::with_recovery).
drag: Option<DragOverride>A drag table or model in place of hpr’s drag buildup, if any.
drag_scale: f64The factor on the rocket’s zero-lift drag (Simulation::with_drag_scale); 1 leaves it.
separations: Vec<Separation>The stack’s separations, in the order they fire, none for a flight that stays whole
(Simulation::with_separations).
Implementations§
Source§impl FlightInputs
impl FlightInputs
Sourcepub fn new(
rocket: Rocket,
configuration_id: impl Into<String>,
environment: Environment,
rail: Rail,
) -> Self
pub fn new( rocket: Rocket, configuration_id: impl Into<String>, environment: Environment, rail: Rail, ) -> Self
The inputs of a flight of rocket’s configuration configuration_id, with the default
integrator, no recovery, hpr’s own drag and no drag scale.
Sourcepub fn simulation(&self) -> Result<Simulation, SimError>
pub fn simulation(&self) -> Result<Simulation, SimError>
The simulation these inputs fly.
§Errors
As Simulation::new, Simulation::with_drag_scale (a scale that is negative or not
finite), Simulation::with_recovery and Simulation::with_separations.
Sourcepub fn fly(&self) -> Result<FlightSummary, SimError>
pub fn fly(&self) -> Result<FlightSummary, SimError>
Flies the flight to the ground and gives its metrics.
§Errors
As FlightInputs::simulation, Simulation::run and
FlightMetrics::summary.
Trait Implementations§
Source§impl Clone for FlightInputs
impl Clone for FlightInputs
Source§fn clone(&self) -> FlightInputs
fn clone(&self) -> FlightInputs
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for FlightInputs
impl !UnwindSafe for FlightInputs
impl Freeze for FlightInputs
impl Send for FlightInputs
impl Sync for FlightInputs
impl Unpin for FlightInputs
impl UnsafeUnpin for FlightInputs
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,
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