SlideShare a Scribd company logo
1 of 23
接收 GPS 衛星定位資訊

組員;王守志、李育承、劉厚鈞

摘要
  本專題我們結合 GPS 晶片(LS20031 模組),透
過TTL轉UART介面與嵌入式系統平台 DMA6410L(Samsung S3C6410)做為結合,以達到嵌入式
1
系統平台取得目前地理位置、時間,回傳相關地理及時間
資訊,回傳的資料,供使用者運用(例如:行車追踪
器)。
關鍵詞: GPS

2
目 錄
1. 前言
2. 技術簡介
3. 架構圖
A. 硬體架構圖
B. 程式關係圖
C. 供「行車追踪器」程式介面
4. 系統展示
5. 參考文獻
6. 附件
A. 電路圖
B. 系統連接照片
C. NMEA 0183 ver 3.01 編碼原則
接收資料代號詳細號說明

3
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
3. 架構圖
A. 硬體架構圖

B. 程式關係圖

6
7
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
4. 系統展示
桿接好的 GPS 模組,測試是否正常運作(使用原廠軟體測
試)

9
完成測試軟體,在 DMA-6410 上測試 GPS

10
11
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
6. 附件
A. 電路圖

B. 系統連接照片

13
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
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
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
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
1

Fix not available

2

2D

3

3D

DOP:精度的監測與控制
Checksum:
GPS 的字串最後會有一個 Checksum Code,將字串的每個字元做 XOR,最後得到的 Code 若等於
Checksum Code 的話,就表示接收的資料無誤

18
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
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
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
S=Simulator
Checksum

*6

<CR> <LF>

End of message termination

22
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

More Related Content

What's hot

第16讲 Vlan和Vtp
第16讲 Vlan和Vtp第16讲 Vlan和Vtp
第16讲 Vlan和VtpF.l. Yu
 
第19讲 Isdn
第19讲 Isdn第19讲 Isdn
第19讲 IsdnF.l. Yu
 
第18讲 Hdlc和Ppp
第18讲 Hdlc和Ppp第18讲 Hdlc和Ppp
第18讲 Hdlc和PppF.l. Yu
 
第14讲 交换机基本操作
第14讲 交换机基本操作第14讲 交换机基本操作
第14讲 交换机基本操作F.l. Yu
 
2018 VLSI/CAD Symposium Tutorial (Aug. 7, 20:00-21:00 Room 3F-VII)
2018 VLSI/CAD Symposium Tutorial (Aug. 7, 20:00-21:00 Room 3F-VII)2018 VLSI/CAD Symposium Tutorial (Aug. 7, 20:00-21:00 Room 3F-VII)
2018 VLSI/CAD Symposium Tutorial (Aug. 7, 20:00-21:00 Room 3F-VII)Simen Li
 
本章分为三节,主要介绍:
本章分为三节,主要介绍:本章分为三节,主要介绍:
本章分为三节,主要介绍:ayoub lmaimouni
 
[ZigBee 嵌入式系統] ZigBee Architecture 與 TI Z-Stack Firmware
[ZigBee 嵌入式系統] ZigBee Architecture 與 TI Z-Stack Firmware[ZigBee 嵌入式系統] ZigBee Architecture 與 TI Z-Stack Firmware
[ZigBee 嵌入式系統] ZigBee Architecture 與 TI Z-Stack FirmwareSimen Li
 
IEC104规约介绍
IEC104规约介绍IEC104规约介绍
IEC104规约介绍Chen Ray
 
20170415- 智慧空調通訊系統實務_柯大
20170415- 智慧空調通訊系統實務_柯大20170415- 智慧空調通訊系統實務_柯大
20170415- 智慧空調通訊系統實務_柯大MAKERPRO.cc
 
第11讲 管理Cisco互联网络
第11讲 管理Cisco互联网络第11讲 管理Cisco互联网络
第11讲 管理Cisco互联网络F.l. Yu
 
