Metadata-Version: 2.4
Name: gnsskit
Version: 0.4.0
Summary: RTKLIB-based GNSS post-processing toolkit: RINEX tools, RTKLIB wrappers, static baselines and network adjustment, kinematic trajectories
Keywords: gnss,gps,rtklib,ppk,surveying,least-squares
Author: Francesco Ioli
Author-email: Francesco Ioli <francesco.ioli@polimi.it>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: GIS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Dist: numpy
Requires-Dist: pandas>=2
Requires-Dist: scipy ; extra == 'network'
Requires-Dist: pyproj ; extra == 'network'
Requires-Dist: matplotlib ; extra == 'plot'
Requires-Python: >=3.10
Project-URL: Repository, https://github.com/franioli/gnsskit
Project-URL: Issues, https://github.com/franioli/gnsskit/issues
Provides-Extra: network
Provides-Extra: plot
Description-Content-Type: text/markdown

# gnsskit

Shared tools for post-processing GNSS data with [RTKLIB](https://www.rtklib.com/) `rnx2rtkp`, used by
[djippk](https://github.com/franioli/djippk) (drone PPK) and [stopgo](https://github.com/franioli/stopgo)
(stop-and-go surveys).

- **RTKLIB wrappers** (`gnsskit.rtklib`): `RtkConfig`, a typed, immutable set of `rnx2rtkp` options
  (`from_file`, `updated`, `with_options`, `with_base_llh`, `write`); `run_rnx2rtkp` and `find_rnx2rtkp`;
  `read_pos` (llh, xyz and enu `.pos` files).
- **RINEX** (`gnsskit.rinex`): `rinex_span`, `header_llh`, `trim_rinex`; inspection with `obs_summary`
  (span, sampling, gaps, satellites), `read_visibility` and `plot_visibility` (RTKPLOT-style satellite
  visibility, needs the `plot` extra).
- **Static** (`gnsskit.static`): `solve_static` (one solution over a time window), `process_baseline`
  (static baselines with covariance), baseline IO and `loop_closures` (misclosure of every triangle of baselines); least-squares adjustment of a redundant baseline
  network in `gnsskit.static.network` (needs the `network` extra).
- **Kinematic** (`gnsskit.kinematic`): trajectory interpolation and averaging.
- **Reference systems** (`gnsskit.refsys`): GPST/UTC, ellipsoids, ECEF/geodetic conversions and
  `ENUFrame`, a local east-north-up frame at a point (points, vectors and covariances, both ways).

## Install

```sh
pip install gnsskit                  # library
pip install "gnsskit[network]"       # + network adjustment (scipy, pyproj)
pip install "gnsskit[network,plot]"  # + satellite visibility plots (matplotlib)
pip install git+https://github.com/franioli/gnsskit   # development version
```

`rnx2rtkp` is not installed by pip. Build the [demo5 fork](https://github.com/rtklibexplorer/RTKLIB) and put it on
your `PATH`; if it is missing, `run_rnx2rtkp` raises an error with instructions. Developed with `rnx2rtkp ver.EX 2.5.1`.

## Example

```python
from gnsskit import RtkConfig, read_pos, run_rnx2rtkp

config = RtkConfig(posmode="static", navsys="GEC", solformat="llh").with_base_llh(46.2, 9.8, 2300.0)
pos_file = run_rnx2rtkp(rover_obs, base_obs, [nav], config, "out.pos")
pos = read_pos(pos_file)
```

See [example/](https://github.com/franioli/gnsskit/tree/main/example) for complete static, kinematic and network adjustment examples.
