“(SKU:RB-03T031)20 channel EM-406A Sirf iii Receiver with Antenna”的版本间的差异

来自ALSROBOT WiKi
跳转至: 导航搜索
(以“ ==产品概述== EM-406A GPS模块为USGlobalSat原装进口产品。它无疑是给对GPS感兴趣的朋友一份大礼...”为内容创建页面)
 
第16行: 第16行:
  
 
==应用例程==
 
==应用例程==
 +
GPS定位
 +
===连接示意图===
 +
[[文件:RB-03T0311.jpg|700px|缩略图|居中]]
 +
===示例代码===
 +
<pre style='color:blue'>#include <nmea.h>
  
 +
// create a GPS data connection to GPRMC sentence type
 +
NMEA gps(GPRMC);
 +
 +
void setup() {
 +
  Serial1.begin(4800);
 +
  pinMode(8, OUTPUT);
 +
}
 +
 +
void loop() {
 +
  if (Serial1.available() > 0 ) {
 +
    // read incoming character from GPS
 +
    char c = Serial1.read();
 +
 +
    // check if the character completes a valid GPS sentence
 +
    if (gps.decode(c)) {
 +
      // check if GPS positioning was active
 +
      if (gps.gprmc_status() == 'A') {
 +
        // check if you are in Colorado, USA
 +
        boolean inColorado = (gps.gprmc_latitude() > 37.0)
 +
                          && (gps.gprmc_latitude() < 41.0)
 +
                          && (gps.gprmc_longitude() < -102.05)
 +
                          && (gps.gprmc_longitude() > -109.05);
 +
 +
        // set led accordingly
 +
        if (inColorado) {
 +
          digitalWrite(8, HIGH);
 +
        } else {
 +
          digitalWrite(8, LOW);
 +
        }
 +
      }
 +
    }
 +
  }
 +
}</pre>
 +
===程序效果===
 +
一个GPS数据连接类型GPRMC创建,用于获取位置信息。当GPS的位置是在科罗拉多州(美国),该LED灯亮,否则关闭。
 
==产品相关推荐==
 
==产品相关推荐==
购买地址:[http://www.alsrobot.cn/goods-506.html 20 channel EM-406A Sirf iii Receiver with Antenna]
+
购买地址:[http://www.alsrobot.cn/goods-506.html 20 channel EM-406A Sirf iii Receiver with Antenna]<br />
 +
 
 +
相关资料1:[https://www.sparkfun.com/datasheets/GPS/EM-406A_User_Manual.PDF em-406a数据表]<br />
 +
 
 +
相关资料2:[https://www.sparkfun.com/datasheets/GPS/NMEA%20Reference%20Manual1.pdf NMEA参考手册]<br />
 +
 
 +
相关资料3:[https://www.sparkfun.com/tutorials/169 sparkfungps概述]<br />
 +
 
 +
相关资料4:[http://wiring.org.co/learning/libraries/basicpositioning.html 布线的例子]

2015年6月12日 (五) 14:11的版本

RB-03T031.jpg

目录

产品概述

EM-406A GPS模块为USGlobalSat原装进口产品。它无疑是给对GPS感兴趣的朋友一份大礼,其中EM-406A GPS模块是基于高性能SiRF StarIII芯片组成的。这款模块所使用的技术与ET-301一样,并且GPS模块上还包括了电压调节,LED状态指示灯,内置贴片天线,支持随即储存器的电池,提供一个6Pin的数据通信接口。非常适合UAV以及航模使用。

规格参数

  1. 20通道接收机
  2. 灵敏度:-159dBm
  3. 定位精度10米/ 5米 (WAAS模式下)
  4. 热启动:1秒
  5. 暖启动:38秒
  6. 冷启动:42秒
  7. 输出NMEA 0183
  8. 70mA @ 4.5-6.5V
  9. 尺寸:30mm x 30mm x 10.5mm
  10. 重量:16克包括电缆

使用方法

应用例程

GPS定位

连接示意图

RB-03T0311.jpg

示例代码

#include <nmea.h>

// create a GPS data connection to GPRMC sentence type
NMEA gps(GPRMC);

void setup() {
  Serial1.begin(4800);
  pinMode(8, OUTPUT);
}

void loop() {
  if (Serial1.available() > 0 ) {
    // read incoming character from GPS
    char c = Serial1.read();

    // check if the character completes a valid GPS sentence
    if (gps.decode(c)) {
      // check if GPS positioning was active
      if (gps.gprmc_status() == 'A') {
        // check if you are in Colorado, USA
        boolean inColorado = (gps.gprmc_latitude() > 37.0)
                          && (gps.gprmc_latitude() < 41.0)
                          && (gps.gprmc_longitude() < -102.05)
                          && (gps.gprmc_longitude() > -109.05);

        // set led accordingly
        if (inColorado) {
          digitalWrite(8, HIGH);
        } else {
          digitalWrite(8, LOW);
        }
      }
    }
  }
}

程序效果

一个GPS数据连接类型GPRMC创建,用于获取位置信息。当GPS的位置是在科罗拉多州(美国),该LED灯亮,否则关闭。

产品相关推荐

购买地址:20 channel EM-406A Sirf iii Receiver with Antenna

相关资料1:em-406a数据表

相关资料2:NMEA参考手册

相关资料3:sparkfungps概述

相关资料4:布线的例子