GPS, both Tiny and Adafruit: That's all?

I was wondering, why there is this amount of discussion here about a GPS-fix and so on, without considering the most important contributing fact, the satellites, better, the satellites in view. They still have one hiding place, the backside of this planet.
I discovered, while I was playing around with my new configuration, that both libraries only parse two sentences from the NMEA output.
We can think what we want about NMEA, that yacht club at Chesapeake Bay, but if we ommit some important informations, that’s our own fault.

This is what both libraries do, here the statement from TinyGPS:

#define _GPRMC_TERM   "GPRMC"
#define _GPGGA_TERM   "GPGGA"

That is it. All other sentences are marked as ‘other’ and discarded, even the nice little ‘GPGLL’ (LL for Lat&Lon) with its ‘V’ for for void, meaning the data is not valid, even if it’s there.
The interesting sentences are those with ‘GPGSV’, satellites in view. The receivers does not only count them, it has a lot of informations about them, there position in elevation and azimuth and the signal’s strength. Before discussing any related problem about shadows, reflections and other disturbances a closer look here might be of use. However, as said, the common libraries in place do not support it.

But NMEA is readable, one of its few advantages. I could took it to a test, slowly moving the antenna out of the shades.
Below is the NMEA output and the output of the ‘echo’ example from Adafruit:

$GPRMC,134949.00,V,,,,,,,090416,,,N*75
$GPVTG,,,,,,,,,N*30
$GPGGA,134949.00,,,,,0,00,99.99,,,,,,*64
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
$GPGSV,1,1,02,15,,,31,19,,,33*75
$GPGLL,,,,,134949.00,V,N*48

Time: 13:49:49.0
Date: 9/4/2016
Fix: 0 quality: 0
Satellites: 2
N
 00 00.000
E
 00 00.000

Take a look at: GPGSV,1,1,02,15,,,31,19,,,33[*75]. At first, forget the checksum. It starts with '’ and the identifier, then the real data begans.
The first 3 numbers are about the sentences itself, the first is the total, there can be more than one sentence of them, the second is the number thereof, here it is number 1 of 1 sentences, and the third is the number of satellites.

$GPGSV,[1,1,02],15,31,19,33

There are are only 2.
Then starts the grouping of 4 values, number, 2 x position and strength, for each satellite:

$GPGSV,1,1,02,[15,31],[19,33],

Both satellites, number 15 and 19, are good, but they have no known position yet. Acquiring a position does not only mean to get the psoition on the ground, but to get the positions of all satellites. In order to do so, you have to have at least 4 satellites in view, the required minimun for an initial fix. An almanac might be of help, because the receiver can anticipate where the satellites are supposed to be, and maybe start off with three. It is not a big help.
The time stamp is already there. A valid time is given with the first satellite, indicating that there is at least one cruising, and more important, the device is working even without a fix. The libraries do ignore it.

To cut things short, I have modified the Adafruit library to get the GSV-sentences. It is still in progress, because I need something like a dirty flag while collecting data over more than one sentence, but it works.

Remain 2 questions: Is there a library that does support more than these two minimum sentences, or maybe has a callback implementation to catch discarded sentences before they vanish?
And regarding the asset-tracker: Why is Particle relying on NMEA at all? Most manufacturers have their own format, which, although proprietary, might be more useful.

2 Likes