GPS - Coordinates - precision problem.
GPS - Coordinates - precision problem.
Reads coordinates from gps. The problem is the conversion from dms to dd. I achieve precision (lat, lon) type 12.12345 and I would like me to 12.123456. Working on esp32, is it possible?
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: GPS - Coordinates - precision problem.
On my reckoning the least significant digit you're seeing corresponds to about 1 meter. Do commercial GPS modules actually provide this level of absolute accuracy?
Assuming they do, there are two possible approaches. I believe it's possible to compile firmware to use double precision floats, so it would happen automatically.
Another option is to use an integer conversion, relying on the fact that Python supports arbitrary precision integers. Compute an integer value of (seconds * a_large_factor). This could be formatted as a float for printing or display.
Assuming they do, there are two possible approaches. I believe it's possible to compile firmware to use double precision floats, so it would happen automatically.
Another option is to use an integer conversion, relying on the fact that Python supports arbitrary precision integers. Compute an integer value of (seconds * a_large_factor). This could be formatted as a float for printing or display.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: GPS - Coordinates - precision problem.
Thanks for reply.
Thanks !!!
What are the possibilities ? how can you do that ?Assuming they do, there are two possible approaches. I believe it's possible to compile firmware to use double precision floats, so it would happen automatically.
Thanks !!!