﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
17829	RTKLib Positioning Solution File (.pos) import	StephaneP	team	"Hi!

.pos file is the standard output file from the various [https://github.com/tomojitakasu/RTKLIB 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 [https://github.com/tomojitakasu/RTKLIB/blob/rtklib_2.4.3/doc/manual_2.4.2.pdf 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

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
[[Image(rtkplot_example.jpg)]]

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 [https://github.com/tomojitakasu/RTKLIB_bin/tree/rtklib_2.4.3 Github]."	enhancement	new	minor		Core			RTKlib, Positioning Solution File, pos, sotmfr2019	
