Line data Source code
1 : #pragma once 2 : 3 : #include "AP_FW_Controller.h" 4 : 5 : class AP_RollController : public AP_FW_Controller 6 : { 7 : public: 8 : AP_RollController(const AP_FixedWing &parms); 9 : 10 : /* Do not allow copies */ 11 : CLASS_NO_COPY(AP_RollController); 12 : 13 : static const struct AP_Param::GroupInfo var_info[]; 14 : 15 : 16 : /* 17 : set the in_recovery flag, which is used during a VTOL upset recovery 18 : this flag only lasts one loop 19 : */ 20 270914 : void set_in_recovery(void) { 21 270914 : in_recovery = true; 22 270914 : } 23 : 24 : private: 25 : float run_axis_rate_control(float desired_rate_degs, float scaler, bool disable_integrator, bool ground_mode) override; 26 : 27 : // Return true if the airspeed should be considered as under speed 28 : bool is_underspeed() const override; 29 : 30 : // Return the measured roll angle in degrees 31 : float get_measured_angle_deg() const override; 32 : 33 : // Return the measured roll rate in radians per second 34 : float get_measured_rate_rads() const override; 35 : 36 : // Return true if rate limits should be applied 37 : bool should_apply_rate_limits() const override; 38 : 39 : // Return positive rate limit in deg per second, zero if disabled 40 : float get_positive_rate_limit_degs() const override; 41 : 42 : // Return negative rate limit in deg per second (as a positive number) zero if disabled 43 : float get_negative_rate_limit_degs() const override; 44 : 45 : bool in_recovery; 46 : };