navlib::DynamicsModel Class Reference

A set of first order differential equations that predicts the motion of a vehicle due to some control input. More...

#include <dynamics.h>

Inheritance diagram for navlib::DynamicsModel:

navlib::UnicycleModel

List of all members.

Public Types

typedef ublas::vector< double > vector
 Funciton that gives the time derivative of the state x'=f(t,x,u,p).
typedef ublas::matrix< double > matrix
typedef boost::function
< vector(double, vector,
vector, vector) > 
PredictFun

Public Member Functions

 DynamicsModel (PredictFun f, vector x0, vector params)
vector getParameters () const
 Returns the current parameter set (for system identification).
vector getState () const
 Returns the current state.
vector getStateDerivative (vector u) const
 Returns what the state derivative would be given an input.
vector predict (vector x, vector u, double dt) const
 Predicts the next state given an input and a time difference.
void setState (vector x)
 Sets the current state.
void setParameters (vector p)
 Sets the current parameter estimate (for system identification).
vector step (vector u, double dt)
 Simulates the system for a single time step.
void setTime (const double &t)
 Sets the current simulation time.

Protected Attributes

PredictFun _dxdt
 x'=f(t,x,u,p)
vector _x
 state estimate
vector _p
 parameter estimate
double _t
 simulation time


Detailed Description

A set of first order differential equations that predicts the motion of a vehicle due to some control input.


Constructor & Destructor Documentation

DynamicsModel::DynamicsModel ( PredictFun  f,
vector  x0,
vector  params 
)

Parameters:
f non-linear set of first order differential equations
x0 initial state
params initial parameter estimage


Member Function Documentation

ublas::vector< double > DynamicsModel::getStateDerivative ( vector  u  )  const

Returns what the state derivative would be given an input.

Parameters:
u control input

References _dxdt, _p, _t, and _x.

ublas::vector< double > DynamicsModel::predict ( vector  x,
vector  u,
double  dt 
) const

Predicts the next state given an input and a time difference.

Parameters:
x state
u control input
dt prediction time

References _dxdt, _p, and _t.

void DynamicsModel::setState ( vector  x  ) 

Sets the current state.

Parameters:
x state

References _x.

void DynamicsModel::setParameters ( vector  p  ) 

Sets the current parameter estimate (for system identification).

Parameters:
p parameters

References _p.

DynamicsModel::vector DynamicsModel::step ( vector  u,
double  dt 
)

Simulates the system for a single time step.

Parameters:
u control input
dt update time

References _dxdt, _p, _t, and _x.

void DynamicsModel::setTime ( const double &  t  ) 

Sets the current simulation time.

Parameters:
t time

References _t.


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

Generated on Mon Nov 3 20:33:35 2008 for navlib by  doxygen 1.5.5