X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FFDM%2FSP%2FBalloon.cxx;h=ee517e53e7566a64832d13cd7b8590538170e558;hb=d66903e9ad63b91182ccc25d9bb82f18f8dd98b6;hp=62e4903b21584e93805c488d6c52ce3f649c521f;hpb=a40e040e24f8e3da171e59148b7344be51964815;p=flightgear.git diff --git a/src/FDM/SP/Balloon.cxx b/src/FDM/SP/Balloon.cxx index 62e4903b2..ee517e53e 100644 --- a/src/FDM/SP/Balloon.cxx +++ b/src/FDM/SP/Balloon.cxx @@ -50,12 +50,13 @@ HISTORY #include #include -#include #include
#include
+#include #include "Balloon.h" + /****************************************************************************/ /********************************** CODE ************************************/ /****************************************************************************/ @@ -80,31 +81,26 @@ void FGBalloonSim::init() { //now do init specific to the Balloon - sgVec3 temp; - SG_LOG( SG_FLIGHT, SG_INFO, "Starting initializing BalloonSim" ); SG_LOG( SG_FLIGHT, SG_INFO, " created a balloon" ); //set position - sgSetVec3( temp, - get_Latitude(), - get_Longitude(), - get_Altitude() * SG_FEET_TO_METER); + SGVec3f temp(get_Latitude(), + get_Longitude(), + get_Altitude() * SG_FEET_TO_METER); current_balloon.setPosition( temp ); //set Euler angles (?) - sgSetVec3( temp, - get_Phi(), - get_Theta(), - get_Psi() ); + temp = SGVec3f(get_Phi(), + get_Theta(), + get_Psi() ); current_balloon.setHPR( temp ); //set velocities - sgSetVec3( temp, - fgGetDouble("/sim/presets/uBody-fps"), - fgGetDouble("/sim/presets/vBody-fps"), - fgGetDouble("/sim/presets/wBody-fps") ); + temp = SGVec3f(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" ); @@ -178,13 +174,13 @@ bool FGBalloonSim::copy_to_BalloonSim() { // Convert from the BalloonSim to the FGInterface struct bool FGBalloonSim::copy_from_BalloonSim() { - sgVec3 temp; + SGVec3f temp; // Velocities current_balloon.getVelocity( temp ); _set_Velocities_Local( temp[0], temp[1], temp[2] ); - /* ***FIXME*** */ _set_V_equiv_kts( sgLengthVec3 ( temp ) ); + /* ***FIXME*** */ _set_V_equiv_kts( length( temp ) ); _set_Omega_Body( 0.0, 0.0, 0.0 );