mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-02 10:23:25 +08:00
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.
46 lines
1.3 KiB
C++
46 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include "AP_FW_Controller.h"
|
|
|
|
class AP_PitchController : public AP_FW_Controller
|
|
{
|
|
public:
|
|
AP_PitchController(const AP_FixedWing &parms);
|
|
|
|
/* Do not allow copies */
|
|
CLASS_NO_COPY(AP_PitchController);
|
|
|
|
static const struct AP_Param::GroupInfo var_info[];
|
|
|
|
|
|
private:
|
|
AP_Float _roll_ff;
|
|
|
|
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 pitch angle in degrees
|
|
float get_measured_angle_deg() const override;
|
|
|
|
// Return the measured pitch 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 rate target offset in deg per second, this is used in angle control
|
|
float get_rate_target_offset_degs() 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;
|
|
|
|
// Return true if the vehicle is inverted
|
|
bool is_inverted() const;
|
|
|
|
};
|