msp over wifi implemented

This commit is contained in:
Constantin Leue
2026-08-02 09:20:05 +02:00
parent 24db38dc33
commit 6cfb82bd77
11 changed files with 155 additions and 13 deletions
@@ -10,6 +10,7 @@ class MspGpsReading {
required this.lat,
required this.lon,
required this.speedMs,
required this.headingDeg,
});
/// 0 = kein Fix (`fc_msp.c`: `gpsSol.fixType`).
@@ -19,6 +20,10 @@ class MspGpsReading {
final double lon;
final double speedMs;
/// Kurs ueber Grund in Grad (0 = Norden, im Uhrzeigersinn), aus
/// `groundCourse` - nur bei [hasFix] aussagekraeftig.
final double headingDeg;
bool get hasFix => fixType != 0;
}
@@ -31,6 +36,7 @@ MspGpsReading parseMspRawGps(Uint8List payload) {
lat: data.getInt32(2, Endian.little) / 1e7,
lon: data.getInt32(6, Endian.little) / 1e7,
speedMs: data.getUint16(12, Endian.little) / 100.0,
headingDeg: data.getUint16(14, Endian.little) / 10.0,
);
}