1
0
Fork 0

Use a bit less intrusive solution

This commit is contained in:
Erik Hofman 2016-08-08 11:16:21 +02:00
parent 02d037d205
commit fa99be7766

View file

@ -1055,12 +1055,12 @@ void FGJSBsim::set_Altitude(double alt)
{ {
SG_LOG(SG_FLIGHT,SG_INFO, "FGJSBsim::set_Altitude: " << alt ); SG_LOG(SG_FLIGHT,SG_INFO, "FGJSBsim::set_Altitude: " << alt );
if (0){ // needTrim) { if (needTrim) {
FGLocation position = fgic->GetPosition(); FGLocation position = fgic->GetPosition();
position.SetPositionGeodetic(0.0, position.GetGeodLatitudeRad(), alt); position.SetPositionGeodetic(0.0, position.GetGeodLatitudeRad(), alt);
fgic->SetAltitudeASLFtIC(position.GetAltitudeASL()); fgic->SetAltitudeASLFtIC(position.GetAltitudeASL());
fgic->SetLatitudeRadIC(position.GetLatitude()); // fgic->SetLatitudeRadIC(position.GetLatitude());
} }
else else
Propagate->SetAltitudeASL(alt); Propagate->SetAltitudeASL(alt);
@ -1071,6 +1071,7 @@ void FGJSBsim::set_Altitude(double alt)
void FGJSBsim::set_V_calibrated_kts(double vc) void FGJSBsim::set_V_calibrated_kts(double vc)
{ {
SG_LOG(SG_FLIGHT,SG_INFO, "FGJSBsim::set_V_calibrated_kts: " << vc ); SG_LOG(SG_FLIGHT,SG_INFO, "FGJSBsim::set_V_calibrated_kts: " << vc );
printf("%s\n", __PRETTY_FUNCTION__);
if (needTrim) if (needTrim)
fgic->SetVcalibratedKtsIC(vc); fgic->SetVcalibratedKtsIC(vc);
@ -1095,6 +1096,7 @@ void FGJSBsim::set_V_calibrated_kts(double vc)
void FGJSBsim::set_Mach_number(double mach) void FGJSBsim::set_Mach_number(double mach)
{ {
SG_LOG(SG_FLIGHT,SG_INFO, "FGJSBsim::set_Mach_number: " << mach ); SG_LOG(SG_FLIGHT,SG_INFO, "FGJSBsim::set_Mach_number: " << mach );
printf("%s\n", __PRETTY_FUNCTION__);
if (needTrim) if (needTrim)
fgic->SetMachIC(mach); 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: " SG_LOG(SG_FLIGHT,SG_INFO, "FGJSBsim::set_Velocities_Local: "
<< north << ", " << east << ", " << down ); << north << ", " << east << ", " << down );
printf("%s\n", __PRETTY_FUNCTION__);
if (needTrim) { if (needTrim) {
fgic->SetVNorthFpsIC(north); 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: " SG_LOG(SG_FLIGHT,SG_INFO, "FGJSBsim::set_Velocities_Body: "
<< u << ", " << v << ", " << w ); << u << ", " << v << ", " << w );
printf("%s\n", __PRETTY_FUNCTION__);
if (needTrim) { if (needTrim) {
fgic->SetUBodyFpsIC(u); fgic->SetUBodyFpsIC(u);