Example #1
0
//------------------------------------------------------------------------------
// setSpeedBrakesSwitch() --   Sets the speed brake switch position:
//      -1.0 -> Retract;  0.0 -> Hold;  1.0 -> Extend 
//------------------------------------------------------------------------------
void JSBSimModel::setSpeedBrakesSwitch(const LCreal sw)
{
    if (fdmex == 0) return;
    JSBSim::FGFCS* FCS = fdmex->GetFCS();
    if (FCS == 0) return;

    if (sw > 0.0) {
        FCS->SetDsbCmd(100.0);
    }
    else if (sw < 0.0) {
        FCS->SetDsbCmd(0.0);
    }
}