freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于arm-linux的gps導(dǎo)航系統(tǒng)_論文-資料下載頁

2024-11-07 22:11本頁面

【導(dǎo)讀】口將數(shù)據(jù)送入PC機(jī)數(shù)據(jù)庫中實(shí)現(xiàn)查詢等一系列功能。本設(shè)計(jì)的特點(diǎn)在于界面友好、用。戶易操作、功耗低、便于長(zhǎng)時(shí)間戶外導(dǎo)航。GPS是20世紀(jì)70年代由美國陸海空三軍聯(lián)合研制的新一代空間衛(wèi)星導(dǎo)。其主要目的是為陸、海、空三大領(lǐng)域提供實(shí)時(shí)、全天候和全球性的導(dǎo)航。服務(wù),并用于情報(bào)收集、核爆監(jiān)測(cè)和應(yīng)急通訊等一些軍事目的。隨著人民生活水平的法。杖,GPS技術(shù)被越來越多的應(yīng)用在個(gè)人PDA、個(gè)人車載終端、手機(jī)等個(gè)人設(shè)備上。本文介紹的GPS導(dǎo)航系統(tǒng),以ARM作為主控芯片,配以GPS、TFT觸摸屏、本系統(tǒng)在一定程度上推動(dòng)了個(gè)人手持GPS導(dǎo)航設(shè)備研究的發(fā)展。系統(tǒng)應(yīng)有彩色觸摸屏;低功耗、高速度的處理芯片;帶有嵌入式操作系統(tǒng);GPS信息接收模塊;sd卡用以存放地圖;高、集成度高、易擴(kuò)展、可靠性高、功耗低、結(jié)構(gòu)簡(jiǎn)單、中斷處理能力強(qiáng)等特點(diǎn)。語音處理和識(shí)別等領(lǐng)域。

  

