From ElectroDragon
Jump to: navigation, search


Arduino Demo Code

  • You need to be aware of the baud rate of your GPS, in the code below it is 38400.This baud rate maybe not read avaialble from arduino monitor, then after you upload the code, you need to open a serial monitor for monitoring.
  • Nema demo will write to uart
  • Connect your GPS shield via hardware uart pin 1/0 or software uart pin 2/3
  • Demo code please this on this page, use hardware or software uart.

RPI Usage

  • Make sure uart is turn on on RPI
  • Direct output raw data from serial - sudo cat /dev/ttyS0
  • You can always just read that raw data, but its much nicer if you can have some Linux software prettify it. We'll try out gpsd which is a GPS-handling Daemon (background-helper)
  • To install gpsd, make sure your Pi has an Internet connection and run the following commands from the console: sudo apt-get install gpsd gpsd-clients python-gps
  • And you can stop/start service by commands, in case the interface is conlict or you don't want to use it:
sudo systemctl stop gpsd.socket
sudo systemctl disable gpsd.socket
sudo systemctl enable gpsd.socket
sudo systemctl start gpsd.socket
  • Run the following command to start up - sudo gpsd /dev/ttyS0 -F /var/run/gpsd.sock, or manually store on foreground by: gpsd -b -N -D 3 -n -F /var/run/gpsd.sock /dev/ttyAMA0
  • Then output dumb data by cgps -s, or gpsmon


  • If no data update or com through, double check config:
  • run command sudo nano /etc/default/gpsd, and change it to look like this
# Default settings for gpsd.
# Please do not edit this file directly - use `dpkg-reconfigure gpsd' to
# change the options.

PC Debug tool

GPS data receiver from computer

Data Output

Output Data

  • GGA: time, location, positioning type
  • GLL: UTC time, longitude, latitude
  • GSA: GPS receiver operating mode, positioning the use of satellites, DOP value
  • GSV: Visible GPS satellite information, elevation, azimuth, SNR RMC: time, date, position, speed
$GPGSV,1,1,01,06,,,20*7C  //GPS Satellites in view
$GPGLL,,,,,,V,N*64  // Geographic position, latitude / longitude
$GPRMC,,V,,,,,,,,,,N*53  //Recommended Minimum Specific GPS/TRANSIT Data
$GPVTG,,,,,,,,,N*30 //Track Made Good and Ground Speed.
$GPGGA,,,,,,0,00,99.99,,,,,,*48   // Global Positioning System Fix Data
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30 //GPS DOP and active satellites


Global Tracking System Supported Country ED20 ATGM336H
GPS US yes yes
BDS CN yes yes
Galileo EU - yes
QZSS JP yes yes
SBAS(WAAS, EGNOS, GAGAN, MSAS) Enhance system - yes


GPS Data Format

$GPTXT,01,01,01,ANTENNA OK*35
Code Means -
GN, GP, BD Dual mode, GPS, beidou -
GPGGA location data -



SIM808 Enable GPS:



Type Function Sensitivity Power Consumption Antenna Other Features
MT3339 GPS, QZSS and SBAS -165dBm, built-in LNA (2.2 dB) Tracking 3mA, 18mW only need nine passive external components
ATGM336H-5N-7X GPS, BDS, GLONASS, QZSS and SBAS, A-GNSS, 22tracking/66acquisition -162dBm Tracking <25mA Replace u-blox max series
SIM28 SIM28ML / SMT GPS, QZSS and SBAS GPS, QZSS and SBAS, 22tracking/66acquisition -165dBm, built-in LNA Tracking 5mA, 2.8-4.3V External Power, passive or active
NEO-6M GPS, 50 channels -161dBm, Time-to-first-fix cold-start 27s 11-40mA , 2.7-3.6V
SIM808 Example Example



Pages in category "GPS"

The following 3 pages are in this category, out of 3 total.