MechJeb2

MechJeb2

4M Downloads

RCS Avaiable Torque FIX

Raf04 opened this issue ยท 4 comments

commented

In VesselState.cs, the formula used to evaluate the torque added by RCS in "torquePYAvailable" and "torqueRAvailable" is by the term:

line 289:

                    double maxT = pm.thrustForces.Max();

This is wrong because "thrustForces.Max ()" is the current torque but NOT the available torque .

I propose the change:

                     double maxT = pm.thrusterPower;

This is important for the stability of the Attitude control loop when the RCS is activated. The torque is made by:
Action (pitch, yaw, roll ) * avaiable Torque.

Small Probe and RCS behaviour: http://youtu.be/qtJD44KPwp8

commented

Good catch! It also seems like a bug that the thruster direction isn't taken into account, but that may not be very significant.

commented

Is the video showing behavior with or without that change?

commented

The video shows behavior with the change made, but also have added more changes. See the Patch 1.

commented

Ah, so that change shown here fixed the problem with the small probe rotating using RCS that Sarbian showed? Cool.