MechJeb2

MechJeb2

4M Downloads

Support for other gimbals

NathanKell opened this issue ยท 0 comments

commented

Right here:

ModuleGimbal gimbal = p.Modules.OfType<ModuleGimbal>().FirstOrDefault();

Is where MJ detects torque from gimbals. It should not be difficult to add support for other gimbal modules. The difficulty will be in optimizing, so you don't have to reflect every frame.
Since EE is derived from ModuleGimbal, this code still works somewhat for it; but since KM_Gimbal is not, you would need to reflect to get the max deflection. In both cases, however, you would want to add directly to torqueAvailable since the gimbals support roll.