source: flair-src/trunk/demos/SimpleFleet/uav/src/SimpleFleet.h@ 471

Last change on this file since 471 was 384, checked in by Sanahuja Guillaume, 4 years ago

update uav colors

File size: 2.2 KB
RevLine 
[33]1// created: 2015/11/05
2// filename: SimpleFleet.h
3//
4// author: Guillaume Sanahuja
5// Copyright Heudiasyc UMR UTC/CNRS 7253
6//
7// version: $Id: $
8//
9// purpose: demo fleet
10//
11//
12/*********************************************************************/
13
14#ifndef SIMPLEFLEET_H
15#define SIMPLEFLEET_H
16
17#include <UavStateMachine.h>
18
19namespace flair {
20 namespace core {
[178]21 class UdpSocket;
[33]22 class AhrsData;
23 }
24 namespace filter {
25 class TrajectoryGenerator2DCircle;
26 }
[122]27 namespace meta {
28 class MetaVrpnObject;
29 }
[33]30 namespace gui {
31 class DoubleSpinBox;
32 }
33}
34
35
36class SimpleFleet : public flair::meta::UavStateMachine {
37 public:
[122]38 SimpleFleet(std::string broadcast,flair::sensor::TargetController *controller);
[33]39 ~SimpleFleet();
40
41 private:
42 enum class BehaviourMode_t {
43 Default,
44 PositionHold1,
45 Circle1,
46 PositionHold2,
47 PositionHold3,
48 Circle2,
49 PositionHold4,
50 };
51
52// BehaviourMode_t orientation_state;
53 BehaviourMode_t behaviourMode;
54 bool vrpnLost;
55
56 void VrpnPositionHold(void);//flight mode
57 void StartCircle(void);
58 void StopCircle(void);
59 void ExtraTakeOff(void);
60 void ExtraSecurityCheck(void);
61 void ExtraCheckJoystick(void);
62 const flair::core::AhrsData *GetOrientation(void) const;
63 void AltitudeValues(float &z,float &dz) const;
[167]64 void PositionValues(flair::core::Vector2Df &pos_error,flair::core::Vector2Df &vel_error,float &yaw_ref);
[33]65 const flair::core::AhrsData *GetReferenceOrientation(void);
66 void SignalEvent(Event_t event);
67 void CheckMessages(void);
68
69 flair::filter::Pid *u_x, *u_y;
70
[167]71 flair::core::Vector2Df posHold;
[135]72 float yawHold;
[178]73 flair::core::UdpSocket *message;
[33]74 flair::core::Time posWait;
75
76 flair::filter::TrajectoryGenerator2DCircle *circle;
77 flair::gui::DoubleSpinBox *xCircleCenter,*yCircleCenter,*yDisplacement;
78 flair::core::AhrsData *customReferenceOrientation,*customOrientation;
[122]79 flair::meta::MetaVrpnObject *uavVrpn;
[33]80};
81
82#endif // SIMPLEFLEET_H
Note: See TracBrowser for help on using the repository browser.