]> git.mxchange.org Git - flightgear.git/blobdiff - src/Aircraft/aircraft.cxx
Fixes for default chase view values.
[flightgear.git] / src / Aircraft / aircraft.cxx
index 498a52968dbff272dfe450ea49ad77040c590c3c..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,22 +50,22 @@ void fgAircraftOutputCurrent(fgAIRCRAFT *a) {
 
     f = a->fdm_state;
 
-    FG_LOG( FG_FLIGHT, FG_DEBUG,
-           "Pos = ("
-           << (f->get_Longitude() * 3600.0 * RAD_TO_DEG) << "," 
-           << (f->get_Latitude()  * 3600.0 * RAD_TO_DEG) << ","
+    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() 
            << ")  (Phi,Theta,Psi)=("
            << f->get_Phi() << "," 
            << 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 ) );
 }