]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/tcas.hxx
Performance optimization
[flightgear.git] / src / Instrumentation / tcas.hxx
index 6672eb83f2edb6f4f3fb2d383ed4e196b4fbe188..f44faf3985ecca5c1421671f958274bc66e5f157 100644 (file)
@@ -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
@@ -28,9 +28,8 @@
 #include <map>
 
 #include <simgear/props/props.hxx>
-#include <simgear/sound/sample_openal.hxx>
 #include <simgear/structure/subsystem_mgr.hxx>
-#include "mk_viii.hxx" // FGVoicePlayer only
+#include <Sound/voiceplayer.hxx>
 
 using std::vector;
 using std::deque;
@@ -141,41 +140,13 @@ class TCAS : public SGSubsystem
     {
         double lat;
         double lon;
-        float  altFt;
+        float  pressureAltFt;
+        float  radarAltFt;
         float  heading;
         float  velocityKt;
         float  verticalFps;
     } LocalInfo; /*< info structure for local aircraft */
 
-//    /////////////////////////////////////////////////////////////////////////////
-//    // TCAS::Timer //////////////////////////////////////////////////////////////
-//    /////////////////////////////////////////////////////////////////////////////
-//
-//    class Timer
-//    {
-//        double start_time;
-//
-//    public:
-//        bool   running;
-//
-//        inline Timer ()
-//          : running(false) {}
-//
-//        inline void start () { running = true; start_time = globals->get_sim_time_sec(); }
-//        inline void stop ()  { running = false; }
-//        inline double elapsed () const { assert(running); return globals->get_sim_time_sec() - start_time; }
-//        inline double start_or_elapsed ()
-//        {
-//            if (running)
-//                return elapsed();
-//            else
-//            {
-//                start();
-//                return 0;
-//            }
-//        }
-//    };
-
     /////////////////////////////////////////////////////////////////////////////
     // TCAS::PropertiesHandler ///////////////////////////////////////////////
     /////////////////////////////////////////////////////////////////////////////
@@ -354,8 +325,12 @@ class TCAS : public SGSubsystem
         void  horizontalThreat    (float bearing, float distanceNm, float heading,
                                    float velocityKt);
 
-        void  setAlt              (float altFt) { self.altFt = altFt;}
-        float getAlt              (void)        { return self.altFt;}
+        void  setPressureAlt      (float altFt) { self.pressureAltFt = altFt;}
+        float getPressureAlt      (void)        { return self.pressureAltFt;}
+
+        void  setRadarAlt         (float altFt) { self.radarAltFt = altFt;}
+        float getRadarAlt         (void)        { return self.radarAltFt;}
+
         float getVelocityKt       (void)        { return self.velocityKt;}
         int   getRASense          (void)        { return currentThreat.RASense;}
 
@@ -370,7 +345,8 @@ class TCAS : public SGSubsystem
 
         SGPropertyNode_ptr nodeLat;
         SGPropertyNode_ptr nodeLon;
-        SGPropertyNode_ptr nodeAlt;
+        SGPropertyNode_ptr nodePressureAlt;
+        SGPropertyNode_ptr nodeRadarAlt;
         SGPropertyNode_ptr nodeHeading;
         SGPropertyNode_ptr nodeVelocity;
         SGPropertyNode_ptr nodeVerticalFps;