How tomojitakasu/rtklib works
Project Type and Purpose
• RTKLIB is an open‐source GNSS positioning toolset:
• A cross‐platform ANSI C/C++ core library implementing satellite navigation algorithms (RTK, PPP, post‐processing)
• A suite of command‐line (CUI) and GUI applications that drive the library for real‐time and offline workflows
• Utilities, sample data, tests and documentation in one monolithic repository
High‐Level Components
A. Core Library (src, lib)
– Algorithm modules: positioning (rtkcmn.c, pntpos.c, postpos.c, ppp.c, ppp_ar.c, etc.)
– Data format parsers/writers: RINEX (rinex.c), RTCM (rtcm*.c), BINEX, SP3, ANTEX, IONEX, etc.
– Receiver interfaces: code in src/rcv for proprietary GNSS raw messages (ublox, novatel, septentrio, etc.)
– Utility modules: coordinate transforms, time/string functions, matrix/vector, atmosphere and antenna models
– Platform abstractions: serial/TCP/I/O threads (stream.c, streamsvr.c), Win32 vs. POSIX sockets
B. Application Layer
1. Command‐Line APs (app/* CUI)
• rtkrcv (real‐time positioning server)
• rnx2rtkp (post‐processing kinematic/PPP)
• strsvr, str2str (stream server/client)
• convbin, pos2kml (data converters)
2. GUI APs (app/* GUI, C++)
• rtknavi (real‐time GUI navigator)
• rtkpost (post‐processing GUI)
• rtkplot (plot solutions & obs data)
• rtkconv (RINEX converter GUI)
• rtkget (downloader)
• srctblbrows (NTRIP browser)
• rtklaunch (application launcher)
C. Utilities (util/)
– Data generators, test pattern creators (gencrc, geniono, simobs, etc.)
– Geoid and grid tools, conversion scripts
D. Sample Data & Test Suite
– data/ : sample GNSS observations, navigation files, TLEs, station lists
– test/data & test/utest : unit‐tests, MATLAB/Octave scripts, test binaries
E. Build & Packaging
– app/* contains IDE project files (Borland C++ Builder, makefiles) for all APs
– lib/* contains build scripts for core library (gcc, bcc, msc, MKL/LAPACK options)
– bin/ includes prebuilt Windows executables and DLLs
– doc/ holds manuals and release notes
Relationships and Data Flow
• External GNSS data sources (serial ports, TCP streams, NTRIP) → Stream modules (stream.c, strsvr)
• Raw data → Receiver parsers (src/rcv/*.c) → Universal observation structures
• Observation + navigation data (RINEX, SP3, ANTEX) → Positioning engine (ppp.c, rtkpos.c)
• Computation results → Applications (GUI/CUI) for display, logging, file output, or further streaming
• Configuration & Options (options.c, GUI dialogs) → Library parameterization
Architectural Patterns & Design Principles
• Modular layering: clear separation of I/O, parsing, core algorithms, and application logic
• Plug‐in-like receiver drivers (each file in src/rcv is self‐contained)
• Data‐driven workflows: APs act as orchestration layers over library functions
• Cross‐platform abstractions: compile‐time flags select Win32 vs. POSIX threading/sockets
• Extensibility: utilities and test code demonstrate integration points for new data formats or algorithms