28 #ifndef STABILIZATION_RATE
29 #define STABILIZATION_RATE
35 #ifndef STABILIZATION_RATE_DEADBAND_P
36 #define STABILIZATION_RATE_DEADBAND_P 0
38 #ifndef STABILIZATION_RATE_DEADBAND_Q
39 #define STABILIZATION_RATE_DEADBAND_Q 0
41 #ifndef STABILIZATION_RATE_DEADBAND_R
42 #define STABILIZATION_RATE_DEADBAND_R 200
45 #define ROLL_RATE_DEADBAND_EXCEEDED(_rc) \
46 (_rc->values[RADIO_ROLL] > STABILIZATION_RATE_DEADBAND_P || \
47 _rc->values[RADIO_ROLL] < -STABILIZATION_RATE_DEADBAND_P)
49 #define PITCH_RATE_DEADBAND_EXCEEDED(_rc) \
50 (_rc->values[RADIO_PITCH] > STABILIZATION_RATE_DEADBAND_Q || \
51 _rc->values[RADIO_PITCH] < -STABILIZATION_RATE_DEADBAND_Q)
53 #define YAW_RATE_DEADBAND_EXCEEDED(_rc) \
54 (_rc->values[RADIO_YAW] > STABILIZATION_RATE_DEADBAND_R || \
55 _rc->values[RADIO_YAW] < -STABILIZATION_RATE_DEADBAND_R)
57 #if SWITCH_STICKS_FOR_RATE_CONTROL
59 #define RC_RATE_P RADIO_YAW
60 #define RC_RATE_Q RADIO_PITCH
61 #define RC_RATE_R RADIO_ROLL
64 #define RC_RATE_P RADIO_ROLL
65 #define RC_RATE_Q RADIO_PITCH
66 #define RC_RATE_R RADIO_YAW
Paparazzi floating point algebra.
Generic interface for radio control modules.
General stabilization interface for rotorcrafts.
void stabilization_rate_enter(void)
Reset rate controller.
struct StabilizationSetpoint stabilization_rate_read_rc(struct RadioControl *rc)
void stabilization_rate_run(bool in_flight, struct StabilizationSetpoint *rate_sp, struct ThrustSetpoint *thrust, int32_t *cmd)
Run indi rate interface from the "stabilization_rate_run" function.
struct FloatRates stabilization_rate_igain
struct FloatRates stabilization_rate_gain
void stabilization_rate_init(void)
Initialize rate controller.
Thrust setpoint // TODO to a setpoint header Structure to store the desired thrust vector with differ...
int int32_t
Typedef defining 32 bit int type.