javaclient2.extra
Class Controller

java.lang.Object
  extended by javaclient2.extra.Controller
Direct Known Subclasses:
PController, PDController, PIController, PIDController

public abstract class Controller
extends java.lang.Object

Abstract controller implementation. Used as a starting point for P, PI, PD, PID controllers.

Author:
Radu Bogdan Rusu

Field Summary
protected  float currE
          current error
protected  float eSum
          the sum of all errors so far
protected  float goal
          set the controller's goal
protected  float lastE
          last error
 
Constructor Summary
Controller()
           
 
Method Summary
protected  float deltaE()
          Get the difference between the current error and the last error.
 void setGoal(float newGoal)
          Set a new goal for the controller.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

goal

protected float goal
set the controller's goal


eSum

protected float eSum
the sum of all errors so far


currE

protected float currE
current error


lastE

protected float lastE
last error

Constructor Detail

Controller

public Controller()
Method Detail

setGoal

public void setGoal(float newGoal)
Set a new goal for the controller.

Parameters:
newGoal - the new goal for the controller

deltaE

protected float deltaE()
Get the difference between the current error and the last error.

Returns:
the difference between the current error and the last error