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

正文內(nèi)容

基于s3c2440的gps定位系統(tǒng)畢設-閱讀頁

2025-02-02 14:59本頁面
  

【正文】 (i=0。i++) Degree[i]=0。 Degree[1]=buffer[no+1]。 no+=3。i8。 for(i=0。i++) Minute[i]=buffer[no+i]。 =(atof(Minute)) / + atoi(Degree)。 if(==39。) flag_gps=1。 //the number of satellite:4445 no = 44。i 4。 Satnum[0]=buffer[no]。 = atoi(Satnum)。 for(i = 0。i++) Height[i]=0。39。 Height[1]=buffer[no+2]。 =(atof(Height))/。 Height[1]=buffer[no+1]。 =(atof(Height))/。圖4410:顯示信息 GPS信息顯示定位信息雖已提取出來,但是這樣顯示并不是很美觀,下面的程序?qū)⑼瓿蒕t界面顯示的功能。 static int fd。static int flag_port。gps::gps( QWidget* parent, const char* name, WFlags fl ) : QWidget( parent, name, fl ){ if ( !name ) setName( gps )。 setCaption( tr( gps ) )。 T_latitudesetGeometry( QRect( 20, 20, 181, 20 ) )。 T_longitude = new QLabel( this, T_longitude )。 T_longitudesetText( tr( ) )。 T_timesetGeometry( QRect( 20, 80, 190, 20 ) )。 T_time2 = new QLabel( this, T_time2 )。 T_time2setText( tr( ) )。 T_statellitesetGeometry( QRect( 20, 140, 90, 20 ) )。 T_hight = new QLabel( this, T_hight )。 T_hightsetText( tr( ) )。 T_portsetGeometry( QRect( 20, 170, 191, 20 ) )。 B_start = new QPushButton( this, B_start )。 B_startsetText( tr( start ) )。 B_stopsetGeometry( QRect( 230, 60, 80, 31 ) )。 B_set = new QPushButton( this, B_set )。 B_setsetText( tr( open_port ) )。 B_closesetGeometry( QRect( 230, 160, 80, 31 ) )。 gps::~gps(){ // no need to delete child widgets, Qt does it all for us}void gps::set(){ struct termios opt。 if(fd0){ qWarning( GPS::gps_start(): open_port ttySAC1 error! )。 //return。 tcgetattr(fd,amp。 tcflush(fd,TCIOFLUSH)。opt,B4800)。opt,B4800)。= ~CSIZE。 amp。 amp。 amp。 [VTIME] =150。 if(0!=tcsetattr(fd,TCSANOW,amp。 //return 0。 T_portsetText(tr(info:Port is open!BPS is: %1).arg(DBPS))。 flag_port=1。 //qWarning( gps::set(): Not implemented yet! )。 T_time2setText( tr(UTC time is: %1 :%2 :%3 ) .arg() .arg() .arg() )。 T_hightsetText(tr(Height: %1M) .arg())。N39。 ) .arg() )。S39。 ) .arg() )。E39。) .arg())。W39。) .arg())。 sleep(2)。 }}void gps::stop(){ fd=0。 flag_port=0。 T_portsetText(tr(info:Port amp。}加上Qt設置的程序后會顯示一個用戶界面如下圖所示,可以在開發(fā)板上通過觸摸屏手動控制,并且在終端會有相應提示。編譯完成后將Qtopia的庫文件,可執(zhí)行二進制文件等拷貝到Y(jié)AFFS2文件系統(tǒng)中,并在Linux的啟動腳本中,加入Qt的環(huán)境變量聲明。圖3 GPS定位終端的Qtopia圖形界面交叉編譯GPS應用程序,生成可執(zhí)行文件,并創(chuàng)建相關的啟動文件與圖標文件,添加到文件系統(tǒng)中的Qtopia目錄中,重新交叉編譯并下載Qtopia到開發(fā)板。 圖4 GPS圖形用戶界面 圖5 GPS定位信息顯示結(jié) 論本文主要介紹了利用嵌入式ARM9 S3C2440如何與PC進行通信,如何將GPS的定位信息由串口傳送到PC機上,如何讓PC機上編譯的程序在平臺上運行。2 創(chuàng)建開發(fā)環(huán)境,在PC機上安裝Ubuntu系統(tǒng)并對系統(tǒng)進行設置,安裝串口工具mini創(chuàng)建交叉編譯環(huán)境,創(chuàng)建QT開發(fā)平臺。4 將出現(xiàn)的結(jié)構(gòu)進行分析,這里會用到NAME0183協(xié)議,通過協(xié)議將得到代碼翻譯成經(jīng)度緯度高度的具體信息。參考文獻[1] 孫天澤,袁文菊,張海峰. 嵌入式設計及Linux驅(qū)動開發(fā)指南——:電子工業(yè)出版社,2007[2] 劉洪濤,孫天澤. 嵌入式系統(tǒng)技術(shù)與設計. :人民郵電出版社,2009[3] S3C2410 User’s Manual. Samsung Electronics Co., Ltd. [4]余萍,許勇,.[碩士學位論文].[5]王曉宇,.[學位論文].[6]江春華,.[學位論文].[7]潘成源,.[學位論文].[8]張慧敏,.[學位論文].[9]陳天麟,.[學位論文]. [6]汪小澄,2007(14):131~133[7] 王淵,趙宇. ,2006,29(06):94~96[8] 游霞. 嵌入式Linux下以太網(wǎng)驅(qū)動程序的開發(fā):[學位論文],電子科技大學,2007[9]蔡樹向,(2008)8011003致 謝本文的順利完成與王偉教授的悉心指導有著很大的聯(lián)系,在整個過程中處處都傾注著老師的心血,王老師淵博的學識、嚴謹?shù)闹螌W作風、敏銳超前的學術(shù)意識、對科學研究全身心的投入、認真負責的工作態(tài)度、平易的待人之道給我留下了深刻的印象王偉老師對我要求嚴格,每個過程王老師都嚴格把關,王老師雖對學生要求嚴格,平常卻很平易近人,給人講解簡明扼要,遇到不明白的更是詳細的講解。同時還要感謝師兄的幫助,給了我很多學習資料,我從師兄那里也學到很多知識,使得本人的研究工作乃至論文的撰寫得以順利地完成。附 錄 AGPS定位程序 include include include include include include include include include include include sys/include sys/include include include include static int fd。static int flag_port。/* * Constructs a gps which is a child of 39。, with the * name 39。 and widget flags set to 39。 */gps::gps( QWidget* parent, const char* name, WFlags fl ) : QWidget( parent, name, fl ){ if ( !name ) setName( gps )。 setCaption( tr( gps ) )。 T_latitudesetGeometry( QRect( 20, 20, 181, 20 ) )。 T_longitude = new QLabel( this, T_longitude )。 T_longitudesetText( tr( ) )。 T_timesetGeometry( QRect( 20, 80, 190, 20 ) )。 T_time2 = new QLabel( this, T_time2 )。 T_time2setText( tr( ) )。 T_statellitesetGeometry( QRect( 20, 140, 90, 20 ) )。 T_hight = new QLabel( this, T_hight )。 T_hightsetText( tr( ) )。 T_portsetGeometry( QRect( 20, 170, 191, 20 ) )。 B_start = new QPushButton( this, B_start )。 B_startsetText( tr( start ) )。 B_stopsetGeometry( QRect( 230, 60, 80, 31 ) )。 B_set = new QPushButton( this, B_set )。 B_setsetText( tr( open_port ) )。 B_closesetGeometry( QRect( 230, 160, 80, 31 ) )。 // signals and slots connections connect( B_start, SIGNAL( clicked() ), this, SLOT( start() ) )。 connect( B_set, SIGNAL( clicked() ), this, SLOT( set() ) )。 T_portsetText(tr(info:Please open the port first!))。 fd=open(/dev/ttySAC1, O_RDWR)。 //perror(open_port error)。 } qWarning(open fd sucess!)。opt)。 cfsetispeed(amp。 cfsetospeed(amp。 amp。 |=CS8。= ~PARENB。= ~INPCK。= ~CSTOPB。 [VMIN]=0。opt)){ qWarning( set error!!\n)。 } else qWarning(setting success!!)。 tcflush(fd,TCIOFLUSH)。 flag_gps=0。}void gps::start(){ char buffer[GPS_RECV_CMD_MAX_BUF]。 char Degree[4]。 char Hour[4]。 char Second[4]。 char Height[4]。 int no = 0。 T_portsetText(tr(info:Please open the port first!))。j=5。 sleep(1)。tmp,1)。$39。 }。$39。 for(i = 0。i++) { read(fd,amp。 buffer[i]=tmp。\n39。 } flag_gps=1。 if(buffer[2]==39。 amp。 buffer[3]==39。 amp。 buffer[4]==39。){ = 1。 //Time:615 no = 6。i 4。 Hour[0]=buffer[no]。 no += 2。i 4。 Minu[0]=buffer[no]。 no += 2。i 4。 Second[0]=buffer[no]。 = atoi(Hour
點擊復制文檔內(nèi)容
黨政相關相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1