pub struct BcCorrectionTable { /* private fields */ }Expand description
BC correction table with 5D interpolation
Implementations§
Source§impl BcCorrectionTable
impl BcCorrectionTable
Sourcepub fn load<P: AsRef<Path>>(path: P) -> Result<Self, BcTableError>
pub fn load<P: AsRef<Path>>(path: P) -> Result<Self, BcTableError>
Load a BC correction table from a binary file
Sourcepub fn lookup_with_caliber(
&self,
bc: f64,
bc_type: &str,
mass_grains: f64,
caliber_inches: f64,
velocity_fps: f64,
) -> f64
pub fn lookup_with_caliber( &self, bc: f64, bc_type: &str, mass_grains: f64, caliber_inches: f64, velocity_fps: f64, ) -> f64
Get the BC correction factor for a given bullet and velocity This is a convenience method that estimates bullet length from mass and caliber
§Arguments
bc- Published BC valuebc_type- “G1” or “G7”mass_grains- Bullet mass in grainscaliber_inches- Bullet caliber in inchesvelocity_fps- Current velocity in fps
Sourcepub fn total_cells(&self) -> usize
pub fn total_cells(&self) -> usize
Get total number of cells in the table
Sourcepub fn dimensions_str(&self) -> String
pub fn dimensions_str(&self) -> String
Get table dimensions as a string
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BcCorrectionTable
impl RefUnwindSafe for BcCorrectionTable
impl Send for BcCorrectionTable
impl Sync for BcCorrectionTable
impl Unpin for BcCorrectionTable
impl UnwindSafe for BcCorrectionTable
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<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.