// Compute some derived values.
vVel = VState.vQtrn.GetTInv()*VState.vUVW;
+
+ // Finaly make shure that the quaternion stays normalized.
+ VState.vQtrn.Normalize();
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// Compute body frame accelerations based on the current body forces
vUVWdot = VState.vUVW*VState.vPQR + vForces/mass;
- // Centrifugal acceleration.
+ // Coriolis acceleration.
FGColumnVector3 ecVel = Tl2ec*vVel;
FGColumnVector3 ace = 2.0*omega*ecVel;
vUVWdot -= Tl2b*(Tec2l*ace);
- // Coriolis acceleration.
+ // Centrifugal acceleration.
FGColumnVector3 aeec = omega*(omega*VState.vLocation);
vUVWdot -= Tl2b*(Tec2l*aeec);
PropertyManager->Tie("metrics/runway-radius", this, &FGPropagate::GetRunwayRadius, &FGPropagate::SetRunwayRadius);
- PropertyManager->Tie("attitude/phi-rad", this, &FGPropagate::Getphi);
- PropertyManager->Tie("attitude/theta-rad", this, &FGPropagate::Gettht);
- PropertyManager->Tie("attitude/psi-rad", this, &FGPropagate::Getpsi);
+ PropertyManager->Tie("attitude/phi-rad", this, (int)ePhi, (PMF)&FGPropagate::GetEuler);
+ PropertyManager->Tie("attitude/theta-rad", this, (int)eTht, (PMF)&FGPropagate::GetEuler);
+ PropertyManager->Tie("attitude/psi-rad", this, (int)ePsi, (PMF)&FGPropagate::GetEuler);
- PropertyManager->Tie("attitude/roll-rad", this, &FGPropagate::Getphi);
- PropertyManager->Tie("attitude/pitch-rad", this, &FGPropagate::Gettht);
- PropertyManager->Tie("attitude/heading-true-rad", this, &FGPropagate::Getpsi);
+ PropertyManager->Tie("attitude/roll-rad", this, (int)ePhi, (PMF)&FGPropagate::GetEuler);
+ PropertyManager->Tie("attitude/pitch-rad", this, (int)eTht, (PMF)&FGPropagate::GetEuler);
+ PropertyManager->Tie("attitude/heading-true-rad", this, (int)ePsi, (PMF)&FGPropagate::GetEuler);
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%