RTKLIB precision edition

  • Replaced simple residual ratio test by an F-Test
    As soon as level of significance raises above α>85%, RTK solution type will change to the fixed state. I updated the ratio check to reflect a minimum of statistical hypothesis testing, well-knowning that state of the art is a Generalized Integer Aperture Estimation for Partial GNSS Ambiguity Fixing (GIAB) which is far beyond my mathematical and programming skills. -> see [1],[2],[3] for reference.
  • Updated ecef2pos and pos2ecef functions
    The RTKLIB internal functions used to convert Earth-Fixed Earth-Centered Coordinates to Geodetic Coordinates were completely rewritten to reflect the closed form algorithm developed by Mr. Osen, which reduces the worst case transformation error by up to 500 million times. [4]
  • Improved baseline calculation
    RTKLIB internal function used to calculate basline distances was updated to use Vincenty’s formula, which is precise to mm level. [5]
  • Implemented socket support for chrony daemon in RTKRCV
    Add the following line to /etc/chrony/chrony.conf …
    refclock SOCK /var/run/chrony.ttyRTK.sock delay 0.0 offset 0.0 poll 2 refid RTK precision 1e-9 prefer
    … and restart chrony by service chronyd restart. Besides other minor improvements in the status report of the RTKRCV terminal, an additional line „chrony update delta“ will provide details about socket status and timediff submitted to chrony, e.g. -0.024404792s.

https://github.com/SJuhl75/RTKLIB/tree/precision

Using RTK-GNSS, the position can be determined extremely precisely to within a few centimeters. I wondered if in this context it is not also feasible to use the atomic clocks of the GNSS satellites as a precise source of a network time server. Unfortunately a corresponding setup is not very straightforward: RTKLIB’s streamserver has to feed the gpsd daemon which in turn has to feed the chrony network time client. By analyzing chrony and gpsd open source code I was able to realize a direct socket connection between RTKLIB’s rtkrcv (RTK receiver console app) and the chrony daemon.
Although the results look promising at first look (roughly 75% reduced delay of rtksvr/chrony vs. strsvr/gpsd/chrony „NMEA“ toolchain), the NTP servers connected via 100Mbit fiber optics uplink perform much better in terms of delay and accuracy.

MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#? NMEA                          0   2   377     1   +180ms[ +180ms] +/- 9838us
#x RTK                           0   2   377     5    +42ms[  +42ms] +/- 2060us
^* ntp1.belwue.de                1   6   377    15   +187us[ +168us] +/- 5008us
^+ ntp2.belwue.de                1   6   377    63    +40us[  +21us] +/- 4930us
^+ ptbtime1.ptb.de               1   6   377    17   +225us[ +206us] +/- 6373us
^+ ptbtime2.ptb.de               1   6   377    76   -149us[ -168us] +/- 6526us
^+ ptbtime3.ptb.de               1   6   377    92   -114us[ -120us] +/- 6401us
^+ ntp1.m-online.net             2   6   377    50   -226us[ -245us] +/- 7253us
^+ ntp2.m-online.net             2   6   377    11    -30us[  -30us] +/- 7587us
^+ ntp3.m-online.net             2   6   377    58   -270us[ -289us] +/- 7748us
Name/IP Address            NP  NR  Span  Frequency  Freq Skew  Offset  Std Dev
==============================================================================
NMEA                       63  29   257     +6.460     33.254   +187ms  5615us
RTK                        21  10    81   -317.239    297.191    +32ms    11ms
ntp1.belwue.de             18   8  1099     +0.017      0.077   +271us    27us
ntp2.belwue.de             64  39   67m     -0.000      0.018    +35us    46us
ptbtime1.ptb.de            17   9  1032     -0.014      0.055   +218us    18us
ptbtime2.ptb.de            47  23   56m     +0.011      0.016   +125us    30us
ptbtime3.ptb.de            56  26  177m     -0.001      0.003   +202us    23us
ntp1.m-online.net          10   7   582     +0.081      0.193   -175us    23us
ntp2.m-online.net          32  14   33m     +0.061      0.052    +74us    49us
ntp3.m-online.net          20  14   20m     +0.125      0.122   +112us    51us

References
[1] The GNSS integer ambiguities: estimation and validation, Sandra Verhagen
[2] The GNSS Ambiguity Ratio-test Revisited: a Better Way of Using it.
[3] Data-Driven Generalized Integer Aperture Bootstrapping for High-Integrity Positioning
G. Nathan Green and Dr. Todd Humphreys, The University of Texas at Austin
[4] Karl Osen. Accurate Conversion of Earth-Fixed Earth-Centered Coordinates to Geodetic Coordinates. [Research Report] Norwegian University of Science and Technology. 2017. ffhal-01704943v2f
[5] Thaddeus Vincenty. Direct and inverse solutions of geodesics on the ellipsoid with application of nested equations. Survey Review XXII, 176, April 1975