Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
alenrajsp committed Dec 1, 2020
1 parent 2ca4236 commit 7f87d43
Show file tree
Hide file tree
Showing 10 changed files with 132,936 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Pycharm
.idea

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 alenrajsp
Copyright (c) 2020 Alen Rajšp

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
49 changes: 47 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,47 @@
# tcxreader
tcxparser is a reader / parser for Garmin’s TCX file format. It also works well with missing data!
## Objective
This is a simple TCX parser / reader which can read Garmin TCX file extension files. The package currently does not support laps and merges the whole exercise into one exercise object.
The following data is currently parsed: longitude, latitude, elevation, time, distance, hr_value, cadence, watts, TPX_speed (extension). GitHub requests appreciated to add missing Extensions.


## Dependencies
This package uses [maya](https://pypi.org/project/maya/) for parsing / reading datetimes from TCX files.

## Example
An example on how to use the package is shown below.
```python
from tcxreader.tcxreader import TCXReader, TCXTrackPoint

tcx_reader = TCXReader()
file_location = 'example_data/15.tcx'

data: TCXTrackPoint = tcx_reader.read(file_location)
""" Example output:
{TCXTrackPoint}
TPX_speed = {float} 5.011000156402588
cadence = {float} 80
distance = {float} 514.0499877929688
elevation = {float} 46.79999923706055
hr_value = {int} 134
latitude = {float} 45.5244944896549
longitude = {float} 13.596355207264423
time = {datetime} 2015-02-19 09:34:17+00:00
watts = {float} 123
"""
print("Output")
print(str(data[0]))
```

## Features
Allows parsing / reading of TCX files.

## Datasets

Datasets are available on the following links: [DATASET1](http://iztok-jr-fister.eu/static/publications/Sport5.zip), [DATASET2](http://iztok-jr-fister.eu/static/css/datasets/Sport.zip)

## Licence

This package is distributed under the MIT License. This license can be found online at <http://www.opensource.org/licenses/MIT>.

## Disclaimer

This framework is provided as-is, and there are no guarantees that it fits your purposes or that it is bug-free. Use it at your own risk!
Loading

0 comments on commit 7f87d43

Please sign in to comment.