Package 

Class Pid


  • 
    public class Pid
    
                        

    PID calculation algorithm.

    • Method Summary

      Modifier and Type Method Description
      void reset() Rest the current PID state.
      double calculateOutput(double setValue, double presentValue, double elapsedMilliseconds) Calculates the desired output based on current error.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Pid

        Pid(String name, PidParams params, ITelemetryLogger logger)
        Constructs a new instance of the PID algorithm class.
        Parameters:
        params - initialization parameters.
    • Method Detail

      • reset

         void reset()

        Rest the current PID state.

      • calculateOutput

         double calculateOutput(double setValue, double presentValue, double elapsedMilliseconds)

        Calculates the desired output based on current error.

        Parameters:
        setValue - desired output value.
        presentValue - current output value.
        elapsedMilliseconds - milliseconds elapsed since last calculation.