3D Printer 韌體原始碼解析心得 (以 Marlin 為對象)
3D Printer 韌體原始碼解析心得 (以 Marlin 為對象)3D Printer 韌體原始碼解析心得 (以 Marlin 為對象)
3D Printer 韌體原始碼解析心得 (以 Marlin 為對象)roboard
 
第9讲 Eigrp
第9讲 Eigrp第9讲 Eigrp
第9讲 EigrpF.l. Yu
 
Arduino 習作工坊 - Lesson 3 電音之夜
Arduino 習作工坊 -  Lesson 3 電音之夜Arduino 習作工坊 -  Lesson 3 電音之夜
Arduino 習作工坊 - Lesson 3 電音之夜CAVEDU Education
 
第7讲 路由协议原理
第7讲 路由协议原理第7讲 路由协议原理
第7讲 路由协议原理F.l. Yu
 
实验3 ospf实验(研究生)2013春
实验3 ospf实验(研究生)2013春实验3 ospf实验(研究生)2013春
实验3 ospf实验(研究生)2013春凯 罗
 
使用 Arduino 控制 ESP8266 的各種方式
使用 Arduino 控制 ESP8266 的各種方式使用 Arduino 控制 ESP8266 的各種方式
使用 Arduino 控制 ESP8266 的各種方式Kenson Chiang
 

What's hot (20)

第16讲 Vlan和Vtp
第16讲 Vlan和Vtp第16讲 Vlan和Vtp
第16讲 Vlan和Vtp
 
第19讲 Isdn
第19讲 Isdn第19讲 Isdn
第19讲 Isdn
 
第18讲 Hdlc和Ppp
第18讲 Hdlc和Ppp第18讲 Hdlc和Ppp
第18讲 Hdlc和Ppp
 
第14讲 交换机基本操作
第14讲 交换机基本操作第14讲 交换机基本操作
第14讲 交换机基本操作
 
2018 VLSI/CAD Symposium Tutorial (Aug. 7, 20:00-21:00 Room 3F-VII)
2018 VLSI/CAD Symposium Tutorial (Aug. 7, 20:00-21:00 Room 3F-VII)2018 VLSI/CAD Symposium Tutorial (Aug. 7, 20:00-21:00 Room 3F-VII)
2018 VLSI/CAD Symposium Tutorial (Aug. 7, 20:00-21:00 Room 3F-VII)
 
本章分为三节,主要介绍:
本章分为三节,主要介绍:本章分为三节,主要介绍:
本章分为三节,主要介绍:
 
[ZigBee 嵌入式系統] ZigBee Architecture 與 TI Z-Stack Firmware
[ZigBee 嵌入式系統] ZigBee Architecture 與 TI Z-Stack Firmware[ZigBee 嵌入式系統] ZigBee Architecture 與 TI Z-Stack Firmware
[ZigBee 嵌入式系統] ZigBee Architecture 與 TI Z-Stack Firmware
 
IEC104规约介绍
IEC104规约介绍IEC104规约介绍
IEC104规约介绍
 
Stm32 technical slide_pdf
Stm32 technical slide_pdfStm32 technical slide_pdf
Stm32 technical slide_pdf
 
20170415- 智慧空調通訊系統實務_柯大
20170415- 智慧空調通訊系統實務_柯大20170415- 智慧空調通訊系統實務_柯大
20170415- 智慧空調通訊系統實務_柯大
 
第11讲 管理Cisco互联网络
第11讲 管理Cisco互联网络第11讲 管理Cisco互联网络
第11讲 管理Cisco互联网络
 
Arduino感測應用
Arduino感測應用Arduino感測應用
Arduino感測應用
 
3D Printer 韌體原始碼解析心得 (以 Marlin 為對象)
3D Printer 韌體原始碼解析心得 (以 Marlin 為對象)3D Printer 韌體原始碼解析心得 (以 Marlin 為對象)
3D Printer 韌體原始碼解析心得 (以 Marlin 為對象)
 
第9讲 Eigrp
第9讲 Eigrp第9讲 Eigrp
第9讲 Eigrp
 
