pub struct CardRequestV1 {Show 33 fields
pub units: CardUnits,
pub muzzle_velocity: f64,
pub ballistic_coefficient: f64,
pub mass: f64,
pub diameter: f64,
pub drag_model: DragModelV1,
pub sight_height: f64,
pub zero_distance: f64,
pub zero_poi_vertical: f64,
pub zero_poi_horizontal: f64,
pub sight_offset_lateral: f64,
pub temperature: Option<f64>,
pub pressure: Option<f64>,
pub humidity: f64,
pub altitude: f64,
pub wind_speed: f64,
pub wind_direction_deg: f64,
pub start: f64,
pub end: f64,
pub step: f64,
pub adjustment_unit: AdjustmentUnit,
pub windage_unit: Option<AdjustmentUnit>,
pub elevation_click_value: Option<String>,
pub windage_click_value: Option<String>,
pub elevation_cf: f64,
pub windage_cf: f64,
pub zero_set_elevation_bias_mil: f64,
pub zero_set_windage_bias_mil: f64,
pub wind_speeds: Vec<f64>,
pub wind_angles_deg: Vec<f64>,
pub bc_segments: Option<Vec<CardBcSegmentV1>>,
pub bc5d_table_path: Option<String>,
pub pdf: Option<PdfCardOptionsV1>,
}Expand description
Everything the three card surfaces share: load, zero, atmosphere, display axes.
Field values are in the units system (see module docs).
Fields§
§units: CardUnits§muzzle_velocity: f64§ballistic_coefficient: f64§mass: f64grains (imperial) / grams (metric)
diameter: f64inches (imperial) / mm (metric)
drag_model: DragModelV1§sight_height: f64inches (imperial) / mm (metric); CLI default 1.5 in
zero_distance: f64§zero_poi_vertical: f64Deliberate POI offset at the zero range, in the units system’s LINEAR drop unit (inches / mm); 0 = zeroed dead-on.
zero_poi_horizontal: f64§sight_offset_lateral: f64Lateral sight-to-bore mount offset (inches / mm).
temperature: Option<f64>§pressure: Option<f64>§humidity: f64§altitude: f64§wind_speed: f64§wind_direction_deg: f64§start: f64§end: f64§step: f64§adjustment_unit: AdjustmentUnit§windage_unit: Option<AdjustmentUnit>Windage axis unit; defaults to the elevation axis.
elevation_click_value: Option<String>Turret graduations as suffixed strings (“0.1mil”, “0.25moa”); required when
the corresponding axis unit is clicks. Windage falls back to elevation.
windage_click_value: Option<String>§elevation_cf: f64Scope tracking correction factors (MBA-1358); 1.0 = tracks true.
windage_cf: f64§zero_set_elevation_bias_mil: f64Selected zero set’s dial corrections, true angular MIL (MBA-1360).
zero_set_windage_bias_mil: f64§wind_speeds: Vec<f64>Wind card only: the sweep of wind speeds (mph / m/s), one output column each.
wind_angles_deg: Vec<f64>Wind card only: wind-FROM angles in degrees; default [90] (full-value from
the right), matching the CLI.
bc_segments: Option<Vec<CardBcSegmentV1>>Explicit velocity-banded BC schedule, mirroring the CLI’s repeatable
--bc-segment VMIN:VMAX:BC. Velocities are in the request’s units velocity
unit (fps imperial / m/s metric), exactly like the CLI flag. When supplied it
wins over bc5d_table_path, and — CLI parity — the scalar
ballistic_coefficient remains the interior-gap fallback unchanged. The
schedule feeds BOTH the zero solve and every sampled trajectory.
bc5d_table_path: Option<String>Filesystem path to a caliber-specific BC5D correction table
(bc5d_<caliber>.bin, the exact format the CLI’s --bc-table-dir
consumes). The table is CRC-verified, a velocity-keyed BC schedule is
generated for this load (same ladder as the CLI), and the scalar BC gets the
table’s muzzle correction as the interior-gap fallback. Ignored when
bc_segments is supplied. Not available on wasm32 builds (no filesystem);
there it is rejected with an invalid-request error.
pdf: Option<PdfCardOptionsV1>Presentation-only options for the printable PDF dope card (card.pdf). Nothing in
here touches the ballistics: the numbers in the PDF are the rows
range_table_v1 returns, computed by the same call.
It lives on the shared request — rather than in a card.pdf-only wrapper type — so
an app stores ONE CardRequestV1 per saved card and replays that exact document
against either surface: card.range_table for the screen, card.pdf for the
printout. The on-screen commands ignore this block.
Deliberately NOT #[cfg(feature = "pdf")], even though everything that consumes it
is: CardRequestV1 denies unknown fields, so gating the field would make a
pdf-less build REJECT a stored request that carries it, breaking exactly the
round-trip the field exists to support. A pdf-less build parses it and never reads
it; only the card.pdf command itself disappears.
Trait Implementations§
Source§impl Clone for CardRequestV1
impl Clone for CardRequestV1
Source§fn clone(&self) -> CardRequestV1
fn clone(&self) -> CardRequestV1
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CardRequestV1
impl Debug for CardRequestV1
Source§impl<'de> Deserialize<'de> for CardRequestV1
impl<'de> Deserialize<'de> for CardRequestV1
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for CardRequestV1
impl RefUnwindSafe for CardRequestV1
impl Send for CardRequestV1
impl Sync for CardRequestV1
impl Unpin for CardRequestV1
impl UnsafeUnpin for CardRequestV1
impl UnwindSafe for CardRequestV1
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.