Public Types | Public Member Functions | Protected Attributes
labust::simulation::KinematicModel Class Reference

#include <kinematic_model.h>

List of all members.

Public Types

enum  { x = 0, y, z }
enum  { phi = 0, theta, psi }
enum  {
  u = 0, v, w, p,
  q, r
}

Public Member Functions

void init (double depth=0)
 KinematicModel ()
 Default constructor for common use without configuration.
const vector3orientation ()
const vector3position () const
void reset ()
void setPosition (const vector3 &pos, const vector3 &rpy)
void setPosition (const vector3 &pos, const quaternion &quat)
void setTs (double Ts)
 Set the sampling time in seconds.
void step (const vector &nu)

Protected Attributes

vector3 current
 The external current disturbance in world coordinates.
double dT
 The model sampling step.
vector3 pos
 Position and orientation state.
vector3 pos0
 The initial position vector.
quaternion quat
 The orientation quaternion.
quaternion quat0
 The initial quaternion vector.
vector3 rpy
 The internal rpy representation.

Detailed Description

This class implements the kinematics of a 6DOF rigid-body. This model is based on the equations of motion derived in chapter 2 of Guidance and control of Ocean Vehicles by Fossen (1994).

Definition at line 51 of file kinematic_model.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
x 
y 
z 

Definition at line 54 of file kinematic_model.h.

anonymous enum
Enumerator:
phi 
theta 
psi 

Definition at line 55 of file kinematic_model.h.

anonymous enum
Enumerator:
u 
v 
w 
p 
q 
r 

Definition at line 56 of file kinematic_model.h.


Constructor & Destructor Documentation

Default constructor for common use without configuration.

Definition at line 42 of file kinematic_model.cpp.


Member Function Documentation

void labust::simulation::KinematicModel::init ( double  depth = 0) [inline]

Initialize the model.

Parameters:
depthDefaults to zero but can be used to set a neutral depth.

Definition at line 111 of file kinematic_model.h.

Method to get the current model states. This vector returns the model orientation in Euler ZYX in world coordinates.

Returns:
Constant reference to the model states.

Definition at line 79 of file kinematic_model.h.

Method to get the current position. This vector returns the model position in world coordinates.

Returns:
Constant reference to the model states.

Definition at line 72 of file kinematic_model.h.

The method restarts the model to initial parameters.

Definition at line 120 of file kinematic_model.h.

void labust::simulation::KinematicModel::setPosition ( const vector3 pos,
const vector3 rpy 
) [inline]

The method sets the initial states of the model.

Parameters:
posPosition in the earth-fixed coordinate frame.
rpyEuler ZYX orientation in the earth-fixed coordinate frame.

Definition at line 90 of file kinematic_model.h.

void labust::simulation::KinematicModel::setPosition ( const vector3 pos,
const quaternion quat 
) [inline]

The method sets the initial states of the model.

Parameters:
posPosition in the earth-fixed coordinate frame.
quatQuaternion orientation in the earth-fixed coordinate frame.

Definition at line 101 of file kinematic_model.h.

void labust::simulation::KinematicModel::setTs ( double  Ts) [inline]

Set the sampling time in seconds.

Definition at line 126 of file kinematic_model.h.

void KinematicModel::step ( const vector nu)

The method performs one simulation step. The model is propagated in time for one sampling period. To access states after the propagation use the accessor methods.

Parameters:
nuVector of linear and angular speeds.

Definition at line 53 of file kinematic_model.cpp.


Member Data Documentation

The external current disturbance in world coordinates.

Definition at line 132 of file kinematic_model.h.

The model sampling step.

Definition at line 126 of file kinematic_model.h.

Position and orientation state.

Definition at line 136 of file kinematic_model.h.

The initial position vector.

Definition at line 134 of file kinematic_model.h.

The orientation quaternion.

Definition at line 140 of file kinematic_model.h.

The initial quaternion vector.

Definition at line 138 of file kinematic_model.h.

The internal rpy representation.

Definition at line 142 of file kinematic_model.h.


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


labust_sim
Author(s): Gyula Nagy
autogenerated on Fri Aug 28 2015 11:22:38