【正文】 de, lati_ns,longitude,longi_ew,spd)。 i= sscanf(pcmd,%[^,],%[^,],%c,%lf,%c,%lf,%c,%lf,%lf,%[^,],%lf,%c,%s, mpGPS_GPRMCGpsid, mpGPS_GPRMCutc_time,amp。mpGPS_GPRMCgps_sw, amp。mpGPS_GPRMClatitude,amp。mpGPS_GPRMClati_ns, amp。mpGPS_GPRMClongitude,amp。mpGPS_GPRMClongi_ew,/*7*/ amp。mpGPS_GPRMCspeed,amp。mpGPS_GPRMCangle,mpGPS_GPRMCutc_date,amp。mpGPS_GPRMCmagneDeclinat,amp。mpGPS_GPRMCmagneDeclinatAngle,mpGPS_GPRMCsumCheck)。 基于 ARMLINUX的 GPS導(dǎo)航系統(tǒng) 35 //請(qǐng)檢查 sscanf 的返回值,可能會(huì)失敗,如果小于要收得的數(shù)目。 if(i13) //轉(zhuǎn)換失敗, { PDF(2,sscanf error\n)。 mpGPS_GPRMCgps_sw=39。V39。 CMDBUF_Init(amp。buf)。return 3。} //轉(zhuǎn)換成度制,而不是度,分,十進(jìn)制分形式。 mpGPS_GPRMClatitude=ddmm2dddd((mpGPS_GPRMClatitude/100))。 mpGPS_GPRMClongitude=ddmm2dddd((mpGPS_GPRMClongitude/100))。 PDF(3,gps_sw=%c\n latitude=%lf\n lati_ns=%c\n, mpGPS_GPRMCgps_sw,mpGPS_GPRMClatitude, mpGPS_GPRMClati_ns)。 PDF(3,longitude=%lf\n longi_ew=%c\n, mpGPS_GPRMClongitude,mpGPS_GPRMClongi_ew)。 goto out。 } ///======================= pcmd=strstr(amp。pcmd_bufbuf[0],$GPGSV)。//只對(duì)此語句解析 if (pcmd!=NULL) { if (!nmea_checksum(amp。pcmd[1])) { PDF(2,check sum error\n)。 /*CMDBUF_Init(amp。buf)。 return 1。*/ } //sscanf 并不能由空值來輸入浮點(diǎn)數(shù)。 i= sscanf(pcmd,%[^,],%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%s, mpGPS_GPGSVGPGSV, amp。mpGPS_GPGSVGSV_NOB,amp。mpGPS_GPGSVGSV_ID, amp。mpGPS_GPGSVStaNOB, amp。mpGPS_GPGSV,amp。mpGPS_GPGSV,amp。mpGPS_GPGSV,amp。mpGPS_GPGSV, amp。mpGPS_GPGSV,amp。mpGPS_GPGSV,amp。mpGPS_GPGSV,amp。mpGPS_GPGSV, amp。mpGPS_GPGSV,amp。mpGPS_GPGSV,amp。mpGPS_GPGSV,amp。mpGPS_GPGSV, amp。mpGPS_GPGSV,amp。mpGPS_GPGSV,amp。mpGPS_GPGSV,amp。mpGPS_GPGSV, mpGPS_GPGSVsumCheck)。 //請(qǐng)檢查 sscanf 的返回值,可能會(huì)失敗,如果小于要收得的數(shù)目。 基于 ARMLINUX的 GPS導(dǎo)航系統(tǒng) 36 GPGSV_Analysis(mpGPS_GPGSV)。//存入數(shù)據(jù)中! i++。 goto out。 } out:CMDBUF_Init(amp。buf)。 } return 0。 } void zh_gpsDriver::CMDBUF_Init( CMD_BUF * pcmd_buf ) { pcmd_bufpos=0。 pcmd_bufsw=0。 } int zh_gpsDriver::GetData(GPS_DATA amp。GPSData) { PDF(3,zh_getGPSdata!\n)。 =mpGPS_GPRMClatitude。 =mpGPS_GPRMClongitude 。 =mpGPS_GPRMCgps_sw。 return mpGPS_GPRMCgps_sw。 } int zh_gpsDriver::GetData(GPS_STASNR amp。 GPSStaSNR) { GPSStaSNR=mGPSStaSNR。 } int zh_gpsDriver::setCOM(COM_PARAM amp。 COMParam) //它是唯一控制串口的, { int i。 struct termios attr。 // 打開串口 if(fd==1) { //close(fd)。 = open(, O_RDWR |O_NONBLOCK)。 // fd=。 基于 ARMLINUX的 GPS導(dǎo)航系統(tǒng) 37 if ( == 1) {printf(open device:%s error!\n,)。return 1。} else printf(open device:%s ok!\n,)。 } // 讀取串口當(dāng)前屬性 i=tcgetattr(fd , amp。attr)。 if(i!=0) {printf(error for get attr!\n)。return 1。 } //========設(shè)置好波特率 if(==4800) { i=cfsetispeed(amp。attr,B4800)。 i=cfsetospeed(amp。attr,B4800)。 if(i!=0) {printf(error for get attr!\n)。return 1。 } } else if(==9600) { i=cfsetispeed(amp。attr,B9600)。 i=cfsetospeed(amp。attr,B9600)。 if(i!=0) {printf(error for get attr!\n)。return 1。 } } else printf(error BaudRaet=%d,only support BaudRate 4800/9600! \n,)。 if((tcsetattr(fd,TCSANOW,amp。attr))!=0) {printf(active set attr error!\n)。return 1。 } //======== return fd。 } void zh_gpsDriver::WfifoFixString(char data) { static int flag=0。 if(data!=39。,39。) flag=0。 else {if(flag==1) fifoctl(amp。fifo,39。039。,WR)。 else flag=1。 } fifoctl(amp。fifo,(int) data,WR)。 } void zh_gpsDriver::timerEvent(QTimerEvent * event) { int readbytes,i,j。 char c。 基于 ARMLINUX的 GPS導(dǎo)航系統(tǒng) 38 if(eventtimerId()==id) { PDF(3,zh_gpsDriver timer is alarm!\n)。 //================ for(j=0。j7。j++) { readbytes = (int)read( fd, rdBuf, sizeof(rdBuf))。 if ( readbytes 0 ) { PDF(2,tty readbytes1=%d\n,readbytes)。 for (i = 0 。 i readbytes 。 i++ ) {c = rdBuf[i]。WfifoFixString(c)。} //================ while(GPRS_GetTextLineFromFIFO(amp。buf)) {CMD_Analysis(amp。buf)。}// 解析完所有的語句。 } } PDF(3,zh_gpsDriver timer out!\n)。 //========================= } else PDF(3,not this timer is alarm!\n)。 } Map 類程序: include //=====經(jīng)緯值 define zhPR 8 //use for the zh point size int zhMap::CMD_Analysis( char * pcmd_buf ) { char* pcmd。 int i。 char msgid[20]。 //========== pcmd=strstr(amp。pcmd_buf[0],mapinfo:)。//只對(duì)此語句解析 if (pcmd!=NULL) { i= sscanf(pcmd,%[^:]:%lf,%lf,%lf,%lf,%d,%d,%d, msgid, amp。A_lont,amp。A_lati, amp。B_lont,amp。 B_lati, amp。Width,amp。Height,/*7*/ amp。subWidth)。 //請(qǐng)檢查 sscanf 的返回值,可能會(huì)失敗,如果小于要收得的數(shù)目。 if(i8) {PDF(2,sscanf error mapcfg\n)。 return 1。} 基于 ARMLINUX的 GPS導(dǎo)航系統(tǒng) 39 PDF(2,A_lont=%lf,A_lati=%lf, B_lont=%lf,B_lati=%lf\n,A_lont,A_lati, B_lont,B_lati)。 PDF(2,Width=%d,Height=%d,subWidth=%d\n,Width,Height,subWidth)。 return 0。 } //============= pcmd=strstr(amp。pcmd_buf[0],xxx)。//只對(duì)此語句解析 if (pcmd!=NULL) {} return 0。 } int zhMap::readMapCfg(QString Mapstr) { Mapstr+=/。 const char * OfilePtr=()。//()。//./。 FILE * infile。 char msg[512]。 PDF(2,OfilePtr=%s\n, OfilePtr)。 if ((infile = fopen(OfilePtr, rb)) == NULL) { PDF(1,can39。t open file\n)。 return 1。 } //================== while(fgets(msg, sizeof(msg), infil
點(diǎn)擊復(fù)制文檔內(nèi)容
高考資料相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1