Rev 1120 | Rev 1153 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1120 | Rev 1121 | ||
---|---|---|---|
Line 143... | Line 143... | ||
143 | struct mk_param_struct EE_Parameter; |
143 | struct mk_param_struct EE_Parameter; |
144 | signed int ExternStickNick = 0,ExternStickRoll = 0,ExternStickGier = 0, ExternHoehenValue = -20; |
144 | signed int ExternStickNick = 0,ExternStickRoll = 0,ExternStickGier = 0, ExternHoehenValue = -20; |
145 | int MaxStickNick = 0,MaxStickRoll = 0; |
145 | int MaxStickNick = 0,MaxStickRoll = 0; |
146 | unsigned int modell_fliegt = 0; |
146 | unsigned int modell_fliegt = 0; |
147 | unsigned char MikroKopterFlags = 0; |
147 | unsigned char MikroKopterFlags = 0; |
148 | unsigned long GIER_GRAD_FAKTOR = 1291; |
148 | long GIER_GRAD_FAKTOR = 1291; |
Line 149... | Line 149... | ||
149 | 149 | ||
150 | void Piep(unsigned char Anzahl) |
150 | void Piep(unsigned char Anzahl) |
151 | { |
151 | { |
152 | while(Anzahl--) |
152 | while(Anzahl--) |
Line 248... | Line 248... | ||
248 | // MesswertGierBias = (signed int) AdNeutralGierBias - AdWertGier; |
248 | // MesswertGierBias = (signed int) AdNeutralGierBias - AdWertGier; |
249 | MesswertRoll = (signed int) AdWertRoll - AdNeutralRoll; |
249 | MesswertRoll = (signed int) AdWertRoll - AdNeutralRoll; |
250 | MesswertNick = (signed int) AdWertNick - AdNeutralNick; |
250 | MesswertNick = (signed int) AdWertNick - AdNeutralNick; |
251 | //DebugOut.Analog[21] = MesswertNick; |
251 | //DebugOut.Analog[21] = MesswertNick; |
252 | //DebugOut.Analog[22] = MesswertRoll; |
252 | //DebugOut.Analog[22] = MesswertRoll; |
253 | DebugOut.Analog[22] = Mess_Integral_Gier; |
253 | //DebugOut.Analog[22] = Mess_Integral_Gier; |
Line 254... | Line 254... | ||
254 | 254 | ||
255 | // Beschleunigungssensor ++++++++++++++++++++++++++++++++++++++++++++++++ |
255 | // Beschleunigungssensor ++++++++++++++++++++++++++++++++++++++++++++++++ |
256 | Mittelwert_AccNick = ((long)Mittelwert_AccNick * 1 + ((ACC_AMPLIFY * (long)AdWertAccNick))) / 2L; |
256 | Mittelwert_AccNick = ((long)Mittelwert_AccNick * 1 + ((ACC_AMPLIFY * (long)AdWertAccNick))) / 2L; |
257 | Mittelwert_AccRoll = ((long)Mittelwert_AccRoll * 1 + ((ACC_AMPLIFY * (long)AdWertAccRoll))) / 2L; |
257 | Mittelwert_AccRoll = ((long)Mittelwert_AccRoll * 1 + ((ACC_AMPLIFY * (long)AdWertAccRoll))) / 2L; |
Line 287... | Line 287... | ||
287 | 287 | ||
288 | MesswertGier += (Parameter_CouplingYawCorrection * tmpl4) / 128; |
288 | MesswertGier += (Parameter_CouplingYawCorrection * tmpl4) / 128; |
289 | } |
289 | } |
Line 290... | Line -... | ||
290 | else tmpl = tmpl2 = 0; |
- | |
- | 290 | else tmpl = tmpl2 = 0; |
|
291 | 291 | ||
292 | 292 | DebugOut.Analog[22] = tmpl; |
|
293 | // Kompasswert begrenzen ++++++++++++++++++++++++++++++++++++++++++++++++ |
293 | // Kompasswert begrenzen ++++++++++++++++++++++++++++++++++++++++++++++++ |
294 | if(ErsatzKompass >= (360L * GIER_GRAD_FAKTOR)) ErsatzKompass -= 360L * GIER_GRAD_FAKTOR; // 360° Umschlag |
294 | if(ErsatzKompass >= (360L * GIER_GRAD_FAKTOR)) ErsatzKompass -= 360L * GIER_GRAD_FAKTOR; // 360° Umschlag |
295 | if(ErsatzKompass < 0) ErsatzKompass += 360L * GIER_GRAD_FAKTOR; |
295 | if(ErsatzKompass < 0) ErsatzKompass += 360L * GIER_GRAD_FAKTOR; |
296 | // Roll ++++++++++++++++++++++++++++++++++++++++++++++++ |
296 | // Roll ++++++++++++++++++++++++++++++++++++++++++++++++ |
297 | MesswertRoll += tmpl; |
297 | MesswertRoll += tmpl; |
298 | MesswertRoll += tmpl2 / 100L; //109 |
298 | MesswertRoll += tmpl2 / 100L; // War: *5/512 |
299 | // MesswertRoll += (tmpl2*Parameter_AchsGegenKopplung1)/512L; //109 |
299 | // MesswertRoll += (tmpl2*Parameter_AchsGegenKopplung1)/512L; //109 |
Line 300... | Line 300... | ||
300 | Mess_IntegralRoll2 += MesswertRoll; |
300 | Mess_IntegralRoll2 += MesswertRoll; |