Introduction of RTKLIB
Yize Zhang

Tokyo University of Marine Science and Technology

Contents
1. Introduction of RTKLIB
2. GNSS Positioning Theory &Example of using RTKLIB

1 RTKLIB• Open source program package for standard and precise positioning with GNSS
(global navigation satellite system).
• Developed by Mr. Tomoji Takasu at TUMSAT.
• Since 2006, latest version is ver. 2.4.3 b31.
• API(Application Programming Interface)+APs (application programs).

1 Features of RTKLIB(1) It supports multi-GNSS satellites:
GPS, GLONASS, Galileo, QZSS, BeiDou and SBAS (no IRNSS/Navic)(2) It supports various positioning modes with GNSS for both real-time- and postprocessing:Single, DGPS/DGNSS, Kinematic, Static, Moving-Baseline, Fixed,
PPP-Kinematic, PPP-Static and PPP-Fixed(3) It supports many standard formats/protocols and receivers:
RINEX 2/3,RTCM 2/3, BINEX, NTRIP 1.0, NMEA 0183, SP3, CLK, ANTEX, IONEX,NGS PCVand EMS ...

NovAtel, u-blox, SkyTraq, JAVAD, Septentrio, NVS, Hemisphere ...

1 Features of RTKLIB(4) It supports real-time communication via:
Serial, TCP/IP, NTRIP, and file streams.
(5) It provides many library functions and APIs
(6) It provides many GUIs and CUI(command-line user interface) APs:

1 Package of RTKLIB

1 RTKLIB version and download

http://www.rtklib.com/

https://github.com/tomojitakasu/

1 Download RTKLIB

https://github.com/tomojitakasu/RTKLIB_bin/tree/rtklib_2.4.3

1 Launch RTKLIB

1 RTKLIB GUIsRTKPLOTRTKNAVI

RTKGETNTRIP BROWSERRTKPOST

RTKCONV1 RTKLIB Manual• http://www.rtklib.com/prog/manual_2.4.2.pdf

Contents
1. Introduction of RTKLIB

2. GNSS Positioning Theory& Example of using RTKLIB

SPP
DGNSS
PPP
RTK

2 GNSS Positioning2 GNSS Observation and Errors

2 GNSS Positioning based on code and carrier phase2 GNSS Observation and Errors

Subirana J. Sanz, Juan Zornoza J.M. and HernándezPajares M. GNSS Data Processing: Volumn I:
Fundamentals and Algorithms. ESA communications,Netherlands, 2013

2 GNSS Observation and Errors

Teunissen P J G , Montenbruck O . Springer Handbookof Global Navigation Satellite Systems [J]. 2017,10.1007/978-3-319-42928-1.

Contents
1. Introduction of RTKLIB

2. GNSS Positioning Theory& Example of using RTKLIBSPPDGNSSPPPRTK2.1.1 GNSS Pseudo-range Observation EquationjI
Pfj = ρ j + c δt f − c δt fj −  jrela + T j − 2 + ε PffPseudo-range
observation

Ionospherecorrection

Geometric distancefrom satellite toreceiver(X, Y, Z)

Noise andTropospherecorrection other modeled
corrections

Receiver clock

Clock relativity
correction

Satellite clock2.1.1 GNSS Observation Data (RINEX format)

ftp://igs.org/pub/data/format/rinex303.pdf2.1.1 GNSS Observation Data (RINEX format)

ftp://igs.org/pub/data/format/rinex303.pdf

2.1.1 GNSS Navigation Data(RINEX format)

ftp://igs.org/pub/data/format/rinex303.pdf

2.1.1 SPP(Single Point Positioning)
Define:x 0 − x sat
y 0 − ysatz 0 − z satρ = ρ0 +dx +dy +dz
ρ0ρ0ρ0𝐼
𝐷 = 𝑐 ⋅ 𝛿𝑡 + 𝛥𝑟𝑒𝑙𝑎 − 𝑇 + 2𝑓
Then:𝑠

 x 0 − x1
 P1 − ρ1 − D1   ρ 0=  nx−x0Pn − ρ n − D n  ρ0


