Rev 1769 | Rev 1787 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1769 | Rev 1773 | ||
---|---|---|---|
Line 1392... | Line 1392... | ||
1392 | // and the hover height will be allways larger than height setpoint. |
1392 | // and the hover height will be allways larger than height setpoint. |
1393 | if((EE_Parameter.ExtraConfig & CFG2_HEIGHT_LIMIT) || !(EE_Parameter.GlobalConfig & CFG_HOEHEN_SCHALTER)) // Regler wird über Schalter gesteuert) |
1393 | if((EE_Parameter.ExtraConfig & CFG2_HEIGHT_LIMIT) || !(EE_Parameter.GlobalConfig & CFG_HOEHEN_SCHALTER)) // Regler wird über Schalter gesteuert) |
1394 | { // old version |
1394 | { // old version |
1395 | HCGas = GasMischanteil; // take current stick gas as neutral point for the height control |
1395 | HCGas = GasMischanteil; // take current stick gas as neutral point for the height control |
1396 | HeightTrimming = 0; |
1396 | HeightTrimming = 0; |
- | 1397 | // set both flags to indicate no vario mode |
|
1397 | FC_StatusFlags &= ~(FC_STATUS_VARIO_TRIM_UP|FC_STATUS_VARIO_TRIM_DOWN); |
1398 | FC_StatusFlags |= (FC_STATUS_VARIO_TRIM_UP|FC_STATUS_VARIO_TRIM_DOWN); |
1398 | } |
1399 | } |
1399 | else |
1400 | else |
1400 | { |
1401 | { |
1401 | // alternative height control |
1402 | // alternative height control |
1402 | // PD-Control with respect to hoover point |
1403 | // PD-Control with respect to hoover point |
Line 1562... | Line 1563... | ||
1562 | StickGasHover = (StickGasHover * UBat) / BattLowVoltageWarning; |
1563 | StickGasHover = (StickGasHover * UBat) / BattLowVoltageWarning; |
1563 | } |
1564 | } |
1564 | else StickGasHover = EE_Parameter.Hoehe_StickNeutralPoint; |
1565 | else StickGasHover = EE_Parameter.Hoehe_StickNeutralPoint; |
1565 | LIMIT_MIN_MAX(StickGasHover, 70, 150); // reserve some range for trim up and down |
1566 | LIMIT_MIN_MAX(StickGasHover, 70, 150); // reserve some range for trim up and down |
1566 | FilterHCGas = GasMischanteil; |
1567 | FilterHCGas = GasMischanteil; |
- | 1568 | // set both flags to indicate no vario mode |
|
- | 1569 | FC_StatusFlags |= (FC_STATUS_VARIO_TRIM_UP|FC_STATUS_VARIO_TRIM_DOWN); |
|
1567 | } |
1570 | } |
Line 1568... | Line 1571... | ||
1568 | 1571 | ||
1569 | // Hover gas estimation by averaging gas control output on small z-velocities |
1572 | // Hover gas estimation by averaging gas control output on small z-velocities |
1570 | // this is done only if height contol option is selected in global config and aircraft is flying |
1573 | // this is done only if height contol option is selected in global config and aircraft is flying |
Line 1611... | Line 1614... | ||
1611 | StartTrigger = 0; |
1614 | StartTrigger = 0; |
1612 | HoverGasFilter = 0; |
1615 | HoverGasFilter = 0; |
1613 | HoverGas = 0; |
1616 | HoverGas = 0; |
1614 | } |
1617 | } |
1615 | }// EOF ParamSet.GlobalConfig & CFG_HEIGHT_CONTROL |
1618 | }// EOF ParamSet.GlobalConfig & CFG_HEIGHT_CONTROL |
- | 1619 | else |
|
- | 1620 | { |
|
- | 1621 | // set undefined state to indicate vario off |
|
- | 1622 | FC_StatusFlags |= (FC_STATUS_VARIO_TRIM_UP|FC_STATUS_VARIO_TRIM_DOWN); |
|
- | 1623 | } // EOF no height control |
|
- | 1624 | ||
1616 | // limit gas to parameter setting |
1625 | // limit gas to parameter setting |
1617 | LIMIT_MIN(GasMischanteil, (MIN_GAS + 10) * STICK_GAIN); |
1626 | LIMIT_MIN(GasMischanteil, (MIN_GAS + 10) * STICK_GAIN); |
1618 | if(GasMischanteil > (MAX_GAS - 20) * STICK_GAIN) GasMischanteil = (MAX_GAS - 20) * STICK_GAIN; |
1627 | if(GasMischanteil > (MAX_GAS - 20) * STICK_GAIN) GasMischanteil = (MAX_GAS - 20) * STICK_GAIN; |
Line 1619... | Line 1628... | ||
1619 | 1628 |