I am extracting data from rinex observation files and would like to convert the approximate position to latitude and longitude using Proj.4. The rinex standard states that these coordinates are WGS84, which I assume refers to the ellipsoid. What are the Proj4 parameters I need to do the conversion? If this is not possible is there another route I can take? Specifically I'm using the pyproj Python library. The correct coordinates should be close to (45.4343,-123.5516).
I am using RTKLib to process the observations, but want to automate downloading the base station/CORS files.
I did just find this code that performs the conversion. I've ported it to Python and it works well for my needs. Still if there is a way to get Proj4 to do this that would be ideal as I use that library for other projects.
Here is the Python I've tested:
In : prj = pyproj.Proj(proj='geocent',ellps='WGS84',datum='WGS84') In : prj(-2478053.2006,-3736604.9657) Out: (1e+30, 1e+30) In : prj(-2478053.2006,-3736604.9657,inverse=True) Out: (-22.260730649602785, -33.5664935140521)
Here is an example header.
2.00 OBSERVATION DATA M (MIXED) RINEX VERSION / TYPE 20180413 230424 UTC PGM / RUN BY / DATE 28jxmqr6 MARKER NAME MARKER NUMBER off OBSERVER / AGENCY 100037 BE-GPS-3300 2.1.47 REC # / TYPE / VERS ANT # / TYPE -2478053.2006 -3736604.9657 4521684.4805 APPROX POSITION XYZ 0.0000 0.0000 0.0000 ANTENNA: DELTA H/E/N 1 1 WAVELENGTH FACT L1/2 4 C1 L1 C2 L2 # / TYPES OF OBSERV 2018 4 13 19 8 50.5000000 GPS TIME OF FIRST OBS 2018 4 13 19 23 28.0000000 GPS TIME OF LAST OBS END OF HEADER