]> git.mxchange.org Git - flightgear.git/commitdiff
Use a bit less intrusive solution
authorErik Hofman <erik@ehofman.com>
Mon, 8 Aug 2016 09:16:21 +0000 (11:16 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 22 Sep 2016 21:27:48 +0000 (23:27 +0200)
src/FDM/JSBSim/JSBSim.cxx

index dae6d451515a074b2cf71f25d0bd9863194edf88..1ef8eca9337668b056fa46a13a10f85254fec2f8 100644 (file)
@@ -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);