pub struct TrajectorySolver { /* private fields */ }Implementations§
Source§impl TrajectorySolver
impl TrajectorySolver
pub fn new( inputs: BallisticInputs, wind: WindConditions, atmosphere: AtmosphericConditions, ) -> Self
pub fn set_max_range(&mut self, range: f64)
pub fn set_time_step(&mut self, step: f64)
Sourcepub fn set_wind_segments(&mut self, segments: Vec<WindSegment>)
pub fn set_wind_segments(&mut self, segments: Vec<WindSegment>)
Supply downrange-segmented wind. Each segment is (speed_kmh, angle_deg, until_distance_m); the wind for a given downrange distance is the first
segment whose until_distance_m exceeds it (a step function), and wind is
zero beyond the last segment. An empty list clears segmented wind (reverts
to the scalar wind). The angle convention matches WindConditions
(0 = headwind, 90 = from the right).
pub fn solve(&self) -> Result<TrajectoryResult, BallisticsError>
Auto Trait Implementations§
impl Freeze for TrajectorySolver
impl RefUnwindSafe for TrajectorySolver
impl Send for TrajectorySolver
impl Sync for TrajectorySolver
impl Unpin for TrajectorySolver
impl UnsafeUnpin for TrajectorySolver
impl UnwindSafe for TrajectorySolver
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.