X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Ftcas.hxx;h=97fae4f374b1d2192c4d67c18716a253ebcdc233;hb=f04d5f8758ef4b5524a9396a84351bf86db6763e;hp=fe8dda26be4b9aa2b95f6cd0b47b09c46b1662a9;hpb=9c04b2c1adb8a5a9a01a9599a849493cd02ad7b5;p=flightgear.git diff --git a/src/Instrumentation/tcas.hxx b/src/Instrumentation/tcas.hxx index fe8dda26b..97fae4f37 100644 --- a/src/Instrumentation/tcas.hxx +++ b/src/Instrumentation/tcas.hxx @@ -16,7 +16,7 @@ // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef __INSTRUMENTS_TCAS_HXX #define __INSTRUMENTS_TCAS_HXX @@ -114,7 +114,7 @@ class TCAS : public SGSubsystem typedef struct { - string callsign; + std::string callsign; bool verticalTA; bool verticalRA; bool horizontalTA; @@ -134,7 +134,7 @@ class TCAS : public SGSubsystem double RAtimestamp; } TrackerTarget; - typedef map TrackerTargets; + typedef map TrackerTargets; typedef struct { @@ -153,11 +153,9 @@ class TCAS : public SGSubsystem class PropertiesHandler : public FGVoicePlayer::PropertiesHandler { - TCAS *tcas; - public: - PropertiesHandler (TCAS *device) : - FGVoicePlayer::PropertiesHandler(), tcas(device) {} + PropertiesHandler (TCAS *) : + FGVoicePlayer::PropertiesHandler() {} PropertiesHandler (void) : FGVoicePlayer::PropertiesHandler() {} }; @@ -238,6 +236,7 @@ class TCAS : public SGSubsystem void bind (SGPropertyNode* node); void init (void); + void reinit (void); void update (int mode); void clear (void); @@ -263,15 +262,14 @@ class TCAS : public SGSubsystem void update (void); - void add (const string callsign, int detectedLevel); + void add (const std::string callsign, int detectedLevel); bool active (void) { return haveTargets;} bool newTraffic (void) { return newTargets;} - bool isTracked (string callsign) { if (!haveTargets) return false;else return _isTracked(callsign);} - bool _isTracked (string callsign); - int getThreatLevel (string callsign); + bool isTracked (std::string callsign) { if (!haveTargets) return false;else return _isTracked(callsign);} + bool _isTracked (std::string callsign); + int getThreatLevel (std::string callsign); private: - TCAS* tcas; double currentTime; bool haveTargets; bool newTargets; @@ -341,8 +339,10 @@ class TCAS : public SGSubsystem static const SensitivityLevel sensitivityLevels[]; TCAS* tcas; +#ifdef FEATURE_TCAS_DEBUG_THREAT_DETECTOR int checkCount; - +#endif // of FEATURE_TCAS_DEBUG_THREAT_DETECTOR + SGPropertyNode_ptr nodeLat; SGPropertyNode_ptr nodeLon; SGPropertyNode_ptr nodePressureAlt; @@ -357,7 +357,7 @@ class TCAS : public SGSubsystem }; private: - string name; + std::string name; int num; double nextUpdateTime; int selfTestStep; @@ -385,6 +385,7 @@ public: virtual void bind (void); virtual void unbind (void); virtual void init (void); + virtual void reinit (void); virtual void update (double dt); };