LRT14  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 
10 {
11 public:
12  TrapezoidProfile(double maxV, double timeToMaxV);
13 
14  virtual double Update(double currentTime);
15  virtual void SetSetpoint(double setpoint, double time);
16  void UpdateValues(double maxV, double timeToMaxV);
17  double GetVelocity();
18  double GetOutput();
19 
20 private:
21  double m_maxV;
22  double m_timeToMaxV;
23  double m_accel;
24  double m_startingTime;
25  double m_setpoint;
26  double m_output;
27  double m_timeToMax;
28  double m_timeFromMax;
29  double m_timeTotal;
30  double m_lastTime;
31  double m_velocity;
32 };
33 
34 #endif