mirror of
https://github.com/okalachev/flix.git
synced 2025-08-17 17:16:10 +00:00
More clean yaw error calculation
This commit is contained in:
@@ -123,7 +123,8 @@ void controlAttitude() {
|
||||
ratesTarget.y = pitchPID.update(error.y, dt);
|
||||
|
||||
if (yawMode == YAW) {
|
||||
ratesTarget.z = yawPID.update(wrapAngle(attitudeTarget.getYaw() - attitude.getYaw()), dt);
|
||||
float yawError = wrapAngle(attitudeTarget.getYaw() - attitude.getYaw());
|
||||
ratesTarget.z = yawPID.update(yawError, dt);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user