|
From: David C. <dp...@us...> - 2015-10-25 21:18:33
|
Update of /cvsroot/jsbsim/JSBSim/src In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv5256 Modified Files: FGFDMExec.h FGFDMExec.cpp Log Message: Added property to indicate trim completed. Index: FGFDMExec.h =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/src/FGFDMExec.h,v retrieving revision 1.101 retrieving revision 1.102 diff -C2 -r1.101 -r1.102 *** FGFDMExec.h 28 Sep 2015 20:50:41 -0000 1.101 --- FGFDMExec.h 25 Oct 2015 21:18:29 -0000 1.102 *************** *** 575,578 **** --- 575,581 ---- } + /** Retrieves the current frame count. */ + unsigned int GetFrame(void) const {return Frame;} + /** Retrieves the current debug level setting. */ int GetDebugLevel(void) const {return debug_lvl;}; *************** *** 626,629 **** --- 629,633 ---- int ta_mode; unsigned int ResetMode; + int trim_completed; FGScript* Script; Index: FGFDMExec.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/src/FGFDMExec.cpp,v retrieving revision 1.180 retrieving revision 1.181 diff -C2 -r1.180 -r1.181 *** FGFDMExec.cpp 28 Sep 2015 21:14:15 -0000 1.180 --- FGFDMExec.cpp 25 Oct 2015 21:18:29 -0000 1.181 *************** *** 160,163 **** --- 160,164 ---- trim_status = false; ta_mode = 99; + trim_completed = 0; Constructing = true; *************** *** 175,178 **** --- 176,180 ---- instance->Tie("simulation/jsbsim-debug", this, &FGFDMExec::GetDebugLevel, &FGFDMExec::SetDebugLevel); instance->Tie("simulation/frame", (int *)&Frame, false); + instance->Tie("simulation/trim-completed", (int *)&trim_completed, false); // simplex trim properties *************** *** 1178,1185 **** --- 1180,1189 ---- return; } + FGTrim trim(this, (JSBSim::TrimMode)mode); if ( !trim.DoTrim() ) cerr << endl << "Trim Failed" << endl << endl; trim.Report(); + trim_completed = 1; } *************** *** 1198,1201 **** --- 1202,1206 ---- Setsim_time(saved_time); std::cout << "dT: " << dT << std::endl; + trim_completed = 1; } |