]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/cockpit.cxx
Propogate colocated dme flag.
[flightgear.git] / src / Cockpit / cockpit.cxx
index 648c0a83e282e7f14fab19bc3d524ce69a3401c0..4b381f3714ea671eda5cb3fd781adf0eee9d6abd 100644 (file)
 #endif
 
 #include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl/xgl.h>
 
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 
+#include <simgear/constants.h>
+#include <simgear/debug/logstream.hxx>
+#include <simgear/math/fg_random.h>
+#include <simgear/math/polar3d.hxx>
+
 #include <Aircraft/aircraft.hxx>
-#include <Debug/logstream.hxx>
-#include <Include/fg_constants.h>
 #include <Include/general.hxx>
 #include <Main/options.hxx>
 #include <Main/views.hxx>
-#include <Math/fg_random.h>
-#include <Math/mat3.h>
-#include <Math/polar3d.hxx>
 #include <Scenery/scenery.hxx>
 #include <Time/fg_timer.hxx>
 #include <Time/fg_time.hxx>
@@ -109,8 +109,8 @@ get_formated_gmt_time( void )
     static char buf[32];
     FGTime *t = FGTime::cur_time_params;
     const struct tm *p = t->getGmt();
-    sprintf( buf, "%d/%d/%2d %d:%02d:%02d", 
-         p->tm_mon+1, p->tm_mday, p->tm_year,
+    sprintf( buf, "%d/%d/%4d %d:%02d:%02d", 
+         p->tm_mon+1, p->tm_mday, 1900 + p->tm_year,
          p->tm_hour, p->tm_min, p->tm_sec);
     return buf;
 }
@@ -161,10 +161,17 @@ float get_rudderval( void )
 float get_speed( void )
 {
     // Make an explicit function call.
-    float speed = current_aircraft.fdm_state->get_V_equiv_kts();
+    float speed = current_aircraft.fdm_state->get_V_calibrated_kts()
+       * current_options.get_speed_up();
     return( speed );
 }
 
+float get_mach(void)
+{
+       float mach=current_aircraft.fdm_state->get_Mach_number();
+       return mach;
+}      
+
 float get_aoa( void )
 {
     float aoa = current_aircraft.fdm_state->get_Alpha() * RAD_TO_DEG;
@@ -452,10 +459,6 @@ bool fgCockpitInit( fgAIRCRAFT *cur_aircraft )
     fgHUDInit( cur_aircraft );
     ac_cockpit = new fg_Cockpit();
     
-    if ( current_options.get_panel_status() ) {
-        new FGPanel;
-    }
-
     // Have to set the LatLon display type
     fgLatLonFormat = toDM;
     
@@ -526,11 +529,7 @@ void fgCockpitUpdate( void ) {
     }
 #endif // #ifdef DISPLAY_COUNTER
     
-    if( current_options.get_panel_status() && 
-         (fabs( current_view.get_view_offset() ) < 0.2) )
-    {
-        xglViewport( 0, 0, iwidth, iheight );
+    xglViewport( 0, 0, iwidth, iheight );
 
-        FGPanel::OurPanel->Update();
-    }
+    current_panel->update();
 }