]> git.mxchange.org Git - flightgear.git/blobdiff - src/Aircraft/aircraft.cxx
Fixes for default chase view values.
[flightgear.git] / src / Aircraft / aircraft.cxx
index 2de2265ee834653da49de96803a7c150ed04bdc2..886cc149d93170d141159758c9d443a565794c11 100644 (file)
@@ -26,6 +26,8 @@
 #include <simgear/constants.h>
 #include <simgear/debug/logstream.hxx>
 
+#include <Main/globals.hxx>
+
 #include "aircraft.hxx"
 
 // This is a record containing all the info for the aircraft currently
@@ -35,10 +37,10 @@ fgAIRCRAFT current_aircraft;
 
 // Initialize an Aircraft structure
 void fgAircraftInit( void ) {
-    FG_LOG( FG_AIRCRAFT, FG_INFO, "Initializing Aircraft structure" );
+    SG_LOG( SG_AIRCRAFT, SG_INFO, "Initializing Aircraft structure" );
 
     current_aircraft.fdm_state   = cur_fdm_state;
-    current_aircraft.controls = &controls;
+    current_aircraft.controls = globals->get_controls();
 }
 
 
@@ -48,8 +50,8 @@ void fgAircraftOutputCurrent(fgAIRCRAFT *a) {
 
     f = a->fdm_state;
 
-    FG_LOG( FG_FLIGHT, FG_DEBUG,
-           "Pos = ("
+    SG_LOG( SG_FLIGHT, SG_DEBUG,
+            "Pos = ("
            << (f->get_Longitude() * 3600.0 * SGD_RADIANS_TO_DEGREES) << "," 
            << (f->get_Latitude()  * 3600.0 * SGD_RADIANS_TO_DEGREES) << ","
            << f->get_Altitude() 
@@ -58,12 +60,12 @@ void fgAircraftOutputCurrent(fgAIRCRAFT *a) {
            << f->get_Theta() << "," 
            << f->get_Psi() << ")" );
 
-    FG_LOG( FG_FLIGHT, FG_DEBUG,
+    SG_LOG( SG_FLIGHT, SG_DEBUG,
            "Kts = " << f->get_V_equiv_kts() 
-           << "  Elev = " << controls.get_elevator() 
-           << "  Aileron = " << controls.get_aileron() 
-           << "  Rudder = " << controls.get_rudder() 
-           << "  Power = " << controls.get_throttle( 0 ) );
+           << "  Elev = " << globals->get_controls()->get_elevator() 
+           << "  Aileron = " << globals->get_controls()->get_aileron() 
+           << "  Rudder = " << globals->get_controls()->get_rudder() 
+           << "  Power = " << globals->get_controls()->get_throttle( 0 ) );
 }