Your SlideShare is downloading. ×
Project gps
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Project gps

2,144
views

Published on

Published in: Technology, Business

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,144
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. 接收 GPS 衛星定位資訊 組員;王守志、李育承、劉厚鈞 摘要   本專題我們結合 GPS 晶片(LS20031 模組),透 過TTL轉UART介面與嵌入式系統平台 DMA6410L(Samsung S3C6410)做為結合,以達到嵌入式 1
  • 2. 系統平台取得目前地理位置、時間,回傳相關地理及時間 資訊,回傳的資料,供使用者運用(例如:行車追踪 器)。 關鍵詞: GPS 2
  • 3. 目 錄 1. 前言 2. 技術簡介 3. 架構圖 A. 硬體架構圖 B. 程式關係圖 C. 供「行車追踪器」程式介面 4. 系統展示 5. 參考文獻 6. 附件 A. 電路圖 B. 系統連接照片 C. NMEA 0183 ver 3.01 編碼原則 接收資料代號詳細號說明 3
  • 4. 1. 前言   本專題使用 LS20031 模組做為接收 GPS 衛星訊號接收器,運作流程是先 由 LS20031 的天線偵測目前在天空上可用衛星數,再由 MC-1513(MediaTek MT3339)晶片將衛星訊號接收、處理相關訊號資料及計算並定位目前地理位置, 再依據“NMEA 0183 ver 3.01” 的編碼原則所製定的資料格式,將處理完後將相 關可用的地理資訊,經由 LS20031 模組以(TTL)訊號方式,將可用的資訊 輸出至相關的裝置。 2. 技術簡介 NMEA 0183 ver 3.01 編碼原則,資料格式代號: GPGGA:衛星定位資訊     (Global positioning system fixed data) GPGLL:地理位置-經度及緯度     (Geographic position - latitude/longitude) GPGSA:衛星定位訊號狀態     (GNSS DOP and active satellites) GPGSV:可視範圍天空衛星狀態     (GNSS satellites in view) GPRMC:建議使用最小 GPS 數據格式     (Recommended minimum specific GNSS data) GPVTG:對地方向及對地速度     (Course over ground and ground speed) 詳細內容格式,請參考附件C 4
  • 5. 5
  • 6. 3. 架構圖 A. 硬體架構圖 B. 程式關係圖 6
  • 7. 7
  • 8. C. 供「行車追踪器」程式介面 輸入:(執行程式時,帶入參數) readNmea <device: com0~2-> 0-2 usb0~1-> 3-4 SAC0~1-> 5-6> ,<output after records read> ,<time different, For example: Taiwan will be 8> 1. 輸入裝置連接埠 2. 輸入處理 N 筆筆數後,才判定為有效資料 3. 時區參數修正,台北時區在國際標準時間時區為(UTC +08:00),故 GPS 讀入的時間為國際標準時間,再加上台北時區修正,方為正確的台北 時間。 程式執行範例: readNmea 6 10 8 開啟:device SAC1 記錄 N 筆資料:10 輸入修正時區:8 輸出:(執行程式時,輸出結果) <Lat> N, <Lon> E,hh:mm:ss dd/MM/YYYY <direction> <speed> 1. 緯度:顯示目前緯度位置 2. N:顯示南半球或北半球 3. 經度:顯示目前經度位置 4. E:顯示東經或西經 5. 國際標準時間:GPS 提供之國際標準時間 6. 方位指向:移動方位 7. 對地速度:移動速度 8
  • 9. 4. 系統展示 桿接好的 GPS 模組,測試是否正常運作(使用原廠軟體測 試) 9
  • 10. 完成測試軟體,在 DMA-6410 上測試 GPS 10
  • 11. 11
  • 12. 5. 參考文獻 NMEA data http://www.gpsinformation.org/dale/nmea.htm NMEA 相關中文說明 http://tw.myblog.yahoo.com/chimei-015/article?mid=1075 http://earthcat99.pixnet.net/blog/post/36811081-gps-nmea-%E8%AA%AA %E6%98%8E 原廠網址 http://www.locosystech.com/ LS20031_datasheet 大辰科技(LOCOSYS) http://www.sparkfun.com/datasheets/GPS/Modules/LS20030~3_da tasheet_v1.0.pdf GPSFOX 測試程式網址 http://www.pololu.com/file/download/GPSFox.zip?file_id=0J301 12
  • 13. 6. 附件 A. 電路圖 B. 系統連接照片 13
  • 14. C. NMEA 0183 ver 3.01 編碼原則,接收資料代號詳細號說 明 1. GPGGA:衛星定位資訊(Global positioning system fixed data) 資料範例: “$GPGGA,030753.000,2503.5021,N,12132.5388,E,1,7,1.36,45.4,M,15.2,M,,*69” 格式說明如下: Name Example Units Message ID $GPGGA GGA protocol header UTC Time 030753.000 hhmmss.sss Latitude 2503.5021 ddmm.mmmm N/S indicator N N=north or S=south 14 Description
  • 15. Longitude 12132.5388 dddmm.mmmm E/W Indicator E E=east or W=west 1 內容參見表格1-1 Satellites Used 7 Range 0 to 12 HDOP 1.36 Horizontal Dilution of Precision MSL Altitude 45.4 mters Units M mters Geoid Separation 15.2 mters Units M mters Position Fix Indicator second Age of Diff. Corr. Null fields when DGPS is not used Diff. Ref. Station ID Checksum *69 <CR> <LF> End of message termination 表格 1-1 Position Fix Indicators Value Description 0 Fix not available or invalid 1 GPS SPS Mode, fix valid 2 Differential GPS, SPS Mode, fix valid 3-5 Not supported 6 Dead Reckoning Mode, fix valid 15
  • 16. 2. GPGLL:地理位置-經度及緯度(Geographic position - latitude/longitude) 範例資料: $GPGLL,2503.5021,N,12132.5388,E,030822.000,A,A*55 格式說明如下: Name Example Message ID $GPGLL GLL protocol header Latitude 2503.5021 ddmm.mmmm N/S indicator N N=north or S=south Longitude E/W indicator UTC Time 12132.538 8 E 030822.00 0 Status A Mode A Checksum Units Description dddmm.mmmm E=east or W=west hhmmss.sss *55 <CR> <LF> A=data valid or V=data not valid A=autonomous, D=DGPS, E=DR, N=Data not valid, R=Coarse Position, S=Simulator End of message termination 16
  • 17. 3. GPGSA:衛星定位訊號狀態(GNSS DOP and active satellites) 接收範例資料: $GPGSA,A,3,17,10,20,28,04,08,193,,,,,,1.62,1.36,0.88*3B 格式說明如下: Name Example Units Description Message ID $GPGSA GSA protocol header Mode 1 A 內容參見表格1-2 Mode 2 3 內容參見表格1-3 ID of satellite used 17 Sv on Channel 1 ID of satellite used 10 Sv on Channel 2 …. …. ID of satellite used Sv on Channel 12 PDOP 1.62 Position Dilution of Precision HDOP 1.36 Horizontal Dilution of Precision VDOP 0.88 Vertical Dilution of Precision Checksum *3B <CR> <LF> End of message termination 表格 1-2 Mode 1 Value Description M Manual-forced to operate in 2D or 3D mode A Automatic-allowed to automatically switch 2D/3D 表格 1-3 Mode 2 Value Description 17
  • 18. 1 Fix not available 2 2D 3 3D DOP:精度的監測與控制 Checksum: GPS 的字串最後會有一個 Checksum Code,將字串的每個字元做 XOR,最後得到的 Code 若等於 Checksum Code 的話,就表示接收的資料無誤 18
  • 19. 4. GPGSV:可視範圍天空衛星狀態(GNSS satellites in view) 接收範例資料: $GPGSV,4,1,14,193,75,038,20,28,70,198,21,17,52,349,28,50,50,134,29*4F $GPGSV,4,2,14,04,44,280,17,20,40,050,33,10,29,200,22,23,13,103,38*73 $GPGSV,4,3,14,32,11,040,15,13,09,137,,02,08,255,,08,07,196,19*75 $GPGSV,4,4,14,11,03,071,,09,02,300,*71 格式說明如下: Name Message ID Total number of messages1 Message number1 Satellites in view Satellite ID Example $GPGSV Units Description GSV protocol header 4 Range 1 to 4 1 Range 1 to 4 14 193 Channel 1 Elevation 75 Azimuth 038 SNR (C/No) 20 Satellite ID 28 Elevation 70 Azimuth 198 SNR (C/No) 21 Satellite ID 17 Elevation 52 Azimuth 349 degree s degree s dB-Hz degree s degree s dB-Hz degree s degree Channel 1 (Range 00 to 90) Channel 1 (Range 000 to 359) Channel 1 (Range 00 to 99, null when not tracking) Channel 2 Channel 2 (Range 00 to 90) Channel 2 (Range 000 to 359) Channel 2 (Range 00 to 99, null when not tracking) Channel 3 Channel 3 (Range 00 to 90) Channel 3 (Range 000 to 359) 19
  • 20. s SNR (C/No) 28 Satellite ID 50 Elevation 50 Azimuth 134 SNR (C/No) 29 Checksum <CR> <LF> *4F dB-Hz degree s degree s dB-Hz Channel 3 (Range 00 to 99, null when not tracking) Channel 4 Channel 4 (Range 00 to 90) Channel 4 (Range 000 to 359) Channel 4 (Range 00 to 99, null when not tracking) End of message termination 20
  • 21. 5. GPRMC:建議使用最小 GPS 數據格式(Recommended minimum specific GNSS data ) 接收範例資料: $GPRMC,030822.000,A,2503.5021,N,12132.5388,E,0.00,292.73,201112,,,A*6E 格式說明如下: Name Example Message ID $GPRMC UTC Time Units Description RMC protocol header 030822.00 hhmmss.sss 0 Status A A=data valid or V=data not valid Latitude 2503.5021 ddmm.mmmm N/S Indicator N N=north or S=south Longitude E/W Indicator Speed over ground Course over ground Date 12132.538 dddmm.mmmm 8 E 0.00 292.73 E=east or W=west knots True degree s 201112 ddmmyy Magnetic degree variation s Variation sense Mode E=east or W=west (Not shown) A A=autonomous, D=DGPS, E=DR, N=Data not valid, R=Coarse Position, 21
  • 22. S=Simulator Checksum *6 <CR> <LF> End of message termination 22
  • 23. 6. GPVTG:對地方向及對地速度(Course over ground and ground speed) 接收資料範例: $GPVTG,292.73,T,,M,0.00,N,0.00,K,A*30 格式說明如下: Name Example Message ID $GPVTG Course over ground Reference 292.73 Units VTG protocol header degree s T degree ground s Speed over ground Units Speed over ground Units M 0.00 K Measured heading Magnetic knots N 0.00 Measured heading True Course over Reference Description Measured speed Knots km/hr Measured speed Kilometer per hour A=autonomous, D=DGPS, E=DR, Mode A N=Data not valid, R=Coarse Position, S=Simulator Checksum <CR> <LF> *30 End of message termination 23