void guidance_v_run(bool_t in_flight) { // FIXME... SATURATIONS NOT TAKEN INTO ACCOUNT // AKA SUPERVISION and co guidance_v_thrust_coeff = get_vertical_thrust_coeff(); if (in_flight) { int32_t vertical_thrust = (stabilization_cmd[COMMAND_THRUST] * guidance_v_thrust_coeff) >> INT32_TRIG_FRAC; gv_adapt_run(stateGetAccelNed_i()->z, vertical_thrust, guidance_v_zd_ref); } else {
void guidance_v_run(bool in_flight) { guidance_v_thrust_coeff = get_vertical_thrust_coeff(); if (in_flight) { /* Only run adaptive throttle estimation if we are in flight and * the desired vertical velocity (zd) was updated (i.e. we ran hover_loop before). * This means that the estimation is not updated when using direct throttle commands. * * FIXME... SATURATIONS NOT TAKEN INTO ACCOUNT, AKA SUPERVISION and co */ if (desired_zd_updated) { int32_t vertical_thrust = (stabilization_cmd[COMMAND_THRUST] * guidance_v_thrust_coeff) >> INT32_TRIG_FRAC; gv_adapt_run(stateGetAccelNed_i()->z, vertical_thrust, guidance_v_zd_ref); } } else {