Python, GDAL OGR and RTKLIB
hey all, i have written some python code to manage processing shapefiles from the reach receivers and i want to share it. Hopefully if someone else needs something like this maybe my code will help you out. This is Python 3 written on windows 10 and calls GDAL OGR libraries.
WARNING this code is designed to work in my semi automated work arrangement so its not going to work for you out of the box. You will need to rework it to fit your situation. furthermore just because this code works for me doesn’t mean it will work for you. for example anything having to do with date, times and latitudes and longitudes may only be set to work for where i am at (California, USA).
first here is my background local library for functions i use across everything i write. it includes code for leveraging my OSGEO4w install.
you save it to :
C:<your python install>\Lib\site-packages
then i have a simple script that takes things like the ‘projected’ field and parses it out into separate fields. there’s a bunch in there you may not need.
then i wrote a processing front end for RTKLIB PPK. the underlying idea here is that i was never able to get everything i wanted out of one configuration set for rtkpost. so i decided i would rather run configuration files in a serial fashion where configurations run from most conservative to least conservative. the code creates a shapefile from the first PPK process (.pos) and then with subsequent config file runs, if there are fixes they overwrite any remaining float values. then if you have a shapefile of points from your rover the resulting kinematic shapefile will be used to improve the points in your rover file records
here are my config files:
numbered 1_.conf where the number represents what i believe to be the most conservative settings and 6_.conf is the least conservative settings.
here is the code
and here is a test set you can use
in an effort to develop better techniques to improve productivity, the team i work with has laid out a testing and training site. the site has a number of OPUS based monuments and using a total station we created a monument in a heavy canopy area. The canopy cover is heavy enough that i have been unable to get a real time fix even with the base station within 50 meters. however, i have been able to get PPK float values within 20cm and all of my PPK results that were fixes, where i have a matching RTK value, also show significant improvement (compare to the OPUS control monuments). The main advantage i am looking for is to not have to fiddle at all with the RTKLIB GUI after each project, (though i still do the UBX conversion there).
so there it is, maybe someone will find it useful, if you write Python it should be fairly straight forward reading to see what it does and how.
and i would like to thank Tim Everett for his work at https://rtklibexplorer.wordpress.com