mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-14 12:13:34 +08:00
attitude_fw remove unused
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
#include <stdio.h>
|
||||
#include <mathlib/mathlib.h>
|
||||
|
||||
ECL_Controller::ECL_Controller(const char *name) :
|
||||
ECL_Controller::ECL_Controller() :
|
||||
_last_run(0),
|
||||
_tc(0.1f),
|
||||
_k_p(0.0f),
|
||||
|
||||
@@ -75,7 +75,7 @@ struct ECL_ControlData {
|
||||
class ECL_Controller
|
||||
{
|
||||
public:
|
||||
ECL_Controller(const char *name);
|
||||
ECL_Controller();
|
||||
virtual ~ECL_Controller() = default;
|
||||
|
||||
virtual float control_attitude(const struct ECL_ControlData &ctl_data) = 0;
|
||||
|
||||
@@ -44,13 +44,6 @@
|
||||
#include <geo/geo.h>
|
||||
#include <mathlib/mathlib.h>
|
||||
|
||||
ECL_PitchController::ECL_PitchController() :
|
||||
ECL_Controller("pitch"),
|
||||
_max_rate_neg(0.0f),
|
||||
_roll_ff(0.0f)
|
||||
{
|
||||
}
|
||||
|
||||
float ECL_PitchController::control_attitude(const struct ECL_ControlData &ctl_data)
|
||||
{
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ class ECL_PitchController :
|
||||
public ECL_Controller
|
||||
{
|
||||
public:
|
||||
ECL_PitchController();
|
||||
ECL_PitchController() = default;
|
||||
~ECL_PitchController() = default;
|
||||
|
||||
float control_attitude(const struct ECL_ControlData &ctl_data);
|
||||
@@ -86,8 +86,8 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
float _max_rate_neg;
|
||||
float _roll_ff;
|
||||
float _max_rate_neg{0.0f};
|
||||
float _roll_ff{0.0f};
|
||||
};
|
||||
|
||||
#endif // ECL_PITCH_CONTROLLER_H
|
||||
|
||||
@@ -43,11 +43,6 @@
|
||||
#include <geo/geo.h>
|
||||
#include <mathlib/mathlib.h>
|
||||
|
||||
ECL_RollController::ECL_RollController() :
|
||||
ECL_Controller("roll")
|
||||
{
|
||||
}
|
||||
|
||||
float ECL_RollController::control_attitude(const struct ECL_ControlData &ctl_data)
|
||||
{
|
||||
/* Do not calculate control signal with bad inputs */
|
||||
|
||||
@@ -55,7 +55,7 @@ class ECL_RollController :
|
||||
public ECL_Controller
|
||||
{
|
||||
public:
|
||||
ECL_RollController();
|
||||
ECL_RollController() = default;
|
||||
~ECL_RollController() = default;
|
||||
|
||||
float control_attitude(const struct ECL_ControlData &ctl_data);
|
||||
|
||||
@@ -46,11 +46,6 @@
|
||||
|
||||
using matrix::wrap_pi;
|
||||
|
||||
ECL_WheelController::ECL_WheelController() :
|
||||
ECL_Controller("wheel")
|
||||
{
|
||||
}
|
||||
|
||||
float ECL_WheelController::control_bodyrate(const struct ECL_ControlData &ctl_data)
|
||||
{
|
||||
/* Do not calculate control signal with bad inputs */
|
||||
|
||||
@@ -55,14 +55,14 @@ class ECL_WheelController :
|
||||
public ECL_Controller
|
||||
{
|
||||
public:
|
||||
ECL_WheelController();
|
||||
ECL_WheelController() = default;
|
||||
~ECL_WheelController() = default;
|
||||
|
||||
float control_attitude(const struct ECL_ControlData &ctl_data);
|
||||
|
||||
float control_bodyrate(const struct ECL_ControlData &ctl_data);
|
||||
|
||||
float control_euler_rate(const struct ECL_ControlData &ctl_data) {return 0;}
|
||||
float control_euler_rate(const struct ECL_ControlData &ctl_data) { (void)ctl_data; return 0; }
|
||||
};
|
||||
|
||||
#endif // ECL_HEADING_CONTROLLER_H
|
||||
|
||||
@@ -43,14 +43,6 @@
|
||||
#include <geo/geo.h>
|
||||
#include <mathlib/mathlib.h>
|
||||
|
||||
ECL_YawController::ECL_YawController() :
|
||||
ECL_Controller("yaw"),
|
||||
_coordinated_min_speed(1.0f),
|
||||
_max_rate(0.0f), /* disable by default */
|
||||
_coordinated_method(0)
|
||||
{
|
||||
}
|
||||
|
||||
float ECL_YawController::control_attitude(const struct ECL_ControlData &ctl_data)
|
||||
{
|
||||
switch (_coordinated_method) {
|
||||
@@ -194,6 +186,8 @@ float ECL_YawController::control_bodyrate(const struct ECL_ControlData &ctl_data
|
||||
|
||||
float ECL_YawController::control_attitude_impl_accclosedloop(const struct ECL_ControlData &ctl_data)
|
||||
{
|
||||
(void)ctl_data; // unused
|
||||
|
||||
/* dont set a rate setpoint */
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ class ECL_YawController :
|
||||
public ECL_Controller
|
||||
{
|
||||
public:
|
||||
ECL_YawController();
|
||||
ECL_YawController() = default;
|
||||
~ECL_YawController() = default;
|
||||
|
||||
float control_attitude(const struct ECL_ControlData &ctl_data);
|
||||
@@ -78,10 +78,10 @@ public:
|
||||
};
|
||||
|
||||
protected:
|
||||
float _coordinated_min_speed;
|
||||
float _max_rate;
|
||||
float _coordinated_min_speed{1.0f};
|
||||
float _max_rate{0.0f};
|
||||
|
||||
int32_t _coordinated_method;
|
||||
int32_t _coordinated_method{COORD_METHOD_OPEN};
|
||||
|
||||
float control_attitude_impl_openloop(const struct ECL_ControlData &ctl_data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user