Arduino 習作工坊 - Lesson 3 電音之夜
Arduino 習作工坊 -  Lesson 3 電音之夜Arduino 習作工坊 -  Lesson 3 電音之夜
Arduino 習作工坊 - Lesson 3 電音之夜
 
第7讲 路由协议原理
第7讲 路由协议原理第7讲 路由协议原理
第7讲 路由协议原理
 
实验3 ospf实验(研究生)2013春
实验3 ospf实验(研究生)2013春实验3 ospf实验(研究生)2013春
实验3 ospf实验(研究生)2013春
 
Arduino程式快速入門
Arduino程式快速入門Arduino程式快速入門
Arduino程式快速入門
 
89S51電路板
89S51電路板89S51電路板
89S51電路板
 
使用 Arduino 控制 ESP8266 的各種方式
使用 Arduino 控制 ESP8266 的各種方式使用 Arduino 控制 ESP8266 的各種方式
使用 Arduino 控制 ESP8266 的各種方式
 

Viewers also liked

AGIA -- Membership Marketing GPS Demo SomaStream Inc.
AGIA -- Membership Marketing GPS Demo SomaStream Inc.AGIA -- Membership Marketing GPS Demo SomaStream Inc.
AGIA -- Membership Marketing GPS Demo SomaStream Inc.somastream
 
Gps based vehicle tracking system
Gps based vehicle tracking systemGps based vehicle tracking system
Gps based vehicle tracking systemSoumitra Kisku
 
Vehicle tracking system using gps and google map
Vehicle tracking system using gps and google mapVehicle tracking system using gps and google map
Vehicle tracking system using gps and google mapsanchit bhargava
 
Vehicle Tracking System
Vehicle Tracking SystemVehicle Tracking System
Vehicle Tracking SystemVikas Agarwal
 
Global positioning system ppt
Global positioning system pptGlobal positioning system ppt
Global positioning system pptSwapnil Ramgirwar
 
Vehicle tracking system using gps and gsm
Vehicle tracking system using gps and gsmVehicle tracking system using gps and gsm
Vehicle tracking system using gps and gsmanita maharjan
 
Global Positioning System (GPS)
Global Positioning System (GPS) Global Positioning System (GPS)
Global Positioning System (GPS) richard_craig
 
Gps tracking system
Gps tracking system Gps tracking system
Gps tracking system Sumit Kumar
 
Vehicle tracking system using GSM and GPS
Vehicle tracking system using GSM and GPSVehicle tracking system using GSM and GPS
Vehicle tracking system using GSM and GPSBharath Chapala
 
Global Positioning System
Global Positioning System Global Positioning System
Global Positioning System Varun B P
 
Global positioning System
Global positioning SystemGlobal positioning System
Global positioning Systemayushrajput
 
Vehicle tracking system using gps and gsm techniques
Vehicle tracking system using gps and gsm techniquesVehicle tracking system using gps and gsm techniques
Vehicle tracking system using gps and gsm techniquesBharath Chapala
 

Viewers also liked (16)

AGIA -- Membership Marketing GPS Demo SomaStream Inc.
AGIA -- Membership Marketing GPS Demo SomaStream Inc.AGIA -- Membership Marketing GPS Demo SomaStream Inc.
AGIA -- Membership Marketing GPS Demo SomaStream Inc.
 
GPS Project Presentation
GPS Project PresentationGPS Project Presentation
GPS Project Presentation
 
Vehicle Tracking System Using GPS
Vehicle Tracking System Using GPSVehicle Tracking System Using GPS
Vehicle Tracking System Using GPS
 
Gps based vehicle tracking system
Gps based vehicle tracking systemGps based vehicle tracking system
Gps based vehicle tracking system
 
Global Positioning System (GPS)
Global Positioning System (GPS)Global Positioning System (GPS)
Global Positioning System (GPS)
 
Vehicle tracking system using gps and google map
Vehicle tracking system using gps and google mapVehicle tracking system using gps and google map
Vehicle tracking system using gps and google map
 
Vehicle Tracking System
Vehicle Tracking SystemVehicle Tracking System
Vehicle Tracking System
 
