pub struct TargetTrack { /* private fields */ }Expand description
Target track held by the traffic picture.
Aggregate of recent fixes, last reported motion and status. Mutated only by
Traffic.
Implementations§
Source§impl TargetTrack
impl TargetTrack
Sourcepub const fn status(&self) -> TrackStatus
pub const fn status(&self) -> TrackStatus
Whether acquired.
Sourcepub const fn fix_count(&self) -> usize
pub const fn fix_count(&self) -> usize
Number of fixes, up to MAX_TRACK_HISTORY.
Sourcepub fn last_position(&self) -> Position
pub fn last_position(&self) -> Position
Last observed position, unsmoothed.
Sourcepub fn first_seen(&self) -> Instant<Utc>
pub fn first_seen(&self) -> Instant<Utc>
Time of the earliest fix in the window.
Sourcepub const fn reported_ground_track(&self) -> Option<GroundTrack>
pub const fn reported_ground_track(&self) -> Option<GroundTrack>
Last course and speed reported by the target, if any.
Sourcepub const fn heading(&self) -> Option<TrueCourse>
pub const fn heading(&self) -> Option<TrueCourse>
Last heading reported by the target, if any.
Sourcepub fn age(&self, now: Instant<Utc>) -> Duration
pub fn age(&self, now: Instant<Utc>) -> Duration
Time since the last sighting; zero if now is earlier.
Sourcepub fn motion(&self) -> Option<GroundTrack>
pub fn motion(&self) -> Option<GroundTrack>
Course and speed over ground: as reported, otherwise fitted from the fixes.
None for a single fix without a report.
Sourcepub fn fitted_motion(&self) -> Option<GroundTrack>
pub fn fitted_motion(&self) -> Option<GroundTrack>
Course and speed fitted to the fixes, ignoring reports (the radar plot).
Least-squares line of position against time, robust to a single noisy
plot. None with fewer than two fixes or no movement.
Sourcepub fn position_at(&self, when: Instant<Utc>) -> Result<Position>
pub fn position_at(&self, when: Instant<Utc>) -> Result<Position>
Extrapolated position at when: the smoothed position at the last fix,
propagated by TargetTrack::motion forwards or backwards. Without
motion, the last position.
§Errors
As rhumb_destination: extrapolation across a pole.