jpmeijers / RN2483-Arduino-Library

Arduino C++ code to communicate with a Microchip RN2483 module
Apache License 2.0
84 stars 60 forks source link

Quick fix on HDOP calculation. #86

Closed alistairuk closed 2 years ago

alistairuk commented 3 years ago

The HDOP value was divided on the client and the server resulting in the value of 0 being reported much of the time. Now corrected so multiplied on the client and divided on the server.

jpmeijers commented 3 years ago

I'm not sure this fix is correct. As far as I remember the gps library we used here reported HDOP in "cm" not in "m". Or at least as 100 times bigger than the normally accepted unit.

So what you see here is: Device: HDOP100 / 10 = HDOP10 Server: HDOP10 / 10 = HDOP

alistairuk commented 3 years ago

Looking at the library just keeps the same scale as the NMEA GPGGA message. I don't have a full NMEA spec but no unit is given on only of the module specifications I have and they do list most others. After further reading it looks like HDOP is actually an abstract calculated value and is not a distance ( this is quite informative ) . You learn something new every day. I have been testing with a Quectel L70 and that has been giving me a value around 2.6.

jpmeijers commented 2 years ago

TinyGPS now has two ways to get hdop:

I'll close this PR as the current code is correct.