|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
30 #ifdef STABILIZATION_ATTITUDE_INDI_SIMPLE
42 #ifndef STABILIZATION_INDI_MAX_RATE
43 #define STABILIZATION_INDI_MAX_RATE 6.0
47 #ifndef STABILIZATION_RATE_DEADBAND_P
48 #define STABILIZATION_RATE_DEADBAND_P 0
50 #ifndef STABILIZATION_RATE_DEADBAND_Q
51 #define STABILIZATION_RATE_DEADBAND_Q 0
53 #ifndef STABILIZATION_RATE_DEADBAND_R
54 #define STABILIZATION_RATE_DEADBAND_R 200
57 #define ROLL_RATE_DEADBAND_EXCEEDED() \
58 (radio_control.values[RADIO_ROLL] > STABILIZATION_RATE_DEADBAND_P || \
59 radio_control.values[RADIO_ROLL] < -STABILIZATION_RATE_DEADBAND_P)
61 #define PITCH_RATE_DEADBAND_EXCEEDED() \
62 (radio_control.values[RADIO_PITCH] > STABILIZATION_RATE_DEADBAND_Q || \
63 radio_control.values[RADIO_PITCH] < -STABILIZATION_RATE_DEADBAND_Q)
65 #define YAW_RATE_DEADBAND_EXCEEDED() \
66 (radio_control.values[RADIO_YAW] > STABILIZATION_RATE_DEADBAND_R || \
67 radio_control.values[RADIO_YAW] < -STABILIZATION_RATE_DEADBAND_R)
70 #if PERIODIC_TELEMETRY
73 static void send_rate(
struct transport_tx *trans,
struct link_device *
dev)
80 pprz_msg_send_RATE_LOOP(trans,
dev, AC_ID,
84 &dummy, &dummy, &dummy,
99 #if PERIODIC_TELEMETRY
#define ROLL_RATE_DEADBAND_EXCEEDED()
#define PITCH_RATE_DEADBAND_EXCEEDED()
void stabilization_indi_init(void)
Function that initializes important values upon engaging INDI.
#define YAW_RATE_DEADBAND_EXCEEDED()
#define THROTTLE_STICK_DOWN()
void stabilization_rate_read_rc(void)
Read RC comands with roll and yaw sticks.
void stabilization_indi_rate_run(struct FloatRates rate_sp, bool in_flight)
void stabilization_indi_enter(void)
Function that resets important values upon engaging INDI.
void stabilization_rate_read_rc_switched_sticks(void)
Read rc with roll and yaw sitcks switched if the default orientation is vertical but airplane sticks ...
void stabilization_rate_run(bool in_flight)
Run indi rate interface from the "stabilization_rate_run" function.
static const struct usb_device_descriptor dev
void stabilization_rate_init(void)
Initialize rate controller.
struct FloatRates stabilization_rate_sp
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.
#define STABILIZATION_INDI_MAX_RATE
Maximum rate you can request in RC rate mode (rad/s)
int32_t stabilization_cmd[COMMANDS_NB]
Stabilization commands.
static void send_rate(struct transport_tx *trans, struct link_device *dev)
#define DefaultPeriodic
Set default periodic telemetry.
void stabilization_rate_enter(void)
Reset rate controller.
struct RadioControl radio_control
pprz_t values[RADIO_CONTROL_NB_CHANNEL]