control_allocator: update matrix normalization

- only normalize rpy for MC matrices
- for thrust use the 3D vector, so it works for FW and tilt rotors as well

This keeps MC unchanged.
This commit is contained in:
Beat Küng
2021-12-20 17:27:21 +01:00
committed by Daniel Agar
parent 460a0df850
commit 5259877b1b
9 changed files with 89 additions and 30 deletions
@@ -216,6 +216,8 @@ public:
int numConfiguredActuators() const { return _num_actuators; }
void setNormalizeRPY(bool normalize_rpy) { _normalize_rpy = normalize_rpy; }
protected:
friend class ControlAllocator; // for _actuator_sp
@@ -230,4 +232,5 @@ protected:
matrix::Vector<float, NUM_AXES> _control_sp; ///< Control setpoint
matrix::Vector<float, NUM_AXES> _control_trim; ///< Control at trim actuator values
int _num_actuators{0};
bool _normalize_rpy{false}; ///< if true, normalize roll, pitch and yaw columns
};