yy 0 − y1
ρ0
y0 − ynρ0

Gz 0 − z1
ρ0
z0 − znρ0  dx 1  dy   dz 1c δt x

2.1.1 Solving GNSS Equations
Then GNSS Equation can be simplified as:

where y is the OMC(observation minus correction),G is the design matrix,
x is the estimated parameter, ɛ is observation noise, R is observation
covariance matrix.

2.1.1 Solving GNSS Equations: Least Square
Least square is to best-fit the condition of:

min V T WV = min i =1 ( v i w i v i ) 2n

 where V = Gxˆ −yFollowing this condition, the Normal Equation of least square is:( G T WG ) xˆ = G T Wy or ( G T R − 1 G ) xˆ = G T R − 1 y
So the least square solution is:xˆ = ( G T R − 1G ) − 1 G T R − 1 y
P = ( G T R −1G ) −1

P is the covariance matrix of the estimated parameter2.1.1 Solving GNSS Equations: Kalman Filter
Predict:xˆ − k = Φ k − 1 xˆ − k − 1P xˆ- k = Φ k − 1 P xˆ- k −1 Φ T k − 1 + Q k − 1
Estimate:

K k = P xˆ- k G T k G k P xˆ- k G k + R kT

xˆ k = xˆ − k + K k y k - G k xˆ − kPxˆ k = I - K k G k Pxˆ-k





−1

2.1.1 Solving GNSS Equations: LS vs. KF

2.1.1 DOP
Covariance matrix of SPP is:
𝑷 = (𝑮𝑻 𝑹−𝟏 𝑮)−𝟏
𝒑𝟏𝟏
𝑷= ⋮𝒑𝟒𝟏⋯ 𝒑𝟏𝟒⋱⋮⋯ 𝒑𝟒𝟒

Define:𝑃𝐷𝑂𝑃 = 𝑝11 + 𝑝22 + 𝑝33
𝐻𝐷𝑂𝑃 = 𝑝11 + 𝑝22
V𝐷𝑂𝑃 = 𝑝33
𝐺𝐷𝑂𝑃 = 𝑝11 + 𝑝22 + 𝑝33 +𝑝442.1.2 Convert data to RINEX using RTKCONV2.1.2 Data quality check using RTKLIB

You can input all the othertypes of navigation files(*.p; *.nav; *.n;*.c;*.g)2.1.2 Data quality check using RTKLIBSat Visibility

SkyPlot2.1.2 Data quality check using RTKLIB

DOP/SatNum

SNR/MP/Ele2.1.3 Example of SPP using RTKLIBDefault setting of RTKLIB

2.1.3 RTKPLOT of SPP

2.1.3 RTKPLOT OPTIONS

2.1.3 Example of SPP using RTKLIB: GPS+Galileo

Contents
1. Introduction of RTKLIB

2. GNSS Positioning Theory& Example of using RTKLIBSPPDGNSSPPPRTK2.2.1 DGNSS(Differential GNSS)
For one common satellite observed by base station and rover station atfrequency f:
𝐼+ 𝜀𝑏𝑓2𝐼s− 𝑐 ⋅ 𝛿𝑡 − 𝑟𝑒𝑙𝑟 + 𝑇 − 2 + 𝜀𝑟𝑓

𝑃𝑏 = 𝜌𝑏 + 𝑐 ⋅ 𝛿𝑡𝑏 − 𝑐 ⋅ 𝛿𝑡 s − 𝑟𝑒𝑙𝑟 + 𝑇 −𝑃𝑟 = 𝜌𝑟 + 𝑐 ⋅ 𝛿𝑡𝑟

