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 Matrix;
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 
131  float Position(void) const;
132 
138  float Speed(void) const;
139 
147  float GetPercentageOfCompletion(void) const;
148 
154  core::Matrix *GetMatrix(void) const;
155 
156 private:
164  void UpdateFrom(const core::io_data *data){};
165 
166  TrajectoryGenerator1D_impl *pimpl_;
167 };
168 } // end namespace filter
169 } // end namespace flair
170 #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
unsigned long long Time
Time definition, in ns.
Definition: Object.h:55
Abstract class for input/ouput system.
core::Matrix * GetMatrix(void) const
Output matrix.
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.
Class defining a matrix.
Definition: Matrix.h:31
void StopTraj(void)
Stop trajectory.
bool IsRunning(void) const
Is trajectory running?
void Update(core::Time time)
Update using provided datas.
float GetPercentageOfCompletion(void) const
Get percentage of completion.