pub struct GnssNetElementLink {
pub gnss_index: usize,
pub netelement_id: String,
pub projected_point: Point<f64>,
pub distance_meters: f64,
pub intrinsic_coordinate: f64,
pub heading_difference: Option<f64>,
pub probability: f64,
}Expand description
Link between a GNSS position and a candidate netelement
Created during path calculation to evaluate which netelements are potential matches for each GNSS position. Multiple links exist per GNSS position. This is an intermediate calculation model, not part of final output.
§Examples
use tp_lib_core::GnssNetElementLink;
use geo::Point;
let link = GnssNetElementLink::new(
5,
"NE_A".to_string(),
Point::new(4.3517, 50.8503),
3.2,
0.45,
Some(5.3),
0.89,
)?;Fields§
§gnss_index: usizeIndex of the GNSS position in the input data
netelement_id: StringID of the candidate netelement
projected_point: Point<f64>Projected point on the netelement (closest point to GNSS position)
distance_meters: f64Distance from GNSS position to projected point in meters
intrinsic_coordinate: f64Intrinsic coordinate on the netelement (0.0 to 1.0) 0.0 = start of segment, 1.0 = end of segment
heading_difference: Option<f64>Angular difference between GNSS heading and netelement direction (degrees) None if GNSS position has no heading information
probability: f64Probability score for this link (0.0 to 1.0) Calculated from distance and heading probability
Implementations§
Source§impl GnssNetElementLink
impl GnssNetElementLink
Sourcepub fn new(
gnss_index: usize,
netelement_id: String,
projected_point: Point<f64>,
distance_meters: f64,
intrinsic_coordinate: f64,
heading_difference: Option<f64>,
probability: f64,
) -> Result<Self, ProjectionError>
pub fn new( gnss_index: usize, netelement_id: String, projected_point: Point<f64>, distance_meters: f64, intrinsic_coordinate: f64, heading_difference: Option<f64>, probability: f64, ) -> Result<Self, ProjectionError>
Create a new GNSS-netelement link with validation
Sourcepub fn is_high_probability(&self, threshold: f64) -> bool
pub fn is_high_probability(&self, threshold: f64) -> bool
Check if this is a high-probability candidate (>= threshold)
Sourcepub fn is_within_distance(&self, max_distance_meters: f64) -> bool
pub fn is_within_distance(&self, max_distance_meters: f64) -> bool
Check if distance is within acceptable range
Trait Implementations§
Source§impl Clone for GnssNetElementLink
impl Clone for GnssNetElementLink
Source§fn clone(&self) -> GnssNetElementLink
fn clone(&self) -> GnssNetElementLink
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GnssNetElementLink
impl Debug for GnssNetElementLink
Source§impl<'de> Deserialize<'de> for GnssNetElementLink
impl<'de> Deserialize<'de> for GnssNetElementLink
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>,
Source§impl PartialEq for GnssNetElementLink
impl PartialEq for GnssNetElementLink
Source§impl Serialize for GnssNetElementLink
impl Serialize for GnssNetElementLink
impl StructuralPartialEq for GnssNetElementLink
Auto Trait Implementations§
impl Freeze for GnssNetElementLink
impl RefUnwindSafe for GnssNetElementLink
impl Send for GnssNetElementLink
impl Sync for GnssNetElementLink
impl Unpin for GnssNetElementLink
impl UnsafeUnpin for GnssNetElementLink
impl UnwindSafe for GnssNetElementLink
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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