]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/Balloon.cxx
I forgot a linker dependency. It really si time to figure out why these are all needed.
[flightgear.git] / src / FDM / Balloon.cxx
index 6790df396ce5fc2042f118fecacc350a024dab60..9d7f19bad4d59d0664adb832b389187bf5ec2347 100644 (file)
@@ -37,6 +37,10 @@ HISTORY
 /* INCLUDES                                                                */
 /****************************************************************************/
 
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
 #include <simgear/compiler.h>
 
 #ifdef SG_MATH_EXCEPTION_CLASH
@@ -103,9 +107,9 @@ void FGBalloonSim::init() {
 
     //set velocities
     sgSetVec3( temp,
-              fgGetDouble("/velocities/uBody-fps"),
-              fgGetDouble("/velocities/vBody-fps"),
-              fgGetDouble("/velocities/wBody-fps") );
+              fgGetDouble("/sim/presets/uBody-fps"),
+              fgGetDouble("/sim/presets/vBody-fps"),
+              fgGetDouble("/sim/presets/wBody-fps") );
     current_balloon.setVelocity( temp );
 
     SG_LOG( SG_FLIGHT, SG_INFO, "Finished initializing BalloonSim" );
@@ -113,9 +117,14 @@ void FGBalloonSim::init() {
 
 
 // Run an iteration of the EOM (equations of motion)
-bool FGBalloonSim::update( int multiloop ) {
+void FGBalloonSim::update( double dt ) {
     double save_alt = 0.0;
 
+    if (is_suspended())
+      return;
+
+    int multiloop = _calc_multiloop(dt);
+
     // lets try to avoid really screwing up the BalloonSim model
     if ( get_Altitude() < -9000 ) {
        save_alt = get_Altitude();
@@ -162,8 +171,6 @@ bool FGBalloonSim::update( int multiloop ) {
     if ( save_alt < -9000.0 ) {
        set_Altitude( save_alt );
     }
-
-    return true;
 }