38,7 → 38,8 |
// + Commercial use (for excample: selling of MikroKopters, selling of PCBs, assembly, ...) is only permitted |
// + with our written permission |
// + * If sources or documentations are redistributet on other webpages, out webpage (http://www.MikroKopter.de) must be |
// + clearly linked as origin // + * porting to systems other than hardware from www.mikrokopter.de is not allowed |
// + clearly linked as origin |
// + * porting to systems other than hardware from www.mikrokopter.de is not allowed |
// + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
// + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
// + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
440,7 → 441,7 |
// Gaswert ermitteln |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
GasMischanteil = StickGas; |
if(GasMischanteil < MIN_GAS) GasMischanteil = MIN_GAS; |
if(GasMischanteil < MIN_GAS + 10) GasMischanteil = MIN_GAS + 10; |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// Empfang schlecht |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
982,10 → 983,7 |
static int KompassSignalSchlecht = 0; |
w = abs(IntegralNick /512); // mit zunehmender Neigung den Einfluss drosseln |
v = abs(IntegralRoll /512); |
//v /= 4; |
//w /= 4; |
if(v > w) w = v; // grösste Neigung ermitteln |
// if((MaxStickNick > 32) || (MaxStickRoll > 32)) w *= 2; |
korrektur = w / 8 + 1; |
if(w < 25 && NeueKompassRichtungMerken && !KompassSignalSchlecht) |
{ |
995,7 → 993,6 |
|
fehler = ((540 + KompassValue - (ErsatzKompass/GIER_GRAD_FAKTOR)) % 360) - 180; |
ErsatzKompass += (fehler * 8) / korrektur; |
// DebugOut.Analog[10] = fehler; |
w = (w * Parameter_KompassWirkung) / 64; // auf die Wirkung normieren |
w = Parameter_KompassWirkung - w; // Wirkung ggf drosseln |
if(w > 0) |
1004,7 → 1001,6 |
{ |
GierGyroFehler += fehler; |
v = 64 + ((MaxStickNick + MaxStickRoll)) / 8; |
//v = 32; |
//r = ((540 + (ErsatzKompass/GIER_GRAD_FAKTOR) - KompassStartwert) % 360) - 180; |
r = KompassRichtung; |
v = (r * w) / v; // nach Kompass ausrichten |