GPS Resolution used by RTABMap

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

GPS Resolution used by RTABMap

drzeno
I have the GPS working with RTABMap. It is supposed to work with the other odometry being sent into the vSLAM algorithm (not sure how). However, it appears that rtabmap only goes out to 6 decimal places when using the latitude and longitude data. That means that at best (no error by the GPS or RTK-GPS) there will be a 0.111 meter error. Can you tell me how I can change the lat, long, alt, resolution two 8 decimal places (1.11 mm accuracy at best). Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: GPS Resolution used by RTABMap

matlabbe
Administrator
Do you mean the exported GPS format is only 6 of precision? The internal format is double. For the export, you may change these lines:
fprintf(fout, "%f %f %f %f %f %f\n",
    iter->second.stamp(),
    iter->second.longitude(),
    iter->second.latitude(),
    iter->second.altitude(),
    iter->second.error(),
    iter->second.bearing());
to
fprintf(fout, "%.*f %.*f %.*f %.*f %.*f %.*f\n",
    8, iter->second.stamp(),
    8, iter->second.longitude(),
    8, iter->second.latitude(),
    8, iter->second.altitude(),
    8, iter->second.error(),
    8, iter->second.bearing());

to get your 8 decimals precision.
Reply | Threaded
Open this post in threaded view
|

Re: GPS Resolution used by RTABMap

matlabbe
Administrator