motris.model
Class CarState

java.lang.Object
  extended bymotris.data.Description
      extended byparameter.ParameterizedObjectAdaptor
          extended bymotris.model.State
              extended bymotris.model.CarState
All Implemented Interfaces:
ParameterizedObject

public class CarState
extends State

Actor state that is specific for vehicles (because of the weird state vector there)

Author:
Hendrik Dahlkamp

Nested Class Summary
 
Nested classes inherited from class parameter.ParameterizedObject
ParameterizedObject.ParameterChangedListener, ParameterizedObject.ParameterizedObjectManager
 
Field Summary
(package private)  NonZeroStartingArray cacheAccel
           
(package private)  java.util.Hashtable cacheCovariance
           
(package private)  NonZeroStartingArray cacheOrient
           
(package private)  NonZeroStartingArray cacheOrient2
           
(package private)  NonZeroStartingArray cacheVelocity
           
(package private)  NonZeroStartingArray cacheX
           
(package private)  NonZeroStartingArray cacheY
           
private  boolean DEBUGMODE
           
private  ParameterSet defaultParams
           
protected  int numStateParameters
           
 
Fields inherited from class motris.model.State
aPrioriCovarianceBeforeProcessNoise, firstVisibleTime, hidden, lastVisibleTime, parameters, referencePointInMiddle, stateChangeSemaphore, time
 
Fields inherited from class parameter.ParameterizedObjectAdaptor
parameterChangedNotifyList
 
Fields inherited from class motris.data.Description
 
Constructor Summary
CarState(ParameterSet _params, int numberOfDerivations, ParameterSet _defaultParams)
           
 
Method Summary
private  void addOrSetParameter(ParameterSet params, Parameter defaultValues, double newValue)
           
 void advanceTimeStep(double deltaT)
           
 void finishInitialisation()
           
 ParameterSet getParameters(boolean forSave)
           
 DoubleVector getPredictedStateVector(double deltaT)
           
 JSci.maths.DoubleSquareMatrix getStateDerivativeMatrix()
           
 DoubleVector getStateVector()
           
 DoubleVector getStateVector(int time)
           
 int getStateVectorDimension()
           
 DoubleVector getStateVectorForReferenceInMiddle()
           
private  void getStoredParameters(ParameterSet params, boolean forSave)
           
 boolean initCovariances()
           
 boolean recallState(int _time)
           
 boolean setFromStateVector(DoubleVector v)
           
 boolean setParameters(ParameterSet _params)
          Copies VALUES not references from supplied ParameterSet into State,
 void storeCurrentState(int _time)
           
 void storeState(ParameterSet params, int _time)
           
 
Methods inherited from class motris.model.State
addParameter, getAPrioriCovarianceBeforeProcessNoise, getCovariance, getNumParameter, getParameter, getParameters, getPosition, getStateVectorDot, getValue, isHidden, isVisibleDuringTime, setAngle, setCovariance, setHidden, setPosition
 
Methods inherited from class parameter.ParameterizedObjectAdaptor
addParameterChangedListener, finalize, fireParameterChanged, parameterEdited, removeParameterChangedListener
 
Methods inherited from class motris.data.Description
getDescription, getIdentifier, getName, setDescription, setIdentifier, setName
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUGMODE

private boolean DEBUGMODE

defaultParams

private ParameterSet defaultParams

numStateParameters

protected int numStateParameters

cacheX

NonZeroStartingArray cacheX

cacheY

NonZeroStartingArray cacheY

cacheOrient

NonZeroStartingArray cacheOrient

cacheVelocity

NonZeroStartingArray cacheVelocity

cacheOrient2

NonZeroStartingArray cacheOrient2

cacheAccel

NonZeroStartingArray cacheAccel

cacheCovariance

java.util.Hashtable cacheCovariance
Constructor Detail

CarState

public CarState(ParameterSet _params,
                int numberOfDerivations,
                ParameterSet _defaultParams)
Method Detail

getStateVectorForReferenceInMiddle

public DoubleVector getStateVectorForReferenceInMiddle()

getStateVector

public DoubleVector getStateVector()
Specified by:
getStateVector in class State

getStateVector

public DoubleVector getStateVector(int time)
Specified by:
getStateVector in class State

getPredictedStateVector

public DoubleVector getPredictedStateVector(double deltaT)
Specified by:
getPredictedStateVector in class State

setFromStateVector

public boolean setFromStateVector(DoubleVector v)
Specified by:
setFromStateVector in class State

advanceTimeStep

public void advanceTimeStep(double deltaT)
Specified by:
advanceTimeStep in class State

setParameters

public boolean setParameters(ParameterSet _params)
Description copied from class: State
Copies VALUES not references from supplied ParameterSet into State,

Specified by:
setParameters in interface ParameterizedObject
Overrides:
setParameters in class State
Parameters:
_params - new parameteres
Returns:
successful operation

getParameters

public ParameterSet getParameters(boolean forSave)
Overrides:
getParameters in class State

addOrSetParameter

private void addOrSetParameter(ParameterSet params,
                               Parameter defaultValues,
                               double newValue)

getStoredParameters

private void getStoredParameters(ParameterSet params,
                                 boolean forSave)

initCovariances

public boolean initCovariances()
Specified by:
initCovariances in class State

getStateDerivativeMatrix

public JSci.maths.DoubleSquareMatrix getStateDerivativeMatrix()
Specified by:
getStateDerivativeMatrix in class State

finishInitialisation

public void finishInitialisation()
Overrides:
finishInitialisation in class State

getStateVectorDimension

public int getStateVectorDimension()
Specified by:
getStateVectorDimension in class State

recallState

public boolean recallState(int _time)
Specified by:
recallState in class State

storeCurrentState

public void storeCurrentState(int _time)
Specified by:
storeCurrentState in class State

storeState

public void storeState(ParameterSet params,
                       int _time)
Specified by:
storeState in class State