LRT13  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator
TrapezoidProfile.h
1 #ifndef TRAPEZOID_PROFILE_H_
2 #define TRAPEZOID_PROFILE_H_
3 
4 #include "MotionProfile.h"
5 
6 class TrapezoidProfile : public MotionProfile
7 {
8 public:
9  TrapezoidProfile(double maxV, double timeToMaxV);
10 
11  virtual double update(double currentTime);
12  virtual void setSetpoint(double setpoint, double time);
13  void updateValues(double maxV, double timeToMaxV);
14  double getVelocity();
15  double getOutput();
16 
17 private:
18  double m_maxV;
19  double m_timeToMaxV;
20  double m_accel;
21  double m_startingTime;
22  double m_setpoint;
23  double m_output;
24  double m_timeToMax;
25  double m_timeFromMax;
26  double m_timeTotal;
27  double m_lastTime;
28  double m_velocity;
29 };
30 
31 #endif