CardResponseV1

Struct CardResponseV1 

Source
pub struct CardResponseV1 {
    pub schema_version: u32,
    pub kind: &'static str,
    pub zero_distance: f64,
    pub bc_for_solve: f64,
    pub bc_ladder: Option<CardBcLadderV1>,
    pub units: CardUnitsBlockV1,
    pub wind_speeds: Vec<f64>,
    pub wind_angles_deg: Vec<f64>,
    pub rows: Vec<CardRowV1>,
    pub extra_angle_rows: Vec<Vec<CardRowV1>>,
    pub truncation: Option<CardTruncationV1>,
}

Fields§

§schema_version: u32§kind: &'static str§zero_distance: f64§bc_for_solve: f64

The scalar BC fed to the zero solve and every sampled flight: the request’s published ballistic_coefficient, or, when bc5d_table_path generated a ladder, that BC with the table’s muzzle-velocity correction applied.

With no Self::bc_ladder it is the BC every row flew, and the printed footer’s BC:. With a bc_ladder it is only the interior-gap fallback: it flies only where bc_ladder.interior_gap allows, and never under a gapless ladder (every ladder a correction table builds), so it must not be presented as the card’s BC (MBA-1601).

§bc_ladder: Option<CardBcLadderV1>

The BC ladder these rows flew, present only when one fed the solve: the request’s bc_segments, or the ladder its bc5d_table_path generated (MBA-1601).

Additive and absent on every card without a ladder, so those responses are byte-identical to before. A saved card has to be able to state the BCs its numbers came from long after the correction table has been replaced on disk, and under a ladder bc_for_solve alone does not do that.

§units: CardUnitsBlockV1§wind_speeds: Vec<f64>

Wind card only: the swept speeds, one per wind_columns entry.

§wind_angles_deg: Vec<f64>

Wind card only: one block of rows per wind angle.

§rows: Vec<CardRowV1>§extra_angle_rows: Vec<Vec<CardRowV1>>

Wind card with multiple angles: rows for angles beyond the first.

§truncation: Option<CardTruncationV1>

Present ONLY when the solved flight stopped short of the rows requested, in which case rows holds every row it did reach and nothing past them (MBA-1476 follow-up).

Additive and absent on every card that ran to its requested end, so a caller reading an untruncated card sees byte-identical JSON to before. It is a field rather than only a log line because the apps and the Flask layer consume this shape: a card that quietly returns fewer rows than were asked for, with nothing on the response saying so, is the same class of silent failure as the substituted row this work removed.

Trait Implementations§

Source§

impl Clone for CardResponseV1

Source§

fn clone(&self) -> CardResponseV1

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for CardResponseV1

Source§

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

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

impl Serialize for CardResponseV1

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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> Same for T

Source§

type Output = T

Should always be Self
§

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

§

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

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

fn is_in_subset(&self) -> bool

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

fn to_subset_unchecked(&self) -> SS

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

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.