]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/gsdi.hxx
GPS: fix bad init when far from any airport
[flightgear.git] / src / Instrumentation / gsdi.hxx
1 // gsdi.cxx - Ground Speed Drift Angle Indicator (known as GSDI or GSDA)
2 // Written by Melchior FRANZ, started 2006.
3 //
4 // Copyright (C) 2006  Melchior FRANZ - mfranz#aon:at
5 //
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License as
8 // published by the Free Software Foundation; either version 2 of the
9 // License, or (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful, but
12 // WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19
20 #ifndef __INSTRUMENTS_GSDI_HXX
21 #define __INSTRUMENTS_GSDI_HXX 1
22
23 #include <simgear/props/props.hxx>
24 #include <simgear/structure/subsystem_mgr.hxx>
25
26
27 /**
28  * Input properties:
29  *
30  * /instrumentation/gsdi/serviceable
31  * /orientation/heading-deg
32  * /velocities/uBody-fps
33  * /velocities/vBody-fps
34  * /environment/wind-from-heading-deg
35  * /environment/wind-speed-kt
36  *
37  * Output properties:
38  *
39  * /instrumentation/gsdi/drift-u-kt
40  * /instrumentation/gsdi/drift-v-kt
41  * /instrumentation/gsdi/drift-speed-kt
42  * /instrumentation/gsdi/drift-angle-deg
43  */
44 class GSDI : public SGSubsystem
45 {
46 public:
47         GSDI(SGPropertyNode *node);
48         virtual ~GSDI();
49
50         virtual void init();
51         virtual void update(double dt);
52
53 private:
54   std::string _name;
55         unsigned int _num;
56
57         SGPropertyNode_ptr _serviceableN;
58         SGPropertyNode_ptr _headingN;
59         SGPropertyNode_ptr _ubodyN;
60         SGPropertyNode_ptr _vbodyN;
61         SGPropertyNode_ptr _wind_speedN;
62         SGPropertyNode_ptr _wind_dirN;
63         SGPropertyNode_ptr _drift_uN;
64         SGPropertyNode_ptr _drift_vN;
65         SGPropertyNode_ptr _drift_speedN;
66         SGPropertyNode_ptr _drift_angleN;
67 };
68
69 #endif // _INSTRUMENTS_GSDI_HXX