#17829 closed enhancement (fixed)
RTKLib Positioning Solution File (.pos) import
Reported by: | StephaneP | Owned by: | Don-vip |
---|---|---|---|
Priority: | normal | Milestone: | 19.08 |
Component: | Core | Version: | |
Keywords: | RTKlib, Positioning Solution File, pos, sotmfr2019 | Cc: |
Description (last modified by )
Hi!
.pos file is the standard output file from the various RTKlib tools (FOSS). It's like a nmea or a gpx file with more informations inside, like Fix mode, deviation, ratio, ...
At this time, If I want to see the trace on an aerial imagery, I have to convert .pos to gpx to open it in Josm, and I lose many useful informations in the process.
Loading the pos files directly in Josm would be a great feature.
Attached with this ticket you will find a small pos file and the gpx (converted with the pos2kml tool).
There is some informations on Positioning Solution File in the documentation (page 101)
- Header lines
% program : RTKLIB ver.demo5 b31 % inp file : rover_2019-06-08_08-03-52.obs % inp file : 2019-06-08-00_00_00-GNSS-1.obs % inp file : 2019-06-08-00_00_00-GNSS-1.nav % inp file : 2019-06-08-00_00_00-GNSS-1.sbs % obs start : 2019/06/08 08:03:55.5 GPST (week2056 547435.5s) % obs end : 2019/06/08 09:46:21.0 GPST (week2056 553581.0s) % pos mode : kinematic % freqs : L1 % solution : combined % elev mask : 15.0 deg % dynamics : on % tidecorr : off % ionos opt : sbas % tropo opt : sbas % ephemeris : broadcast % navi sys : gps galileo beidou sbas % amb res : fix and hold % val thres : 3.0 % antenna1 : ( 0.0000 0.0000 0.0000) % antenna2 : ( 0.0000 0.0000 0.0000) % ref pos : 47.060027749 -1.350495019 84.8600 % % (lat/lon/height=WGS84/ellipsoidal,Q=1:fix,2:float,3:sbas,4:dgps,5:single,6:ppp,ns=# of satellites) % GPST latitude(deg) longitude(deg) height(m) Q ns sdn(m) sde(m) sdu(m) sdne(m) sdeu(m) sdun(m) age(s) ratio
These lines could be in the layer info (except the last one)
If it exists, the "ref pos" could be a marker (it's the base station coordinates)
- Solution body
- Line ending is CR+LF
- The fields separator is 1 or more spaces.
- Fields names are on the last header line
- Fields conversion
- Time (GPST, UTC, ...) -> conversion to time key
As is, or GPST to UTC conversion) - lat/lon (WGS84, ECEF, baseline) -> lat/lon
Accept only WGS84, or ECEF/Baseline conversion to WGS84 - height -> ele key
As is or Geodetic to Ellipsoid conversion if Josm can do it. - Q -> Q key and point's colour
- ns -> ns key (or sat key, as for gpx files)
- sdn, sde, sdu -> keys and use them for drawing a circle (as "Draw a circle from HDOP value" for the gpx files)
- sdne, sdeu, sdun -> keys
I don't understand these values - age -> age key
- ratio -> ratio key
- Time (GPST, UTC, ...) -> conversion to time key
When you look at a solution in rtkplot, the first thing you look is the points' colors. The Q value set the color and the default one are:
Q=1 (fix) -> Green
Q=2 (float) -> Orange
Q=3 (sbas) -> Pink
Q=4 (dgps) -> Blue
Q=5 (single) -> Red
Q=6 (ppp) -> Light Blue
If you want to use the various RTKLib tools, there is a debian package with the GUI (rtklib-qt). This package is out of date but should works to open a .pos file in rtkplot.
For Windows, the binary files are on Github.
Attachments (6)
Change History (26)
by , 6 years ago
Attachment: | example.pos added |
---|
comment:1 by , 6 years ago
Description: | modified (diff) |
---|
comment:2 by , 6 years ago
Priority: | minor → normal |
---|
comment:3 by , 6 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 5 years ago
Milestone: | → 19.08 |
---|
by , 5 years ago
Attachment: | rtklib_hdop.png added |
---|
by , 5 years ago
Attachment: | rtklib_quality.png added |
---|
comment:8 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:9 by , 5 years ago
A big thank you @Don-vip!
It looks Ok.
Small remarks. When you convert a pos file to a data layer:
-On nodes, there is a small typo. key "ration" instead of "ratio"
-Q value is correctly used to select a color, but I don't see it as a key/value
by , 5 years ago
Attachment: | pos_in_josm.png added |
---|
comment:11 by , 5 years ago
In example.pos file, timedate is GPS Time. It's like UTC time but without the leap seconds. Today, GPS Time is 18 seconds ahead of UTC Time.
When I convert a pos file to a data layer. Josm apply a time offset. It looks like a local time to UTC offset (-2 Hours). That's weird.
last point in example.pos: 2019/06/08 08:23:52.800
last node in josm: 2019-06-08T06:23:52.8Z
last point in example.gpx (GPST to UTC conversion made by rtklib): 2019-06-08T08:23:34.80Z
comment:12 by , 5 years ago
Description: | modified (diff) |
---|
comment:13 by , 5 years ago
Description: | modified (diff) |
---|
comment:14 by , 5 years ago
Discussion on gps time to utc time conversion: https://coderanch.com/t/667087/java/Reconciling-Java-date-time-GPS
comment:15 by , 5 years ago
comment:17 by , 5 years ago
It's ok for me as I can set RTKLib to output the .pos file with UTC time.
comment:18 by , 5 years ago
Can you please attach an example with UTC? I must be sure how to detect if it's GPS Time or UTC.
comment:19 by , 5 years ago
GPST:
% program : RTKPOST ver.demo5 b31a % inp file : C:\Users\Stéphane\Documents\RTK\data\rover_divers\2019-07-12\2019-07-12_06H\rover_2019-07-12_06-26-52.obs % inp file : C:\Users\Stéphane\Documents\RTK\data\rover_divers\2019-07-12\2019-07-12_06H\boug193z.19o % inp file : C:\Users\Stéphane\Documents\RTK\data\rover_divers\2019-07-12\2019-07-12_06H\rover_2019-07-12_06-26-52.nav % obs start : 2019/07/12 06:28:20.4 GPST (week2061 455300.4s) % obs end : 2019/07/12 07:51:02.1 GPST (week2061 460262.1s) % pos mode : kinematic % freqs : L1+L2+E5b+L5 % solution : combined % elev mask : 15.0 deg % dynamics : on % tidecorr : off % ionos opt : broadcast % tropo opt : saastamoinen % ephemeris : broadcast % navi sys : gps galileo beidou sbas % amb res : fix and hold % val thres : 3.0 % antenna1 : ( 0.0000 0.0000 0.0000) % antenna2 : ( 0.0000 0.0000 0.0000) % ref pos : 47.165589172 -1.640961015 118.0940 % % (lat/lon/height=WGS84/ellipsoidal,Q=1:fix,2:float,3:sbas,4:dgps,5:single,6:ppp,ns=# of satellites) % GPST latitude(deg) longitude(deg) height(m) Q ns sdn(m) sde(m) sdu(m) sdne(m) sdeu(m) sdun(m) age(s) ratio 2019/07/12 06:28:20.400 46.987981139 -1.400660975 83.2759 1 8 0.0058 0.0041 0.0122 0.0023 -0.0017 -0.0047 -0.61 30.4 2019/07/12 06:28:20.700 46.987981154 -1.400660971 83.2786 1 8 0.0057 0.0041 0.0122 0.0023 -0.0017 -0.0047 -0.31 30.4 2019/07/12 06:28:21.000 46.987981145 -1.400660975 83.2795 1 8 0.0057 0.0041 0.0122 0.0023 -0.0017 -0.0047 -0.01 30.4
UTC:
% program : RTKPOST ver.demo5 b31a % inp file : C:\Users\Stéphane\Documents\RTK\data\rover_divers\2019-07-12\2019-07-12_06H\rover_2019-07-12_06-26-52.obs % inp file : C:\Users\Stéphane\Documents\RTK\data\rover_divers\2019-07-12\2019-07-12_06H\boug193z.19o % inp file : C:\Users\Stéphane\Documents\RTK\data\rover_divers\2019-07-12\2019-07-12_06H\rover_2019-07-12_06-26-52.nav % obs start : 2019/07/12 06:28:02.4 UTC (week2061 455300.4s) % obs end : 2019/07/12 07:50:44.1 UTC (week2061 460262.1s) % pos mode : kinematic % freqs : L1 % solution : forward % elev mask : 15.0 deg % dynamics : on % tidecorr : off % ionos opt : broadcast % tropo opt : saastamoinen % ephemeris : broadcast % navi sys : gps galileo beidou sbas % amb res : fix and hold % val thres : 3.0 % antenna1 : ( 0.0000 0.0000 0.0000) % antenna2 : ( 0.0000 0.0000 0.0000) % ref pos : 47.165589172 -1.640961015 118.0940 % % (lat/lon/height=WGS84/ellipsoidal,Q=1:fix,2:float,3:sbas,4:dgps,5:single,6:ppp,ns=# of satellites) % UTC latitude(deg) longitude(deg) height(m) Q ns sdn(m) sde(m) sdu(m) sdne(m) sdeu(m) sdun(m) age(s) ratio 2019/07/12 06:28:02.400 46.987973053 -1.400673775 83.2217 2 8 2.1080 1.4308 4.3602 0.8909 0.2758 -1.3394 0.39 0.0 2019/07/12 06:28:02.700 46.987972899 -1.400673506 83.1819 2 8 1.5608 1.0578 3.2397 0.6457 0.1841 -1.0408 0.69 0.0 2019/07/12 06:28:03.000 46.987972807 -1.400673339 83.1678 2 8 1.2955 0.8774 2.6924 0.5315 0.1466 -0.8790 -0.01 0.0 2019/07/12 06:28:03.300 46.987972899 -1.400673186 83.1420 2 8 1.1314 0.7660 2.3528 0.4620 0.1250 -0.7747 0.29 0.0
JST (I think it's the Japan time (UTC+9)):
% program : RTKPOST ver.demo5 b31a % inp file : C:\Users\Stéphane\Documents\RTK\data\rover_divers\2019-07-12\2019-07-12_06H\rover_2019-07-12_06-26-52.obs % inp file : C:\Users\Stéphane\Documents\RTK\data\rover_divers\2019-07-12\2019-07-12_06H\boug193z.19o % inp file : C:\Users\Stéphane\Documents\RTK\data\rover_divers\2019-07-12\2019-07-12_06H\rover_2019-07-12_06-26-52.nav % obs start : 2019/07/12 15:28:02.4 JST (week2061 455300.4s) % obs end : 2019/07/12 16:50:44.1 JST (week2061 460262.1s) % pos mode : kinematic % freqs : L1 % solution : forward % elev mask : 15.0 deg % dynamics : on % tidecorr : off % ionos opt : broadcast % tropo opt : saastamoinen % ephemeris : broadcast % navi sys : gps galileo beidou sbas % amb res : fix and hold % val thres : 3.0 % antenna1 : ( 0.0000 0.0000 0.0000) % antenna2 : ( 0.0000 0.0000 0.0000) % ref pos : 47.165589172 -1.640961015 118.0940 % % (lat/lon/height=WGS84/ellipsoidal,Q=1:fix,2:float,3:sbas,4:dgps,5:single,6:ppp,ns=# of satellites) % JST latitude(deg) longitude(deg) height(m) Q ns sdn(m) sde(m) sdu(m) sdne(m) sdeu(m) sdun(m) age(s) ratio 2019/07/12 15:28:02.400 46.987973053 -1.400673775 83.2217 2 8 2.1080 1.4308 4.3602 0.8909 0.2758 -1.3394 0.39 0.0 2019/07/12 15:28:02.700 46.987972899 -1.400673506 83.1819 2 8 1.5608 1.0578 3.2397 0.6457 0.1841 -1.0408 0.69 0.0 2019/07/12 15:28:03.000 46.987972807 -1.400673339 83.1678 2 8 1.2955 0.8774 2.6924 0.5315 0.1466 -0.8790 -0.01 0.0 2019/07/12 15:28:03.300 46.987972899 -1.400673186 83.1420 2 8 1.1314 0.7660 2.3528 0.4620 0.1250 -0.7747 0.29 0.0
GPS week
You won't like this one. It's the same keyword as GPS Time.
Perharps I should ask the RTKLib dev to use another keyword, something like GPSWT.
% program : RTKPOST ver.demo5 b31a % inp file : C:\Users\Stéphane\Documents\RTK\data\rover_divers\2019-07-12\2019-07-12_06H\rover_2019-07-12_06-26-52.obs % inp file : C:\Users\Stéphane\Documents\RTK\data\rover_divers\2019-07-12\2019-07-12_06H\boug193z.19o % inp file : C:\Users\Stéphane\Documents\RTK\data\rover_divers\2019-07-12\2019-07-12_06H\rover_2019-07-12_06-26-52.nav % obs start : 2019/07/12 06:28:20.4 GPST (week2061 455300.4s) % obs end : 2019/07/12 07:51:02.1 GPST (week2061 460262.1s) % pos mode : kinematic % freqs : L1 % solution : forward % elev mask : 15.0 deg % dynamics : on % tidecorr : off % ionos opt : broadcast % tropo opt : saastamoinen % ephemeris : broadcast % navi sys : gps galileo beidou sbas % amb res : fix and hold % val thres : 3.0 % antenna1 : ( 0.0000 0.0000 0.0000) % antenna2 : ( 0.0000 0.0000 0.0000) % ref pos : 47.165589172 -1.640961015 118.0940 % % (lat/lon/height=WGS84/ellipsoidal,Q=1:fix,2:float,3:sbas,4:dgps,5:single,6:ppp,ns=# of satellites) % GPST latitude(deg) longitude(deg) height(m) Q ns sdn(m) sde(m) sdu(m) sdne(m) sdeu(m) sdun(m) age(s) ratio 2061 455300.400 46.987973053 -1.400673775 83.2217 2 8 2.1080 1.4308 4.3602 0.8909 0.2758 -1.3394 0.39 0.0 2061 455300.700 46.987972899 -1.400673506 83.1819 2 8 1.5608 1.0578 3.2397 0.6457 0.1841 -1.0408 0.69 0.0 2061 455301.000 46.987972807 -1.400673339 83.1678 2 8 1.2955 0.8774 2.6924 0.5315 0.1466 -0.8790 -0.01 0.0
There is a setting to choose the number of decimal.
UTC with 0 decimal:
% (lat/lon/height=WGS84/ellipsoidal,Q=1:fix,2:float,3:sbas,4:dgps,5:single,6:ppp,ns=# of satellites) % UTC latitude(deg) longitude(deg) height(m) Q ns sdn(m) sde(m) sdu(m) sdne(m) sdeu(m) sdun(m) age(s) ratio 2019/07/12 06:28:02 46.987973053 -1.400673775 83.2217 2 8 2.1080 1.4308 4.3602 0.8909 0.2758 -1.3394 0.39 0.0 2019/07/12 06:28:03 46.987972899 -1.400673506 83.1819 2 8 1.5608 1.0578 3.2397 0.6457 0.1841 -1.0408 0.69 0.0
UTC with 6 decimals:
% (lat/lon/height=WGS84/ellipsoidal,Q=1:fix,2:float,3:sbas,4:dgps,5:single,6:ppp,ns=# of satellites) % UTC latitude(deg) longitude(deg) height(m) Q ns sdn(m) sde(m) sdu(m) sdne(m) sdeu(m) sdun(m) age(s) ratio 2019/07/12 06:28:02.399680 46.987973053 -1.400673775 83.2217 2 8 2.1080 1.4308 4.3602 0.8909 0.2758 -1.3394 0.39 0.0 2019/07/12 06:28:02.699680 46.987972899 -1.400673506 83.1819 2 8 1.5608 1.0578 3.2397 0.6457 0.1841 -1.0408 0.69 0.0 2019/07/12 06:28:02.999680 46.987972807 -1.400673339 83.1678 2 8 1.2955 0.8774 2.6924 0.5315 0.1466 -0.8790 -0.01 0.0
.pos file