Skip to main content

Module gnss

Module gnss 

Source
Expand description

Satellite fix, independent of the sentence it arrived in.

Receivers report fixes in many formats (NMEA RMC/GGA, binary protocols, proprietary), all carrying the same facts: position, time, method, quality. GnssFix holds those facts; parsers translate into it and use cases read only it (anti-corruption layer).

No vertical channel: a height without datum, vertical velocity and source would be incomplete.

use kinavis_kernel::gnss::{Dop, FixType, GnssFix};
use kinavis_kernel::time::{Civil, Instant, Utc};
use kinavis_kernel::{Position, Speed, TrueCourse};

let taken_at = Instant::<Utc>::from_civil(Civil::date(2026, 9, 11))?;
let fix = GnssFix::builder(taken_at, "50°45.3'N 001°20.0'W".parse::<Position>()?)
    .fix_type(FixType::Differential)
    .course_over_ground(TrueCourse::new(272.5)?)
    .speed_over_ground(Speed::from_knots(11.3)?)
    .satellites(9)
    .hdop(Dop::new(0.9)?)
    .build();

assert!(fix.quality().fix_type().is_position_fix());
// HDOP times the nominal one-sigma range error for a differential fix.
assert_eq!(format!("{:.2}", fix.horizontal_accuracy().unwrap().metres()), "0.90");

Structs§

Dop
Dilution of precision: geometry factor from range error to position error.
GnssFix
Satellite fix: position, time, method and other receiver data.
GnssFixBuilder
Builder for the optional parts of a GnssFix.
GnssQuality
Receiver-reported fix quality.

Enums§

FixType
Fix method.