pub struct TargetObservation { /* private fields */ }Expand description
One sighting of a target: radar bearing and range, AIS position report, or any other position source.
Position is the common denominator from which tracks are built. Sources that also report course and speed over ground (AIS) add them; the track prefers them to values fitted from positions.
Implementations§
Source§impl TargetObservation
impl TargetObservation
Sourcepub const fn new(target: TargetId, position: Position, at: Instant<Utc>) -> Self
pub const fn new(target: TargetId, position: Position, at: Instant<Utc>) -> Self
Target at a position at an instant.
Sourcepub fn from_contact(
target: TargetId,
own: Position,
contact: Contact,
at: Instant<Utc>,
) -> Result<Self>
pub fn from_contact( target: TargetId, own: Position, contact: Contact, at: Instant<Utc>, ) -> Result<Self>
Radar plot: true bearing and range from own position at the time of the plot.
§Errors
As rhumb_destination: a plot beyond a pole.
Sourcepub const fn with_ground_track(self, ground_track: GroundTrack) -> Self
pub const fn with_ground_track(self, ground_track: GroundTrack) -> Self
Adds the target’s reported course and speed over ground.
Sourcepub const fn with_heading(self, heading: TrueCourse) -> Self
pub const fn with_heading(self, heading: TrueCourse) -> Self
Adds the target’s reported heading.
Sourcepub const fn ground_track(&self) -> Option<GroundTrack>
pub const fn ground_track(&self) -> Option<GroundTrack>
Reported course and speed, if any.
Sourcepub const fn heading(&self) -> Option<TrueCourse>
pub const fn heading(&self) -> Option<TrueCourse>
Reported heading, if any.
Trait Implementations§
Source§impl Clone for TargetObservation
impl Clone for TargetObservation
impl Copy for TargetObservation
Source§impl Debug for TargetObservation
impl Debug for TargetObservation
Source§impl PartialEq for TargetObservation
impl PartialEq for TargetObservation
impl StructuralPartialEq for TargetObservation
Auto Trait Implementations§
impl Freeze for TargetObservation
impl RefUnwindSafe for TargetObservation
impl Send for TargetObservation
impl Sync for TargetObservation
impl Unpin for TargetObservation
impl UnsafeUnpin for TargetObservation
impl UnwindSafe for TargetObservation
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