r4m0n

C# console PID tunning

Dec 29th, 2012
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.70 KB | None | 0 0
  1. First, on the command line:
  2. LoadAssembly("MuMechLib.dll");
  3. using MuMech;
  4.  
  5. main program:
  6. public class Program {
  7.     public static void Test() {
  8.         MechJebCore c = FlightGlobals.ActiveVessel.GetMasterMechJeb();
  9.         MechJebModuleDockingAutopilot a = c.GetComputerModule<MechJebModuleDockingAutopilot>();
  10.         c.rcs.enabled = false;
  11.         c.rcs.Kp = 0.3;
  12.         c.rcs.Ki = 0.08;
  13.         c.rcs.Kd = 0.02;
  14.         c.rcs.enabled = true;
  15.         a.enabled = false;
  16.         a.Kp = 1;
  17.         a.Ki = 0;
  18.         a.Kd = 0;
  19.         a.enabled = true;
  20.         //c.rcs.SetTargetWorldVelocity(c.vesselState.velocityVesselOrbit);
  21.     }
  22. }
  23.  
  24. afterwards, to refresh in the command line:
  25. Program.Test();
Advertisement
Add Comment
Please, Sign In to add comment