Global positioning system ppt
Global positioning system pptGlobal positioning system ppt
Global positioning system ppt
 
Vehicle tracking system using gps and gsm
Vehicle tracking system using gps and gsmVehicle tracking system using gps and gsm
Vehicle tracking system using gps and gsm
 
Global Positioning System (GPS)
Global Positioning System (GPS) Global Positioning System (GPS)
Global Positioning System (GPS)
 
Gps tracking system
Gps tracking system Gps tracking system
Gps tracking system
 
Vehicle tracking system using GSM and GPS
Vehicle tracking system using GSM and GPSVehicle tracking system using GSM and GPS
Vehicle tracking system using GSM and GPS
 
Global Positioning System
Global Positioning System Global Positioning System
Global Positioning System
 
Global positioning System
Global positioning SystemGlobal positioning System
Global positioning System
 
Gps ppt
Gps pptGps ppt
Gps ppt
 
Vehicle tracking system using gps and gsm techniques
Vehicle tracking system using gps and gsm techniquesVehicle tracking system using gps and gsm techniques
Vehicle tracking system using gps and gsm techniques
 

Similar to Project gps

基于嵌入式系统的Avs P10编码系统设计
基于嵌入式系统的Avs P10编码系统设计基于嵌入式系统的Avs P10编码系统设计
基于嵌入式系统的Avs P10编码系统设计Hengyi
 
PPP-RTK技术面临的机遇与挑战.pdf
PPP-RTK技术面临的机遇与挑战.pdfPPP-RTK技术面临的机遇与挑战.pdf
PPP-RTK技术面临的机遇与挑战.pdfpatrickwang85
 
Digital Passband Communication
Digital Passband CommunicationDigital Passband Communication
Digital Passband CommunicationPei-Che Chang
 
[智慧創新應用自造松]LPWAN]技術現況與應用實務
[智慧創新應用自造松]LPWAN]技術現況與應用實務[智慧創新應用自造松]LPWAN]技術現況與應用實務
[智慧創新應用自造松]LPWAN]技術現況與應用實務MAKERPRO.cc
 
Cisco路由协议高度总结
Cisco路由协议高度总结Cisco路由协议高度总结
Cisco路由协议高度总结blackbird_ly
 
Wireless Communication short talk
Wireless Communication short talkWireless Communication short talk
Wireless Communication short talkPei-Che Chang
 
第五章 5G信令流程.pdf
第五章 5G信令流程.pdf第五章 5G信令流程.pdf
第五章 5G信令流程.pdfpatrickwang85
 
7.Cne040608010038 Bts3812 E系统概述 Issue 1.0
7.Cne040608010038 Bts3812 E系统概述 Issue 1.07.Cne040608010038 Bts3812 E系统概述 Issue 1.0
7.Cne040608010038 Bts3812 E系统概述 Issue 1.0Atif Mahmood
 
Ad9850 mc145151
Ad9850 mc145151Ad9850 mc145151
Ad9850 mc145151kcarring
 
GPS技术问题.pptx
GPS技术问题.pptxGPS技术问题.pptx
GPS技术问题.pptxpatrickwang85
 
NTHU Comm Presentation
NTHU Comm PresentationNTHU Comm Presentation
NTHU Comm PresentationPei-Che Chang
 
接收 GPS 衛星定位資訊
接收 GPS 衛星定位資訊接收 GPS 衛星定位資訊
接收 GPS 衛星定位資訊艾鍗科技
 
How to transfer the paper to the box ?
How to transfer the paper to the box ?How to transfer the paper to the box ?
How to transfer the paper to the box ?Deloitte Consulting
 

Similar to Project gps (20)

基于嵌入式系统的Avs P10编码系统设计
基于嵌入式系统的Avs P10编码系统设计基于嵌入式系统的Avs P10编码系统设计
基于嵌入式系统的Avs P10编码系统设计
 
PPP-RTK技术面临的机遇与挑战.pdf
PPP-RTK技术面临的机遇与挑战.pdfPPP-RTK技术面临的机遇与挑战.pdf
PPP-RTK技术面临的机遇与挑战.pdf
 
