calculate

open fun calculate(measurement: Double): Double

Returns the next output of the PID controller.

Return

The next output of the PID controller.

Parameters

measurement

The current measurement of the process variable.


open fun calculate(measurement: Double, newGoal: TrapezoidProfile.State): Double

Returns the next output of the PID controller.

Return

The next output of the PID controller.

Parameters

measurement

The current measurement of the process variable.

newGoal

The new goal of the controller.


open fun calculate(measurement: Double, newGoal: Double): Double

Returns the next output of the PIDController.

Return

The next output of the PID controller.

Parameters

measurement

The current measurement of the process variable.

newGoal

The new goal of the controller.


open fun calculate(measurement: Double, newGoal: TrapezoidProfile.State, newConstraints: TrapezoidProfile.Constraints): Double

Returns the next output of the PID controller.

Return

The next output of the PID controller.

Parameters

measurement

The current measurement of the process variable.

newGoal

The new goal of the controller.

newConstraints

Velocity and acceleration constraints for goal.