GLOBAL DATA
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-static const char *IdSrc = "$Id$";
+static const char *IdSrc = "$Id: FGAircraft.cpp,v 1.28 2010/09/07 00:40:03 jberndt Exp $";
static const char *IdHdr = ID_AIRCRAFT;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if (FGModel::Run()) return true;
if (FDMExec->Holding()) return false;
+ RunPreFunctions();
+
vForces.InitMatrix();
if (!HoldDown) {
vForces += Aerodynamics->GetForces();
vForces += GroundReactions->GetForces();
vForces += ExternalReactions->GetForces();
vForces += BuoyantForces->GetForces();
+ } else {
+ const FGMatrix33& mTl2b = Propagate->GetTl2b();
+ vForces = mTl2b * FGColumnVector3(0,0,-MassBalance->GetWeight());
}
vMoments.InitMatrix();
vBodyAccel = vForces/MassBalance->GetMass();
- vNcg = vBodyAccel/Inertial->gravity();
+ vNcg = vBodyAccel/Inertial->SLgravity();
vNwcg = Aerodynamics->GetTb2w() * vNcg;
- vNwcg(3) = -1*vNwcg(3) + 1;
+ vNwcg(3) = 1.0 - vNwcg(3);
+
+ RunPostFunctions();
return false;
}
}
}
+ PostLoad(el, PropertyManager);
+
Debug(2);
return true;