Skip to main content

Module ffi

Module ffi 

Source
Expand description

FFI bindings for iOS/Swift integration

Structs§

FFIAtmosphericConditions
FFIBallisticInputs
FFIMonteCarloParams
FFIMonteCarloResults
FFITrajectoryPoint
FFITrajectoryResult
FFITrajectorySample
FFIWindConditions

Constants§

MIN_FFI_STEP_SIZE_MS
Minimum C-ABI trajectory step_size, in milliseconds (0.1 ms = 0.0001 s).

Functions§

ballistics_calculate_trajectory
Calculate a trajectory through the C ABI.
ballistics_calculate_trajectory_with_drag_table
ballistics_calculate_trajectory with a caller-supplied custom drag deck (Cd vs Mach, e.g. Hornady CDM / Doppler-radar data). The deck REPLACES the G-model + BC for drag: bc_type/bc_value are ignored, and the retardation denominator becomes the projectile’s sectional density (mass and diameter in inputs must therefore be positive). Mach values must be strictly ascending with at least 2 points and finite positive Cd; outside the deck’s Mach domain the nearest endpoint Cd is held.
ballistics_calculate_zero_angle
Calculate the zero angle for a target distance through the C ABI.
ballistics_calculate_zero_angle_with_drag_table
ballistics_calculate_zero_angle with a caller-supplied custom drag deck (Cd vs Mach, e.g. Hornady CDM / Doppler-radar data). The deck REPLACES the G-model + BC for drag: bc_type/bc_value are ignored, and the retardation denominator becomes the projectile’s sectional density (mass and diameter in inputs must therefore be positive). Mach values must be strictly ascending with at least 2 points and finite positive Cd; outside the deck’s Mach domain the nearest endpoint Cd is held. Pair this with ballistics_calculate_trajectory_with_drag_table using the same deck to fly the solved angle — the two exports share identical deck semantics.
ballistics_free_monte_carlo_results
Release Monte Carlo results allocated by either Monte Carlo C entry point.
ballistics_free_trajectory_result
Release a trajectory result allocated by ballistics_calculate_trajectory.
ballistics_get_version
ballistics_monte_carlo
Run a Monte Carlo simulation through the C ABI.
ballistics_monte_carlo_with_direction_std_dev
Run a Monte Carlo simulation with independent wind-direction uncertainty through the C ABI.
ballistics_quick_trajectory