msp over wifi implemented
This commit is contained in:
@@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user