Rev 1685 | Rev 1691 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1685 | Rev 1690 | ||
---|---|---|---|
Line 591... | Line 591... | ||
591 | Ki = 10300 / (Parameter_I_Faktor + 1); |
591 | Ki = 10300 / (Parameter_I_Faktor + 1); |
592 | MAX_GAS = EE_Parameter.Gas_Max; |
592 | MAX_GAS = EE_Parameter.Gas_Max; |
593 | MIN_GAS = EE_Parameter.Gas_Min; |
593 | MIN_GAS = EE_Parameter.Gas_Min; |
Line 594... | Line 594... | ||
594 | 594 | ||
595 | tmp = EE_Parameter.OrientationModeControl; |
595 | tmp = EE_Parameter.OrientationModeControl; |
596 | if(tmp > 50 && NaviDataOkay > 200) |
596 | if(tmp > 50) |
597 | { |
597 | { |
598 | #ifdef SWITCH_LEARNS_CAREFREE |
598 | #ifdef SWITCH_LEARNS_CAREFREE |
599 | if(!CareFree) ControlHeading = (((int) EE_Parameter.OrientationAngle * 15 + KompassValue) % 360) / 2; |
599 | if(!CareFree) ControlHeading = (((int) EE_Parameter.OrientationAngle * 15 + KompassValue) % 360) / 2; |
600 | #endif |
600 | #endif |
601 | CareFree = 1; |
601 | CareFree = 1; |
602 | if(tmp >= 248 && Poti[255 - tmp] < 50) CareFree = 0; |
602 | if(tmp >= 248 && Poti[255 - tmp] < 50) CareFree = 0; |
603 | } |
603 | } |
Line -... | Line 604... | ||
- | 604 | else CareFree = 0; |
|
- | 605 | ||
- | 606 | if(CareFree && FromNaviCtrl.CompassValue == -2 && BeepMuster == 0xffff) |
|
- | 607 | { |
|
- | 608 | beeptime = 15000; |
|
- | 609 | BeepMuster = 0xA400; |
|
604 | else CareFree = 0; |
610 | CareFree = 0; |
605 | 611 | } |
|
Line 606... | Line 612... | ||
606 | if(CareFree) {if(Parameter_AchsKopplung1 < 210) Parameter_AchsKopplung1 += 30;} |
612 | if(CareFree) {if(Parameter_AchsKopplung1 < 210) Parameter_AchsKopplung1 += 30;} |
607 | } |
613 | } |
Line 1626... | Line 1632... | ||
1626 | if(IntegralFaktor) SummeNick += IntegralNickMalFaktor - StickNick; // I-Anteil bei Winkelregelung |
1632 | if(IntegralFaktor) SummeNick += IntegralNickMalFaktor - StickNick; // I-Anteil bei Winkelregelung |
1627 | else SummeNick += DiffNick; // I-Anteil bei HH |
1633 | else SummeNick += DiffNick; // I-Anteil bei HH |
1628 | if(SummeNick > (STICK_GAIN * 16000L)) SummeNick = (STICK_GAIN * 16000L); |
1634 | if(SummeNick > (STICK_GAIN * 16000L)) SummeNick = (STICK_GAIN * 16000L); |
1629 | if(SummeNick < -(16000L * STICK_GAIN)) SummeNick = -(16000L * STICK_GAIN); |
1635 | if(SummeNick < -(16000L * STICK_GAIN)) SummeNick = -(16000L * STICK_GAIN); |
Line 1630... | Line -... | ||
1630 | - | ||
1631 | DebugOut.Analog[16] = MesswertNick; |
- | |
1632 | DebugOut.Analog[17] = DiffNick; |
- | |
1633 | - | ||
1634 | 1636 | ||
1635 | if(Parameter_UserParam5 > 50) |
1637 | if(Parameter_UserParam5 > 50) |
1636 | pd_ergebnis_nick = (EE_Parameter.Gyro_Stability * DiffNick) / 8 + SummeNick / Ki; // PI-Regler für Nick |
1638 | pd_ergebnis_nick = (EE_Parameter.Gyro_Stability * DiffNick) / 8 + SummeNick / Ki; // PI-Regler für Nick |
1637 | else |
1639 | else |
Line 1649... | Line 1651... | ||
1649 | if(IntegralFaktor) SummeRoll += IntegralRollMalFaktor - StickRoll;// I-Anteil bei Winkelregelung |
1651 | if(IntegralFaktor) SummeRoll += IntegralRollMalFaktor - StickRoll;// I-Anteil bei Winkelregelung |
1650 | else SummeRoll += DiffRoll; // I-Anteil bei HH |
1652 | else SummeRoll += DiffRoll; // I-Anteil bei HH |
1651 | if(SummeRoll > (STICK_GAIN * 16000L)) SummeRoll = (STICK_GAIN * 16000L); |
1653 | if(SummeRoll > (STICK_GAIN * 16000L)) SummeRoll = (STICK_GAIN * 16000L); |
1652 | if(SummeRoll < -(16000L * STICK_GAIN)) SummeRoll = -(16000L * STICK_GAIN); |
1654 | if(SummeRoll < -(16000L * STICK_GAIN)) SummeRoll = -(16000L * STICK_GAIN); |
Line 1653... | Line 1655... | ||
1653 | 1655 | ||
1654 | if(Parameter_UserParam5 > 50) |
1656 | //if(Parameter_UserParam5 > 50) |
1655 | pd_ergebnis_roll = (EE_Parameter.Gyro_Stability * DiffRoll) / 8 + SummeRoll / Ki; // PI-Regler für Roll |
1657 | pd_ergebnis_roll = (EE_Parameter.Gyro_Stability * DiffRoll) / 8 + SummeRoll / Ki; // PI-Regler für Roll |
1656 | else |
1658 | //else |
Line 1657... | Line 1659... | ||
1657 | pd_ergebnis_roll = DiffRoll + SummeRoll / Ki; // PI-Regler für Roll |
1659 | // pd_ergebnis_roll = DiffRoll + SummeRoll / Ki; // PI-Regler für Roll |
1658 | 1660 | ||
1659 | tmp_int = (long)((long)Parameter_DynamicStability * (long)(GasMischanteil + abs(GierMischanteil)/2)) / 64; |
1661 | tmp_int = (long)((long)Parameter_DynamicStability * (long)(GasMischanteil + abs(GierMischanteil)/2)) / 64; |
Line 1681... | Line 1683... | ||
1681 | // Gier |
1683 | // Gier |
1682 | if(Mixer.Motor[i][3] == 64) tmp_int += GierMischanteil; |
1684 | if(Mixer.Motor[i][3] == 64) tmp_int += GierMischanteil; |
1683 | else if(Mixer.Motor[i][3] == -64) tmp_int -= GierMischanteil; |
1685 | else if(Mixer.Motor[i][3] == -64) tmp_int -= GierMischanteil; |
1684 | else tmp_int += ((long)GierMischanteil * Mixer.Motor[i][3]) / 64L; |
1686 | else tmp_int += ((long)GierMischanteil * Mixer.Motor[i][3]) / 64L; |
Line -... | Line 1687... | ||
- | 1687 | ||
- | 1688 | //if(Parameter_UserParam4 < 50) |
|
1685 | 1689 | { |
|
1686 | if(tmp_int > tmp_motorwert[i]) tmp_int = (tmp_motorwert[i] + tmp_int) / 2; // MotorSmoothing |
1690 | if(tmp_int > tmp_motorwert[i]) tmp_int = (tmp_motorwert[i] + tmp_int) / 2; // MotorSmoothing |
- | 1691 | else tmp_int = 2 * tmp_int - tmp_motorwert[i]; // MotorSmoothing |
|
1687 | else tmp_int = 2 * tmp_int - tmp_motorwert[i]; // MotorSmoothing |
1692 | } |
1688 | 1693 | ||
1689 | /* |
1694 | /* |
1690 | if(Parameter_UserParam5 > 50) |
1695 | if(Parameter_UserParam5 > 50) |
1691 | { |
1696 | { |
1692 | if(tmp_int > tmp_motorwert[i]) tmp_int = (tmp_motorwert[i] + tmp_int) / 2; // MotorSmoothing |
1697 | if(tmp_int > tmp_motorwert[i]) tmp_int = (tmp_motorwert[i] + tmp_int) / 2; // MotorSmoothing |