1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-26 01:35:41 +03:00

120hz altitude data used in GPS Rescue

Disarm on crash flip recovery or impact while in do nothing mode
add blackbox headers for new fields
rearrange altitude factors
fix ibus uint16 for estimatedVario
update GPS altitude at 120hz
get GPS derivative from error
PT2 filter on GPS derivative
remove acceleration element
move altitude filtering to position.c
calculate altitude derivative in position.c for vario
filter vario with PT1
update pg in position and baro
field and test tuning from field tests
land 3x faster from higher altitude
PT2 vario for checking GPS
This commit is contained in:
ctzsnooze 2022-08-29 20:30:49 +10:00
parent e1cafc0434
commit b88e73d137
12 changed files with 261 additions and 251 deletions

View file

@ -24,13 +24,17 @@
#define TASK_ALTITUDE_RATE_HZ 120
typedef struct positionConfig_s {
uint8_t altSource;
uint8_t altPreferBaro;
uint8_t altitude_source;
uint8_t altitude_prefer_baro;
uint16_t altitude_lpf; // lowpass cutoff (value / 100) Hz for baro smoothing
uint16_t altitude_d_lpf; // lowpass for (value / 100) Hz baro derivative smoothing
} positionConfig_t;
PG_DECLARE(positionConfig_t, positionConfig);
bool isAltitudeOffset(void);
void calculateEstimatedAltitude();
void positionInit(void);
int32_t getEstimatedAltitudeCm(void);
float getAltitude(void);
int16_t getEstimatedVario(void);