Possible bug in Attitude Controller
Raf04 opened this issue ยท 2 comments
In "MechJebModuleAttitudeController.cs", the line:
err.Scale(Vector3d.Scale(vesselState.MoI, torque.Invert()));
Is not it should be: ?
err.Scale(Vector3d.Scale(vesselState.MoI, torque.Invert()).Reorder(132));
To compensate MoI and maximum avaiable Torque the formula is:
error angle = error angle * MoI / avaiable Torque
In the "err" vector, "err.x" is the pitch error angle, "err.y" is the yaw error angle and "err.z" is the roll error angle. In the Moment of Inertia and Torque vectors the axes "y" and "z" are exchanged.
Are you referring to line 307? cad6c55 I think he beat you to it. :)
The fix mentioned by @Tallinu should be in version 2.0.8, just released. Closing this.