mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
GPS Home altitude is added to blackbox logging (#13939)
added logging of gps homes altitude
This commit is contained in:
parent
4ed21bdd06
commit
a7672a0a1e
1 changed files with 4 additions and 2 deletions
|
@ -287,7 +287,8 @@ static const blackboxConditionalFieldDefinition_t blackboxGpsGFields[] = {
|
||||||
// GPS home frame
|
// GPS home frame
|
||||||
static const blackboxSimpleFieldDefinition_t blackboxGpsHFields[] = {
|
static const blackboxSimpleFieldDefinition_t blackboxGpsHFields[] = {
|
||||||
{"GPS_home", 0, SIGNED, PREDICT(0), ENCODING(SIGNED_VB)},
|
{"GPS_home", 0, SIGNED, PREDICT(0), ENCODING(SIGNED_VB)},
|
||||||
{"GPS_home", 1, SIGNED, PREDICT(0), ENCODING(SIGNED_VB)}
|
{"GPS_home", 1, SIGNED, PREDICT(0), ENCODING(SIGNED_VB)},
|
||||||
|
{"GPS_home", 2, SIGNED, PREDICT(0), ENCODING(SIGNED_VB)}
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -357,7 +358,7 @@ typedef struct blackboxMainState_s {
|
||||||
} blackboxMainState_t;
|
} blackboxMainState_t;
|
||||||
|
|
||||||
typedef struct blackboxGpsState_s {
|
typedef struct blackboxGpsState_s {
|
||||||
gpsLocation_t GPS_home; // height is not used in blackbox logging
|
gpsLocation_t GPS_home;
|
||||||
gpsLocation_t GPS_coord;
|
gpsLocation_t GPS_coord;
|
||||||
uint8_t GPS_numSat;
|
uint8_t GPS_numSat;
|
||||||
} blackboxGpsState_t;
|
} blackboxGpsState_t;
|
||||||
|
@ -1088,6 +1089,7 @@ static void writeGPSHomeFrame(void)
|
||||||
|
|
||||||
blackboxWriteSignedVB(GPS_home_llh.lat);
|
blackboxWriteSignedVB(GPS_home_llh.lat);
|
||||||
blackboxWriteSignedVB(GPS_home_llh.lon);
|
blackboxWriteSignedVB(GPS_home_llh.lon);
|
||||||
|
blackboxWriteSignedVB(GPS_home_llh.altCm / 10); //log homes altitude, in increments of 0.1m
|
||||||
//TODO it'd be great if we could grab the GPS current time and write that too
|
//TODO it'd be great if we could grab the GPS current time and write that too
|
||||||
|
|
||||||
gpsHistory.GPS_home = GPS_home_llh;
|
gpsHistory.GPS_home = GPS_home_llh;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue