state-observation 1.7.0
General implementation of observers.
Loading...
Searching...
No Matches
stateObservation::DynamicalSystemSimulator Class Reference

The class gives a small encapsulation of the dynamics functor, which enables the simulation of the dynamics and the storage of states, inputs and measurements. More...

#include <dynamical-system-simulator.hpp>

Collaboration diagram for stateObservation::DynamicalSystemSimulator:
[legend]

Public Member Functions

 DynamicalSystemSimulator ()
 Constructor.
virtual ~DynamicalSystemSimulator ()
 Virtual destructor.
virtual void setDynamicsFunctor (DynamicalSystemFunctorBase *)
virtual void setState (const Vector &x, TimeIndex k)
 Sets the state value at instant k.
virtual void setInput (const Vector &u, TimeIndex k)
virtual Vector getCurrentState () const
 Gets the state of the current time.
virtual TimeIndex getCurrentTime () const
 Gets the current time.
virtual void simulateDynamics ()
 Runs one loop of the dynamics simulation.
virtual void simulateDynamicsTo (TimeIndex k)
 Runs the simulation until a given time index.
virtual Vector getInput (TimeIndex k) const
virtual Vector getMeasurement (TimeIndex k)
virtual Vector getState (TimeIndex k)
virtual IndexedVectorArray getMeasurementArray (TimeIndex startingTime, TimeSize duration)
virtual IndexedVectorArray getStateArray (TimeIndex startingTime, TimeSize duration)
virtual void resetDynamics ()
 resets all the states, the measurements and the inputs
virtual void resetSimulator ()
 resets all the simulator with even the dynamics functor

Protected Attributes

DynamicalSystemFunctorBasef_
IndexedVectorArray x_
IndexedVectorArray y_
std::map< TimeIndex, Vectoru_

Detailed Description

The class gives a small encapsulation of the dynamics functor, which enables the simulation of the dynamics and the storage of states, inputs and measurements.

Definition at line 31 of file dynamical-system-simulator.hpp.

Member Function Documentation

◆ setDynamicsFunctor()

virtual void stateObservation::DynamicalSystemSimulator::setDynamicsFunctor ( DynamicalSystemFunctorBase * )
virtual

Sets a pointer to the dynamics Functor (the class does not destroy the Functor when the class is destroyed.)

◆ setInput()

virtual void stateObservation::DynamicalSystemSimulator::setInput ( const Vector & u,
TimeIndex k )
virtual

Set the value of the input at instant k If no value of the input is available when simulating the system the previous input value is automatically set.

◆ getInput()

virtual Vector stateObservation::DynamicalSystemSimulator::getInput ( TimeIndex k) const
virtual

Gets the input of a given time index, if the Input is not available the previous input is provided

◆ getMeasurement()

virtual Vector stateObservation::DynamicalSystemSimulator::getMeasurement ( TimeIndex k)
virtual

Gets the measurement value at a given time index if the value is not available, the dynamics is simulated to the time k

◆ getState()

virtual Vector stateObservation::DynamicalSystemSimulator::getState ( TimeIndex k)
virtual

Gets the state value at a given time index if the value is not available, the dynamics is simulated to the time k

◆ getMeasurementArray()

virtual IndexedVectorArray stateObservation::DynamicalSystemSimulator::getMeasurementArray ( TimeIndex startingTime,
TimeSize duration )
virtual

Gives a IndexedVectorArray of the measurements starting at startingTime and having the given duration

◆ getStateArray()

virtual IndexedVectorArray stateObservation::DynamicalSystemSimulator::getStateArray ( TimeIndex startingTime,
TimeSize duration )
virtual

Gives a IndexedVectorArray of the states starting at startingTime and having the given duration

Member Data Documentation

◆ f_

DynamicalSystemFunctorBase* stateObservation::DynamicalSystemSimulator::f_
protected

Definition at line 93 of file dynamical-system-simulator.hpp.

◆ x_

IndexedVectorArray stateObservation::DynamicalSystemSimulator::x_
protected

Definition at line 95 of file dynamical-system-simulator.hpp.

◆ y_

IndexedVectorArray stateObservation::DynamicalSystemSimulator::y_
protected

Definition at line 97 of file dynamical-system-simulator.hpp.

◆ u_

std::map<TimeIndex, Vector> stateObservation::DynamicalSystemSimulator::u_
protected

Definition at line 99 of file dynamical-system-simulator.hpp.


The documentation for this class was generated from the following file: