mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 17:49:33 +00:00
More clean yaw error calculation
This commit is contained in:
parent
5613028678
commit
84a329cca7
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user