Subversion Repositories FlightCtrl

Rev

Rev 1246 | Rev 1254 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1246 Rev 1253
Line 235... Line 235...
235
    IntegralRoll = EE_Parameter.GyroAccFaktor * (long)Mittelwert_AccRoll;
235
    IntegralRoll = EE_Parameter.GyroAccFaktor * (long)Mittelwert_AccRoll;
236
    Mess_IntegralNick2 = IntegralNick;
236
    Mess_IntegralNick2 = IntegralNick;
237
    Mess_IntegralRoll2 = IntegralRoll;
237
    Mess_IntegralRoll2 = IntegralRoll;
238
    Mess_Integral_Gier = 0;
238
    Mess_Integral_Gier = 0;
239
    StartLuftdruck = Luftdruck;
239
    StartLuftdruck = Luftdruck;
240
    HoeheD = 0;
240
    VarioMeter = 0;
241
    Mess_Integral_Hoch = 0;
241
    Mess_Integral_Hoch = 0;
242
    KompassStartwert = KompassValue;
242
    KompassStartwert = KompassValue;
243
    GPS_Neutral();
243
    GPS_Neutral();
244
    beeptime = 50;
244
    beeptime = 50;
245
        Umschlag180Nick = ((long) EE_Parameter.WinkelUmschlagNick * 2500L) + 15000L;
245
        Umschlag180Nick = ((long) EE_Parameter.WinkelUmschlagNick * 2500L) + 15000L;
Line 1184... Line 1184...
1184
    DebugOut.Analog[9] = UBat;
1184
    DebugOut.Analog[9] = UBat;
1185
    DebugOut.Analog[11] = ErsatzKompass / GIER_GRAD_FAKTOR;
1185
    DebugOut.Analog[11] = ErsatzKompass / GIER_GRAD_FAKTOR;
1186
    DebugOut.Analog[10] = SenderOkay;
1186
    DebugOut.Analog[10] = SenderOkay;
1187
    //DebugOut.Analog[16] = Mittelwert_AccHoch;
1187
    //DebugOut.Analog[16] = Mittelwert_AccHoch;
1188
    //DebugOut.Analog[17] = FromNaviCtrl_Value.Distance;
1188
    //DebugOut.Analog[17] = FromNaviCtrl_Value.Distance;
1189
    //DebugOut.Analog[18] = (int)FromNaviCtrl_Value.OsdBar;
1189
    DebugOut.Analog[18] = VarioMeter;
1190
    DebugOut.Analog[19] = WinkelOut.CalcState;
1190
    DebugOut.Analog[19] = WinkelOut.CalcState;
1191
    DebugOut.Analog[20] = ServoValue;
1191
    DebugOut.Analog[20] = ServoValue;
1192
//    DebugOut.Analog[24] = MesswertNick/2;
1192
//    DebugOut.Analog[24] = MesswertNick/2;
1193
//    DebugOut.Analog[25] = MesswertRoll/2;
1193
//    DebugOut.Analog[25] = MesswertRoll/2;
1194
    DebugOut.Analog[27] = (int)FromNaviCtrl_Value.Kalman_MaxDrift;
1194
    DebugOut.Analog[27] = (int)FromNaviCtrl_Value.Kalman_MaxDrift;
Line 1313... Line 1313...
1313
 
1313
 
1314
    if(Notlandung) SollHoehe = 0;
1314
    if(Notlandung) SollHoehe = 0;
1315
    h = HoehenWert;
1315
    h = HoehenWert;
1316
    if((h > SollHoehe) && HoehenReglerAktiv)      // zu hoch --> drosseln
1316
    if((h > SollHoehe) && HoehenReglerAktiv)      // zu hoch --> drosseln
1317
     {
1317
     {
1318
      h = ((h - SollHoehe) * (int) Parameter_Hoehe_P) / (16 / STICK_GAIN); // Differenz bestimmen --> P-Anteil
1318
      h = ((h - SollHoehe) * (int) Parameter_Hoehe_P) / 16; // Differenz bestimmen --> P-Anteil
1319
      h = GasMischanteil - h;         // vom Gas abziehen
1319
      h = GasMischanteil - h;         // vom Gas abziehen
1320
      h -= (HoeheD)/(8/STICK_GAIN);    // D-Anteil
1320
      h -= (Parameter_Luftdruck_D * VarioMeter)/128;    // D-Anteil
1321
      tmp_int = ((Mess_Integral_Hoch / 128) * (signed long) Parameter_Hoehe_ACC_Wirkung) / (128 / STICK_GAIN);
1321
      tmp_int = ((Mess_Integral_Hoch / 128) * (signed long) Parameter_Hoehe_ACC_Wirkung) / (128 / STICK_GAIN);
1322
      if(tmp_int > 70*STICK_GAIN) tmp_int = 70*STICK_GAIN;
1322
      if(tmp_int > 70*STICK_GAIN) tmp_int = 70*STICK_GAIN;
1323
      else if(tmp_int < -(70*STICK_GAIN)) tmp_int = -(70*STICK_GAIN);
1323
      else if(tmp_int < -(70*STICK_GAIN)) tmp_int = -(70*STICK_GAIN);
1324
      h -= tmp_int;
1324
      h -= tmp_int;