Flair
Framework Libre Air
TrajectoryGenerator2DCircle.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 TRAJECTORYGENERATOR2DCIRCLE_H
14 #define TRAJECTORYGENERATOR2DCIRCLE_H
15 
16 #include <IODevice.h>
17 #include <Vector2D.h>
18 
19 namespace flair {
20 namespace core {
21 class Matrix;
22 }
23 namespace gui {
24 class LayoutPosition;
25 }
26 }
27 
28 class TrajectoryGenerator2DCircle_impl;
29 
30 namespace flair {
31 namespace filter {
47 public:
60  std::string name);
61 
67 
74  void StartTraj(const core::Vector2Df &start_pos, float nb_lap = -1);
75 
81  void StopTraj(void);
82 
88  void FinishTraj(void);
89 
95  void SetCenter(const core::Vector2Df &value);
96 
102  void SetCenterSpeed(const core::Vector2Df &value);
103 
112  void Update(core::Time time);
113 
119  void GetPosition(core::Vector2Df &point) const;
120 
126  void GetSpeed(core::Vector2Df &point) const;
127 
133  core::Matrix *GetMatrix(void) const;
134 
140  bool IsRunning(void) const;
141 
142 private:
150  void UpdateFrom(const core::io_data *data){};
151 
152  TrajectoryGenerator2DCircle_impl *pimpl_;
153 };
154 } // end namespace filter
155 } // end namespace flair
156 #endif // TRAJECTORYGENERATOR2DCIRCLE_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 2D vector.
Definition: Vector2D.h:24
unsigned long long Time
Time definition, in ns.
Definition: Object.h:55
Class defining a 2D vector.
void SetCenter(const core::Vector2Df &value)
Set center position.
Abstract class for input/ouput system.
void StopTraj(void)
Stop trajectory.
void StartTraj(const core::Vector2Df &start_pos, float nb_lap=-1)
Start trajectory.
Class generating a circle trajectory in 2D.
Definition: TrajectoryGenerator2DCircle.h:46
TrajectoryGenerator2DCircle(const gui::LayoutPosition *position, std::string name)
Constructor.
void GetPosition(core::Vector2Df &point) const
Position.
core::Matrix * GetMatrix(void) const
Output matrix.
void GetSpeed(core::Vector2Df &point) const
Speed.
bool IsRunning(void) const
Is trajectory running?
void Update(core::Time time)
Update using provided datas.
Class to define a position in a layout on the ground station.
Definition: LayoutPosition.h:28
void FinishTraj(void)
Finish trajectory.
void SetCenterSpeed(const core::Vector2Df &value)
Set center speed.
Class defining a matrix.
Definition: Matrix.h:31