GPS模塊使用手冊(cè).doc_第1頁
GPS模塊使用手冊(cè).doc_第2頁
GPS模塊使用手冊(cè).doc_第3頁
GPS模塊使用手冊(cè).doc_第4頁
GPS模塊使用手冊(cè).doc_第5頁
已閱讀5頁,還剩4頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

GPS模塊使用手冊(cè)一、GPS模塊的幾個(gè)重要指標(biāo)1.衛(wèi)星軌跡全球有24顆GPS衛(wèi)星沿6條軌道繞地球運(yùn)行(每4個(gè)一組),GPS接收模塊就是靠接收這些衛(wèi)星來進(jìn)行定位的。但一般在地球的同一邊不會(huì)超過12顆衛(wèi)星,所以一般選擇可以跟蹤12顆衛(wèi)星以下的器件就可以了。當(dāng)然,所能跟蹤的衛(wèi)星數(shù)越多,性能越好。大多數(shù)GPS接收器可以追蹤812顆衛(wèi)星。計(jì)算2維坐標(biāo)至少需要3顆衛(wèi)星,4顆衛(wèi)星可以計(jì)算3維坐標(biāo)。2.并行通道由于最多可能有12顆衛(wèi)星是可見的,GPS接收器必須按順序訪問每一顆衛(wèi)星來獲取每顆衛(wèi)星的信息,所以市面上的GPS接收器大多數(shù)是12并行通道型的,這允許它們連續(xù)追蹤每一顆衛(wèi)星的信息。12通道接收器的優(yōu)點(diǎn)包括快速冷啟動(dòng)和初始化衛(wèi)星的信息,而且在森林地區(qū)可以有更好的接收效果。一般12通道接收器不需要外置天線,除非是在封閉的空間,如船艙或車廂中。3.定位時(shí)間定位時(shí)間是指重啟GPS接收器時(shí),確定現(xiàn)在位置所需的時(shí)間。對(duì)于12通道接收器,冷啟動(dòng)時(shí)的定位時(shí)間一般為35 min,熱啟動(dòng)時(shí)為1530 s。4.定位精度普通GPS接收器的水平位置定位精度在510 m內(nèi)。5.DGPS功能DGPS是一個(gè)固定的GPS接收器,用于接收衛(wèi)星的信號(hào)。DGPS可以準(zhǔn)確地計(jì)算出理論上衛(wèi)星信號(hào)傳送到的精確時(shí)間,然后將它與實(shí)際傳送時(shí)間相比較,并計(jì)算出差值。DGPS將這個(gè)差值發(fā)送出去,其它GPS接收器就可以利用這個(gè)差值得到一個(gè)更精確的位置讀數(shù)(510 m或者更少的誤差)。許多GPS設(shè)備提供商在一些地區(qū)設(shè)置了DGPS發(fā)送機(jī),供客戶免費(fèi)使用,只要客戶所購買的GPS接收器有DGPS功能即可。6.信號(hào)干擾要獲得一個(gè)很好的定位信號(hào),GPS接收器必須至少能接收到35顆衛(wèi)星。如果是在峽谷中或兩邊高樓林立的街道上,或者是在茂密的叢林里,有可能接收不到足夠的衛(wèi)星,無法定位或者只能得到二維坐標(biāo)。同樣,如果在一個(gè)建筑里面,有可能無法更新位置。一些GPS接收器有單獨(dú)的天線可以貼在擋風(fēng)玻璃上,或者將一個(gè)外置天線放在車頂上,這有助于接收器收到更多的衛(wèi)星信號(hào)。二、HOLUX M-89 GPS模塊特性我們選用的是臺(tái)灣生產(chǎn)的HOLUX M-89 GPS模塊,并為其配備了PCB板,以方便與單片機(jī)進(jìn)行連接,下面與反面如下圖所示, HOLUX M-89 GPS接收衛(wèi)星信號(hào)時(shí)一般還需要配備天線,如下圖所示:HOLUX M-89 GPS模塊主要特性如下:產(chǎn)品特征通 道:并行32通道頻 率:L1 1575.42MHzC/A碼(1.023MHZ碼片速率)跟蹤靈敏度:-159dB動(dòng)態(tài)性能速 度:515米/秒加速度:4g顛 簸:20米/秒捕獲時(shí)間重獲取時(shí)間:0.1秒熱啟動(dòng)時(shí)間:1秒溫啟動(dòng)時(shí)間:33秒冷啟動(dòng)時(shí)間:36秒精度定位: 10米(2D RMS) 1-5米 (DGPS)速度: 0.1米/秒時(shí)間: 1ms數(shù)據(jù)特性I/O信息:1個(gè)全雙工串行TTL接口數(shù)據(jù)傳輸速率: 480038400 (標(biāo)準(zhǔn):9600)格式: SiRF二進(jìn)制和NMEA-0183(v3.01)GGA,GLL,GSA,GSV,RMC,VTGDGPS協(xié)議:RTCM SC-104,類型1,2和9脈沖延時(shí): 100ms電氣特性輸入電壓: 3.35VDC后備電源: 直流3V輸入電流: 80mA物理特性尺寸: 25.4mm(D)25.4mm(W)3mm(H)重量: 7g環(huán)境特性操作溫度: -30+85存貯范圍: -40+85三、12864顯示GPS數(shù)據(jù)實(shí)驗(yàn)1.HOLUX M-89 GPS模塊與DD-900實(shí)驗(yàn)開發(fā)板的連接HOLUX M-89 GPS模塊安裝在一塊PCB板上,板上引出有6針間距為2.54mm的插針,可方便地與頂頂電子開發(fā)的DD-900實(shí)驗(yàn)開發(fā)板進(jìn)行連接,各插針管腳功能及其與DD-900實(shí)驗(yàn)開發(fā)板的連接方法如下:1腳:指示燈,通電常亮,接收到衛(wèi)星開始閃爍,模塊板上帶有LED燈,實(shí)驗(yàn)時(shí)可不接。2腳:外部復(fù)位輸入,模塊內(nèi)部有復(fù)位電路,實(shí)驗(yàn)時(shí)可不接。3腳:模塊串口數(shù)據(jù)輸出。接DD-900實(shí)驗(yàn)開發(fā)板MCU的RXD腳(P30腳)。4腳:模塊串口數(shù)據(jù)輸入。接DD-900實(shí)驗(yàn)開發(fā)板MCU的TXD腳(P31腳)。5腳:GND。接DD-900實(shí)驗(yàn)開發(fā)板的地端。6腳:電源輸入,電壓范圍:3.3-5V,接DD-900實(shí)驗(yàn)開發(fā)板的3.3V或5V端。2.GPS源程序?qū)嶒?yàn)步驟(1)打開STC下載軟件,將“12864液晶屏顯示GPS數(shù)據(jù)C51源程序”中的“GPS_12864.hex”目標(biāo)文件下載到DD-900實(shí)驗(yàn)開發(fā)板上。(2)取一只12864液晶顯示屏,將其插到DD-900實(shí)驗(yàn)開發(fā)板上。(3)將GPS模塊與天線連接好。(4)找四根杜邦線,將GPS模塊與DD-900實(shí)驗(yàn)開發(fā)板的連接好。斷開232與單片機(jī)的短接插針。使單片機(jī)只能與GPS模塊進(jìn)行通信。(5)打開DD-900實(shí)驗(yàn)開發(fā)板電源,約幾十秒后,在12864液晶屏上即可顯示出經(jīng)度、緯度、時(shí)間、海拔高度等信息,如下圖所示:以上信息的意思為:東經(jīng)120度23.7285分,北緯36度17.3538分,時(shí)間為15點(diǎn)10分52秒,海拔高度為145.6米。需要注意的是,實(shí)驗(yàn)時(shí),要將GPS模塊和天線放置在室外,以便接收到衛(wèi)星信號(hào),另外,GPS啟動(dòng)時(shí)需要一定的啟動(dòng)時(shí)間,GPS啟動(dòng)后才能接收到并計(jì)算出正確的數(shù)據(jù)。另外,如果你沒有采用DD-900實(shí)驗(yàn)開發(fā)板,而是采用其它實(shí)驗(yàn)板,需要將單片機(jī)晶振頻率設(shè)置為11.0592MHz,以保證GPS模塊與單片機(jī)按照9600的波特率進(jìn)行通信。四、用串口調(diào)試助手查看GPS數(shù)據(jù)1.GPS模塊與DD-900的連接(1)GPS模塊通過DD-900實(shí)驗(yàn)開發(fā)板串口,可以方便地與PC機(jī)進(jìn)行連接,連接方法如下:(2)GPS模塊的3腳(模塊串口數(shù)據(jù)輸出)接DD-900實(shí)驗(yàn)開發(fā)板MCU的TXD腳(P31腳),注意,與上個(gè)實(shí)驗(yàn)不同。(3)GPS模塊的4腳(模塊串口數(shù)據(jù)輸入)接DD-900實(shí)驗(yàn)開發(fā)板MCU的RXD腳(P30腳),注意,與上個(gè)實(shí)驗(yàn)不同。(4)GPS模塊5腳(GND)接DD-900實(shí)驗(yàn)開發(fā)板的地端。(5)GPS模塊6腳(電源輸入)接DD-900實(shí)驗(yàn)開發(fā)板的3.3V或5V端。(6)取下DD-900的MCU。2.實(shí)驗(yàn)方法 連接完成后,打開頂頂串口調(diào)試助手,選擇好串口(一般為串口1,如果采用USB轉(zhuǎn)串口,要選擇虛擬串口號(hào),本例采用的是USB轉(zhuǎn)串口,虛擬串口號(hào)為COM5)。波特率選擇為9600,校驗(yàn)位為NINE,數(shù)據(jù)位為8,停止位為1。以上設(shè)置完成后,打開串口,即可在接收窗口中接收到有關(guān)的GPS數(shù)據(jù),如圖所示:五、其它1.GPS模塊與PC機(jī)的通信模組可以直接采用電平轉(zhuǎn)換電路MAX232,將GPS模塊的串口和PC機(jī)的串口連接,用串口調(diào)試工具和GPS模塊調(diào)試軟件監(jiān)控模塊輸出的數(shù)據(jù),注意:模塊的默認(rèn)波特率為9600,PC機(jī)串口波特率必須設(shè)置成9600。如果沒有接GPS天線或收不到衛(wèi)星信號(hào)。模組上的LED燈一直常亮,如果收到有效的衛(wèi)星信號(hào)LED開始閃爍。2.GPS的數(shù)據(jù)協(xié)議GPS數(shù)據(jù)格式支持 NMEA0183 V 3.01 數(shù)據(jù)協(xié)議。格式 NMEA0183 V3.01: GPGGA(1 次1 秒)、GPGSA(1 次5 秒)、GPGSV(1 次5 秒)、GPRMC(1 次1 秒)、GPVTG(1 次1 秒)。下面是調(diào)試模組用串口監(jiān)控到的數(shù)據(jù):無衛(wèi)星狀態(tài):$GPGGA,000355.026,8960.0000,N,00000.0000,E,0,0,137.0,M,13.0,M,*44$GPGSA,A,1,*1E$GPGSV,1,1,00*79$GPRMC,000355.026,V,8960.0000,N,00000.0000,E,0.00,0.00,060180,N*79$GPVTG,0.00,T,M,0.00,N,0.00,K,N*32$GPGGA,000356.026,8960.0000,N,00000.0000,E,0,0,137.0,M,13.0,M,*47$GPRMC,000356.026,V,8960.0000,N,00000.0000,E,0.00,0.00,060180,N*7A$GPVTG,0.00,T,M,0.00,N,0.00,K,N*32$GPGGA,000357.026,8960.0000,N,00000.0000,E,0,0,137.0,M,13.0,M,*46$GPRMC,000357.026,V,8960.0000,N,00000.0000,E,0.00,0.00,060180,N*7B$GPVTG,0.00,T,M,0.00,N,0.00,K,N*32$GPGGA,000358.026,8960.0000,N,00000.0000,E,0,0,137.0,M,13.0,M,*49$GPRMC,000358.026,V,8960.0000,N,00000.0000,E,0.00,0.00,060180,N*74$GPVTG,0.00,T,M,0.00,N,0.00,K,N*32$GPGGA,000359.026,8960.0000,N,00000.0000,E,0,0,137.0,M,13.0,M,*48$GPRMC,000359.026,V,8960.0000,N,00000.0000,E,0.00,0.00,060180,N*75$GPVTG,0.00,T,M,0.00,N,0.00,K,N*32$GPGGA,000400.026,8960.0000,N,00000.0000,E,0,0,137.0,M,13.0,M,*43$GPGSA,A,1,*1E$GPGSV,1,1,00*79$GPRMC,000400.026,V,8960.0000,N,00000.0000,E,0.00,0.00,060180,N*7E$GPVTG,0.00,T,M,0.00,N,0.00,K,N*32$GPGGA,000401.026,8960.0000,N,00000.0000,E,0,0,137.0,M,13.0,M,*42$GPRMC,000401.026,V,8960.0000,N,00000.0000,E,0.00,0.00,060180,N*7F$GPVTG,0.00,T,M,0.00,N,0.00,K,N*32$GPGGA,000402.026,8960.0000,N,00000.0000,E,0,0,137.0,M,13.0,M,*41$GPRMC,000402.026,V,8960.0000,N,00000.0000,E,0.00,0.00,060180,N*7C$GPVTG,0.00,T,M,0.00,N,0.00,K,N*32$GPGGA,000403.026,8960.0000,N,00000.0000,E,0,0,137.0,M,13.0,M,*40$GPRMC,000403.026,V,8960.0000,N,00000.0000,E,0.00,0.00,060180,N*7D$GPVTG,0.00,T,M,0.00,N,0.00,K,N*32$GPGGA,000404.026,8960.0000,N,00000.0000,E,0,0,137.0,M,13.0,M,*47$GPRMC,000404.026,V,8960.0000,N,00000.0000,E,0.00,0.00,060180,N*7A$GPVTG,0.00,T,M,0.00,N,0.00,K,N*32$GPGGA,000405.026,8960.0000,N,00000.0000,E,0,0,137.0,M,13.0,M,*46$GPGSA,A,1,*1E有衛(wèi)星狀態(tài):$GPGGA,090113.000,3958.2847,N,11616.6454,E,1,8,1.00,67.6,M,-6.7,M,*78$GPRMC,090113.000,A,3958.2847,N,11616.6454,E,0.00,0.00,080110,A*60$GPVTG,0.00,T,M,0.00,N,0.00,K,A*3D$GPGGA,090114.000,3958.2847,N,11616.6456,E,1,8,1.00,67.7,M,-6.7,M,*7C$GPRMC,090114.000,A,3958.2847,N,11616.6456,E,0.00,0.00,080110,A*65$GPVTG,0.00,T,M,0.00,N,0.00,K,A*3D$GPGGA,090115.000,3958.2846,N,11616.6456,E,1,8,1.00,67.7,M,-6.7,M,*7C$GPRMC,090115.000,A,3958.2846,N,11616.6456,E,0.00,0.00,080110,A*65$GPVTG,0.00,T,M,0.00,N,0.00,K,A*3D$GPGGA,090116.000,3958.2846,N,11616.6456,E,1,8,1.00,67.8,M,-6.7,M,*70$GPRMC,090116.000,A,3958.2846,N,11616.6456,E,0.00,0.00,080110,A*66$GPVTG,0.00,T,M,0.00,N,0.00,K,A*3D$GPGGA,090117.000,3958.2845,N,11616.6457,E,1,8,1.00,67.8,M,-6.7,M,*73$GPGSA,A,3,29,15,10,18,09,21,24,27,1.28,1.00,0.79*08$GPGSV,3,1,10,24,78,302,38,15,77,207,42,29,36,238,48,10,33,073,24*76$GPGSV,3,2,10,21,29,310,39,08,22,054,18,15,276,42,27,14,167,36*7D$GPGSV,3,3,10,09,05,175,35,40,*45$GPRMC,090117.000,A,3958.2845,N,11616.6457,E,0.00,0.00,080110,A*65$GPVTG,0.00,T,M,0.00,N,0.00,K,A*3D$GPGGA,090118.000,3958.2846,N,11616.6457,E,1,8,1.00,67.8,M,-6.7,M,*7F$GPRMC,090118.000,A,3958.2846,N,11616.6457,E,0.00,0.00,080110,A*69$GPVTG,0.00,T,M,0.00,N,0.00,K,A*3D$GPGGA,090119.000,3958.2846,N,11616.6458,E,1,9,0.85,67.8,M,-6.7,M,*7C$GPRMC,090119.000,A,3958.2846,N,11616.6458,E,0.00,0.00,080110,A*67$GPVTG,0.00,T,M,0.00,N,0.00,K,A*3D$GPGGA,090120.000,3958.2847,N,11616.6459,E,1,9,0.85,67.8,M,-6.7,M,*76$GPRMC,090120.000,A,3958.2847,N,11616.6459,E,0.00,0.00,080110,A*6D$GPVTG,0.00,T,M,0.00,N,0.00,K,A*3D$GPGGA,090121.000,3958.2847,N,11616.6460,E,1,9,0.85,67.8,M,-6.7,M,*7D$GPRMC,090121.000,A,3958.2847,N,11616.6460,E,0.00,0.00,080110,A*66$GPVTG,0.00,T,M,0.00,N,0.00,K,A*3D$GPGGA,090122.000,3958.2847,N,11616.6461,E,1,9,0.85,67.8,M,-6.7,M,*7F$GPGSA,A,3,29,15,10,18,09,21,24,08,27,1.14,0.85,0.77*0D$GPGSV,3,1,10,24,78,302,38,15,77,207,42,29,36,238,48,10,33,073,22*70$GPGSV,3,2,10,21,29,310,39,08,22,054,21,18,15,276,42,27,14,167,36*7E$GPGSV,3,3,10,09,05,175,35,43,*46$GPRMC,090122.000,A,3958.2847,N,11616.6461,E,0.00,0.00,080110,A*64$GPVTG,0.00,T,M,0.00,N,0.00,K,A*3D$GPGGA,090123.000,3958.2848,N,11616.6462,E,1,9,0.85,67.8,M,-6.7,M,*72$GPRMC,090123.000,A,3958.2848,N,11616.6462,E,0.00,0.00,080110,A*69$GPVTG,0.00,T,M,0.00,N,0.00,K,A*3D2.GPS 語句數(shù)據(jù)格式GPS模塊可以輸出多種數(shù)據(jù)格式輸出語句,這樣,在源程序中,我們通過對(duì)這些輸出語句進(jìn)行解析,就可以得到GPS的定位數(shù)據(jù)。下面重點(diǎn)介紹GPRMC和GPGGA輸出語句:(1)GPRMC輸出語句其標(biāo)準(zhǔn)格式為:$GPRMC, ,A*hh 例如:$GPRMC,024813.640,A,3158.4608,N,11848.3737,E,10.05,324.27,150706,A*50 標(biāo)準(zhǔn)定位時(shí)間(UTC time)格式:時(shí)時(shí)分分秒秒.秒秒秒(hhmmss.sss)。 定位狀態(tài),A = 數(shù)據(jù)可用,V = 數(shù)據(jù)不可用。 緯度,格式:度度分分.分分分分(ddmm.mmmm)。 緯度區(qū)分,北半球(N)或南半球(S)。 經(jīng)度,格式:度度分分.分分分分。 經(jīng)度區(qū)分,東(E)半球或西(W)半球。 相對(duì)位移速度, 0.0 至 1851.8 knots(節(jié)) 相對(duì)位移方向,000.0 至 359.9度。實(shí)際值。 日期,格式:日日月月年年(ddmmyy)。 磁偏角,(000 - 180)度,前導(dǎo)位數(shù)不足則補(bǔ)0 。 磁偏角方向,E=東W=西。A* 語句結(jié)束標(biāo)志符。hh 從$開始的所

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論