"PAM-7Q Driver GPS Spin" OBEX Patched

I found problems with the fixed point GPS object I posted in 2016:

By: Tom Crawford, created: 2016-06-03 | updated: 2017-08-11
The original upload (2016) had at least two major problems:

1. It did not read and parse an RMC sentence every second (because it got busy doing GGA and/or GSV sentences). This results in the time not being updated every second. The new version still has this problem.

2. Much worse, it reported incorrect fractional minutes of latitude and longitude. This is because it assumed the GPS sentence contained exactly four digits of fraction. Not so for the PAM-7Q RMC sentence which contains five digits. This resulted in my program returning the fraction as ten times the actual value. I patched this by detecting the five digits and rounding and dividing by ten. I think I know now one reason why people used floating point.


My apologies for not doing a better job of testing.
Re-inventing the wheel is not a waste of time if, when you are done, you understand why it is round.
Cool, CA, USA 95614
Sign In or Register to comment.