pub struct TrackUpdate {
pub track_id: String,
pub classification: String,
pub confidence: f64,
pub position: Position,
pub velocity: Option<Velocity>,
pub attributes: HashMap<String, Value>,
pub source_platform: String,
pub source_model: String,
pub model_version: String,
pub timestamp: DateTime<Utc>,
pub cell_id: Option<String>,
pub formation_id: Option<String>,
}Expand description
Track update from a Peat platform’s sensor
Represents a detected entity (person, vehicle, etc.) being tracked by a Peat sensor.
Fields§
§track_id: StringUnique track identifier
classification: StringClassification of tracked entity (person, vehicle, aircraft, etc.)
confidence: f64Detection confidence (0.0 - 1.0)
position: PositionCurrent position
velocity: Option<Velocity>Current velocity (if available)
attributes: HashMap<String, Value>Custom attributes (key-value pairs)
source_platform: StringPlatform that detected this track
source_model: StringAI model that generated detection
model_version: StringVersion of the AI model
timestamp: DateTime<Utc>Timestamp of the update
cell_id: Option<String>Cell membership (if assigned)
formation_id: Option<String>Formation membership (if assigned)
Implementations§
Source§impl TrackUpdate
impl TrackUpdate
Sourcepub fn new(
track_id: String,
classification: String,
confidence: f64,
position: Position,
source_platform: String,
source_model: String,
model_version: String,
) -> Self
pub fn new( track_id: String, classification: String, confidence: f64, position: Position, source_platform: String, source_model: String, model_version: String, ) -> Self
Create a new track update
Sourcepub fn with_attribute(self, key: &str, value: Value) -> Self
pub fn with_attribute(self, key: &str, value: Value) -> Self
Add an attribute
Sourcepub fn with_velocity(self, velocity: Velocity) -> Self
pub fn with_velocity(self, velocity: Velocity) -> Self
Set velocity
Sourcepub fn with_formation(self, formation_id: String) -> Self
pub fn with_formation(self, formation_id: String) -> Self
Set formation membership
Trait Implementations§
Source§impl Clone for TrackUpdate
impl Clone for TrackUpdate
Source§fn clone(&self) -> TrackUpdate
fn clone(&self) -> TrackUpdate
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TrackUpdate
impl Debug for TrackUpdate
Source§impl<'de> Deserialize<'de> for TrackUpdate
impl<'de> Deserialize<'de> for TrackUpdate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TrackUpdate
impl PartialEq for TrackUpdate
Source§impl Serialize for TrackUpdate
impl Serialize for TrackUpdate
impl StructuralPartialEq for TrackUpdate
Auto Trait Implementations§
impl Freeze for TrackUpdate
impl RefUnwindSafe for TrackUpdate
impl Send for TrackUpdate
impl Sync for TrackUpdate
impl Unpin for TrackUpdate
impl UnsafeUnpin for TrackUpdate
impl UnwindSafe for TrackUpdate
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more