DIY your GPS tracker
It is easy today to build a GPS tracking system for mobile applications that can be adapted to your needs. In fact, it is more accurate to speak of a GNSS (Global Navigation Satellite System) tracker, a term which encompasses the 4 positioning systems or satellite constellations:
- the historical GPS of US origin
- Galileo developed by Europe
- Glonass developed by Russia
- Beidou developed by China
The GPS or GNSS receiver
There are receivers mounted on a printed circuit, allowing easy interface via USB or a TTL serial port. They are based on the NEO-M8 chip. Preferably take the M8 and not the M6 or M7 because it allows you to work on 3 constellations of satellites simultaneously. On the back, when the red LED flashes every second, it indicates that the satellites have been acquired. The first time it is started it may take a while. Subsequently, the satellite parameters being saved, it will be faster.
The external antenna
If the receiver board is hidden by a building or a metal envelope, you can use an external antenna with its preamplifier which is fed directly by the coaxial connected to the SMA connector.
The receiver and external antenna set can be bought for less than 10 € at Aliexpress. Take Aliexpress standard shipping and you will receive your package within 10-15 days.
Reading data
The easiest way is to connect via the micro-USB to a PC or a microcomputer such as a Raspberry-Pi or an Orange-Pi. You can use the serial interface by connecting to a UART. Be careful to choose the 3.3v or 5v supply voltage according to the chosen UART. To read the content sent every second by the receiver, you need a “serial monitor” software like Putty for Windows or Minicom for Linux.
Connect to 9600bauds, 8 bit, 1 stop bit on the correct COM port.
If you have software like Arduino, use the included monitor.
On the 5 output pins is the output marked PPS (Pulse Per Second). It provides 1 rising edge every second very precisely. It can be used to count elapsed time with the accuracy of GNSS clocks.
NMEA data
The data provided is in the NMEA0183 format well known to sailors. Every second the receiver sends a lot of information such as:
$GNRMC,145341.00,A,4338.87446,N,00707.82656,E,0.030,,040621,,,D*65 $GNVTG,,T,,M,0.030,N,0.056,K,D*38 $GNGGA,145341.00,4338.87446,N,00707.82656,E,2,11,0.81,3.9,M,47.3,M,,0000*4E $GNGSA,A,3,23,01,27,21,32,22,10,16,,,,,1.56,0.81,1.34*10 $GNGSA,A,3,426,420,419,,,,,,,,,,1.56,0.81,1.34*2B $GPGSV,4,1,13,01,24,271,41,03,00,216,,08,77,302,09,10,47,054,27*78 $GPGSV,4,2,13,14,04,330,,16,16,184,26,21,48,284,36,22,26,216,27*75 $GPGSV,4,3,13,23,14,045,23,27,64,131,20,32,26,113,16,36,34,147,*7F $GPGSV,4,4,13,49,40,183,*48 $GBGSV,3,1,12,402,02,098,,405,20,118,,406,15,054,,409,17,080,*60 $GBGSV,3,2,12,416,17,059,,419,43,171,18,420,56,085,25,422,00,200,*6C $GBGSV,3,3,12,424,07,318,27,426,11,273,26,429,68,091,08,430,15,111,*63 $GNGLL,4338.87446,N,00707.82656,E,145341.00,A,D*7E
Each message begins with a $ followed by 5 letters then a series of digits or characters separated by commas.
The first two characters after the $ sign identify the origin of the signal (the constellation of satellites). The main prefixes are:
- BD or GB – Beidou ;
- GA – Galileo ;
- GP – GPS ;
- GL – GLONASS.
The prefix GN is used in the case of mixed GPS + GLONASS signals.
$GNRMC : type de trame 145341.00 : heure UTC exprimée en hhmmss.sss A : état A=données valides, V=données invalides 4338.87446 : Latitude exprimée en ddmm.mmmm : 43° 38.87446 mn N : indicateur de latitude N=nord, S=sud 00707.82656 : Longitude exprimée en dddmm.mmmm : E : indicateur de longitude E=est, W=ouest 0.3 : vitesse sur le fond en nœuds 0 : route sur le fond en degrés 040621 : date exprimée en qqmmaa : 4 Juin 2021 , : déclinaison magnétique en degrés (souvent vide pour un GPS) , : sens de la déclinaison E=est, W=ouest (souvent vide pour un GPS) A : mode de positionnement A=autonome, D=DGPS, E=DR *53 : somme de contrôle de parité au format hexadécimal3
For details of all messages received, go to the U-Blox website (Swiss company)
https://www.u-blox.com/en/docs/UBX-13003221
The analysis of messages is easy in a microcomputer to have a localization solution adapted to its needs.
Recent Comments