From: Bertrand <bco...@us...> - 2016-06-12 09:09:05
|
Update of /cvsroot/jsbsim/JSBSim/src/initialization In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv27245 Modified Files: FGTrim.cpp Log Message: Skip the retracted landing gears during the trim on ground since it will lead to an incorrect solution once the simulation will restart. Index: FGTrim.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/src/initialization/FGTrim.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -r1.33 -r1.34 *** FGTrim.cpp 5 Jun 2016 15:23:02 -0000 1.33 --- FGTrim.cpp 12 Jun 2016 09:09:02 -0000 1.34 *************** *** 391,395 **** for (int i = 0; i < GroundReactions->GetNumGearUnits(); ++i) { ContactPoints c; ! c.location = GroundReactions->GetGearUnit(i)->GetBodyLocation(); FGLocation gearLoc = CGLocation.LocalToLocation(Tb2l * c.location); --- 391,401 ---- for (int i = 0; i < GroundReactions->GetNumGearUnits(); ++i) { ContactPoints c; ! FGLGear* gear = GroundReactions->GetGearUnit(i); ! ! // Skip the retracted landing gears ! if (!gear->GetGearUnitDown()) ! continue; ! ! c.location = gear->GetBodyLocation(); FGLocation gearLoc = CGLocation.LocalToLocation(Tb2l * c.location); *************** *** 403,407 **** if (height < hmin) { hmin = height; ! contactRef = i; } } --- 409,413 ---- if (height < hmin) { hmin = height; ! contactRef = contacts.size() - 1; } } |