]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/Balloon.cxx
Fix from Dave to get JSBSim engine startups working again.
[flightgear.git] / src / FDM / Balloon.cxx
index 71ee91c7ef4bf3c5533fdee1acacd15092feb041..86e0f7156c3621874d0298eb55154b5f1ca3d739 100644 (file)
@@ -48,7 +48,7 @@ HISTORY
 #include <simgear/constants.h>
 #include <simgear/debug/logstream.hxx>
 #include <simgear/math/sg_geodesy.hxx>
-#include <simgear/misc/fgpath.hxx>
+#include <simgear/misc/sg_path.hxx>
 
 #include <Aircraft/aircraft.hxx>
 #include <Controls/controls.hxx>
@@ -75,11 +75,15 @@ FGBalloonSim::~FGBalloonSim() {
 // Initialize the BalloonSim flight model, dt is the time increment for
 // each subsequent iteration through the EOM
 void FGBalloonSim::init() {
+                               // explicitly call the superclass's
+                               // init method first.
+    FGInterface::init();
+
     sgVec3 temp;
 
-    FG_LOG( FG_FLIGHT, FG_INFO, "Starting initializing BalloonSim" );
+    SG_LOG( SG_FLIGHT, SG_INFO, "Starting initializing BalloonSim" );
 
-    FG_LOG( FG_FLIGHT, FG_INFO, "  created a balloon" );
+    SG_LOG( SG_FLIGHT, SG_INFO, "  created a balloon" );
 
     //set position
     sgSetVec3( temp,
@@ -97,12 +101,12 @@ void FGBalloonSim::init() {
 
     //set velocities
     sgSetVec3( temp,
-              fgGetDouble("/velocities/uBody"),
-              fgGetDouble("/velocities/vBody"),
-              fgGetDouble("/velocities/wBody") );
+              fgGetDouble("/velocities/uBody-fps"),
+              fgGetDouble("/velocities/vBody-fps"),
+              fgGetDouble("/velocities/wBody-fps") );
     current_balloon.setVelocity( temp );
 
-    FG_LOG( FG_FLIGHT, FG_INFO, "Finished initializing BalloonSim" );
+    SG_LOG( SG_FLIGHT, SG_INFO, "Finished initializing BalloonSim" );
 }
 
 
@@ -117,7 +121,7 @@ bool FGBalloonSim::update( int multiloop ) {
     }
 
     // set control positions
-    current_balloon.set_burner_strength ( controls.get_throttle(0) );
+    current_balloon.set_burner_strength ( globals->get_controls()->get_throttle(0) );
     //not more implemented yet
 
     // Inform BalloonSim of the local terrain altitude
@@ -146,7 +150,7 @@ bool FGBalloonSim::update( int multiloop ) {
     /*sgVec3 temp, temp2;
     current_balloon.getPosition( temp );
     current_balloon.getVelocity( temp2 );
-    FG_LOG( FG_FLIGHT, FG_INFO, "T: " << current_balloon.getTemperature() <<
+    SG_LOG( SG_FLIGHT, SG_INFO, "T: " << current_balloon.getTemperature() <<
                                " alt: " << temp[2] <<
                                " gr_alt: " << get_Runway_altitude() << 
                                " burner: " << controls.get_elevator() <<