# sgl-ut/gnsstk-apps architecture

> Architecture diagram of the GitHub repository sgl-ut/gnsstk-apps, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sgl-ut/gnsstk-apps
- Repository: https://github.com/sgl-ut/gnsstk-apps

## Overview

GNSSTk is a GNSS toolkit whose C++ applications use its library to inspect, transform, compare, validate, and process navigation data. The main user workflow is command-line input of GNSS files or options, application-specific processing, and textual or file output. The graph also preserves documented positioning, time conversion, visibility, geomatics, and stream-I/O capabilities. README documents the application categories and library foundation; sampled excerpts show some utility implementations and the relative-position data model, but not a complete runtime call graph, so unverified subsystem links are omitted.

Main entry points: [`ext/apps/rfw/DeviceStream.hpp`](https://github.com/sgl-ut/gnsstk-apps/blob/stable/ext/apps/rfw/DeviceStream.hpp) (Device streams), [`ext/apps/rfw/rfw.cpp`](https://github.com/sgl-ut/gnsstk-apps/blob/stable/ext/apps/rfw/rfw.cpp) (Rolling file writer), [`core/apps/Rinextools/RinDump.cpp`](https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/Rinextools/RinDump.cpp) (RINEX inspect/edit), [`core/apps/filetools/bc2sp3.cpp`](https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/filetools/bc2sp3.cpp) (File conversion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_utilities["File Utilities"]
  node_rinex_tools["RINEX inspect/edit<br/>[RinDump.cpp]"]
  node_rinex_edit["RINEX editing<br/>[RinEdit.cpp]"]
  node_rinex_nav_edit["Navigation editing<br/>[RinEditNav.cpp]"]
  node_rinex_summary["RINEX summary<br/>[RinSum.cpp]"]
  node_elevation_strip["Elevation filtering<br/>[RinexElvStrip.cpp]"]
  node_file_convert["File conversion<br/>[bc2sp3.cpp]"]
  node_nav_dump["Navigation dump<br/>[navdump.cpp]"]
  node_file_validate["File validation<br/>[CheckFrame.hpp]"]
  node_file_compare["File comparison<br/>[rnwdiff.cpp]"]
  node_rinex_merge["RINEX merge<br/>[mergeRinNav.cpp]"]
end

subgraph group_navigation["Navigation Processing"]
  node_time_tools["Time conversion<br/>[timeconvert.cpp]"]
  node_position_solve["Position solution<br/>[PRSolve.cpp]"]
  node_coordinate_convert["Coordinate conversion<br/>[poscvt.cpp]"]
  node_sat_visibility["Satellite visibility<br/>[WhereSat.cpp]"]
end

subgraph group_geomatics["Geomatics"]
  node_relative_setup["Relative-solution setup<br/>[CommandInput.cpp]"]
  node_double_difference["Double-difference model<br/>[DDBase.hpp]"]
  node_relative_estimation["Relative estimation<br/>[Estimation.cpp]"]
  node_cycle_slips["Cycle-slip correction<br/>[DiscFix.cpp]"]
  node_kalman["Kalman processing<br/>[tkalm.hpp]"]
  node_robust_analysis["Robust analysis<br/>[rstats.cpp]"]
end

subgraph group_io["Stream I/O"]
  node_device_stream["Device streams<br/>[DeviceStream.hpp]"]
  node_fd_buffer["Descriptor buffer<br/>[FDStreamBuff.hpp]"]
  node_tcp_buffer["TCP buffer<br/>[TCPStreamBuff.hpp]"]
  node_rolling_writer["Rolling file writer<br/>[rfw.cpp]"]
end

node_user(("Command-line user"))
node_gnsstk["GNSSTk library"]
node_result["Report or output file"]

node_user -->|"runs utility"| node_rinex_tools
node_user -->|"runs utility"| node_rinex_edit
node_user -->|"runs utility"| node_rinex_nav_edit
node_user -->|"runs utility"| node_rinex_summary
node_user -->|"runs utility"| node_elevation_strip
node_user -->|"runs conversion"| node_file_convert
node_user -->|"runs utility"| node_nav_dump
node_user -->|"runs validation"| node_file_validate
node_user -->|"compares files"| node_file_compare
node_user -->|"merges files"| node_rinex_merge
node_user -->|"converts time"| node_time_tools
node_user -->|"requests solution"| node_position_solve
node_user -->|"converts coordinates"| node_coordinate_convert
node_user -->|"checks visibility"| node_sat_visibility
node_user -->|"configures processing"| node_relative_setup
node_user -->|"runs correction"| node_cycle_slips
node_user -->|"runs processing"| node_kalman
node_user -->|"runs analysis"| node_robust_analysis
node_rinex_tools -->|"uses library"| node_gnsstk
node_position_solve -->|"uses library"| node_gnsstk
node_time_tools -->|"uses library"| node_gnsstk
node_file_convert -.->|"writes output"| node_result
node_file_validate -.->|"reports errors"| node_result
node_file_compare -.->|"reports differences"| node_result
node_rinex_merge -->|"writes merged file"| node_result
node_relative_setup -.->|"configures model"| node_double_difference
node_double_difference -.->|"supports estimation"| node_relative_estimation
node_rolling_writer -->|"reads stream"| node_device_stream
node_device_stream -->|"uses buffer"| node_fd_buffer
node_device_stream -->|"uses buffer"| node_tcp_buffer
node_rolling_writer -.->|"writes files"| node_result

click node_rinex_tools "https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/Rinextools/RinDump.cpp"
click node_rinex_edit "https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/Rinextools/RinEdit.cpp"
click node_rinex_nav_edit "https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/Rinextools/RinEditNav.cpp"
click node_rinex_summary "https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/Rinextools/RinSum.cpp"
click node_elevation_strip "https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/Rinextools/RinexElvStrip.cpp"
click node_file_convert "https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/filetools/bc2sp3.cpp"
click node_nav_dump "https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/filetools/navdump.cpp"
click node_file_validate "https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/checktools/CheckFrame.hpp"
click node_file_compare "https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/difftools/rnwdiff.cpp"
click node_rinex_merge "https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/mergetools/mergeRinNav.cpp"
click node_time_tools "https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/time/timeconvert.cpp"
click node_position_solve "https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/positioning/PRSolve.cpp"
click node_coordinate_convert "https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/positioning/poscvt.cpp"
click node_sat_visibility "https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/visibility/WhereSat.cpp"
click node_relative_setup "https://github.com/sgl-ut/gnsstk-apps/blob/stable/ext/apps/geomatics/relposition/CommandInput.cpp"
click node_double_difference "https://github.com/sgl-ut/gnsstk-apps/blob/stable/ext/apps/geomatics/relposition/DDBase.hpp"
click node_relative_estimation "https://github.com/sgl-ut/gnsstk-apps/blob/stable/ext/apps/geomatics/relposition/Estimation.cpp"
click node_cycle_slips "https://github.com/sgl-ut/gnsstk-apps/blob/stable/ext/apps/geomatics/cycleslips/DiscFix.cpp"
click node_kalman "https://github.com/sgl-ut/gnsstk-apps/blob/stable/ext/apps/geomatics/kalman/tkalm.hpp"
click node_robust_analysis "https://github.com/sgl-ut/gnsstk-apps/blob/stable/ext/apps/geomatics/robust/rstats.cpp"
click node_device_stream "https://github.com/sgl-ut/gnsstk-apps/blob/stable/ext/apps/rfw/DeviceStream.hpp"
click node_fd_buffer "https://github.com/sgl-ut/gnsstk-apps/blob/stable/ext/apps/rfw/FDStreamBuff.hpp"
click node_tcp_buffer "https://github.com/sgl-ut/gnsstk-apps/blob/stable/ext/apps/rfw/TCPStreamBuff.hpp"
click node_rolling_writer "https://github.com/sgl-ut/gnsstk-apps/blob/stable/ext/apps/rfw/rfw.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_rinex_tools,node_rinex_edit,node_rinex_nav_edit,node_rinex_summary,node_elevation_strip,node_file_convert,node_nav_dump,node_file_validate,node_file_compare,node_rinex_merge,node_user toneBlue
class node_time_tools,node_position_solve,node_coordinate_convert,node_sat_visibility toneAmber
class node_relative_setup,node_double_difference,node_relative_estimation,node_cycle_slips,node_kalman,node_robust_analysis toneMint
class node_device_stream,node_fd_buffer,node_tcp_buffer,node_rolling_writer toneRose
class node_gnsstk,node_result toneIndigo
```

## Components

### File Utilities

- [RINEX inspect/edit](https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/Rinextools/RinDump.cpp): `core/apps/Rinextools/RinDump.cpp`
- [RINEX editing](https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/Rinextools/RinEdit.cpp): `core/apps/Rinextools/RinEdit.cpp`
- [Navigation editing](https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/Rinextools/RinEditNav.cpp): `core/apps/Rinextools/RinEditNav.cpp`
- [RINEX summary](https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/Rinextools/RinSum.cpp): `core/apps/Rinextools/RinSum.cpp`
- [Elevation filtering](https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/Rinextools/RinexElvStrip.cpp): `core/apps/Rinextools/RinexElvStrip.cpp`
- [File conversion](https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/filetools/bc2sp3.cpp): `core/apps/filetools/bc2sp3.cpp`
- [Navigation dump](https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/filetools/navdump.cpp): `core/apps/filetools/navdump.cpp`
- [File validation](https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/checktools/CheckFrame.hpp): `core/apps/checktools/CheckFrame.hpp`
- [File comparison](https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/difftools/rnwdiff.cpp): `core/apps/difftools/rnwdiff.cpp`
- [RINEX merge](https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/mergetools/mergeRinNav.cpp): `core/apps/mergetools/mergeRinNav.cpp`

### Navigation Processing

- [Time conversion](https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/time/timeconvert.cpp): `core/apps/time/timeconvert.cpp`
- [Position solution](https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/positioning/PRSolve.cpp): `core/apps/positioning/PRSolve.cpp`
- [Coordinate conversion](https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/positioning/poscvt.cpp): `core/apps/positioning/poscvt.cpp`
- [Satellite visibility](https://github.com/sgl-ut/gnsstk-apps/blob/stable/core/apps/visibility/WhereSat.cpp): `core/apps/visibility/WhereSat.cpp`

### Geomatics

- [Relative-solution setup](https://github.com/sgl-ut/gnsstk-apps/blob/stable/ext/apps/geomatics/relposition/CommandInput.cpp): `ext/apps/geomatics/relposition/CommandInput.cpp`
- [Double-difference model](https://github.com/sgl-ut/gnsstk-apps/blob/stable/ext/apps/geomatics/relposition/DDBase.hpp): `ext/apps/geomatics/relposition/DDBase.hpp`
- [Relative estimation](https://github.com/sgl-ut/gnsstk-apps/blob/stable/ext/apps/geomatics/relposition/Estimation.cpp): `ext/apps/geomatics/relposition/Estimation.cpp`
- [Cycle-slip correction](https://github.com/sgl-ut/gnsstk-apps/blob/stable/ext/apps/geomatics/cycleslips/DiscFix.cpp): `ext/apps/geomatics/cycleslips/DiscFix.cpp`
- [Kalman processing](https://github.com/sgl-ut/gnsstk-apps/blob/stable/ext/apps/geomatics/kalman/tkalm.hpp): `ext/apps/geomatics/kalman/tkalm.hpp`
- [Robust analysis](https://github.com/sgl-ut/gnsstk-apps/blob/stable/ext/apps/geomatics/robust/rstats.cpp): `ext/apps/geomatics/robust/rstats.cpp`

### Stream I/O

- [Device streams](https://github.com/sgl-ut/gnsstk-apps/blob/stable/ext/apps/rfw/DeviceStream.hpp): `ext/apps/rfw/DeviceStream.hpp`
- [Descriptor buffer](https://github.com/sgl-ut/gnsstk-apps/blob/stable/ext/apps/rfw/FDStreamBuff.hpp): `ext/apps/rfw/FDStreamBuff.hpp`
- [TCP buffer](https://github.com/sgl-ut/gnsstk-apps/blob/stable/ext/apps/rfw/TCPStreamBuff.hpp): `ext/apps/rfw/TCPStreamBuff.hpp`
- [Rolling file writer](https://github.com/sgl-ut/gnsstk-apps/blob/stable/ext/apps/rfw/rfw.cpp): `ext/apps/rfw/rfw.cpp`

### Other components

- **Command-line user**
- **GNSSTk library**
- **Report or output file**

## Connections

- Command-line user → RINEX inspect/edit: runs utility
- Command-line user → RINEX editing: runs utility
- Command-line user → Navigation editing: runs utility
- Command-line user → RINEX summary: runs utility
- Command-line user → Elevation filtering: runs utility
- Command-line user → File conversion: runs conversion
- Command-line user → Navigation dump: runs utility
- Command-line user → File validation: runs validation
- Command-line user → File comparison: compares files
- Command-line user → RINEX merge: merges files
- Command-line user → Time conversion: converts time
- Command-line user → Position solution: requests solution
- Command-line user → Coordinate conversion: converts coordinates
- Command-line user → Satellite visibility: checks visibility
- Command-line user → Relative-solution setup: configures processing
- Command-line user → Cycle-slip correction: runs correction
- Command-line user → Kalman processing: runs processing
- Command-line user → Robust analysis: runs analysis
- RINEX inspect/edit → GNSSTk library: uses library
- Position solution → GNSSTk library: uses library
- Time conversion → GNSSTk library: uses library
- File conversion → Report or output file: writes output
- File validation → Report or output file: reports errors
- File comparison → Report or output file: reports differences
- RINEX merge → Report or output file: writes merged file (evidence: `core/apps/mergetools/mergeRinNav.cpp`)
- Relative-solution setup → Double-difference model: configures model (evidence: `ext/apps/geomatics/relposition/CommandInput.cpp`)
- Double-difference model → Relative estimation: supports estimation (evidence: `ext/apps/geomatics/relposition/Estimation.cpp`)
- Rolling file writer → Device streams: reads stream (evidence: `ext/apps/rfw/rfw.cpp`)
- Device streams → Descriptor buffer: uses buffer (evidence: `ext/apps/rfw/DeviceStream.hpp`)
- Device streams → TCP buffer: uses buffer (evidence: `ext/apps/rfw/DeviceStream.hpp`)
- Rolling file writer → Report or output file: writes files