After station differencing:
𝑃𝑏𝑟 = 𝜌𝑟 − 𝜌𝑏 + 𝑐 ⋅ 𝛿𝑡𝑏𝑟 + 𝜀𝑏𝑟

By Least Square or Kalman Filter, we can get the coordinate difference ofthese two stations. If the coordinate of base station is known, then theposition of rover station can be get:𝑃𝑜𝑠𝑟 = 𝑃𝑜𝑠𝑏 + 𝑑𝑃𝑜𝑠𝑏𝑟2.2.1 Benefit of DGNSSFor short baseline, DGNSS would remove errors from satellite and atmosphere,
including satellite orbit, clock, relativity, ionosphere, troposphere error.

However, DGNSS can’t remove errors from receivers, will enlarge pseudorange observation noise by 2 times.

2.2.2 Example of DGNSS using RTKLIB

2.2.2 Example of DGNSS using RTKLIB

STD improve from [0.62,0.62,1.95]m to [0.22,0.23, 0.97]mContents
1. Introduction of RTKLIB

2. GNSS Positioning Theory& Example of using RTKLIB

SPP
DGNSS
PPPRTK2.3.1 GNSS Carrier Phase Observation EquationjI
Pfj = ρ j + c δt f − c δt fj −  jrela + T j − 2 + ε Pffj
Ijj
jjj
L f = ρ + c δt f,L − c δt f,L − Δ rela + T + 2 + λ f  N fj + λ f  W j + ε LffCarrier Phaseobservation

Ionospherecorrection

Geometric distancefrom satellite toreceiver(X, Y, Z)

Satellite clockReceiver clock

Tropospherecorrection
Clock relativity
correction

Noise andother modeled
corrections

Ambiguity
including satellite
and receiver bias

Phase windup2.3.1 PPP(Precise Point Positioning)
Similar as SPP, we can establish PPP model by combining pseudo-range andcarrier phase observation:
 x 0 − x1ρ0
 P1 − ρ1 − D P1 x 0 − x1L −ρ −D  ρL1 
 1 10
=  x − xn Pn − ρ n − D Pn   0
L n − ρ n − D Ln   ρ 0nx−x0 ρ 0y 0 − y1
ρ0y 0 − y1
ρ0
y0 − ynρ0
y0 − ynρ0z 0 − z1
ρ0z 0 − z1
ρ0
z0 − zn
ρ0z0 − zn
ρ01 M1wet
1 M1wet

1 M nwet
1 M nwet  dx 0  0 
  dy 1  0  dz   c δt    dZTD w 0  0  B 
1  
0  1 B n

Troposphere residual after model correction and carrier phase ambiguity is
estimated together with receiver coordinate and receiver clock.

2.3.1 PPP(Precise Point Positioning)
Each errors must be corrected carefully.
(1) Satellite clock and coordinate are from IGS final products(.sp3, .clk);(2) Satellite and receiver Phase Center Offset(PCO) and Phase Center
Variation(PCV) should be corrected by IGS antenna model(.atx);(3) Ionosphere error usually removed after Ionosphere-Free combination, or
estimated as a random walk parameter;(4) Troposphere residual after model correction and carrier phase ambiguity
should be estimated together with coordinate and receiver clock.
(5) Earth solid tide and ocean tide error must be corrected.

2.3.1 PPP: IGS products

http://www.igs.org/products

2.3.1 PPP: IGS products

http://acc.igs.org/

2.3.1 PPP: IGS products

http://kb.igs.org/hc/enus/article_attachments/203088448/UsingIGSProductsVer21_cor.pdf

https://kb.igs.org/hc/enus/articles/201096516-IGS-Formats

2.3.1 PPP using Final Orbits and Clocks

http://acc.igs.org/

2.3.2 Example of PPP using RTKLIB

2.3.2 Example of Static PPP using RTKLIB

2.3.2 Example of Static PPP using RTKLIB

2.3.2 Example of Kinematic PPP using RTKLIBContents
1. Introduction of RTKLIB

