1
0
Fork 0

Fixed compilation errors due to the synchronization of JSBSim

This commit is contained in:
Bertrand Coconnier 2018-09-15 17:00:27 +02:00
parent 6cc3d14032
commit 3889af3170
2 changed files with 11 additions and 11 deletions

View file

@ -254,7 +254,6 @@ CLASS DOCUMENTATION
* *
* - Linux (x86) * - Linux (x86)
* - Windows (MSVC, Cygwin, Mingwin) * - Windows (MSVC, Cygwin, Mingwin)
* - SGI (native compilers)
* - Mac OS X * - Mac OS X
* - FreeBSD * - FreeBSD
* *
@ -441,7 +440,8 @@ int real_main(int argc, char* argv[])
if (!FDMExec->GetPropertyManager()->GetNode(CommandLineProperties[i])) { if (!FDMExec->GetPropertyManager()->GetNode(CommandLineProperties[i])) {
cerr << endl << " No property by the name " << CommandLineProperties[i] << endl; cerr << endl << " No property by the name " << CommandLineProperties[i] << endl;
goto quit; delete FDMExec;
exit(-1);
} else { } else {
FDMExec->SetPropertyValue(CommandLineProperties[i], CommandLinePropertyValues[i]); FDMExec->SetPropertyValue(CommandLineProperties[i], CommandLinePropertyValues[i]);
} }
@ -455,10 +455,16 @@ int real_main(int argc, char* argv[])
// Dump the simulation state (position, orientation, etc.) // Dump the simulation state (position, orientation, etc.)
FDMExec->GetPropagate()->DumpState(); FDMExec->GetPropagate()->DumpState();
if (FDMExec->GetIC()->NeedTrim()) { // Perform trim if requested via the initialization file
trimmer = new JSBSim::FGTrim( FDMExec ); JSBSim::TrimMode icTrimRequested = (JSBSim::TrimMode)FDMExec->GetIC()->TrimRequested();
if (icTrimRequested != JSBSim::TrimMode::tNone) {
trimmer = new JSBSim::FGTrim( FDMExec, icTrimRequested );
try { try {
trimmer->DoTrim(); trimmer->DoTrim();
if (FDMExec->GetDebugLevel() > 0)
trimmer->Report();
delete trimmer; delete trimmer;
} catch (string& msg) { } catch (string& msg) {
cerr << endl << msg << endl << endl; cerr << endl << msg << endl << endl;
@ -542,9 +548,6 @@ int real_main(int argc, char* argv[])
} }
quit:
// PRINT ENDING CLOCK TIME // PRINT ENDING CLOCK TIME
time(&tod); time(&tod);
strftime(s, 99, "%A %B %d %Y %X", localtime(&tod)); strftime(s, 99, "%A %B %d %Y %X", localtime(&tod));
@ -767,4 +770,3 @@ void PrintHelp(void)
cout << " NOTE: There can be no spaces around the = sign when" << endl; cout << " NOTE: There can be no spaces around the = sign when" << endl;
cout << " an option is followed by a filename" << endl << endl; cout << " an option is followed by a filename" << endl << endl;
} }

View file

@ -1096,9 +1096,7 @@ void FGJSBsim::set_V_calibrated_kts(double vc)
fgic->SetVcalibratedKtsIC(vc); fgic->SetVcalibratedKtsIC(vc);
else { else {
double p=pressure->getDoubleValue(); double p=pressure->getDoubleValue();
double psl=fdmex->GetAtmosphere()->GetPressureSL(); double mach = FGJSBBase::MachFromVcalibrated(vc, p);
double rhosl=fdmex->GetAtmosphere()->GetDensitySL();
double mach = FGJSBBase::MachFromVcalibrated(vc, p, psl, rhosl);
double temp = 1.8*(temperature->getDoubleValue()+273.15); double temp = 1.8*(temperature->getDoubleValue()+273.15);
double soundSpeed = sqrt(1.4*1716.0*temp); double soundSpeed = sqrt(1.4*1716.0*temp);
FGColumnVector3 vUVW = Propagate->GetUVW(); FGColumnVector3 vUVW = Propagate->GetUVW();