26 #ifndef ATTITUDE_REF_SATURATE_NAIVE_H
27 #define ATTITUDE_REF_SATURATE_NAIVE_H
43 #define SATURATE_SPEED_TRIM_ACCEL(_rate, _accel, _max_rate) { \
44 if ((_rate) >= (_max_rate)) { \
45 (_rate) = (_max_rate); \
50 else if ((_rate) <= -(_max_rate)) { \
51 (_rate) = -(_max_rate); \
struct FloatRates max_accel
#define SATURATE_SPEED_TRIM_ACCEL(_rate, _accel, _max_rate)
saturate angular speed and trim accel accordingly
struct Int32Rates max_rate
static void attitude_ref_float_saturate_naive(struct FloatRates *rate, struct FloatRates *accel, struct FloatRefSat *sat)
static void attitude_ref_int_saturate_naive(struct Int32Rates *rate, struct Int32Rates *accel, struct Int32RefSat *sat)
struct FloatRates max_rate
struct Int32Rates max_accel
#define RATES_BOUND_BOX_ABS(_v, _v_max)
int32_t p
in rad/s with INT32_RATE_FRAC
int32_t r
in rad/s with INT32_RATE_FRAC
int32_t q
in rad/s with INT32_RATE_FRAC
Paparazzi floating point algebra.
Paparazzi fixed point algebra.