MechJeb2

MechJeb2

4M Downloads

SmartASS oscillates madly

numerobis opened this issue ยท 4 comments

commented
  1. Build a plane with a lot of small control surfaces, pitched down 45 degrees (so when the plane goes straight, you have 45 degree AoA on that small control surface).
  2. Specify that certain ones should be used only for roll, others only for lift, others only for lift (no control enabled). Use none for yaw since engines and pod torque should be plenty.
  3. Set smartass to pitch 45, heading 90, roll 0.
  4. Launch your plane and reach ~100 m/s.
  5. Watch the oscillations start to go nuts, until the plane just starts spinning.

Such planes are easy but tedious to control with SAS + keyboard. But MechJeb seems to think it has a lot more torque than it actually has. Then P is totally off in the controller, so the I and D parts go nuts.

I'm betting it's that VesselState.torqueAvailable is not distinguishing the contribution along each axis. But despite several attempts, I've never managed to really figure out the attitude control data flow so I have no idea how to implement anything there.

commented

You're guessing right. MJ ignore the tweakable that limits the use of a control surface.
And MJ is too aggressive while in atmo too.

commented

Not sure if this one is entirely fixed? torqueAvailable is still a Vector3d not a Vector6, dunno what SmartASS is using these days.

commented

IIRC this was just that the torque on the pitch axis was the sum of all surfaces, not just the sum of surfaces used for pitch (and similarly for the other two axes). I'm not sure you'd need a V6.

commented

I'm gonna guess this one is long since fixed.