Gps concepts
Gps conceptsGps concepts
Gps concepts
 
Digital Passband Communication
Digital Passband CommunicationDigital Passband Communication
Digital Passband Communication
 
[智慧創新應用自造松]LPWAN]技術現況與應用實務
[智慧創新應用自造松]LPWAN]技術現況與應用實務[智慧創新應用自造松]LPWAN]技術現況與應用實務
[智慧創新應用自造松]LPWAN]技術現況與應用實務
 
Cisco路由协议高度总结
Cisco路由协议高度总结Cisco路由协议高度总结
Cisco路由协议高度总结
 
Microbit 1 introduction
Microbit 1 introductionMicrobit 1 introduction
Microbit 1 introduction
 
Wireless Communication short talk
Wireless Communication short talkWireless Communication short talk
Wireless Communication short talk
 
第五章 5G信令流程.pdf
第五章 5G信令流程.pdf第五章 5G信令流程.pdf
第五章 5G信令流程.pdf
 
Microbit 1 overview
Microbit 1 overviewMicrobit 1 overview
Microbit 1 overview
 
7.Cne040608010038 Bts3812 E系统概述 Issue 1.0
7.Cne040608010038 Bts3812 E系统概述 Issue 1.07.Cne040608010038 Bts3812 E系统概述 Issue 1.0
7.Cne040608010038 Bts3812 E系统概述 Issue 1.0
 
Ad9850 mc145151
Ad9850 mc145151Ad9850 mc145151
Ad9850 mc145151
 
GPS技术问题.pptx
GPS技术问题.pptxGPS技术问题.pptx
GPS技术问题.pptx
 
20 cpu04
20 cpu0420 cpu04
20 cpu04
 
NTHU Comm Presentation
NTHU Comm PresentationNTHU Comm Presentation
NTHU Comm Presentation
 
19 cpu03
19 cpu0319 cpu03
19 cpu03
 
接收 GPS 衛星定位資訊
接收 GPS 衛星定位資訊接收 GPS 衛星定位資訊
接收 GPS 衛星定位資訊
 
Arduino序列通訊應用
Arduino序列通訊應用Arduino序列通訊應用
Arduino序列通訊應用
 
How to transfer the paper to the box ?
How to transfer the paper to the box ?How to transfer the paper to the box ?
How to transfer the paper to the box ?
 
18 cpu02
18 cpu0218 cpu02
18 cpu02
 

More from 艾鍗科技

TinyML - 4 speech recognition
TinyML - 4 speech recognition TinyML - 4 speech recognition
TinyML - 4 speech recognition 艾鍗科技
 
Appendix 1 Goolge colab
Appendix 1 Goolge colabAppendix 1 Goolge colab
Appendix 1 Goolge colab艾鍗科技
 
Project-IOT於餐館系統的應用
Project-IOT於餐館系統的應用Project-IOT於餐館系統的應用
Project-IOT於餐館系統的應用艾鍗科技
 
02 IoT implementation
02 IoT implementation02 IoT implementation
02 IoT implementation艾鍗科技
 
Tiny ML for spark Fun Edge
Tiny ML for spark Fun EdgeTiny ML for spark Fun Edge
Tiny ML for spark Fun Edge艾鍗科技
 
2. 機器學習簡介
2. 機器學習簡介2. 機器學習簡介
2. 機器學習簡介艾鍗科技
 
5.MLP(Multi-Layer Perceptron)
5.MLP(Multi-Layer Perceptron) 5.MLP(Multi-Layer Perceptron)
5.MLP(Multi-Layer Perceptron) 艾鍗科技
 
心率血氧檢測與運動促進
心率血氧檢測與運動促進心率血氧檢測與運動促進
心率血氧檢測與運動促進艾鍗科技
 
利用音樂&情境燈幫助放鬆
利用音樂&情境燈幫助放鬆利用音樂&情境燈幫助放鬆
利用音樂&情境燈幫助放鬆艾鍗科技
 
