Francklin2 / RTKLIB_Touchscreen_GUI

RTKLIB GUI for Raspberry Pi with touchscreen made with Qt by the ENSG students
175 stars 63 forks source link

Add Proj4 cs2cs for coordinate transformation #38

Open Francklin2 opened 6 years ago

Francklin2 commented 6 years ago

For the coordinate transformation we add cs2cs from Proj4 in the post processing and for the saved point output (settings are in rover mode>status>save point options). The cs2cs Proj4 library is installed in the system with apt-get install proj_bin and called in rtkbase by a Qprocess., cs2cs is very powerfull and can be used with different syntax under command line, C++ or python, rtkbase is able to get a output from cs2cs but is it the correct way to use it..? I use this (easy) syntax in rtkbase for ECEF to Lambert93 RGF93/CC42 : cs2cs +init=epsg:4328 +to +init=epsg:3942 I also tried for the same transformation this syntax who gave me the same results : cs2cs +proj=geocent +datum=WGS84 +units=m +no_defs +to +proj=lcc +lat_1=41.25 +lat_2=42.75 +lat_0=42 +lon_0=3 +x_0=1700000 +y_0=1200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs If we add the geoid correction files the results are the same if we use these 2 syntax, so I use the short EPSG syntax in rtkbase (much easier to write) : cs2cs +init=epsg:4328 +to +init=epsg:3942 +geoidgrids=/home/pi/geoid_correction_file.gtx or cs2cs +proj=geocent +datum=WGS84 +units=m +no_defs +to +proj=lcc +geoidgrids=/home/pi/geoid_correction_file.gtx +lat_1=41.25 +lat_2=42.75 +lat_0=42 +lon_0=3 +x_0=1700000 +y_0=1200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs

Note that the absolute path to the geoid correction file have to be write else cs2cs won't find it. Those 2 way to use cs2cs apparently give me the same results, can we keep the +init EPSG syntax in rtkbase ?

kikislater commented 4 years ago

Proj 6 simplify the process. However you'll need proj 6.2.1

cs2cs EPSG:4326 EPSG:3942+5720

With +5720 you will get geoid correction from IGN RAF18 grid Thank you to @rouault for his help and clarifications