]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/gps.hxx
Don't start paused for in air starts.
[flightgear.git] / src / Instrumentation / gps.hxx
1 // gps.hxx - distance-measuring equipment.
2 // Written by David Megginson, started 2003.
3 //
4 // This file is in the Public Domain and comes with no warranty.
5
6
7 #ifndef __INSTRUMENTS_GPS_HXX
8 #define __INSTRUMENTS_GPS_HXX 1
9
10 #ifndef __cplusplus
11 # error This library requires C++
12 #endif
13
14 #include <simgear/misc/props.hxx>
15 #include <Main/fgfs.hxx>
16
17
18 /**
19  * Model a GPS radio.
20  *
21  * Input properties:
22  *
23  * /position/longitude-deg
24  * /position/latitude-deg
25  * /position/altitude-ft
26  * /environment/magnetic-variation-deg
27  * /systems/electrical/outputs/gps
28  * /instrumentation/gps/serviceable
29  *
30  * Output properties:
31  *
32  * /instrumentation/gps/indicated-longitude-deg
33  * /instrumentation/gps/indicated-latitude-deg
34  * /instrumentation/gps/indicated-altitude-ft
35  * /instrumentation/gps/indicated-track-true-deg
36  * /instrumentation/gps/indicated-track-magnetic-deg
37  * /instrumentation/gps/indicated-ground-speed-kt
38  */
39 class GPS : public FGSubsystem
40 {
41
42 public:
43
44     GPS ();
45     virtual ~GPS ();
46
47     virtual void init ();
48     virtual void update (double delta_time_sec);
49
50 private:
51
52     void search (double frequency, double longitude_rad,
53                  double latitude_rad, double altitude_m);
54
55     SGPropertyNode_ptr _longitude_node;
56     SGPropertyNode_ptr _latitude_node;
57     SGPropertyNode_ptr _altitude_node;
58     SGPropertyNode_ptr _magvar_node;
59     SGPropertyNode_ptr _serviceable_node;
60     SGPropertyNode_ptr _electrical_node;
61
62     SGPropertyNode_ptr _raim_node;
63     SGPropertyNode_ptr _indicated_longitude_node;
64     SGPropertyNode_ptr _indicated_latitude_node;
65     SGPropertyNode_ptr _indicated_altitude_node;
66     SGPropertyNode_ptr _true_track_node;
67     SGPropertyNode_ptr _magnetic_track_node;
68     SGPropertyNode_ptr _speed_node;
69
70     bool _last_valid;
71     double _last_longitude_deg;
72     double _last_latitude_deg;
73     double _last_altitude_m;
74
75 };
76
77
78 #endif // __INSTRUMENTS_GPS_HXX