LRAUV  revA
Trajectory Class Reference

This is a helper class for Depthcontrol, HeadingControl, and SpeedControl which projects the state of a variable forward into the future. More...

#include <Trajectory.h>

Public Member Functions

 Trajectory (bool periodic=true)
 
virtual ~Trajectory ()
 
float project (float x0, float dt, float xf, float xdotmax, float xdot2, bool debug=false)
 project: executes the trajectory generator for one time step inputs: xf is the final, or goal in radians xdotmax is the max desired rate (foo/sec) xdot2 is the acceleration rate (foo/sec2) outputs: the trajectory structure will have updated x and xdot elements More...
 
float getXDot () const
 
void setXDot (const float xDot)
 
float getX () const
 
void setX (float x0)
 

Protected Attributes

bool initialized_
 
float x_
 
float xDot_
 
bool periodic_
 

Detailed Description

This is a helper class for Depthcontrol, HeadingControl, and SpeedControl which projects the state of a variable forward into the future.

Constructor & Destructor Documentation

Trajectory::Trajectory ( bool  periodic = true)
Trajectory::~Trajectory ( )
virtual

Member Function Documentation

float Trajectory::getX ( ) const
inline

References x_.

Referenced by VerticalControl::overrideVertical().

float Trajectory::getXDot ( ) const
inline
float Trajectory::project ( float  x0,
float  dt,
float  xf,
float  xdotmax,
float  xdot2,
bool  debug = false 
)

project: executes the trajectory generator for one time step inputs: xf is the final, or goal in radians xdotmax is the max desired rate (foo/sec) xdot2 is the acceleration rate (foo/sec2) outputs: the trajectory structure will have updated x and xdot elements

References dt, initialized_, AuvMath::Limit(), AuvMath::ModPi(), periodic_, x_, and xDot_.

Referenced by VerticalControl::controlDepth(), HorizontalControl::headingControl(), PitchServo::run(), and DepthServo::run().

void Trajectory::setX ( float  x0)
inline

References x_.

Referenced by VerticalControl::controlDepth().

void Trajectory::setXDot ( const float  xDot)
inline

Member Data Documentation

bool Trajectory::initialized_
protected

Referenced by project().

bool Trajectory::periodic_
protected

Referenced by project().

float Trajectory::x_
protected

Referenced by getX(), project(), and setX().

float Trajectory::xDot_
protected

Referenced by getXDot(), project(), and setXDot().


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