Larus glider flight sensor system 3.9.2024
Software-In-The-Loop test and validation system
Loading...
Searching...
No Matches
airborne_detector.h
Go to the documentation of this file.
1/***********************************************************************/
26#ifndef NAV_ALGORITHMS_AIRBORNE_DETECTOR_H_
27#define NAV_ALGORITHMS_AIRBORNE_DETECTOR_H_
28
31{
32public:
34 : just_landed( false),
35 airborne_counter( 0)
36 {}
38 {
39 if( yes)
40 {
41 if( airborne_counter < LEVEL)
42 ++ airborne_counter;
43 }
44 else
45 {
46 if( airborne_counter > 0)
47 {
48 --airborne_counter;
49 if( airborne_counter == 0)
50 just_landed = true;
51 }
52 }
53 }
55 {
56 if( just_landed)
57 {
58 just_landed = false;
59 airborne_counter=0;
60 return true;
61 }
62 return false;
63 }
64private:
65 enum { LEVEL = 200}; // 20s @ 10Hz
66 bool just_landed;
67 unsigned airborne_counter;
68};
69
70#endif /* NAV_ALGORITHMS_AIRBORNE_DETECTOR_H_ */
observation of the aircraft state (ground / flying)
void report_to_be_airborne(bool yes)
mathematical vector of arbitrary type and size
Definition vector.h:40