mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 10:33:33 +08:00
mc_att_control: move rate control to RateControl class
This makes the controller more modular, more readable and hence better maintainable.
This commit is contained in:
@@ -56,15 +56,6 @@ public:
|
||||
AttitudeControl() = default;
|
||||
~AttitudeControl() = default;
|
||||
|
||||
/**
|
||||
* Run one control loop cycle calculation with either new
|
||||
* @param q estimation of the current vehicle attitude unit quaternion
|
||||
* @param qd desired vehicle attitude setpoint
|
||||
* @param yawspeed_feedforward [rad/s] yaw feed forward angular rate in world frame
|
||||
* @return [rad/s] body frame 3D angular rate setpoint vector to be executed by the rate controller
|
||||
*/
|
||||
matrix::Vector3f update(matrix::Quatf q, matrix::Quatf qd, float yawspeed_feedforward);
|
||||
|
||||
/**
|
||||
* Set proportional attitude control gain
|
||||
* @param proportional_gain 3D vector containing gains for roll, pitch, yaw
|
||||
@@ -77,6 +68,15 @@ public:
|
||||
*/
|
||||
void setRateLimit(const matrix::Vector3f &rate_limit) { _rate_limit = rate_limit; }
|
||||
|
||||
/**
|
||||
* Run one control loop cycle calculation
|
||||
* @param q estimation of the current vehicle attitude unit quaternion
|
||||
* @param qd desired vehicle attitude setpoint
|
||||
* @param yawspeed_feedforward [rad/s] yaw feed forward angular rate in world frame
|
||||
* @return [rad/s] body frame 3D angular rate setpoint vector to be executed by the rate controller
|
||||
*/
|
||||
matrix::Vector3f update(matrix::Quatf q, matrix::Quatf qd, float yawspeed_feedforward);
|
||||
|
||||
private:
|
||||
matrix::Vector3f _proportional_gain;
|
||||
matrix::Vector3f _rate_limit;
|
||||
|
||||
Reference in New Issue
Block a user