From: Bertrand <bco...@us...> - 2016-05-01 18:26:00
|
Update of /cvsroot/jsbsim/JSBSim/src/models In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv4123/src/models Modified Files: FGPropagate.cpp Log Message: Prevent the integrators from continuing to accumulate while the simulation is suspended. Index: FGPropagate.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/src/models/FGPropagate.cpp,v retrieving revision 1.130 retrieving revision 1.131 diff -C2 -r1.130 -r1.131 *** FGPropagate.cpp 16 Apr 2016 12:24:39 -0000 1.130 --- FGPropagate.cpp 1 May 2016 18:25:57 -0000 1.131 *************** *** 223,230 **** // Propagate rotational / translational velocity, angular /translational position, respectively. ! Integrate(VState.qAttitudeECI, VState.vQtrndot, VState.dqQtrndot, dt, integrator_rotational_position); ! Integrate(VState.vPQRi, in.vPQRidot, VState.dqPQRidot, dt, integrator_rotational_rate); ! Integrate(VState.vInertialPosition, VState.vInertialVelocity, VState.dqInertialVelocity, dt, integrator_translational_position); ! Integrate(VState.vInertialVelocity, in.vUVWidot, VState.dqUVWidot, dt, integrator_translational_rate); // CAUTION : the order of the operations below is very important to get transformation --- 223,232 ---- // Propagate rotational / translational velocity, angular /translational position, respectively. ! if (!FDMExec->IntegrationSuspended()) { ! Integrate(VState.qAttitudeECI, VState.vQtrndot, VState.dqQtrndot, dt, integrator_rotational_position); ! Integrate(VState.vPQRi, in.vPQRidot, VState.dqPQRidot, dt, integrator_rotational_rate); ! Integrate(VState.vInertialPosition, VState.vInertialVelocity, VState.dqInertialVelocity, dt, integrator_translational_position); ! Integrate(VState.vInertialVelocity, in.vUVWidot, VState.dqUVWidot, dt, integrator_translational_rate); ! } // CAUTION : the order of the operations below is very important to get transformation *************** *** 232,236 **** // 1. Update the Earth position angle (EPA) ! VState.vLocation.IncrementEarthPositionAngle(in.vOmegaPlanet(eZ)*(in.DeltaT*rate)); // 2. Update the Ti2ec and Tec2i transforms from the updated EPA --- 234,238 ---- // 1. Update the Earth position angle (EPA) ! VState.vLocation.IncrementEarthPositionAngle(in.vOmegaPlanet(eZ)*dt); // 2. Update the Ti2ec and Tec2i transforms from the updated EPA |