namespace JSBSim {
-static const char *IdSrc = "$Id: FGPropagate.cpp,v 1.85 2011/04/03 19:24:58 jberndt Exp $";
+static const char *IdSrc = "$Id: FGPropagate.cpp,v 1.88 2011/05/20 03:18:36 jberndt Exp $";
static const char *IdHdr = ID_PROPAGATE;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
bool FGPropagate::InitModel(void)
{
- if (!FGModel::InitModel()) return false;
-
// For initialization ONLY:
SeaLevelRadius = LocalTerrainRadius = FDMExec->GetInertial()->GetRefRadius();
VState.dqInertialVelocity.resize(4, FGColumnVector3(0.0,0.0,0.0));
VState.dqQtrndot.resize(4, FGColumnVector3(0.0,0.0,0.0));
- integrator_rotational_rate = eAdamsBashforth2;
- integrator_translational_rate = eTrapezoidal;
- integrator_rotational_position = eAdamsBashforth2;
- integrator_translational_position = eTrapezoidal;
+ integrator_rotational_rate = eRectEuler;
+ integrator_translational_rate = eAdamsBashforth2;
+ integrator_rotational_position = eRectEuler;
+ integrator_translational_position = eAdamsBashforth3;
return true;
}
RecomputeLocalTerrainRadius();
VehicleRadius = GetRadius();
- double radInv = 1.0/VehicleRadius;
// Set the angular velocities of the body frame relative to the ECEF frame,
// expressed in the body frame.
*/
-bool FGPropagate::Run(void)
+bool FGPropagate::Run(bool Holding)
{
- if (FGModel::Run()) return true; // Fast return if we have nothing to do ...
- if (FDMExec->Holding()) return false;
+ if (FGModel::Run(Holding)) return true; // Fast return if we have nothing to do ...
+ if (Holding) return false;
double dt = FDMExec->GetDeltaT()*rate; // The 'stepsize'
// orientation quaternion and vLocation vector.
UpdateBodyMatrices();
- CalculateUVW(); // Translational position derivative (velocities are integrated in the inertial frame)
+ // Translational position derivative (velocities are integrated in the inertial frame)
+ CalculateUVW();
- // Set auxililary state variables
+ // Set auxilliary state variables
RecomputeLocalTerrainRadius();
VehicleRadius = GetRadius(); // Calculate current aircraft radius from center of planet
{
Ti2b = VState.qAttitudeECI.GetT(); // ECI to body frame transform
Tb2i = Ti2b.Transposed(); // body to ECI frame transform
- Tl2b = Ti2b*Tl2i; // local to body frame transform
+ Tl2b = Ti2b * Tl2i; // local to body frame transform
Tb2l = Tl2b.Transposed(); // body to local frame transform
- Tec2b = Tl2b * Tec2l; // ECEF to body frame transform
+ Tec2b = Ti2b * Tec2i; // ECEF to body frame transform
Tb2ec = Tec2b.Transposed(); // body to ECEF frame tranform
}