public Autopilot_Module(GridTerminalSystemUtils GTS, IMyShipController controller, IngameTime ingameTime, PID_Controller.PIDSettings gyroPidSettings, PID_Controller.PIDSettings thrustPidSettings, EntityTracking_Module trackingModule) { GTS.GridTerminalSystem.GetBlocksOfType(allThrusters); GTS.GridTerminalSystem.GetBlocksOfType(gyros); this.controller = controller; this.ingameTime = ingameTime; thrustPidController = new PID_Controller(thrustPidSettings); gyroControl = new AdvGyroControl(gyroPidSettings, ingameTime); thrustControl = new AdvThrustControl(controller, allThrusters, ingameTime); collisionAvoidance = new CollisionAvoidance(controller, trackingModule, 10, 10); trackingModule.onEntityDetected += collisionAvoidance.OnEntityDetected; }
public Autopilot_Module(GridTerminalSystemUtils GTS, IMyShipController controller, IngameTime ingameTime, EntityTracking_Module trackingModule) { GTS.GridTerminalSystem.GetBlocksOfType(allThrusters); GTS.GridTerminalSystem.GetBlocksOfType(gyros); this.controller = controller; this.ingameTime = ingameTime; thrustControl = new AdvThrustControl(controller, allThrusters, ingameTime); collisionAvoidance = new CollisionAvoidance(controller, trackingModule, 10, 10); trackingModule.onEntityDetected += collisionAvoidance.OnEntityDetected; PID_Controller.PIDSettings onePid = new PID_Controller.PIDSettings { PGain = 1, DerivativeGain = 0, IntegralGain = 0, }; thrustPidController = new PID_Controller(onePid); gyroControl = new AdvGyroControl(onePid, ingameTime); }