Files
ardupilot/libraries/APM_Control/AP_RollController.h
T
Peter Barker da9ecf550a APM_Control: remove convert_pid()
AP_RollController::convert_pid() and AP_PitchController::convert_pid()
converted the old RLL2SRV_/PTCH2SRV_ gains into the AC_PID form.  Added
Apr-2021 and described in the code as "a temporary conversion function
during development"; present in the 4.3.0 release, so anybody running
4.3.0 or later has already had it applied.
2026-09-01 20:49:36 +10:00

47 lines
1.3 KiB
C++

#pragma once
#include "AP_FW_Controller.h"
class AP_RollController : public AP_FW_Controller
{
public:
AP_RollController(const AP_FixedWing &parms);
/* Do not allow copies */
CLASS_NO_COPY(AP_RollController);
static const struct AP_Param::GroupInfo var_info[];
/*
set the in_recovery flag, which is used during a VTOL upset recovery
this flag only lasts one loop
*/
void set_in_recovery(void) {
in_recovery = true;
}
private:
float run_axis_rate_control(float desired_rate_degs, float scaler, bool disable_integrator, bool ground_mode) override;
// Return true if the airspeed should be considered as under speed
bool is_underspeed() const override;
// Return the measured roll angle in degrees
float get_measured_angle_deg() const override;
// Return the measured roll rate in radians per second
float get_measured_rate_rads() const override;
// Return true if rate limits should be applied
bool should_apply_rate_limits() const override;
// Return positive rate limit in deg per second, zero if disabled
float get_positive_rate_limit_degs() const override;
// Return negative rate limit in deg per second (as a positive number) zero if disabled
float get_negative_rate_limit_degs() const override;
bool in_recovery;
};