2. GNSS Positioning Theory& Example of using RTKLIB

SPP
DGNSS
PPPRTK2.4.1 RTK(Real Time Kinematic)
For one common satellite observed by base station and rover station atfrequency f:

𝐼𝑠+𝜆⋅
𝑁+𝜆⋅
B−𝜆⋅
𝐵+ 𝜆𝑓 ⋅ 𝑊 + 𝜀𝑏𝑓𝑏𝑓𝑏𝑓𝑓2𝐼s− 𝑐 ⋅ 𝛿𝑡 − 𝑟𝑒𝑙𝑟 + 𝑇 + 2 + 𝜆𝑓 ⋅ 𝑁r + 𝜆𝑓 ⋅ B𝑟 − 𝜆𝑓 ⋅ 𝐵 𝑠 + 𝜆𝑓 ⋅ 𝑊 + 𝜀𝑟𝑓𝐿𝑏 = 𝜌𝑏 + 𝑐 ⋅ 𝛿𝑡𝑏 − 𝑐 ⋅ 𝛿𝑡 s − 𝑟𝑒𝑙𝑟 + 𝑇 +𝐿𝑟 = 𝜌𝑟 + 𝑐 ⋅ 𝛿𝑡𝑟

After station differencing:
𝐿𝑏𝑟 = 𝜌𝑟 −𝜌𝑏 +𝑐 ⋅ 𝛿𝑡𝑏𝑟 +𝜆𝑓 ⋅ 𝑁𝑏r + 𝜆𝑓 ⋅ B𝑏𝑟 + 𝜀𝑏𝑟

After satellite differencing:
𝑖𝑗

𝑖𝑗

𝑖𝑗

𝑖𝑗

𝑖𝑗

𝐿𝑏𝑟 = 𝜌𝑟 −𝜌𝑏 +𝜆𝑓 ⋅ 𝑁𝑏𝑟 + 𝜀𝑏𝑟

2.4.1 Integer Least Square(ILS)
By Least Square or Kalman Filter, we can get the float solution of coordinate
difference and float ambiguity.

The float solution of ambiguity can be fixed to integer using LAMBDA(Leastsquares AMBiguity Decorrelation Adjustment).

2.4.1 Integer Least Square(ILS)
After ambiguity is fixed, the float coordinate solution will updated as:

The covariance an also updated as:2.4.2 Example of RTK using RTKLIB

2.4.2 Example of RTK using RTKLIB

2.4.2 Example of RTK using RTKLIB

2.4.2 Example of RTK using RTKLIB

2.4.2 If we set SNR Mask

Fix rate will improve from 92.7% to 96.8%

Contents
1. Introduction of RTKLIB

2. GNSS Positioning Theory& Example of using RTKLIB

SPP
DGNSS
PPP
RTK
RTKNAVI2.5 RTKNAVI• RTKPOST is for post processing of GNSS data
• For real-time users, RTKNAVI is usually used.

2.5 RTKNAVI

2.5 RTKNAVI

2.5 RTKNAVISame as RTKPOST

2.5 RTKNAVI

2.5 RTKNAVI

3 Other software: Modified RTKCONV v2.4.3 p01

3 Other software

https://onedrive.live.com/?authkey=%21AJql2JkZaRwVhAM&id=CA40E2337C7D7327%211297
7&cid=CA40E2337C7D7327

3 Modified RTKCONV v2.4.3 p01

3 Modified RTKPOST v2.4.3 p01

3 Net_Diff⚫Functions:✓1. SPP/PPP/RTK/DGNSS/PPP-AR/PPP-RTK✓2 GPS/Glonass/Galileo/BeiDou/QZSS/IRNSS✓3 Single, dual, triple-frequency✓4 Data download✓5 Observation and positioning analysis✓6 Ntrip receiving, data conversion✓7 Orbit simulation⚫https://github.com/YizeZhang/Net_Diff

Thank you!