1、GPS模块使用手册一、GPS模块多个关键指标1.卫星轨迹全球有24颗GPS卫星沿6条轨道绕地球运行(每4个一组),GPS接收模块就是靠接收这些卫星来进行定位。但通常在地球同一边不会超出12颗卫星,所以通常选择能够跟踪12颗卫星以下器件就能够了。当然,所能跟踪卫星数越多,性能越好。大多数GPS接收器能够追踪812颗卫星。计算2维坐标最少需要3颗卫星,4颗卫星能够计算3维坐标。2.并行通道因为最多可能有12颗卫星是可见,GPS接收器必需按次序访问每一颗卫星来获取每颗卫星信息,所以市面上GPS接收器大多数是12并行通道型,这许可它们连续追踪每一颗卫星信息。12通道接收器优点包含快速冷开启和初始化卫星
2、信息,而且在森林地域能够有愈加好接收效果。通常12通道接收器不需要外置天线,除非是在封闭空间,如船舱或车厢中。3.定位时间定位时间是指重启GPS接收器时,确定现在位置所需时间。对于12通道接收器,冷开启时定位时间通常为35 min,热开启时为1530 s。4.定位精度一般GPS接收器水平位置定位精度在510 m内。5.DGPS功效DGPS是一个固定GPS接收器,用于接收卫星信号。DGPS能够正确地计算出理论上卫星信号传送到正确时间,然后将它和实际传送时间相比较,并计算出差值。DGPS将这个差值发送出去,其它GPS接收器就能够利用这个差值得到一个更正确位置读数(510 m或更少误差)。很多GPS
3、设备提供商在部分地域设置了DGPS发送机,供用户无偿使用,只要用户所购置GPS接收器有DGPS功效即可。6.信号干扰要取得一个很好定位信号,GPS接收器必需最少能接收到35颗卫星。假如是在峡谷中或两边高楼林立街道上,或是在茂密丛林里,有可能接收不到足够卫星,无法定位或只能得到二维坐标。一样,假如在一个建筑里面,有可能无法更新位置。部分GPS接收器有单独天线能够贴在挡风玻璃上,或将一个外置天线放在车顶上,这有利于接收器收到更多卫星信号。二、HOLUX M-89 GPS模块特征我们选择是台湾生产HOLUX M-89 GPS模块,并为其配置了PCB板,以方便和单片机进行连接,下面和反面以下图所表示,
4、 HOLUX M-89 GPS接收卫星信号时通常还需要配置天线,以下图所表示:HOLUX M-89 GPS模块关键特征以下:产品特征通 道:并行32通道频 率:L1 1575.42MHzC/A码(1.023MHZ码片速率)跟踪灵敏度:-159dB动态性能速 度:515米/秒加速度:4g颠 簸:20米/秒捕捉时间重获取时间:0.1秒热开启时间:1秒温开启时间:33秒冷开启时间:36秒精度定位: 10米(2D RMS) 1-5米 (DGPS)速度: 0.1米/秒时间: 1ms数据特征I/O信息:1个全双工串行TTL接口数据传输速率: 480038400 (标准:9600)格式: SiRF二进制和N
5、MEA-0183(v3.01)GGA,GLL,GSA,GSV,RMC,VTGDGPS协议:RTCM SC-104,类型1,2和9脉冲延时: 100ms电气特征输入电压: 3.35VDC后备电源: 直流3V输入电流: 80mA物理特征尺寸: 25.4mm(D)25.4mm(W)3mm(H)重量: 7g环境特征操作温度: -30+85存贮范围: -40+85三、12864显示GPS数据试验1.HOLUX M-89 GPS模块和DD-900试验开发板连接HOLUX M-89 GPS模块安装在一块PCB板上,板上引出有6针间距为2.54mm插针,可方便地和顶顶电子开发DD-900试验开发板进行连接,各
6、插针管脚功效及其和DD-900试验开发板连接方法以下:1脚:指示灯,通电常亮,接收到卫星开始闪烁,模块板上带有LED灯,试验时可不接。2脚:外部复位输入,模块内部有复位电路,试验时可不接。3脚:模块串口数据输出。接DD-900试验开发板MCURXD脚(P30脚)。4脚:模块串口数据输入。接DD-900试验开发板MCUTXD脚(P31脚)。5脚:GND。接DD-900试验开发板地端。6脚:电源输入,电压范围:3.3-5V,接DD-900试验开发板3.3V或5V端。2.GPS源程序试验步骤(1)打开STC下载软件,将“12864液晶屏显示GPS数据C51源程序”中“GPS_12864.hex”目标
7、文件下载到DD-900试验开发板上。(2)取一只12864液晶显示器,将其插到DD-900试验开发板上。(3)将GPS模块和天线连接好。(4)找四根杜邦线,将GPS模块和DD-900试验开发板连接好。断开232和单片机短接插针。使单片机只能和GPS模块进行通信。(5)打开DD-900试验开发板电源,约几十秒后,在12864液晶屏上即可显示出经度、纬度、时间、海拔高度等信息,以下图所表示:以上信息意思为:东经120度23.7285分,北纬36度17.3538分,时间为15点10分52秒,海拔高度为145.6米。需要注意是,试验时,要将GPS模块和天线放置在室外,方便接收到卫星信号,另外,GPS开
8、启时需要一定开启时间,GPS开启后才能接收到并计算出正确数据。另外,假如你没有采取DD-900试验开发板,而是采取其它试验板,需要将单片机晶振频率设置为11.0592MHz,以确保GPS模块和单片机根据9600波特率进行通信。四、用串口调试助手查看GPS数据1.GPS模块和DD-900连接(1)GPS模块经过DD-900试验开发板串口,能够方便地和PC机进行连接,连接方法以下:(2)GPS模块3脚(模块串口数据输出)接DD-900试验开发板MCUTXD脚(P31脚),注意,和上个试验不一样。(3)GPS模块4脚(模块串口数据输入)接DD-900试验开发板MCURXD脚(P30脚),注意,和上个
9、试验不一样。(4)GPS模块5脚(GND)接DD-900试验开发板地端。(5)GPS模块6脚(电源输入)接DD-900试验开发板3.3V或5V端。(6)取下DD-900MCU。2.试验方法 连接完成后,打开顶顶串口调试助手,选择好串口(通常为串口1,假如采取USB转串口,要选择虚拟串口号,本例采取是USB转串口,虚拟串口号为COM5)。波特率选择为9600,校验位为NINE,数据位为8,停止位为1。以上设置完成后,打开串口,即可在接收窗口中接收到相关GPS数据,图所表示:五、其它1.GPS模块和PC机通信模组能够直接采取电平转换电路MAX232,将GPS模块串口和PC机串口连接,用串口调试工具
10、和GPS模块调试软件监控模块输出数据,注意:模块默认波特率为9600,PC机串口波特率必需设置成9600。假如没有接GPS天线或收不到卫星信号。模组上LED灯一直常亮,假如收到有效卫星信号LED开始闪烁。2.GPS数据协议GPS数据格式支持 NMEA0183 V 3.01 数据协议。格式 NMEA0183 V3.01: GPGGA(1 次1 秒)、GPGSA(1 次5 秒)、GPGSV(1 次5 秒)、GPRMC(1 次1 秒)、GPVTG(1 次1 秒)。下面是调试模组用串口监控到数据:无卫星状态:$GPGGA,000355.026,8960.0000,N,00000.0000,E,0,0,
11、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,
12、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,06
13、0180,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
14、*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,00
15、000.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$G
16、PGGA,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有卫星状态:$GPGGA,090113.000,3958.2847,N,11616.6454,E,1,8,1.00,
17、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.
18、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.0
19、0,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,17
20、5,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,39
21、58.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,
22、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
23、.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,39
24、58.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 语句数据格式GPS模块能够输出多个数据格式输出语句,这么,在源程序中,我们经过对这些输出语句进行解析,就能够得到GPS定位数据。下面关键介绍GPRMC和GPGGA输出语句:(1)GPRMC输出语句其标准格式为:$GPRMC, ,A*hh 比如:$GPRMC,024813.640,A,315
25、8.4608,N,11848.3737,E,10.05,324.27,150706,A*50 标准定位时间(UTC time)格式:时时分分秒秒.秒秒秒(hhmmss.sss)。 定位状态,A = 数据可用,V = 数据不可用。 纬度,格式:度度分分.分分分分(ddmm.mmmm)。 纬度区分,北半球(N)或南半球(S)。 经度,格式:度度分分.分分分分。 经度区分,东(E)半球或西(W)半球。 相对位移速度, 0.0 至 1851.8 knots(节) 相对位移方向,000.0 至 359.9度。实际值。 日期,格式:日日月月年年(ddmmyy)。 磁偏角,(000 - 180)度,前导位数
26、不足则补0 。 磁偏角方向,E=东W=西。A* 语句结束标志符。hh 从$开始全部ASCII码校验和。 回车换行。(2)GPGGA输出语句 这是一帧GPS定位关键数据,也是使用最广数据。为了便于了解,下面举例说明GPGGA语句各部分含义。其标准格式为:$GPGGA, ,M,M,*hh传送信息说明以下:$GPGGA:起始引导符及语句格式说明(本句为GPS定位数据)。 UTC时间,时时分分秒秒格式。 纬度,度度分分.分分分分格式(第1位是0也将传送)。 纬度半球,N或S(北纬或南纬)。 经度,度度度分分.分分分分格式(第1位0也将传送)。 经度半球,E或W(东经或西经)。 GPS质量指示,0:方位
27、无法使用,1=非差分GPS取得方位,2=差分方法取得方位(DGPS),6=估量取得。 使用卫星数量,从00到12(第1位是0也将传送)。 水平正确度,0.599.9。 天线离海平面高度,-9 999.99999.9m。M指单位米。 大地水准面高度,-999.99999.9m。M指单位米。 差分GPS数据期限(RTCM SC-104),最终设置RTCM传送秒数量(比如无DGPS为0)。 差分参考基站标号,从00001023,实时DGPS时无。* 语句结束标志符。hh 从$开始全部ASCII码校验和。 回车换行。比如,假如实时收到一条“$GPGGA”语句以下:$GPGGA,114641,3002.3232,N,12206.1157,E,1,03,12.9,53.2,M,11.6,M,*4A这是一条GPS定位数据信息语句,其含义是:UTC时间为11时46分41秒,位置在北纬30度2.323 2分,东经122度6.115 7分,一般GPS定位方法,接收到3颗卫星,水平精度为12.9 m,天线离海平面高度为53.2m,所在地离地平面高度为11.6m,校验和为4AH。因为GPS模块发送不止是一条语句,要完整接收这条“$GPGGA”语句,就必需判定这条语句头。也就是“$GPGGA,”这7个字符,当完整收到这7个字符后,才能确保是所需要数据。
©2010-2024 宁波自信网络信息技术有限公司 版权所有
客服电话:4008-655-100 投诉/维权电话:4009-655-100