From eb5a3ceee5ac47dcff22ca0bea930ad868c6dfaa Mon Sep 17 00:00:00 2001 From: tony Date: Sun, 24 Feb 2002 21:56:38 +0000 Subject: [PATCH] Workaround for terrain altitude problem. Helps but doesn't work 100% --- src/FDM/JSBSim/JSBSim.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/FDM/JSBSim/JSBSim.cxx b/src/FDM/JSBSim/JSBSim.cxx index 11e00bfb5..b4d125e19 100644 --- a/src/FDM/JSBSim/JSBSim.cxx +++ b/src/FDM/JSBSim/JSBSim.cxx @@ -244,15 +244,14 @@ FGJSBsim::update( int multiloop ) { copy_to_JSBsim(); trimmed->setBoolValue(false); + + if ( needTrim ) { if ( startup_trim->getBoolValue() ) { SG_LOG(SG_FLIGHT, SG_INFO, "Ready to trim, terrain altitude is: " << scenery.get_cur_elev() * SG_METER_TO_FEET ); - SG_LOG( SG_FLIGHT, SG_INFO, "position = " - << fgGetDouble("/position/longitude-deg") << ", " - << fgGetDouble("/position/latitude-deg") ); fgic->SetTerrainAltitudeFtIC( scenery.get_cur_elev() * SG_METER_TO_FEET ); do_trim(); } else { @@ -561,9 +560,6 @@ void FGJSBsim::set_Altitude(double alt) { fgic->SetTerrainAltitudeFtIC( scenery.get_cur_elev() * SG_METER_TO_FEET ); SG_LOG(SG_FLIGHT, SG_INFO, "Terrain altitude: " << scenery.get_cur_elev() * SG_METER_TO_FEET ); - SG_LOG( SG_FLIGHT, SG_INFO, "position = " - << fgGetDouble("/position/longitude-deg") << ", " - << fgGetDouble("/position/latitude-deg") ); fgic->SetLatitudeRadIC( lat_geoc ); fgic->SetAltitudeFtIC(alt); needTrim=true; @@ -672,8 +668,8 @@ void FGJSBsim::set_Density(double rho) { void FGJSBsim::set_Velocities_Local_Airmass (double wnorth, double weast, double wdown ) { - SG_LOG(SG_FLIGHT,SG_DEBUG, "FGJSBsim::set_Velocities_Local_Airmass: " - << wnorth << ", " << weast << ", " << wdown ); + //SG_LOG(SG_FLIGHT,SG_INFO, "FGJSBsim::set_Velocities_Local_Airmass: " + // << wnorth << ", " << weast << ", " << wdown ); _set_Velocities_Local_Airmass( wnorth, weast, wdown ); fgic->SetWindNEDFpsIC( wnorth, weast, wdown ); -- 2.39.5