X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FFDM%2FBalloon.cxx;h=211b7c6acf3747d06595175793943bf0062a988f;hb=ae1028b795c3a492844af468b574db8b18e97f98;hp=e5b2b619a0497040cb8ca312e1558f7c5b9ff876;hpb=1294aed4650ec2aacef27a7fdeb2f4e012516ca0;p=flightgear.git diff --git a/src/FDM/Balloon.cxx b/src/FDM/Balloon.cxx index e5b2b619a..211b7c6ac 100644 --- a/src/FDM/Balloon.cxx +++ b/src/FDM/Balloon.cxx @@ -47,7 +47,7 @@ HISTORY #include #include -#include +#include #include #include @@ -63,7 +63,7 @@ HISTORY // Initialize the BalloonSim flight model, dt is the time increment for // each subsequent iteration through the EOM -int FGBalloonSim::init( double dt ) { +bool FGBalloonSim::init( double dt ) { sgVec3 temp; FG_LOG( FG_FLIGHT, FG_INFO, "Starting initializing BalloonSim" ); @@ -96,12 +96,12 @@ int FGBalloonSim::init( double dt ) { FG_LOG( FG_FLIGHT, FG_INFO, "Finished initializing BalloonSim" ); - return 1; + return true; } // Run an iteration of the EOM (equations of motion) -int FGBalloonSim::update( int multiloop ) { +bool FGBalloonSim::update( int multiloop ) { double save_alt = 0.0; // lets try to avoid really screwing up the BalloonSim model @@ -151,18 +151,18 @@ int FGBalloonSim::update( int multiloop ) { set_Altitude( save_alt ); } - return 1; + return true; } // Convert from the FGInterface struct to the BalloonSim -int FGBalloonSim::copy_to_BalloonSim() { - return 1; +bool FGBalloonSim::copy_to_BalloonSim() { + return true; } // Convert from the BalloonSim to the FGInterface struct -int FGBalloonSim::copy_from_BalloonSim() { +bool FGBalloonSim::copy_from_BalloonSim() { sgVec3 temp; @@ -181,9 +181,9 @@ int FGBalloonSim::copy_from_BalloonSim() { double alt = temp[2] * METER_TO_FEET; double lat_geod, tmp_alt, sl_radius1, sl_radius2, tmp_lat_geoc; - fgGeocToGeod( lat_geoc, EQUATORIAL_RADIUS_M + alt * FEET_TO_METER, + sgGeocToGeod( lat_geoc, EQUATORIAL_RADIUS_M + alt * FEET_TO_METER, &lat_geod, &tmp_alt, &sl_radius1 ); - fgGeodToGeoc( lat_geod, alt * FEET_TO_METER, &sl_radius2, &tmp_lat_geoc ); + sgGeodToGeoc( lat_geod, alt * FEET_TO_METER, &sl_radius2, &tmp_lat_geoc ); FG_LOG( FG_FLIGHT, FG_DEBUG, "lon = " << lon << " lat_geod = " << lat_geod << " lat_geoc = " << lat_geoc @@ -198,7 +198,7 @@ int FGBalloonSim::copy_from_BalloonSim() { current_balloon.getHPR( temp ); set_Euler_Angles( temp[0], temp[1], temp[2] ); - + set_Euler_Rates(0,0,0); set_Alpha( 0.0/*FDMExec.GetTranslation()->Getalpha()*/ ); set_Beta( 0.0/*FDMExec.GetTranslation()->Getbeta()*/ ); @@ -213,7 +213,7 @@ int FGBalloonSim::copy_from_BalloonSim() { set_sin_cos_longitude( lon ); set_sin_cos_latitude( lat_geod ); - return 0; + return true; }