pub struct SpatialAnchorLite {
pub anchor_id: String,
pub geodetic: [f64; 3],
pub enu_offset: [f32; 3],
pub confidence_radius_mm: f32,
}Expand description
Lightweight geodetic spatial anchor for assets (no vibe dependency).
Stores WGS84 [lat, lon, alt] plus an optional ENU offset and confidence
radius. Under the qualia feature, converts to/from
vibe::cosmic::ar::SpatialAnchor.
Fields§
§anchor_id: StringUnique anchor identifier
geodetic: [f64; 3]WGS84 geodetic position [lat_deg, lon_deg, alt_m]
enu_offset: [f32; 3]Local ENU offset [East, North, Up] in meters
confidence_radius_mm: f32Confidence radius in millimeters
Implementations§
Source§impl SpatialAnchorLite
impl SpatialAnchorLite
Sourcepub fn new(anchor_id: &str, lat: f64, lon: f64, alt: f64) -> Self
pub fn new(anchor_id: &str, lat: f64, lon: f64, alt: f64) -> Self
Create a new spatial anchor at a geodetic position.
Sourcepub fn with_enu_offset(self, east: f32, north: f32, up: f32) -> Self
pub fn with_enu_offset(self, east: f32, north: f32, up: f32) -> Self
Set ENU offset.
Sourcepub fn with_confidence(self, radius_mm: f32) -> Self
pub fn with_confidence(self, radius_mm: f32) -> Self
Set confidence radius in mm.
Sourcepub fn is_submillimeter(&self) -> bool
pub fn is_submillimeter(&self) -> bool
Whether this anchor is sub-millimeter precision.
Trait Implementations§
Source§impl Clone for SpatialAnchorLite
impl Clone for SpatialAnchorLite
Source§impl Debug for SpatialAnchorLite
impl Debug for SpatialAnchorLite
Source§impl<'de> Deserialize<'de> for SpatialAnchorLite
impl<'de> Deserialize<'de> for SpatialAnchorLite
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 SpatialAnchorLite
impl PartialEq for SpatialAnchorLite
Source§impl Serialize for SpatialAnchorLite
impl Serialize for SpatialAnchorLite
impl StructuralPartialEq for SpatialAnchorLite
Auto Trait Implementations§
impl Freeze for SpatialAnchorLite
impl RefUnwindSafe for SpatialAnchorLite
impl Send for SpatialAnchorLite
impl Sync for SpatialAnchorLite
impl Unpin for SpatialAnchorLite
impl UnsafeUnpin for SpatialAnchorLite
impl UnwindSafe for SpatialAnchorLite
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