LRAUV  revA
Trajectory.h
Go to the documentation of this file.
1 
9 #ifndef TRAJECTORY_H_
10 #define TRAJECTORY_H_
11 
19 {
20 public:
21  Trajectory( bool periodic = true );
22  virtual ~Trajectory();
23 
24  // Executes the trajectory generator for one time step
25  float project( float x0, float dt, float xf, float xdotmax, float xdot2, bool debug = false );
26 
27  float getXDot() const
28  {
29  return xDot_;
30  }
31 
32  void setXDot( const float xDot )
33  {
34  xDot_ = xDot;
35  }
36 
37  float getX() const
38  {
39  return x_;
40  }
41 
42  void setX( float x0 )
43  {
44  x_ = x0;
45  }
46 
47 protected:
49  float x_;
50  float xDot_;
51  bool periodic_;
52 
53 };
54 
55 #endif /* TRAJECTORY_H_ */
virtual ~Trajectory()
Definition: Trajectory.cpp:23
bool initialized_
Definition: Trajectory.h:48
This is a helper class for Depthcontrol, HeadingControl, and SpeedControl which projects the state of...
Definition: Trajectory.h:18
void setX(float x0)
Definition: Trajectory.h:42
float getX() const
Definition: Trajectory.h:37
bool periodic_
Definition: Trajectory.h:51
Trajectory(bool periodic=true)
Definition: Trajectory.cpp:16
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
Definition: Trajectory.cpp:33
float xDot_
Definition: Trajectory.h:50
float getXDot() const
Definition: Trajectory.h:27
void setXDot(const float xDot)
Definition: Trajectory.h:32
float x_
Definition: Trajectory.h:49
*uLong * dt
Definition: ZipEncoder.cpp:36