179,7 → 179,6 |
DebugOut.Analog[9] = UBat; |
DebugOut.Analog[10] = SenderOkay; |
DebugOut.Analog[11] = ErsatzKompass / GIER_GRAD_FAKTOR; |
DebugOut.Analog[16] = Capacity.MinOfMaxPWM; |
DebugOut.Analog[20] = ServoNickValue; |
DebugOut.Analog[22] = Capacity.ActualCurrent; |
DebugOut.Analog[23] = Capacity.UsedCapacity; |
190,7 → 189,8 |
// DebugOut.Analog[28] = (int)FromNaviCtrl_Value.Kalman_MaxFusion; |
// DebugOut.Analog[29] = (int)FromNaviCtrl_Value.Kalman_K; |
//DebugOut.Analog[28] = I2CError; |
DebugOut.Analog[29] = FromNaviCtrl_Value.SerialDataOkay; |
// DebugOut.Analog[29] = FromNaviCtrl_Value.SerialDataOkay; |
DebugOut.Analog[29] = Capacity.MinOfMaxPWM; |
DebugOut.Analog[30] = GPS_Nick; |
DebugOut.Analog[31] = GPS_Roll; |
} |
594,7 → 594,10 |
tmp = EE_Parameter.OrientationModeControl; |
if(tmp > 50 && NaviDataOkay > 200) |
{ |
CareFree = 1; |
#ifdef SWITCH_LEARNS_CAREFREE |
if(!CareFree) ControlHeading = (((int) EE_Parameter.OrientationAngle * 15 + KompassValue) % 360) / 2; |
#endif |
CareFree = 1; |
if(tmp >= 248 && Poti[255 - tmp] < 50) CareFree = 0; |
} |
else CareFree = 0; |
669,11 → 672,11 |
{ |
SummeNick = 0; |
SummeRoll = 0; |
sollGier = 0; |
Mess_Integral_Gier = 0; |
if(modell_fliegt == 250) |
{ |
NeueKompassRichtungMerken = 1; |
sollGier = 0; |
Mess_Integral_Gier = 0; |
// Mess_Integral_Gier2 = 0; |
} |
} else FCFlags |= FCFLAG_FLY; |
1619,12 → 1622,17 |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Nick-Achse |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
#define ABSCHWAECHEN 2 |
DiffNick = MesswertNick - StickNick; // Differenz bestimmen |
if(IntegralFaktor) SummeNick += IntegralNickMalFaktor - StickNick; // I-Anteil bei Winkelregelung |
else SummeNick += DiffNick; // I-Anteil bei HH |
if(SummeNick > (STICK_GAIN * 16000L)) SummeNick = (STICK_GAIN * 16000L); |
if(SummeNick < -(16000L * STICK_GAIN)) SummeNick = -(16000L * STICK_GAIN); |
pd_ergebnis_nick = DiffNick + SummeNick / Ki; // PI-Regler für Nick |
if(Parameter_UserParam5 > 50) |
pd_ergebnis_nick = DiffNick/ABSCHWAECHEN + SummeNick / Ki; // PI-Regler für Nick |
else |
pd_ergebnis_nick = DiffNick + SummeNick / Ki; // PI-Regler für Nick |
|
// Motor Vorn |
tmp_int = (long)((long)Parameter_DynamicStability * (long)(GasMischanteil + abs(GierMischanteil)/2)) / 64; |
if(pd_ergebnis_nick > tmp_int) pd_ergebnis_nick = tmp_int; |
1638,11 → 1646,20 |
else SummeRoll += DiffRoll; // I-Anteil bei HH |
if(SummeRoll > (STICK_GAIN * 16000L)) SummeRoll = (STICK_GAIN * 16000L); |
if(SummeRoll < -(16000L * STICK_GAIN)) SummeRoll = -(16000L * STICK_GAIN); |
|
if(Parameter_UserParam5 > 50) |
pd_ergebnis_roll = DiffRoll/ABSCHWAECHEN + SummeRoll / Ki; // PI-Regler für Roll |
else |
pd_ergebnis_roll = DiffRoll + SummeRoll / Ki; // PI-Regler für Roll |
|
tmp_int = (long)((long)Parameter_DynamicStability * (long)(GasMischanteil + abs(GierMischanteil)/2)) / 64; |
if(pd_ergebnis_roll > tmp_int) pd_ergebnis_roll = tmp_int; |
if(pd_ergebnis_roll < -tmp_int) pd_ergebnis_roll = -tmp_int; |
|
DebugOut.Analog[17] = SummeRoll / 4; |
DebugOut.Analog[16] = SummeNick / 4; |
DebugOut.Analog[18] = Mess_Integral_Gier/2; |
|
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Universal Mixer |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |