Dear adafruit Team and Forum members,
thanks for the great adafruit ultimate GPS breakout. I built a custom GPS logger with it to track my outdoor activities (I just directly dump the nmea data to a SD card). During my first holidays with the logger, I noticed a weird behavior, appearing several times a day: The GPS position reported by the module sometimes "hangs" although I move continuously. So the NMEA sentences look like in the following example. Imagine a linear move from position X1 over X2, X3, ... to X100 starting at time T.
T+0 -> Position X1
T+1 -> Position X1
T+2 -> Position X1
T+3 -> Position X1
...
T+98 -> Position X40
T+99 -> Position X80
T+100 -> Position X100
The real positions X2, X3, ... X99 are lost. The duration of such periods varies from seconds to few minutes. As you can see in the example, at the end, the GPS not immediately catches up to the real position (X100), but in large steps approximating the move.
Do you have any idea what causes this issue? Maybe this is a known problem or just a problem with my GPS chip?
Thanks for your input!
Joachim.
Ultimate GPS - position hangs sometimes
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Ultimate GPS - position hangs sometimes
Are you losing your fix during that "stuck" interval? The RMC sentence includes an indication of the quality of the fix - the second field of the sentence will be either "A" for valid information or "V" for invalid information.
-
- Posts: 4
- Joined: Mon Apr 14, 2014 3:38 pm
Re: Ultimate GPS - position hangs sometimes
This is an extract from one log, it seems to be valid ("A") all the time:
$GPRMC,170917.800,A,4908.2393,N,00837.8730,E,0.02,217.22,240314,,,A*67
$GPRMC,170918.000,A,4908.2393,N,00837.8730,E,0.02,217.22,240314,,,A*60
$GPRMC,170918.600,A,4908.2393,N,00837.8729,E,0.04,217.22,240314,,,A*68
$GPRMC,170918.800,A,4908.2393,N,00837.8729,E,0.05,217.22,240314,,,A*67
Here it starts to "hang":
$GPRMC,170919.000,A,4908.2392,N,00837.8729,E,0.00,217.22,240314,,,A*6A
$GPRMC,170919.200,A,4908.2392,N,00837.8729,E,0.7.22,240314,,,A*68
$GPRMC,170919.400,A,4908.2392,N,00837.8729,E,0.00,217.22,240314,,,A*6E
$GPRMC,170919.600,A,4908.2392,N,00837.8729,E,0.00,217.22,240314,,,A*6C
$GPRMC,170919.800,A,4908.2392,N,00837.8729,E,0.00,217.22,240314,,,A*62
$GPRMC,170920.000,A,4908.2392,N,00837.8729,E,0.00,217.22,240314,,,A*60
[...]
$GPRMC,171124.400,A,4908.2392,N,00837.8729,E,0.00,217.22,240314,,,A*69
$GPRMC,171124.600,A,4908.2392,N,00837.8729,E,0.00,217.22,240314,,,A*6B
$GPRMC,171124.800,A,4908.2392,N,00837.8729,E,0.00,217.22,240314,,,A*65
$GPRMC,171125.000,A,4908.2392,N,00837.8729,E,0.00,217.22,240314,,,A*6C
$GPRMC,171125.400,A,4908.2392,N,00837.8729,E,0.00,217.22,240314,,,A*68
Here starts the "catch up" to the real position:
$GPRMC,171125.600,A,4908.2392,N,00837.8727,E,0.00,217.22,240314,,,A*64
$GPRMC,171125.800,A,4908.2391,N,00837.8726,E,0.51,217.22,240314,,,A*6C
$GPRMC,171126.000,A,4908.2390,N,00837.8724,E,1.30,260.21,240314,,,A*61
[...]
Catch up is finished:
$GPRMC,171145.200,A,4908.1154,N,00837.7454,E,4.38,253.27,240314,,,A*6F
$GPRMC,171145.400,A,4908.1154,N,00837.7449,E,4.31,253.30,240314,,,A*6A
$GPRMC,171145.600,A,4908.1154,N,00837.7445,E,3.98,255.65,240314,,,A*66
$GPRMC,170917.800,A,4908.2393,N,00837.8730,E,0.02,217.22,240314,,,A*67
$GPRMC,170918.000,A,4908.2393,N,00837.8730,E,0.02,217.22,240314,,,A*60
$GPRMC,170918.600,A,4908.2393,N,00837.8729,E,0.04,217.22,240314,,,A*68
$GPRMC,170918.800,A,4908.2393,N,00837.8729,E,0.05,217.22,240314,,,A*67
Here it starts to "hang":
$GPRMC,170919.000,A,4908.2392,N,00837.8729,E,0.00,217.22,240314,,,A*6A
$GPRMC,170919.200,A,4908.2392,N,00837.8729,E,0.7.22,240314,,,A*68
$GPRMC,170919.400,A,4908.2392,N,00837.8729,E,0.00,217.22,240314,,,A*6E
$GPRMC,170919.600,A,4908.2392,N,00837.8729,E,0.00,217.22,240314,,,A*6C
$GPRMC,170919.800,A,4908.2392,N,00837.8729,E,0.00,217.22,240314,,,A*62
$GPRMC,170920.000,A,4908.2392,N,00837.8729,E,0.00,217.22,240314,,,A*60
[...]
$GPRMC,171124.400,A,4908.2392,N,00837.8729,E,0.00,217.22,240314,,,A*69
$GPRMC,171124.600,A,4908.2392,N,00837.8729,E,0.00,217.22,240314,,,A*6B
$GPRMC,171124.800,A,4908.2392,N,00837.8729,E,0.00,217.22,240314,,,A*65
$GPRMC,171125.000,A,4908.2392,N,00837.8729,E,0.00,217.22,240314,,,A*6C
$GPRMC,171125.400,A,4908.2392,N,00837.8729,E,0.00,217.22,240314,,,A*68
Here starts the "catch up" to the real position:
$GPRMC,171125.600,A,4908.2392,N,00837.8727,E,0.00,217.22,240314,,,A*64
$GPRMC,171125.800,A,4908.2391,N,00837.8726,E,0.51,217.22,240314,,,A*6C
$GPRMC,171126.000,A,4908.2390,N,00837.8724,E,1.30,260.21,240314,,,A*61
[...]
Catch up is finished:
$GPRMC,171145.200,A,4908.1154,N,00837.7454,E,4.38,253.27,240314,,,A*6F
$GPRMC,171145.400,A,4908.1154,N,00837.7449,E,4.31,253.30,240314,,,A*6A
$GPRMC,171145.600,A,4908.1154,N,00837.7445,E,3.98,255.65,240314,,,A*66
-
- Posts: 18
- Joined: Sun Mar 23, 2014 7:19 am
Re: Ultimate GPS - position hangs sometimes
I don´t know if these hangs are a normal behavior. But do you really want to log every(!) NMEA sentence? I´m working on a similar project and wrote a NMEA parser that combines 2 sentences (GPRMC and GPGGA) to get one measurement record that contains the GPS position and the altitude as well. Invalid NMEA records will always be rejected. Not till a valid combined record is created the parser fires an event that provides the new "measurement record". There are a lot of them anyway, much to much to log them. So I´m currently thinking about comparing the position of the newest record (provided by the parser) with the one logged before it. If the distance between these 2 positions is to short (lets say less than 10 meters) the new record will not be logged. This should give a more realistic log file w/o logging always the same position if the device is not moving. And it would also filter these hangs (I currently don´t know if my GPS has this problem). If the resulting log file will be usable or not is another question ;) . If the GPS hangs for too long the recorded track may become totally wrong. I have to check this when my logger finally works.
Daniel
Daniel
-
- Posts: 4
- Joined: Mon Apr 14, 2014 3:38 pm
Re: Ultimate GPS - position hangs sometimes
I do not want to log every NMEA sentence. This is just a full example to explain my issue.
However, just not logging identical GPRMC records (wrt position) would not fix the issue I'm currently facing, because in reality, I *am* at a different position, and the GPS chip should recognize that and not report a GPRMC marked as valid but reporting a wrong position.
However, just not logging identical GPRMC records (wrt position) would not fix the issue I'm currently facing, because in reality, I *am* at a different position, and the GPS chip should recognize that and not report a GPRMC marked as valid but reporting a wrong position.
- Barry914
- Posts: 448
- Joined: Sun Dec 08, 2013 1:26 pm
Re: Ultimate GPS - position hangs sometimes
Have you tried an update rate slower than 5 per second?
-
- Posts: 4
- Joined: Mon Apr 14, 2014 3:38 pm
Re: Ultimate GPS - position hangs sometimes
Not yet. I'll try an update rate of 1 per second.
However, I will consider this only as a workaround to identify the real issue. The GPS should run with 5Hz and 10Hz as it is specified to support such update rates.
However, I will consider this only as a workaround to identify the real issue. The GPS should run with 5Hz and 10Hz as it is specified to support such update rates.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Ultimate GPS - position hangs sometimes
I've never seen behavior like that. I can't explain it.jowi24a wrote:This is an extract from one log, it seems to be valid ("A") all the time:
Why don't we try replacing the GPS module.
Please email [email protected] with a link to this thread for a replacement
- wethaguy
- Posts: 54
- Joined: Sun May 06, 2012 9:00 pm
Re: Ultimate GPS - position hangs sometimes
You may be moving below the nav speed threshold and therefore the GPS is ignoring the changes until you reach the threshold. Page 13 and 14 of the command packet datasheet show you how to get and set the nav speed threshold. If you are moving slowly, you want to disable it (set it to 0). This will add more "jitter" to your course since you will be logging every position fix even if it's a foot to the left, right, back, or forward.
- Barry914
- Posts: 448
- Joined: Sun Dec 08, 2013 1:26 pm
Re: Ultimate GPS - position hangs sometimes
I've been "fixing" my GPS project and noticed something odd that might be related. I'm using a 5 Hz update rate and an RMC only frequency of every 5th fix, so I get one sentence per second from the GPS. Once in a while I see the speed go to 0.00 and the position freeze for seconds or minutes before returning to more normal readings. The sentences are valid and the mode is usually differential (using WAAS). The nav speed threshold is the default, which is disabled. (edit): I want to add I never saw this behavior when using a 1 Hz update rate and RMC only every fix.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Ultimate GPS - position hangs sometimes
I never use the 5hz update rate, so maybe it is something related to that. Something to look into...
- Barry914
- Posts: 448
- Joined: Sun Dec 08, 2013 1:26 pm
Re: Ultimate GPS - position hangs sometimes
I should have said I am using a 4 Hz update rate and one RMC sentence every 4th fix. It doesn't seem like 5 Hz is a magic number.
- adafruit2
- Posts: 22144
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Ultimate GPS - position hangs sometimes
That isn't something we've seen, it could be there's just not enough information (satellite) data available?
- Barry914
- Posts: 448
- Joined: Sun Dec 08, 2013 1:26 pm
Re: Ultimate GPS - position hangs sometimes
If it doesn't have enough data it should return a void sentence, shouldn't it? It's beginning to sound a little like a firmware bug. I think it was Mike who suggested that if my project wasn't broken I should keep fixing it until it is.
Please be positive and constructive with your questions and comments.