pub enum GasVelocityModel {
Saami(FirearmType),
Factor(f64),
Fixed(f64),
}Expand description
How the propellant gas velocity (SAAMI’s V_PG) is resolved from the muzzle velocity.
See the module docs for why the SAAMI type-keyed factor is the default.
Variants§
Saami(FirearmType)
V_gas = firearm_type.saami_gas_factor() * V_muzzle – the default/recommended path.
Factor(f64)
V_gas = factor * V_muzzle: an explicit override of the SAAMI per-type factor.
Fixed(f64)
V_gas is an absolute constant (m/s), independent of muzzle velocity – e.g. the
popular non-SAAMI rule of thumb of roughly 4700 fps (~1433 m/s) for smokeless
powder, or a chronographed/measured gas velocity.
Implementations§
Source§impl GasVelocityModel
impl GasVelocityModel
Sourcepub fn resolve_mps(self, muzzle_velocity_mps: f64) -> f64
pub fn resolve_mps(self, muzzle_velocity_mps: f64) -> f64
Resolve the propellant gas velocity (m/s) for a given muzzle velocity (m/s).
Trait Implementations§
Source§impl Clone for GasVelocityModel
impl Clone for GasVelocityModel
Source§fn clone(&self) -> GasVelocityModel
fn clone(&self) -> GasVelocityModel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GasVelocityModel
Source§impl Debug for GasVelocityModel
impl Debug for GasVelocityModel
Source§impl PartialEq for GasVelocityModel
impl PartialEq for GasVelocityModel
impl StructuralPartialEq for GasVelocityModel
Auto Trait Implementations§
impl Freeze for GasVelocityModel
impl RefUnwindSafe for GasVelocityModel
impl Send for GasVelocityModel
impl Sync for GasVelocityModel
impl Unpin for GasVelocityModel
impl UnsafeUnpin for GasVelocityModel
impl UnwindSafe for GasVelocityModel
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Scalar for 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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.