|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
27 #ifndef DELAYED_FIRST_ORDER_LOWPASS_FILTER_H
28 #define DELAYED_FIRST_ORDER_LOWPASS_FILTER_H
32 #define DELAYED_FIRST_ORDER_LOWPASS_FILTER_BUFFER_SIZE 20
33 #define DELAYED_FIRST_ORDER_LOWPASS_FILTER_FILTER_ALPHA_SHIFT 14
64 if ((
f->buffer[next_idx] - prev) >
f->max_inc) {
65 f->buffer[next_idx] = prev +
f->max_inc;
68 if ((
f->buffer[next_idx] - prev) < -
f->max_inc) {
69 f->buffer[next_idx] = prev -
f->max_inc;
74 return f->buffer[req_idx];
89 (
f->sample_frequency +
f->omega);
124 f->sample_frequency = sample_frequency;
132 f->max_inc = max_inc;
#define DELAYED_FIRST_ORDER_LOWPASS_FILTER_BUFFER_SIZE
static void delayed_first_order_lowpass_initialize(struct delayed_first_order_lowpass_filter_t *f, uint32_t omega, uint8_t delay, uint16_t max_inc, uint16_t sample_frequency)
delayed_first_order_lowpass_initialize
uint16_t sample_frequency
#define DELAYED_FIRST_ORDER_LOWPASS_FILTER_FILTER_ALPHA_SHIFT
static void delayed_first_order_lowpass_set_omega(struct delayed_first_order_lowpass_filter_t *f, uint32_t omega)
delayed_first_order_lowpass_set_omega
static void delayed_first_order_lowpass_set_delay(struct delayed_first_order_lowpass_filter_t *f, uint8_t delay)
delayed_first_order_lowpass_set_delay
uint16_t f
Camera baseline, in meters (i.e. horizontal distance between the two cameras of the stereo setup)
static int32_t delayed_first_order_lowpass_propagate(struct delayed_first_order_lowpass_filter_t *f, int32_t input)
delayed_first_order_lowpass_propagate
int32_t buffer[DELAYED_FIRST_ORDER_LOWPASS_FILTER_BUFFER_SIZE]