35 #define GUIDANCE_V_MODE_KILL 0
36 #define GUIDANCE_V_MODE_RC_DIRECT 1
37 #define GUIDANCE_V_MODE_RC_CLIMB 2
38 #define GUIDANCE_V_MODE_CLIMB 3
39 #define GUIDANCE_V_MODE_HOVER 4
40 #define GUIDANCE_V_MODE_NAV 5
41 #define GUIDANCE_V_MODE_MODULE 6
42 #define GUIDANCE_V_MODE_FLIP 7
43 #define GUIDANCE_V_MODE_GUIDED 8
120 #define GuidanceVSetRef guidance_v_set_ref
151 #define guidance_v_SetKi(_val) { \
152 guidance_v_ki = _val; \
153 guidance_v_z_sum_err = 0; \
Adaptation block of the vertical guidance.
Reference generation for vertical guidance.
int32_t guidance_v_z_ref
altitude reference in meters.
void guidance_v_read_rc(void)
void guidance_v_thrust_adapt(bool in_flight)
void guidance_v_set_vz(float vz)
Set z velocity setpoint.
int32_t guidance_v_z_sum_err
accumulator for I-gain
void guidance_v_z_enter(void)
int32_t guidance_v_z_sp
altitude setpoint in meters (input).
void guidance_v_notify_in_flight(bool in_flight)
int32_t guidance_v_kp
vertical control P-gain
int32_t guidance_v_kd
vertical control D-gain
int32_t guidance_v_zd_ref
vertical speed reference in meter/s.
int32_t guidance_v_ff_cmd
feed-forward command
int32_t guidance_v_rc_delta_t
Direct throttle from radio control.
bool guidance_v_adapt_throttle_enabled
Use adaptive throttle command estimation.
int32_t guidance_v_zdd_ref
vertical acceleration reference in meter/s^2.
void guidance_v_run(bool in_flight)
int32_t guidance_v_fb_cmd
feed-back command
int32_t guidance_v_zd_sp
vertical speed setpoint in meter/s (input).
void guidance_v_set_z(float z)
Set z position setpoint.
void guidance_v_guided_enter(void)
Enter GUIDED mode control.
float guidance_v_nominal_throttle
nominal throttle for hover.
void guidance_v_set_ref(int32_t pos, int32_t speed, int32_t accel)
Set guidance ref parameters.
void guidance_v_set_th(float th)
Set throttle setpoint.
int32_t guidance_v_ki
vertical control I-gain
void guidance_v_mode_changed(uint8_t new_mode)
void guidance_v_guided_run(bool in_flight)
Run GUIDED mode control.
int32_t guidance_v_delta_t
thrust command.
void run_hover_loop(bool in_flight)
void guidance_v_from_nav(bool in_flight)
Set guidance setpoint from NAV and run hover loop.
void guidance_v_init(void)
int32_t guidance_v_thrust_coeff
int int32_t
Typedef defining 32 bit int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.