Flair
Framework Libre Air
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties
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 
77  void StartTraj(float start_pos, float end_pos);
78 
83  void StopTraj(void);
84 
91  void Reset(void);
92 
98  bool IsRunning(void) const;
99 
105  void SetPositionOffset(float value);
106 
112  void SetSpeedOffset(float value);
113 
122  void Update(core::Time time);
123 
128  float Position(void) const;
129 
134  float Speed(void) const;
135 
141  core::cvmatrix *Matrix(void) const;
142 
143 private:
151  void UpdateFrom(const core::io_data *data){};
152 
153  TrajectoryGenerator1D_impl *pimpl_;
154 };
155 } // end namespace filter
156 } // end namespace flair
157 #endif // TRAJECTORYGENERATOR1D_H
Abstract class for data types.
Definition: io_data.h:77
Abstract class for input/ouput system.
Definition: IODevice.h:44
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 start_pos, float end_pos)
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.