Skip to main content

sample_trajectory

Function sample_trajectory 

Source
pub fn sample_trajectory(
    trajectory_data: &TrajectoryData,
    outputs: &TrajectoryOutputs,
    step_m: f64,
    mass_kg: f64,
) -> Result<Vec<TrajectorySample>, BallisticsError>
Expand description

Sample trajectory at regular distance intervals with vectorized operations.

ยงErrors

Returns BallisticsError when the requested range or interval is non-finite, or when the retained distance grid would exceed MAX_TRAJECTORY_SAMPLES.