1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 17:25:20 +03:00

gyro & d-term filters: remove filtering options except biquad/pt1

* through extensive testing prior to the beginning of the RC cycle, we have
  discovered that the simplest combination of filters appears to be up to four
  PT1 filters: two for gyro, and two for d-term.
* non-cascaded biquad filter plumbing is retained for noisy setups and the
  dynamic notch bandpass, although gyro and d-term variants of the filtering may
  eventually be removed in favor of pt1
* update all related unit tests
This commit is contained in:
AJ Christensen 2018-05-26 19:25:27 +12:00
parent 418fd4beaa
commit a63c8b0079
8 changed files with 28 additions and 531 deletions

View file

@ -67,8 +67,6 @@ typedef enum {
FILTER_LOWPASS2
} filterSlots;
#define GYRO_LPF_ORDER_MAX 6
typedef struct gyroConfig_s {
sensor_align_e gyro_align; // gyro alignment
uint8_t gyroMovementCalibrationThreshold; // people keep forgetting that moving model while init results in wrong gyro offsets. and then they never reset gyro. so this is now on by default.
@ -80,18 +78,10 @@ typedef struct gyroConfig_s {
bool gyro_use_32khz;
uint8_t gyro_to_use;
// Lagged Moving Average smoother
uint8_t gyro_lma_depth;
uint8_t gyro_lma_weight;
// Lowpass primary/secondary
uint8_t gyro_lowpass_type;
uint8_t gyro_lowpass2_type;
// Order is used for the 'higher ordering' of cascaded butterworth/biquad sections
uint8_t gyro_lowpass_order;
uint8_t gyro_lowpass2_order;
uint16_t gyro_lowpass_hz;
uint16_t gyro_lowpass2_hz;