Skip to main content

DragQuery

Struct DragQuery 

Source
pub struct DragQuery<'a> { /* private fields */ }
Expand description

What a DragModel is asked: the flow and the drag conditions, with the rocket’s reference area, its length and hpr’s own drag buildup at hand. Made by AeroModel::drag; to try a model on its own, give it to an AeroModel and ask that for its drag.

Implementations§

Source§

impl<'a> DragQuery<'a>

Source

pub fn flow(&self) -> &Flow

The flow: Mach number, angle of attack and roll. The coefficient asked for is the zero-lift one whatever the angle of attack; hpr scales it for the angle itself.

Source

pub fn mach(&self) -> f64

The Mach number, as a shorthand for flow().mach: finite and not negative.

Source

pub fn conditions(&self) -> &DragConditions

The drag conditions: the Reynolds number per meter, and whether a motor is thrusting, which a model with a power-on curve reads. They are as hpr’s buildup reads them: under AeroModel::with_full_base_drag_under_power the thrusting motors’ areas are zero.

Source

pub fn reference_area_m2(&self) -> f64

The area the coefficient is on: the rocket’s reference area, m².

Source

pub fn length_m(&self) -> f64

The rocket’s length, nose tip to the aft end of its last body component, m: the length hpr’s buildup takes the Reynolds number on.

Source

pub fn buildup(&self) -> Result<Drag, AeroError>

hpr’s own drag buildup at this flow and these conditions (AeroModel::buildup_drag): what the flight would have used without the model.

§Errors

As AeroModel::buildup_drag: among others, AeroError::Mach at Mach 5 and faster, where the buildup ends.

Source

pub fn buildup_components(&self) -> Result<Vec<ComponentDrag>, AeroError>

hpr’s own drag buildup at this flow, component by component (AeroModel::buildup_components).

§Errors

As AeroModel::buildup_components.

Trait Implementations§

Source§

impl<'a> Clone for DragQuery<'a>

Source§

fn clone(&self) -> DragQuery<'a>

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<'a> Copy for DragQuery<'a>

Source§

impl Debug for DragQuery<'_>

Source§

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

The question, without the rocket’s whole model.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for DragQuery<'a>

§

impl<'a> !UnwindSafe for DragQuery<'a>

§

impl<'a> Freeze for DragQuery<'a>

§

impl<'a> Send for DragQuery<'a>

§

impl<'a> Sync for DragQuery<'a>

§

impl<'a> Unpin for DragQuery<'a>

§

impl<'a> UnsafeUnpin for DragQuery<'a>

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> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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> 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.