Example #1
0
        public PIDTuner(float initialPGain, float initialDGain, int stepsPerIteration, PIDController controller)
        {
            gains    = new float[2];
            deltas   = new float[] { 0.1f, 0.1f };
            gains[0] = controller.PGain = initialPGain;
            gains[1] = controller.DGain = initialDGain;
            this.stepsPerIteration = stepsPerIteration;
            this.controller        = controller;

            numSteps   = 0;
            totalcte   = 0f;
            BestAvgCTE = float.MaxValue;
            currGain   = 0;
        }
Example #2
0
        public PIDTuner(float initialPGain, float initialDGain, int stepsPerIteration, PIDController controller)
        {
            gains = new float[2];
            deltas = new float[] { 0.1f, 0.1f };
            gains[0] = controller.PGain = initialPGain;
            gains[1] = controller.DGain = initialDGain;
            this.stepsPerIteration = stepsPerIteration;
            this.controller = controller;

            numSteps = 0;
            totalcte = 0f;
            BestAvgCTE = float.MaxValue;
            currGain = 0;
        }