28 #ifndef FW_V_CTL_COMMON_H
29 #define FW_V_CTL_COMMON_H
36 #define V_CTL_MODE_MANUAL 0
37 #define V_CTL_MODE_AUTO_THROTTLE 1
38 #define V_CTL_MODE_AUTO_CLIMB 2
39 #define V_CTL_MODE_AUTO_ALT 3
40 #define V_CTL_MODE_LANDING 4
41 #define V_CTL_MODE_NB 5
47 #define V_CTL_CLIMB_MODE_AUTO_THROTTLE 0
48 #define V_CTL_CLIMB_MODE_AUTO_PITCH 1
51 #define V_CTL_AUTO_THROTTLE_STANDARD 0
52 #define V_CTL_AUTO_THROTTLE_AGRESSIVE 1
53 #define V_CTL_AUTO_THROTTLE_BLENDED 2
83 #define guidance_v_SetCruiseThrottle(_v) { \
84 v_ctl_auto_throttle_cruise_throttle = (_v ? _v : v_ctl_auto_throttle_nominal_cruise_throttle); \
85 Bound(v_ctl_auto_throttle_cruise_throttle, v_ctl_auto_throttle_min_cruise_throttle, v_ctl_auto_throttle_max_cruise_throttle); \
88 #define guidance_v_SetAutoThrottleIgain(_v) { \
89 v_ctl_auto_throttle_igain = _v; \
90 v_ctl_auto_throttle_sum_err = 0; \
void v_ctl_landing_loop(void)
pprz_t v_ctl_throttle_setpoint
void v_ctl_climb_loop(void)
Auto-throttle inner loop.
float v_ctl_auto_airspeed_controlled
uint8_t v_ctl_auto_throttle_submode
float v_ctl_pitch_setpoint
void v_ctl_guidance_loop(void)
General guidance logic This will call the proper control loops according to the sub-modes.
void v_ctl_throttle_slew(void)
Computes throttle_slewed from throttle_setpoint.
float v_ctl_auto_throttle_sum_err
pprz_t v_ctl_throttle_slewed
void v_ctl_altitude_loop(void)
outer loop
float v_ctl_auto_throttle_cruise_throttle
float v_ctl_altitude_error
in meters, (setpoint - alt) -> positive = too low
float v_ctl_auto_groundspeed_setpoint
in meters per second
float v_ctl_climb_setpoint
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.