Metadata-Version: 2.4
Name: gpst
Version: 0.3.0
Summary: GPS Tools - A collection of tools to work with GPS track files.
Author-email: Neri <neri@n3r1.com>
Project-URL: Homepage, https://github.com/neri14/gpst
Project-URL: Repository, https://github.com/neri14/gpst
Project-URL: Issues, https://github.com/neri14/gpst/issues
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Other Audience
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: garmin-fit-sdk>=21.178.0
Requires-Dist: matplotlib>=3.10.0
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Dynamic: license-file

# GPS Tools

[![CI](https://github.com/neri14/gpst/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/neri14/gpst/actions/workflows/ci.yml)
[![Coverage Status](https://codecov.io/gh/neri14/gpst/branch/master/graph/badge.svg)](https://codecov.io/gh/neri14/gpst)
[![PyPI - Version](https://img.shields.io/pypi/v/gpst)](https://pypi.org/project/gpst/)

[![Python 3.12+](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/downloads/)

**GPS Tools** - A collection of tools to work with GPS track files.


## Example Usage

**convert .fit file to .gpx file**

```gpst process track.fit -o track.gpx```


## Detailed Usage

```
$ gpst -h
usage: gpst [-h] [--version] tool ...

GPS Tools - A collection of tools to work with GPS track files.

positional arguments:
  tool        Available tools:
    plot      Plot data from the fit file.
    process   Process GPS track file and write results to a GPX file.

options:
  -h, --help  show this help message and exit
  --version   show program's version number and exit
```


### gpst process

```
$ gpst process -h
usage: gpst process [-h] -o OUT_FILE [-y] IN_FILE

positional arguments:
  IN_FILE               Path to input file (.gpx or .fit).

options:
  -h, --help            show this help message and exit
  -o, --output OUT_FILE
                        Path to the output file.
  -y, --yes             Accept questions (e.g. overwrite existing output file).
```


### gpst plot

**Note:** plot tool does not calculate additional fields, to use calculated fields with FIT file, convert with process tool to GPX first

```
$ gpst plot -h
usage: gpst plot [-h] -x X_AXIS -y Y_AXIS [Y_AXIS ...] [--y-right Y_AXIS_RIGHT [Y_AXIS_RIGHT ...]] [-t {line,scatter}] [--type-right {line,scatter}] [-o OUTPUT] FILE

positional arguments:
  FILE                  Path to input file (.gpx or .fit).

options:
  -h, --help            show this help message and exit
  -x, --x-axis X_AXIS   Field to use for the x-axis.
  -y, --y-axis Y_AXIS [Y_AXIS ...]
                        Field to use for the y-axis.
  --y-right Y_AXIS_RIGHT [Y_AXIS_RIGHT ...]
                        Field to use for the y-axis on the right side.
  -t, --type {line,scatter}
                        Plot type: line, scatter. Default is line.
  --type-right {line,scatter}
                        Plot type for right y-axis: line, scatter. Default is line.
  -o, --output OUTPUT   Path to the output image file. If not provided, shows the plot interactively.
```


## Future Improvements

- [ ] --fix-elevation option for process tool
- [ ] configurable elevation smoothing window
- [ ] configurable grade window


## Limitations

- GPX rte and wpt (and FIT equivalents) are ignored
- track and segment split in GPX (and FIT equivalents) are ignored
- GPX 1.0 is not supported (yet)
- unsupported fields are not preserved (see [list of supported Fields](./FIELDS.md))

- following GPX extensions are utilized for working with GPX files:
  - http://www.garmin.com/xmlschemas/TrackPointExtension/v1
  - http://www.garmin.com/xmlschemas/TrackPointExtension/v2
  - http://www.garmin.com/xmlschemas/GpxExtensions/v2
  - http://www.garmin.com/xmlschemas/GpxExtensions/v3
  - http://www.n3r1.com/xmlschemas/ActivityDataExtensions/v1
