stella.util
Class SineError.Relaxation

java.lang.Object
  extended by stella.util.SineError.Relaxation
Enclosing class:
SineError

private static final class SineError.Relaxation
extends Object

A class that simulates the reaction of the system to an offset. As long as the relaxation is active, this class return the current value of the individual relaxation process with getCurrentRelax(double). Once isFinished(double) returns true, no more changes in the relaxation will occur and the instance can be removed from the currently active relaxation list.


Field Summary
private  double attain
          The total offset this relaxation process should attain to.
private  double deadtime
          The deadtime of the process.
private  double speed
          The speed with which the system reaction during latency phase.
private  double t0
          The time this relaxation was started.
 
Constructor Summary
private SineError.Relaxation(double tstart, double total, double toff, double velocity)
          Constructs a new relaxation process whose current offset is determined by a function that returns zero during the deadtime and will return its full offset latency and total offset dependant after the deadtime.
 
Method Summary
 double getCurrentRelax(double t)
          Returns the current relaxation state of this process.
 boolean isFinished(double t)
          Returns true if this relaxation process is finished.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

t0

private double t0
The time this relaxation was started.


attain

private double attain
The total offset this relaxation process should attain to.


deadtime

private double deadtime
The deadtime of the process.


speed

private double speed
The speed with which the system reaction during latency phase.

Constructor Detail

SineError.Relaxation

private SineError.Relaxation(double tstart,
                             double total,
                             double toff,
                             double velocity)
Constructs a new relaxation process whose current offset is determined by a function that returns zero during the deadtime and will return its full offset latency and total offset dependant after the deadtime.

Method Detail

getCurrentRelax

public double getCurrentRelax(double t)
Returns the current relaxation state of this process. This is calculated using the starttime and the current time in the following way: After the relaxation is finished, it should be removed from the currently active relaxation processes list.


isFinished

public boolean isFinished(double t)
Returns true if this relaxation process is finished. This depends on the time, speed and total offset to attain. After a relaxation process is finished, it always returns the total value and can be removed from the list of current active offsets.