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

Last change on this file since 317 was 178, checked in by Bayard Gildas, 7 years ago

Change Udp socket object name (from "Socket" to "UdpSocket")

File size: 2.2 KB
Line 
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 {
21 class FrameworkManager;
22 class UdpSocket;
23 class AhrsData;
24 }
25 namespace filter {
26 class TrajectoryGenerator2DCircle;
27 }
28 namespace meta {
29 class MetaVrpnObject;
30 }
31 namespace gui {
32 class DoubleSpinBox;
33 }
34}
35
36
37class SimpleFleet : public flair::meta::UavStateMachine {
38 public:
39 SimpleFleet(std::string broadcast,flair::sensor::TargetController *controller);
40 ~SimpleFleet();
41
42 private:
43 enum class BehaviourMode_t {
44 Default,
45 PositionHold1,
46 Circle1,
47 PositionHold2,
48 PositionHold3,
49 Circle2,
50 PositionHold4,
51 };
52
53// BehaviourMode_t orientation_state;
54 BehaviourMode_t behaviourMode;
55 bool vrpnLost;
56
57 void VrpnPositionHold(void);//flight mode
58 void StartCircle(void);
59 void StopCircle(void);
60 void ExtraTakeOff(void);
61 void ExtraSecurityCheck(void);
62 void ExtraCheckJoystick(void);
63 const flair::core::AhrsData *GetOrientation(void) const;
64 void AltitudeValues(float &z,float &dz) const;
65 void PositionValues(flair::core::Vector2Df &pos_error,flair::core::Vector2Df &vel_error,float &yaw_ref);
66 const flair::core::AhrsData *GetReferenceOrientation(void);
67 void SignalEvent(Event_t event);
68 void CheckMessages(void);
69
70 flair::filter::Pid *u_x, *u_y;
71
72 flair::core::Vector2Df posHold;
73 float yawHold;
74 flair::core::UdpSocket *message;
75 flair::core::Time posWait;
76
77 flair::filter::TrajectoryGenerator2DCircle *circle;
78 flair::gui::DoubleSpinBox *xCircleCenter,*yCircleCenter,*yDisplacement;
79 flair::core::AhrsData *customReferenceOrientation,*customOrientation;
80 flair::meta::MetaVrpnObject *uavVrpn;
81};
82
83#endif // SIMPLEFLEET_H
Note: See TracBrowser for help on using the repository browser.