資源簡介
德國電調(diào)源碼,卡爾曼濾波,PID算法程序源碼,C語言代碼。

代碼片段和文件信息
/*
Copyright?2008?by?Michael?Walter
All?functions?written?by?Michael?Walter?are?free?software?and?can?be?redistributed?and/or?modified?under?the?terms?of?the?GNU?Lesser
General?Public?License?as?published?by?the?Free?Software?Foundation.?This?program?is?distributed?in?the?hope?that?it?will?be?useful?but
WITHOUT?ANY?WARRANTY?without?even?the?implied?warranty?of?MERCHANTABILITY?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.
See?the?GNU?Lesser?General?Public?License?for?more?details.?You?should?have?received?a?copy?of?the?GNU?Lesser?General?Public
License?along?with?this?program.?If?not?see? .
Please?note:?The?software?is?based?on?the?framework?provided?by?H.?Buss?and?I.?Busker?in?their?Mikrokopter?projekt.?All?functions?that
are?not?written?by?Michael?Walter?are?under?the?license?by?H.?Buss?and?I.?Busker?(license_buss.txt)?published?by?www.mikrokopter.de?
unless?it?is?stated?otherwise.
*/
#include?“main.h“
#include?“FlightControl.h“
int?UBat?=?100;?/*?Initial?Battery?Guess?*/
int?AdWertNick_Raw?=?0?AdWertRoll_Raw?=?0?AdWertGier_Raw?=?0;
int?AdWertAccRoll?=?0AdWertAccNick?=?0AdWertAccHoch?=?0;
int?AdWertAccRoll_Raw?=?0AdWertAccNick_Raw?=?0AdWertAccHoch_Raw?=?0;
int?AccumulatedACC_X?=?0?AccumulatedACC_Y?=?0?AccumulatedACC_Z?=?0?AccumulatedAirPressure?=?0;
int?AccumulatedACC_X_cnt?=?0?AccumulatedACC_Y_cnt?=?0?AccumulatedACC_Z_cnt?=?0?AccumulatedAirPressure_cnt?=?0;
int?AccumulatedRoll?=?0?AccumulatedNick?=?0?AccumulatedGier?=?0;
int?AccumulatedRoll_cnt?=?0?AccumulatedNick_cnt?=?0?AccumulatedGier_cnt?=?0;
unsigned?int?AdWertAirPressure_Raw?=?1023;
/*?****************************************************************************
Functionname:?????ADC_Init??????????????????????*/?/*!
Description:
??@return???????????void
??@pre??????????????-
??@post?????????????-
??@author???????????H.?Buss?/?I.?Busker
****************************************************************************?*/
void?ADC_Init(void)
{?
#ifdef?INTERNAL_REFERENCE?
??ADMUX?=?64;/*?Internal?Reference?5V?*/
#else
??ADMUX?=?0;?/*?External?Reference?*/
#endif
??ADCSRA=(1< }
/*?****************************************************************************
Functionname:?????SucheLuftruckOffset??????????????????????*/?/*!
Description:
??@return???????????void
??@pre??????????????-
??@post?????????????-
??@author???????????H.?Buss?/?I.?Busker
****************************************************************************?*/
void?SucheLuftruckOffset(void)
{
??unsigned?int?off;
??off?=?eeprom_read_byte(&EEPromArray[EEPROM_ADR_LAST_OFFSET]);
??if(off?>?20)?off?-=?10;
??OCR0A?=?off;
??Delay_ms_Mess(100);
??if(AdWertAirPressure_Raw?850)?off?=?0;
??for(;?off?250;off++)
??{
????OCR0A?=?off;
????Delay_ms_Mess(50);
????printf(“.“);??
????if(AdWertAirPressure_Raw?900)?break;
??}
??eeprom_write_byte(&EEPromArray[EEPRO
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????5125??2013-09-21?10:17??卡爾曼版\analog.c
?????文件???????1730??2013-09-21?10:17??卡爾曼版\analog.h
?????文件??????10331??2013-09-21?10:02??卡爾曼版\Bob4_OSD.c
?????文件???????9538??2013-09-21?10:04??卡爾曼版\eeprom.c
?????文件???????3925??2013-09-21?10:06??卡爾曼版\fc.h
?????文件?????120851??2013-09-21?00:29??卡爾曼版\Flight-Ctrl_MEGA644p_V0_66c?.hex
?????文件??????21542??2013-09-21?10:21??卡爾曼版\FlightControl.c
?????文件???????1947??2013-09-21?10:18??卡爾曼版\FlightControl.h
?????文件??????16822??2013-09-21?10:20??卡爾曼版\gps.c
?????文件???????2768??2013-09-21?10:06??卡爾曼版\gps.h
?????文件??????22746??2013-09-22?12:25??卡爾曼版\kafi.c
?????文件???????4373??2013-09-21?10:21??卡爾曼版\kafi.h
?????文件??????14855??2013-09-21?10:19??卡爾曼版\main.c
?????文件???????2365??2013-09-21?10:08??卡爾曼版\main.h
?????文件???????9065??2013-09-21?10:09??卡爾曼版\matmatrix.c
?????文件???????2254??2013-09-22?12:13??卡爾曼版\matmatrix.h
?????文件???????1154??2013-09-21?10:09??卡爾曼版\menu.h
?????文件??????13692??2013-09-21?10:10??卡爾曼版\mm3.c
?????文件????????705??2013-09-21?10:11??卡爾曼版\mm3.h
?????文件???????5201??2013-09-21?10:11??卡爾曼版\mymath.c
?????文件????????259??2013-09-21?10:01??卡爾曼版\mymath.h
?????文件????????718??2013-09-21?10:12??卡爾曼版\old_macros.h
?????文件??????20170??2013-09-21?10:12??卡爾曼版\printf_P.c
?????文件????????570??2013-09-21?10:13??卡爾曼版\printf_P.h
?????文件???????3251??2013-09-21?10:16??卡爾曼版\rc.c
?????文件????????747??2013-09-21?10:13??卡爾曼版\rc.h
?????文件???????3673??2013-09-21?10:22??卡爾曼版\timer0.c
?????文件????????548??2013-09-21?10:14??卡爾曼版\timer0.h
?????文件??????11215??2013-09-21?10:14??卡爾曼版\twimaster.c
?????文件???????1045??2013-09-21?10:15??卡爾曼版\twimaster.h
............此處省略11個文件信息
評論
共有 條評論