drone status pill in footer for fly mode implemented. footer layout and sizes homogenized
This commit is contained in:
@@ -11,6 +11,7 @@ class MspGpsReading {
|
||||
required this.lon,
|
||||
required this.speedMs,
|
||||
required this.headingDeg,
|
||||
required this.hdop,
|
||||
});
|
||||
|
||||
/// 0 = kein Fix (`fc_msp.c`: `gpsSol.fixType`).
|
||||
@@ -24,6 +25,13 @@ class MspGpsReading {
|
||||
/// `groundCourse` - nur bei [hasFix] aussagekraeftig.
|
||||
final double headingDeg;
|
||||
|
||||
/// Horizontale Streuung der Positionsschaetzung (kleiner = besser, ~1.0
|
||||
/// oder darunter ist gut) - `gpsSol.hdop / HDOP_SCALE` (`gps.h`:
|
||||
/// `#define HDOP_SCALE (100)`). Ohne Fix meldet iNAV hier 9999/100 =
|
||||
/// 99.99 (`gps.c`: `gpsSol.hdop = 9999`), also einen sehr grossen statt
|
||||
/// eines fehlenden Werts.
|
||||
final double hdop;
|
||||
|
||||
bool get hasFix => fixType != 0;
|
||||
}
|
||||
|
||||
@@ -37,6 +45,7 @@ MspGpsReading parseMspRawGps(Uint8List payload) {
|
||||
lon: data.getInt32(6, Endian.little) / 1e7,
|
||||
speedMs: data.getUint16(12, Endian.little) / 100.0,
|
||||
headingDeg: data.getUint16(14, Endian.little) / 10.0,
|
||||
hdop: data.getUint16(16, Endian.little) / 100.0,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -133,3 +142,11 @@ int parseMspInavAnalogBatteryPercent(Uint8List payload) => payload[21];
|
||||
/// Empfaenger-Linkqualitaet in Prozent (Offset 1, `rxLinkStatistics.uplinkLQ`
|
||||
/// - bereits 0-100, siehe [MspCommands.inavLinkStats]).
|
||||
int parseMspLinkQuality(Uint8List payload) => payload[1];
|
||||
|
||||
/// Parst die `MSP2_INAV_GET_LINK_STATS`-Antwort und liefert das
|
||||
/// Signal-Rausch-Verhaeltnis des Uplinks in dB (Offset 2,
|
||||
/// `rxLinkStatistics.uplinkSNR` - `int8_t`, `fc_msp.c` schreibt
|
||||
/// `(uint8_t)rxLinkStatistics.uplinkSNR`, das Byte muss also vorzeichen-
|
||||
/// behaftet zurueckgelesen werden, siehe [MspCommands.inavLinkStats]).
|
||||
int parseMspLinkStatsSnr(Uint8List payload) =>
|
||||
ByteData.sublistView(payload).getInt8(2);
|
||||
|
||||
Reference in New Issue
Block a user