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); \
static void attitude_ref_int_saturate_naive(struct Int32Rates *rate, struct Int32Rates *accel, struct Int32RefSat *sat)
#define SATURATE_SPEED_TRIM_ACCEL(_rate, _accel, _max_rate)
saturate angular speed and trim accel accordingly
static void attitude_ref_float_saturate_naive(struct FloatRates *rate, struct FloatRates *accel, struct FloatRefSat *sat)
int32_t r
in rad/s with INT32_RATE_FRAC
struct FloatRates max_rate
Paparazzi floating point algebra.
#define RATES_BOUND_BOX_ABS(_v, _v_max)
struct FloatRates max_accel
int32_t p
in rad/s with INT32_RATE_FRAC
struct Int32Rates max_rate
struct Int32Rates max_accel
int32_t q
in rad/s with INT32_RATE_FRAC
Paparazzi fixed point algebra.