Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Vertical control for fixed wing vehicles. More...
Go to the source code of this file.
Macros | |
#define | V_CTL_MODE_MANUAL 0 |
#define | V_CTL_MODE_AUTO_THROTTLE 1 |
#define | V_CTL_MODE_AUTO_CLIMB 2 |
#define | V_CTL_MODE_AUTO_ALT 3 |
#define | V_CTL_MODE_LANDING 4 |
#define | V_CTL_MODE_NB 5 |
#define | V_CTL_CLIMB_MODE_AUTO_THROTTLE 0 |
#define | V_CTL_CLIMB_MODE_AUTO_PITCH 1 |
#define | V_CTL_AUTO_THROTTLE_STANDARD 0 |
#define | V_CTL_AUTO_THROTTLE_AGRESSIVE 1 |
#define | V_CTL_AUTO_THROTTLE_BLENDED 2 |
#define | guidance_v_SetCruiseThrottle(_v) |
#define | guidance_v_SetAutoThrottleIgain(_v) |
Functions | |
void | v_ctl_init (void) |
void | v_ctl_altitude_loop (void) |
outer loop More... | |
void | v_ctl_climb_loop (void) |
Auto-throttle inner loop. More... | |
void | v_ctl_landing_loop (void) |
void | v_ctl_guidance_loop (void) |
General guidance logic This will call the proper control loops according to the sub-modes. More... | |
void | v_ctl_throttle_slew (void) |
Computes throttle_slewed from throttle_setpoint. More... | |
Variables | |
uint8_t | v_ctl_mode |
float | v_ctl_climb_setpoint |
uint8_t | v_ctl_climb_mode |
uint8_t | v_ctl_auto_throttle_submode |
float | v_ctl_auto_throttle_sum_err |
float | v_ctl_altitude_error |
in meters, (setpoint - alt) -> positive = too low More... | |
float | v_ctl_auto_airspeed_controlled |
float | v_ctl_auto_groundspeed_setpoint |
in meters per second More... | |
float | v_ctl_auto_throttle_cruise_throttle |
pprz_t | v_ctl_throttle_setpoint |
pprz_t | v_ctl_throttle_slewed |
float | v_ctl_pitch_setpoint |
Vertical control for fixed wing vehicles.
Definition in file guidance_common.h.
#define guidance_v_SetAutoThrottleIgain | ( | _v | ) |
Definition at line 88 of file guidance_common.h.
#define guidance_v_SetCruiseThrottle | ( | _v | ) |
Definition at line 83 of file guidance_common.h.
#define V_CTL_AUTO_THROTTLE_AGRESSIVE 1 |
Definition at line 52 of file guidance_common.h.
#define V_CTL_AUTO_THROTTLE_BLENDED 2 |
Definition at line 53 of file guidance_common.h.
#define V_CTL_AUTO_THROTTLE_STANDARD 0 |
Definition at line 51 of file guidance_common.h.
#define V_CTL_CLIMB_MODE_AUTO_PITCH 1 |
Definition at line 48 of file guidance_common.h.
#define V_CTL_CLIMB_MODE_AUTO_THROTTLE 0 |
Definition at line 47 of file guidance_common.h.
#define V_CTL_MODE_AUTO_ALT 3 |
Definition at line 39 of file guidance_common.h.
#define V_CTL_MODE_AUTO_CLIMB 2 |
Definition at line 38 of file guidance_common.h.
#define V_CTL_MODE_AUTO_THROTTLE 1 |
Definition at line 37 of file guidance_common.h.
#define V_CTL_MODE_LANDING 4 |
Definition at line 40 of file guidance_common.h.
#define V_CTL_MODE_MANUAL 0 |
Definition at line 36 of file guidance_common.h.
#define V_CTL_MODE_NB 5 |
Definition at line 41 of file guidance_common.h.
void v_ctl_altitude_loop | ( | void | ) |
outer loop
Computes v_ctl_climb_setpoint and sets v_ctl_auto_throttle_submode
Definition at line 286 of file energy_ctrl.c.
References UtmCoor_f::alt, dt_navigation, STALL_AIRSPEED, stateGetPositionUtm_f(), v_ctl_altitude_error, V_CTL_ALTITUDE_MAX_CLIMB, v_ctl_altitude_max_climb, v_ctl_altitude_pgain, v_ctl_altitude_pre_climb, v_ctl_altitude_pre_climb_correction, v_ctl_altitude_setpoint, v_ctl_auto_airspeed_setpoint, V_CTL_AUTO_CLIMB_LIMIT, V_CTL_AUTO_THROTTLE_AGRESSIVE, V_CTL_AUTO_THROTTLE_BLENDED, V_CTL_AUTO_THROTTLE_STANDARD, v_ctl_auto_throttle_submode, v_ctl_climb_mode, V_CTL_CLIMB_MODE_AUTO_THROTTLE, v_ctl_climb_setpoint, and v_ctl_max_climb.
Referenced by navigation_task(), and v_ctl_guidance_loop().
void v_ctl_climb_loop | ( | void | ) |
Auto-throttle inner loop.
Definition at line 324 of file energy_ctrl.c.
References ac_char_update(), accel_imu_meas, ACCELS_FLOAT_OF_BFP, AIRSPEED_SETPOINT_SLEW, autopilot, autopilot_throttle_killed(), controlled_throttle, dt_attidude, pprz_autopilot::launch, low_pass_vdot(), MAX_PPRZ, nav_pitch, stateGetAirspeed_f(), stateGetHorizontalSpeedNorm_f(), stateGetNedToBodyEulers_f(), stateGetSpeedEnu_f(), TRIM_UPPRZ, v_ctl_airspeed_pgain, v_ctl_auto_airspeed_controlled, v_ctl_auto_airspeed_setpoint, v_ctl_auto_airspeed_setpoint_slew, v_ctl_auto_groundspeed_igain, V_CTL_AUTO_GROUNDSPEED_MAX_SUM_ERR, v_ctl_auto_groundspeed_pgain, v_ctl_auto_groundspeed_setpoint, v_ctl_auto_groundspeed_sum_err, v_ctl_auto_pitch_of_airspeed_dgain, v_ctl_auto_pitch_of_airspeed_igain, v_ctl_auto_pitch_of_airspeed_pgain, v_ctl_auto_throttle_climb_throttle_increment, v_ctl_auto_throttle_cruise_throttle, v_ctl_auto_throttle_nominal_cruise_pitch, v_ctl_auto_throttle_nominal_cruise_throttle, v_ctl_auto_throttle_of_airspeed_igain, v_ctl_auto_throttle_of_airspeed_pgain, v_ctl_auto_throttle_pitch_of_vz_pgain, v_ctl_climb_auto_throttle_loop(), v_ctl_climb_mode, V_CTL_CLIMB_MODE_AUTO_PITCH, V_CTL_CLIMB_MODE_AUTO_THROTTLE, v_ctl_climb_setpoint, v_ctl_desired_acceleration, v_ctl_energy_diff_igain, v_ctl_energy_diff_pgain, v_ctl_energy_total_igain, v_ctl_energy_total_pgain, V_CTL_GLIDE_RATIO, v_ctl_max_acceleration, v_ctl_mode, V_CTL_MODE_AUTO_CLIMB, v_ctl_pitch_setpoint, v_ctl_set_pitch(), v_ctl_set_throttle(), V_CTL_SPEED_AIRSPEED, V_CTL_SPEED_GROUNDSPEED, v_ctl_speed_mode, V_CTL_SPEED_THROTTLE, v_ctl_throttle_setpoint, FloatVect3::x, and EnuCoor_f::z.
Referenced by attitude_loop(), and v_ctl_guidance_loop().
void v_ctl_guidance_loop | ( | void | ) |
General guidance logic This will call the proper control loops according to the sub-modes.
Definition at line 265 of file guidance_v.c.
References autopilot, electrical, pprz_autopilot::flight_time, pprz_autopilot::kill_throttle, pprz_autopilot::launch, MAX_PPRZ, nav_pitch, nav_throttle_setpoint, TRIM_PPRZ, TRIM_UPPRZ, v_ctl_altitude_loop(), v_ctl_climb_loop(), v_ctl_landing_loop(), v_ctl_mode, V_CTL_MODE_AUTO_ALT, V_CTL_MODE_AUTO_CLIMB, V_CTL_MODE_AUTO_THROTTLE, V_CTL_MODE_LANDING, v_ctl_pitch_setpoint, v_ctl_throttle_setpoint, and Electrical::vsupply.
void v_ctl_init | ( | void | ) |
Definition at line 208 of file energy_ctrl.c.
References accel_cb(), accel_ev, controlled_throttle, v_ctl_airspeed_pgain, v_ctl_altitude_error, V_CTL_ALTITUDE_MAX_CLIMB, v_ctl_altitude_max_climb, v_ctl_altitude_pgain, v_ctl_altitude_pre_climb, v_ctl_altitude_pre_climb_correction, V_CTL_ALTITUDE_PRE_CLIMB_CORRECTION, v_ctl_altitude_setpoint, v_ctl_auto_airspeed_controlled, v_ctl_auto_airspeed_pitch_dgain, v_ctl_auto_airspeed_pitch_igain, v_ctl_auto_airspeed_pitch_pgain, v_ctl_auto_airspeed_pitch_sum_err, v_ctl_auto_airspeed_setpoint, v_ctl_auto_airspeed_setpoint_slew, v_ctl_auto_airspeed_throttle_dgain, v_ctl_auto_airspeed_throttle_igain, v_ctl_auto_airspeed_throttle_pgain, v_ctl_auto_airspeed_throttle_sum_err, v_ctl_auto_groundspeed_igain, v_ctl_auto_groundspeed_pgain, v_ctl_auto_groundspeed_setpoint, v_ctl_auto_groundspeed_sum_err, v_ctl_auto_pitch_dgain, V_CTL_AUTO_PITCH_DGAIN, v_ctl_auto_pitch_igain, V_CTL_AUTO_PITCH_IGAIN, v_ctl_auto_pitch_of_airspeed_dgain, v_ctl_auto_pitch_of_airspeed_igain, v_ctl_auto_pitch_of_airspeed_pgain, v_ctl_auto_pitch_pgain, v_ctl_auto_pitch_sum_err, v_ctl_auto_throttle_climb_throttle_increment, v_ctl_auto_throttle_cruise_throttle, V_CTL_AUTO_THROTTLE_DGAIN, v_ctl_auto_throttle_dgain, v_ctl_auto_throttle_igain, v_ctl_auto_throttle_max_cruise_throttle, v_ctl_auto_throttle_min_cruise_throttle, v_ctl_auto_throttle_nominal_cruise_pitch, v_ctl_auto_throttle_nominal_cruise_throttle, v_ctl_auto_throttle_of_airspeed_igain, v_ctl_auto_throttle_of_airspeed_pgain, v_ctl_auto_throttle_pgain, v_ctl_auto_throttle_pitch_of_vz_dgain, V_CTL_AUTO_THROTTLE_PITCH_OF_VZ_DGAIN, v_ctl_auto_throttle_pitch_of_vz_pgain, V_CTL_AUTO_THROTTLE_STANDARD, v_ctl_auto_throttle_submode, v_ctl_auto_throttle_sum_err, v_ctl_climb_mode, V_CTL_CLIMB_MODE_AUTO_THROTTLE, v_ctl_climb_setpoint, v_ctl_energy_diff_igain, v_ctl_energy_diff_pgain, V_CTL_ENERGY_IMU_ID, v_ctl_energy_total_igain, v_ctl_energy_total_pgain, v_ctl_max_acceleration, V_CTL_MAX_ACCELERATION, v_ctl_max_climb, v_ctl_mode, V_CTL_MODE_MANUAL, v_ctl_pitch_setpoint, V_CTL_PITCH_TRIM, v_ctl_pitch_trim, v_ctl_speed_mode, V_CTL_SPEED_THROTTLE, and v_ctl_throttle_setpoint.
void v_ctl_landing_loop | ( | void | ) |
Definition at line 357 of file guidance_v.c.
References UtmCoor_f::alt, autopilot_throttle_killed(), CONTROL_FREQUENCY, h_ctl_roll_setpoint, lateral_mode, LATERAL_MODE_ROLL, MAX_PPRZ, nav_pitch, stateGetHorizontalSpeedNorm_f(), stateGetPositionUtm_f(), v_ctl_altitude_setpoint, and v_ctl_throttle_setpoint.
Referenced by attitude_loop(), and v_ctl_guidance_loop().
void v_ctl_throttle_slew | ( | void | ) |
Computes throttle_slewed from throttle_setpoint.
Computes throttle_slewed from throttle_setpoint.
Definition at line 437 of file energy_ctrl.c.
References MAX_PPRZ, TRIM_PPRZ, v_ctl_throttle_setpoint, V_CTL_THROTTLE_SLEW, and v_ctl_throttle_slewed.
Referenced by attitude_loop().
|
extern |
in meters, (setpoint - alt) -> positive = too low
Definition at line 92 of file energy_ctrl.c.
Referenced by h_ctl_course_loop(), v_ctl_altitude_loop(), v_ctl_climb_auto_throttle_loop(), and v_ctl_init().
|
extern |
Definition at line 123 of file energy_ctrl.c.
Referenced by send_airspeed(), v_ctl_climb_loop(), and v_ctl_init().
|
extern |
in meters per second
Definition at line 125 of file energy_ctrl.c.
Referenced by send_airspeed(), v_ctl_climb_loop(), and v_ctl_init().
|
extern |
Definition at line 103 of file energy_ctrl.c.
Referenced by formation_flight(), potential_task(), start_formation(), stop_formation(), v_ctl_climb_auto_throttle_loop(), v_ctl_climb_loop(), v_ctl_init(), and v_ctl_set_throttle().
|
extern |
Definition at line 76 of file energy_ctrl.c.
Referenced by h_ctl_course_loop(), nav_periodic_task(), send_calibration(), v_ctl_altitude_loop(), v_ctl_climb_auto_throttle_loop(), and v_ctl_init().
|
extern |
Definition at line 77 of file energy_ctrl.c.
Referenced by send_calibration(), v_ctl_climb_auto_throttle_loop(), v_ctl_init(), and v_ctl_set_throttle().
|
extern |
Definition at line 75 of file energy_ctrl.c.
Referenced by v_ctl_altitude_loop(), v_ctl_climb_loop(), and v_ctl_init().
|
extern |
Definition at line 98 of file energy_ctrl.c.
Referenced by gvf_parametric_low_level_control_3D(), send_desired(), v_ctl_altitude_loop(), v_ctl_climb_auto_throttle_loop(), v_ctl_climb_loop(), v_ctl_init(), v_ctl_set_pitch(), and v_ctl_set_throttle().
|
extern |
Definition at line 74 of file energy_ctrl.c.
Referenced by attitude_loop(), gvf_parametric_low_level_control_3D(), h_ctl_pitch_loop(), nav_home(), nav_periodic_task(), nav_skid_landing_glide(), nav_without_gps(), navigation_task(), send_mode(), v_ctl_climb_loop(), v_ctl_guidance_loop(), and v_ctl_init().
|
extern |
Definition at line 133 of file energy_ctrl.c.
Referenced by attitude_loop(), h_ctl_guidance_loop(), v_ctl_climb_auto_throttle_loop(), v_ctl_climb_loop(), v_ctl_guidance_loop(), v_ctl_init(), and v_ctl_set_pitch().
|
extern |
Definition at line 131 of file energy_ctrl.c.
Referenced by attitude_loop(), autopilot_static_on_rc_frame(), h_ctl_roll_loop(), nav_home(), v_ctl_climb_auto_throttle_loop(), v_ctl_climb_loop(), v_ctl_guidance_loop(), v_ctl_init(), v_ctl_landing_loop(), and v_ctl_throttle_slew().
|
extern |
Definition at line 132 of file energy_ctrl.c.
Referenced by attitude_loop(), and v_ctl_throttle_slew().