pub struct TrajectoryParams {Show 26 fields
pub mass_kg: f64,
pub bc: f64,
pub drag_model: DragModel,
pub wind_segments: Vec<WindSegment>,
pub atmos_params: (f64, f64, f64, f64),
pub omega_vector: Option<Vector3<f64>>,
pub enable_spin_drift: bool,
pub enable_magnus: bool,
pub enable_coriolis: bool,
pub target_distance_m: f64,
pub enable_wind_shear: bool,
pub wind_shear_model: String,
pub shooter_altitude_m: f64,
pub is_twist_right: bool,
pub shooting_angle: f64,
pub bullet_diameter: f64,
pub bullet_length: f64,
pub twist_rate: f64,
pub custom_drag_table: Option<DragTable>,
pub cd_scale: f64,
pub custom_drag_reference: bool,
pub bc_segments: Option<Vec<(f64, f64)>>,
pub use_bc_segments: bool,
pub bc_segments_data: Option<Vec<BCSegmentData>>,
pub ground_threshold: f64,
pub atmo_sock: Option<AtmoSock>,
}Expand description
Parameters for trajectory computation
Fields§
§mass_kg: f64§bc: f64§drag_model: DragModel§wind_segments: Vec<WindSegment>Downrange wind zones, normalized by until_distance_m when integration begins.
atmos_params: (f64, f64, f64, f64)Dual-mode atmosphere tuple consumed by compute_derivatives:
Standard (base_alt_m, base_temp_c, base_pressure_hPa, base_density_ratio) — note
slot 3 is a density RATIO, NOT humidity, even though it rides in the humidity field;
or Direct (air_density, speed_of_sound, 0.0, 0.0) — slots 2 and 3 are zero
sentinels. A pressure of 0 that is not the direct-mode sentinel disables drag.
omega_vector: Option<Vector3<f64>>Earth rotation in level downrange/up/lateral axes. The derivative kernel projects it into
the inclined shot frame using shooting_angle before applying Coriolis acceleration.
enable_spin_drift: bool§enable_magnus: bool§enable_coriolis: bool§target_distance_m: f64§enable_wind_shear: bool§wind_shear_model: String§shooter_altitude_m: f64§is_twist_right: bool§shooting_angle: f64§bullet_diameter: f64§bullet_length: f64§twist_rate: f64§custom_drag_table: Option<DragTable>§cd_scale: f64MBA-1356: whole-curve scale for the custom deck (1.0 = neutral). Threaded so the binding entry point (fast_integrate_with_segments) cannot silently drop it.
custom_drag_reference: boolWhether custom_drag_table is a reference curve that the BCs were measured against,
flown as Cd / BC with the BC the kernel resolves (a ladder’s band BC, else the scalar
bc), rather than the projectile’s own Cd over sectional density. Mirrors
BallisticInputs::custom_drag_reference and is threaded beside cd_scale for the same
reason: build_inputs copies it onto the derivative inputs, and a flag dropped beside
cd_scale = 1.0 would fly a reference curve as the projectile’s own Cd. false for a
caller with no table, or with the projectile’s own curve.
bc_segments: Option<Vec<(f64, f64)>>§use_bc_segments: bool§bc_segments_data: Option<Vec<BCSegmentData>>MBA-1602: the caller’s velocity-keyed BC ladder (fps bands), flown when
use_bc_segments is on and the ladder is non-empty. None or an empty ladder is no
ladder: with use_bc_segments on and no Mach bc_segments, the kernel keeps its
historical opt-in auto-estimate (MBA-955). Threaded so the binding entry point
(fast_integrate_with_segments) cannot silently drop it.
ground_threshold: f64MBA-954: altitude (m, relative to launch) below which integration stops. -1000.0 is the historical default — effectively “no early ground impact” for normal flat-fire shots.
atmo_sock: Option<AtmoSock>MBA-1137: optional downrange-segmented atmosphere. When Some, compute_derivatives
swaps the standard-mode base T/P/H for the zone selected by downrange distance before the
altitude lapse. None (default) is byte-identical to pre-feature behavior.
Auto Trait Implementations§
impl Freeze for TrajectoryParams
impl RefUnwindSafe for TrajectoryParams
impl Send for TrajectoryParams
impl Sync for TrajectoryParams
impl Unpin for TrajectoryParams
impl UnsafeUnpin for TrajectoryParams
impl UnwindSafe for TrajectoryParams
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<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.