IoT感測器驅動程式 在樹莓派上實作
IoT感測器驅動程式在樹莓派上實作IoT感測器驅動程式在樹莓派上實作
IoT感測器驅動程式 在樹莓派上實作艾鍗科技
 
無線聲控遙控車
無線聲控遙控車無線聲控遙控車
無線聲控遙控車艾鍗科技
 
最佳光源的研究和實作
最佳光源的研究和實作最佳光源的研究和實作
最佳光源的研究和實作 艾鍗科技
 
無線監控網路攝影機與控制自走車
無線監控網路攝影機與控制自走車無線監控網路攝影機與控制自走車
無線監控網路攝影機與控制自走車 艾鍗科技
 
Reinforcement Learning
Reinforcement LearningReinforcement Learning
Reinforcement Learning艾鍗科技
 
人臉辨識考勤系統
人臉辨識考勤系統人臉辨識考勤系統
人臉辨識考勤系統艾鍗科技
 
智慧家庭Smart Home
智慧家庭Smart Home智慧家庭Smart Home
智慧家庭Smart Home艾鍗科技
 

More from 艾鍗科技 (20)

TinyML - 4 speech recognition
TinyML - 4 speech recognition TinyML - 4 speech recognition
TinyML - 4 speech recognition
 
Appendix 1 Goolge colab
Appendix 1 Goolge colabAppendix 1 Goolge colab
Appendix 1 Goolge colab
 
Project-IOT於餐館系統的應用
Project-IOT於餐館系統的應用Project-IOT於餐館系統的應用
Project-IOT於餐館系統的應用
 
02 IoT implementation
02 IoT implementation02 IoT implementation
02 IoT implementation
 
Tiny ML for spark Fun Edge
Tiny ML for spark Fun EdgeTiny ML for spark Fun Edge
Tiny ML for spark Fun Edge
 
Openvino ncs2
Openvino ncs2Openvino ncs2
Openvino ncs2
 
Step motor
Step motorStep motor
Step motor
 
2. 機器學習簡介
2. 機器學習簡介2. 機器學習簡介
2. 機器學習簡介
 
5.MLP(Multi-Layer Perceptron)
5.MLP(Multi-Layer Perceptron) 5.MLP(Multi-Layer Perceptron)
5.MLP(Multi-Layer Perceptron)
 
3. data features
3. data features3. data features
3. data features
 
心率血氧檢測與運動促進
心率血氧檢測與運動促進心率血氧檢測與運動促進
心率血氧檢測與運動促進
 
利用音樂&情境燈幫助放鬆
利用音樂&情境燈幫助放鬆利用音樂&情境燈幫助放鬆
利用音樂&情境燈幫助放鬆
 
IoT感測器驅動程式 在樹莓派上實作
IoT感測器驅動程式在樹莓派上實作IoT感測器驅動程式在樹莓派上實作
IoT感測器驅動程式 在樹莓派上實作
 
無線聲控遙控車
無線聲控遙控車無線聲控遙控車
無線聲控遙控車
 
最佳光源的研究和實作
最佳光源的研究和實作最佳光源的研究和實作
最佳光源的研究和實作
 
無線監控網路攝影機與控制自走車
無線監控網路攝影機與控制自走車無線監控網路攝影機與控制自走車
無線監控網路攝影機與控制自走車
 
Reinforcement Learning
Reinforcement LearningReinforcement Learning
Reinforcement Learning
 
Linux Device Tree
Linux Device TreeLinux Device Tree
Linux Device Tree
 
人臉辨識考勤系統
人臉辨識考勤系統人臉辨識考勤系統
人臉辨識考勤系統
 
智慧家庭Smart Home
智慧家庭Smart Home智慧家庭Smart Home
智慧家庭Smart Home
 

Project gps

  • 1. 接收 GPS 衛星定位資訊 組員;王守志、李育承、劉厚鈞 摘要   本專題我們結合 GPS 晶片(LS20031 模組),透 過TTL轉UART介面與嵌入式系統平台 DMA6410L(Samsung S3C6410)做為結合,以達到嵌入式 1
  • 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
  • 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
  • 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
  • 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