コード例 #1
0
        public PIDController(double kp, double ki, double kd, double maxoutput = double.MaxValue, double minoutput = double.MinValue, bool extraUnwind = false)
        {
            Vessel           = null;
            Target           = new Quaternion();
            RollControlRange = 5.0 * Mathf.Deg2Rad;

            //Use http://www.ni.com/white-paper/3782/en/ to fine-tune
            pitchRatePI = new PIDLoop(kp, ki, kd, maxoutput, minoutput, extraUnwind);
            yawRatePI   = new PIDLoop(kp, ki, kd, maxoutput, minoutput, extraUnwind);
            rollRatePI  = new PIDLoop(kp, ki, kd, maxoutput, minoutput, extraUnwind);

            pitchPI = new TorquePI();
            yawPI   = new TorquePI();
            rollPI  = new TorquePI();

            Reset();
        }