https://github.com/firefly-cpp/tcxread
A parser for TCX files
https://github.com/firefly-cpp/tcxread
data-mining data-science garmin-connect tcx-files tcx-parser
Last synced: about 2 months ago
JSON representation
A parser for TCX files
- Host: GitHub
- URL: https://github.com/firefly-cpp/tcxread
- Owner: firefly-cpp
- License: mit
- Created: 2024-07-18T08:17:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-12T11:42:50.000Z (over 1 year ago)
- Last Synced: 2025-03-24T23:35:11.659Z (about 1 year ago)
- Topics: data-mining, data-science, garmin-connect, tcx-files, tcx-parser
- Language: Ruby
- Homepage:
- Size: 1 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-computational-intelligence-in-sports - tcxread - A parser for TCX files. (Software 💻 / Wrestling 🤼♀️)
README
tcxread -- A parser for TCX files written in Ruby
📦 Installation •
🚀 Basic run example •
💾 Datasets •
📖 Further read •
🔗 Related packages/frameworks •
🔑 License
tcxread is a Ruby package designed to simplify the process of reading and processing .tcx files, commonly used by Garmin devices and other GPS-enabled fitness devices to store workout data.
## 📦 Installation
```sh
$ gem install tcxread
```
## 🚀 Basic run example
```ruby
require 'tcxread'
data = TCXRead.load_file('23.tcx')
puts [
"Distance meters: #{data.total_distance_meters}",
"Time seconds: #{data.total_time_seconds}",
"Calories: #{data.total_calories}",
"Total ascent: #{data.total_ascent}",
"Total descent: #{data.total_descent}",
"Max altitude: #{data.max_altitude}",
"Average heart rate: #{data.average_heart_rate}",
"Average watts: #{data.average_watts}",
"Max watts: #{data.max_watts}",
"Average speed: #{data.average_speed_all}",
"Average speed (moving): #{data.average_speed_moving}",
"Average cadence (moving): #{data.average_cadence_biking}",
"Average cadence: #{data.average_cadence_all}"
].join("\n")
```
Use `TCXRead.parse(data)` to parse raw TCX data.
## 💾 Datasets
Datasets available and used in the examples 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), [DATASET3](https://github.com/firefly-cpp/tcx-test-files).
## 📖 Further read
[1] [Awesome Computational Intelligence in Sports](https://github.com/firefly-cpp/awesome-computational-intelligence-in-sports)
## 🔗 Related packages/frameworks
[1] [tcxreader: Python reader/parser for Garmin's TCX file format.](https://github.com/alenrajsp/tcxreader)
[2] [sport-activities-features: A minimalistic toolbox for extracting features from sports activity files written in Python](https://github.com/firefly-cpp/sport-activities-features)
[3] [TCXReader.jl: Julia package designed for parsing TCX files](https://github.com/firefly-cpp/TCXReader.jl)
[4] [TCXWriter: A Tiny Library for writing/creating TCX files on Arduino](https://github.com/firefly-cpp/tcxwriter)
## 🔑 License
This package is distributed under the MIT License. This license can be found online at .
## 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!