mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 08:53:35 +08:00
FW attitude control scaling fixes and cleanup (#15256)
* FW attitude control scaling fixes and cleanup This commit aligns the scaling better with the derivations in https://dev.px4.io/master/en/flight_stack/controller_diagrams.html#airspeed-scaling Integrator terms now scale with IAS^2 (all three axes) To match the roll and pitch controllers: - Yaw integrator scale is now applied during accumulation, not to integral value (so now FW_YR_IMAX is respected more intuitively) - Yaw FF term now scale with IAS instead of IAS^2 Also made a number of small changes to make the three files (roll, pitch, yaw) 3-way diffable to be clearer about what the differences among them are. * Remove unused yaw coordination method - "Coordination method" open vs. closed code removed, since closed is never used and not actually implemented. - No change to behavior * Remove PX4_WARN messages Co-authored-by: george <george@campsix.com>
This commit is contained in:
co-authored by
george
parent
f792cc7b6b
commit
94326a29bb
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2013-2016 Estimation and Control Library (ECL). All rights reserved.
|
||||
* Copyright (c) 2013-2020 Estimation and Control Library (ECL). All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -45,6 +45,7 @@
|
||||
* which in turn is based on initial work of
|
||||
* Jonathan Challinger, 2012.
|
||||
*/
|
||||
|
||||
#ifndef ECL_YAW_CONTROLLER_H
|
||||
#define ECL_YAW_CONTROLLER_H
|
||||
|
||||
@@ -61,32 +62,9 @@ public:
|
||||
float control_euler_rate(const struct ECL_ControlData &ctl_data) override;
|
||||
float control_bodyrate(const struct ECL_ControlData &ctl_data) override;
|
||||
|
||||
/* Additional setters */
|
||||
void set_coordinated_min_speed(float coordinated_min_speed)
|
||||
{
|
||||
_coordinated_min_speed = coordinated_min_speed;
|
||||
}
|
||||
|
||||
void set_coordinated_method(int32_t coordinated_method)
|
||||
{
|
||||
_coordinated_method = coordinated_method;
|
||||
}
|
||||
|
||||
enum {
|
||||
COORD_METHOD_OPEN = 0,
|
||||
COORD_METHOD_CLOSEACC = 1
|
||||
};
|
||||
|
||||
protected:
|
||||
float _coordinated_min_speed{1.0f};
|
||||
float _max_rate{0.0f};
|
||||
|
||||
int32_t _coordinated_method{COORD_METHOD_OPEN};
|
||||
|
||||
float control_attitude_impl_openloop(const struct ECL_ControlData &ctl_data);
|
||||
|
||||
float control_attitude_impl_accclosedloop(const struct ECL_ControlData &ctl_data);
|
||||
|
||||
};
|
||||
|
||||
#endif // ECL_YAW_CONTROLLER_H
|
||||
|
||||
Reference in New Issue
Block a user