Category:GPS

From ElectroDragon
Jump to: navigation, search

Usage

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

Cgps-s.png

  • 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.
START_DAEMON="true"
GPSD_OPTIONS="-n"
DEVICES="/dev/ttyS0"
USBAUTO="false"
GPSD_SOCKET="/var/run/gpsd.sock"

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

GNSS

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

Comparision

GPS Data Format

$GNGGA,084852.000,2236.9453,N,11408.4790,E,1,05,3.1,89.7,M,0.0,M,,*48
$GNGLL,2236.9453,N,11408.4790,E,084852.000,A,A*4C
$GPGSA,A,3,10,18,31,,,,,,,,,,6.3,3.1,5.4*3E
$BDGSA,A,3,06,07,,,,,,,,,,,6.3,3.1,5.4*24
$GPGSV,3,1,09,10,78,325,24,12,36,064,,14,26,307,,18,67,146,27*71
$GPGSV,3,2,09,21,15,188,,24,13,043,,25,55,119,,31,36,247,30*7F
$GPGSV,3,3,09,32,42,334,*43
$BDGSV,1,1,02,06,68,055,27,07,82,211,31*6A
$GNRMC,084852.000,A,2236.9453,N,11408.4790,E,0.53,292.44,141216,,,A*75
$GNVTG,292.44,T,,M,0.53,N,0.98,K,A*2D
$GNZDA,084852.000,14,12,2016,00,00*48
$GPTXT,01,01,01,ANTENNA OK*35
Code Means -
GN, GP, BD Dual mode, GPS, beidou -
GPGGA location data -

Solution

Use

SIM808 Enable GPS:

  • AT+CGNSPWR=1
  • AT+CGNSTST=1

Select

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

Schematic

Datasheet

Pages in category "GPS"

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