]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATCDCL/ATC.hxx
CMake update for new KLN89 file.
[flightgear.git] / src / ATCDCL / ATC.hxx
index 8b05d6ca08293fd5c6a7ebdd764a8c8ca03fe457..e5ddcd0a9a97cd4502a6bb00f8859552052e4271 100644 (file)
 
 #include <simgear/constants.h>
 #include <simgear/compiler.h>
+#include <simgear/props/props.hxx>
 #include <simgear/misc/sgstream.hxx>
 #include <simgear/math/sg_geodesy.hxx>
 #include <simgear/debug/logstream.hxx>
+#include <simgear/structure/SGSharedPtr.hxx>
 
 #include <iosfwd>
 #include <string>
@@ -63,6 +65,8 @@ enum plane_type {
 // PlaneRec - a structure holding ATC-centric details of planes under control
 // This might move or change eventually
 struct PlaneRec {
+        PlaneRec() : type(UNKNOWN), squawkcode(0) {}
+        PlaneRec(const std::string& s) : type(UNKNOWN), callsign(s), squawkcode(0) {}
        plane_type type;
        std::string callsign;
        int squawkcode;
@@ -85,6 +89,7 @@ const int ATC_NUM_TYPES = 1 + INVALID;
 
 // DCL - new experimental ATC data store
 struct ATCData {
+        ATCData() : type(INVALID), cart(0, 0, 0), freq(0), range(0) {}
        atc_type type;
        SGGeod geod;
        SGVec3d cart;
@@ -97,6 +102,7 @@ struct ATCData {
 // perhaps we could use an FGRunway instead of this.
 // That wouldn't cache the orthopos though.
 struct RunwayDetails {
+        RunwayDetails() : end1ortho(0, 0, 0), end2ortho(0, 0, 0), hdg(0), length(-1), width(-1) {}
        SGGeod threshold_pos;
        SGVec3d end1ortho;      // ortho projection end1 (the threshold ATM)
        SGVec3d end2ortho;      // ortho projection end2 (the take off end in the current hardwired scheme)
@@ -212,7 +218,7 @@ protected:
        bool _voiceOK;  // Flag - true if at least one voice has loaded OK
        FGATCVoice* _vPtr;
 
-       SGSampleGroup *_sgr; // default sample group;
+       SGSharedPtr<SGSampleGroup> _sgr; // default sample group;
 
        
        bool freqClear; // Flag to indicate if the frequency is clear of ongoing dialog
@@ -246,6 +252,11 @@ private:
        bool _transmitting;     // we are transmitting
        double _counter;
        double _max_count;
+
+       SGPropertyNode_ptr _volume;
+       SGPropertyNode_ptr _enabled;
+       SGPropertyNode_ptr _atc_external;
+       SGPropertyNode_ptr _internal;
 };
 
 std::istream& operator>> ( std::istream& fin, ATCData& a );