X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FFDM%2FBalloon.cxx;h=9d7f19bad4d59d0664adb832b389187bf5ec2347;hb=e6c6c666c2d71fed0d1cd7176a793f8055bad14c;hp=dd5bc016d8f8580432532adc857e9bcbb6daa138;hpb=aabdd355f014ddefeee05c4f495ead1b47c1d18d;p=flightgear.git diff --git a/src/FDM/Balloon.cxx b/src/FDM/Balloon.cxx index dd5bc016d..9d7f19bad 100644 --- a/src/FDM/Balloon.cxx +++ b/src/FDM/Balloon.cxx @@ -37,6 +37,10 @@ HISTORY /* INCLUDES */ /****************************************************************************/ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #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) -void 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();