From 061a0ccd932a2d22c1b0d150b54b35db3ee22546 Mon Sep 17 00:00:00 2001 From: Erik Hofman Date: Mon, 8 Aug 2016 11:16:21 +0200 Subject: [PATCH] Use a bit less intrusive solution --- src/FDM/JSBSim/JSBSim.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/FDM/JSBSim/JSBSim.cxx b/src/FDM/JSBSim/JSBSim.cxx index dae6d4515..1ef8eca93 100644 --- a/src/FDM/JSBSim/JSBSim.cxx +++ b/src/FDM/JSBSim/JSBSim.cxx @@ -1055,12 +1055,12 @@ void FGJSBsim::set_Altitude(double alt) { SG_LOG(SG_FLIGHT,SG_INFO, "FGJSBsim::set_Altitude: " << alt ); - if (0){ // needTrim) { + if (needTrim) { FGLocation position = fgic->GetPosition(); position.SetPositionGeodetic(0.0, position.GetGeodLatitudeRad(), alt); fgic->SetAltitudeASLFtIC(position.GetAltitudeASL()); - fgic->SetLatitudeRadIC(position.GetLatitude()); +// fgic->SetLatitudeRadIC(position.GetLatitude()); } else Propagate->SetAltitudeASL(alt); @@ -1071,6 +1071,7 @@ void FGJSBsim::set_Altitude(double alt) void FGJSBsim::set_V_calibrated_kts(double vc) { SG_LOG(SG_FLIGHT,SG_INFO, "FGJSBsim::set_V_calibrated_kts: " << vc ); +printf("%s\n", __PRETTY_FUNCTION__); if (needTrim) fgic->SetVcalibratedKtsIC(vc); @@ -1095,6 +1096,7 @@ void FGJSBsim::set_V_calibrated_kts(double vc) void FGJSBsim::set_Mach_number(double mach) { SG_LOG(SG_FLIGHT,SG_INFO, "FGJSBsim::set_Mach_number: " << mach ); +printf("%s\n", __PRETTY_FUNCTION__); if (needTrim) fgic->SetMachIC(mach); @@ -1116,6 +1118,7 @@ void FGJSBsim::set_Velocities_Local( double north, double east, double down ) { SG_LOG(SG_FLIGHT,SG_INFO, "FGJSBsim::set_Velocities_Local: " << north << ", " << east << ", " << down ); +printf("%s\n", __PRETTY_FUNCTION__); if (needTrim) { fgic->SetVNorthFpsIC(north); @@ -1137,6 +1140,7 @@ void FGJSBsim::set_Velocities_Body( double u, double v, double w) { SG_LOG(SG_FLIGHT,SG_INFO, "FGJSBsim::set_Velocities_Body: " << u << ", " << v << ", " << w ); +printf("%s\n", __PRETTY_FUNCTION__); if (needTrim) { fgic->SetUBodyFpsIC(u); -- 2.39.5