Flair
Framework Libre Air
TrajectoryGenerator1D.h
Go to the documentation of this file.
1 // %flair:license{
2 // This file is part of the Flair framework distributed under the
3 // CECILL-C License, Version 1.0.
4 // %flair:license}
13 #ifndef TRAJECTORYGENERATOR1D_H
14 #define TRAJECTORYGENERATOR1D_H
15 
16 #include <IODevice.h>
17 
18 namespace flair {
19 namespace core {
20 class cvmatrix;
21 }
22 namespace gui {
23 class LayoutPosition;
24 }
25 }
26 
27 class TrajectoryGenerator1D_impl;
28 
29 namespace flair {
30 namespace filter {
48 public:
62  TrajectoryGenerator1D(const gui::LayoutPosition *position, std::string name,
63  std::string unit = "");
64 
70 
79  void StartTraj(float startPosition, float endPosition,float startVelocity=0);
80 
85  void StopTraj(void);
86 
93  void Reset(void);
94 
100  bool IsRunning(void) const;
101 
107  void SetPositionOffset(float value);
108 
114  void SetSpeedOffset(float value);
115 
124  void Update(core::Time time);
125 
130  float Position(void) const;
131 
136  float Speed(void) const;
137 
143  core::cvmatrix *Matrix(void) const;
144 
145 private:
153  void UpdateFrom(const core::io_data *data){};
154 
155  TrajectoryGenerator1D_impl *pimpl_;
156 };
157 } // end namespace filter
158 } // end namespace flair
159 #endif // TRAJECTORYGENERATOR1D_H
Abstract class for data types.
Definition: io_data.h:94
Abstract class for input/ouput system.
Definition: IODevice.h:45
namespace of the flair Framework
Definition: Ahrs.h:19
Class defining a matrix of kind CvMat.
Definition: cvmatrix.h:33
core::cvmatrix * Matrix(void) const
Output matrix.
unsigned long long Time
Time definition, in ns.
Definition: Object.h:49
Abstract class for input/ouput system.
Class generating a trajectory in 1D.
Definition: TrajectoryGenerator1D.h:47
void StartTraj(float startPosition, float endPosition, float startVelocity=0)
Start trajectory.
float Speed(void) const
Speed.
float Position(void) const
Position.
void SetPositionOffset(float value)
Set position offset.
TrajectoryGenerator1D(const gui::LayoutPosition *position, std::string name, std::string unit="")
Constructor.
Class to define a position in a layout on the ground station.
Definition: LayoutPosition.h:28
void SetSpeedOffset(float value)
Set speed offset.
void StopTraj(void)
Stop trajectory.
bool IsRunning(void) const
Is trajectory running?
void Update(core::Time time)
Update using provided datas.