Rev 2316 | Rev 2319 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2316 | Rev 2318 | ||
---|---|---|---|
Line 799... | Line 799... | ||
799 | else |
799 | else |
800 | { |
800 | { |
801 | FC_StatusFlags |= FC_STATUS_FLY; |
801 | FC_StatusFlags |= FC_STATUS_FLY; |
802 | if(FC_StatusFlags2 & FC_STATUS2_WAIT_FOR_TAKEOFF) |
802 | if(FC_StatusFlags2 & FC_STATUS2_WAIT_FOR_TAKEOFF) |
803 | { |
803 | { |
804 | /* |
- | |
805 | if(Parameter_UserParam3 > 50) |
- | |
806 | { |
- | |
807 | FromNC_AltitudeSpeed = 15; |
- | |
808 | FromNC_AltitudeSetpoint = 500; |
- | |
809 | } |
- | |
810 | */ |
- | |
811 | if(HoehenWert > 150 || HoehenWert < -350 || !(Parameter_GlobalConfig & CFG_HOEHENREGELUNG)) |
804 | if(HoehenWert > 150 || HoehenWert < -350 || !(Parameter_GlobalConfig & CFG_HOEHENREGELUNG)) |
812 | { |
805 | { |
813 | FC_StatusFlags2 &= ~FC_STATUS2_WAIT_FOR_TAKEOFF; |
806 | FC_StatusFlags2 &= ~FC_STATUS2_WAIT_FOR_TAKEOFF; |
814 | #if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
807 | #if (defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)) |
815 | SpeakHoTT = SPEAK_RISING; |
808 | SpeakHoTT = SPEAK_RISING; |
816 | //SollHoehe = 250; |
- | |
817 | #endif |
809 | #endif |
818 | beeptime = 5000; |
- | |
819 | } |
810 | } |
820 | SummeNick = 0; |
811 | SummeNick = 0; |
821 | SummeRoll = 0; |
812 | SummeRoll = 0; |
822 | Mess_Integral_Gier = 0; |
813 | Mess_Integral_Gier = 0; |
823 | // sollGier = 0; |
814 | // sollGier = 0; |
824 | if(modell_fliegt > 1000) modell_fliegt = 1000; // for the Hooverpoint-Estimation |
815 | if(modell_fliegt > 1000) modell_fliegt = 1000; // for the Hooverpoint-Estimation |
825 | } |
816 | } |
826 | /* |
- | |
827 | else |
- | |
828 | if(Parameter_UserParam3 > 150) |
- | |
829 | { |
- | |
830 | if(HoehenWert > 2500) FromNC_AltitudeSpeed = 30; |
- | |
831 | else |
- | |
832 | if(HoehenWert > 1500) FromNC_AltitudeSpeed = 30; |
- | |
833 | else |
- | |
834 | { |
- | |
835 | FromNC_AltitudeSpeed = 10; |
- | |
836 | SummeNick -= SummeNick / 4; |
- | |
837 | SummeRoll -= SummeRoll / 4; |
- | |
838 | } |
- | |
839 | FromNC_AltitudeSetpoint = -300; |
- | |
840 | } |
- | |
841 | */ |
- | |
842 | } |
817 | } |
843 | if((PPM_in[EE_Parameter.Kanalbelegung[K_GAS]] > 80) && MotorenEin == 0) |
818 | if((PPM_in[EE_Parameter.Kanalbelegung[K_GAS]] > 80) && MotorenEin == 0) |
844 | { |
819 | { |
845 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
820 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
846 | // auf Nullwerte kalibrieren |
821 | // auf Nullwerte kalibrieren |
Line 1890... | Line 1865... | ||
1890 | // Hover gas estimation by averaging gas control output on small z-velocities |
1865 | // Hover gas estimation by averaging gas control output on small z-velocities |
1891 | // this is done only if height contol option is selected in global config and aircraft is flying |
1866 | // this is done only if height contol option is selected in global config and aircraft is flying |
1892 | if((FC_StatusFlags & FC_STATUS_FLY))// && !(FC_SatusFlags & FC_STATUS_EMERGENCY_LANDING)) |
1867 | if((FC_StatusFlags & FC_STATUS_FLY))// && !(FC_SatusFlags & FC_STATUS_EMERGENCY_LANDING)) |
1893 | { |
1868 | { |
1894 | //if(HoverGasFilter == 0 || StartTrigger == 1) HoverGasFilter = HOVER_GAS_AVERAGE * (unsigned long)(GasMischanteil); // init estimation |
1869 | //if(HoverGasFilter == 0 || StartTrigger == 1) HoverGasFilter = HOVER_GAS_AVERAGE * (unsigned long)(GasMischanteil); // init estimation |
1895 | if(HoverGasFilter == 0 || StartTrigger == 1) HoverGasFilter = HOVER_GAS_AVERAGE * (unsigned long)(HoverGas); // Qopter: geändert |
1870 | if(HoverGasFilter == 0 || StartTrigger == 1) HoverGasFilter = HOVER_GAS_AVERAGE * (unsigned long)(HoverGas); // 0.90f: geändert |
1896 | if(StartTrigger == 1) StartTrigger = 2; |
1871 | if(StartTrigger == 1) StartTrigger = 2; |
1897 | tmp_long2 = (int32_t)GasMischanteil; // take current thrust |
1872 | tmp_long2 = (int32_t)GasMischanteil; // take current thrust |
1898 | tmp_long2 *= CosAttitude; // apply attitude projection |
1873 | tmp_long2 *= CosAttitude; // apply attitude projection |
1899 | tmp_long2 /= 8192; |
1874 | tmp_long2 /= 8192; |
1900 | // average vertical projected thrust |
1875 | // average vertical projected thrust |