public bool QueryDerivatives(IAgFlightBasicManeuverState pCurrentState, IAgFlightBasicManeuverDerivs presultCurrentDerivs, bool vbAllowThresholdDetection)
        {
            // the strategy extrapolates the starting flight condition ...

            // model the effects of coriolis without compensating for it ...
            presultCurrentDerivs.SetVertPlaneCompensateForCoriolisAccel(false);
            presultCurrentDerivs.SetHorizPlaneCompensateForCoriolisAccel(false);

            // totalECFAccel = pitchRateNormalAccel + speedDotLongAccel + coriolisAccel - centripetalAccel
            pCurrentState.QueryECFCoriolisAccel(m_coriolisAccel);
            pCurrentState.QueryECFCentripetalAccel(m_centripetalAccel);
            m_accelCommand.SetToZero(); // pitchRateNormalAccel = speedDotLongAccel = 0
            m_accelCommand.Add(m_coriolisAccel);
            m_accelCommand.Subtract(m_centripetalAccel);

            presultCurrentDerivs.SetEcfAccelCommand(m_accelCommand);

            // compute ref axes PQRs
            pCurrentState.QueryECFToRefAxesAttRefFrame(m_ecfToRefAxesQuat, null);
            pCurrentState.QueryOmegaEarthInFrame(m_ecfToRefAxesQuat, m_earthOmegaInRefAxes);

            double dCommandFPADot = 0.0;

            m_PQR.ConstructFromComponents(0.0, dCommandFPADot, 0.0);
            m_PQR.Add(m_earthOmegaInRefAxes);

            presultCurrentDerivs.SetRefAxesOmegaCommand(m_PQR);

            // Tgo is used for calc progress and to refine stopping condition
            presultCurrentDerivs.NavTimeToGo     = 1.0;
            presultCurrentDerivs.ProfileTimeToGo = 1.0;

            return(true);
        }
Ejemplo n.º 2
0
 public bool QueryDerivatives(IAgFlightBasicManeuverState pCurrentState, IAgFlightBasicManeuverDerivs presultCurrentDerivs, bool vbAllowThresholdDetection)
 {
     // nothing to do for this example, all the action gets done in the Nav strategy
     return(true);
 }