https://github.com/firefly-cpp/ast-monitor
AST-Monitor is a wearable Raspberry Pi computer for cyclists
https://github.com/firefly-cpp/ast-monitor
artificial-sport-trainer data-mining raspberry-pi sport-tracker
Last synced: 2 months ago
JSON representation
AST-Monitor is a wearable Raspberry Pi computer for cyclists
- Host: GitHub
- URL: https://github.com/firefly-cpp/ast-monitor
- Owner: firefly-cpp
- License: mit
- Created: 2021-12-31T13:41:25.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-11T15:41:19.000Z (2 months ago)
- Last Synced: 2025-04-12T01:23:35.435Z (2 months ago)
- Topics: artificial-sport-trainer, data-mining, raspberry-pi, sport-tracker
- Language: Python
- Homepage:
- Size: 7.57 MB
- Stars: 6
- Watchers: 4
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Citation: CITATION.cff
Awesome Lists containing this project
README
![]()
AST-Monitor --- A wearable Raspberry Pi computer for cyclists
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
π» Graphical User Interface β’
βοΈ Hardware β’
π₯οΈ Software β’
π¦ Installation β’
π’ Deployment β’
π Examples β’
π License β’
π Cite us β’
π Further read β’
π Related packages β’
π References β’
π« ContributorsWelcome to AST-Monitor: Revolutionizing Sport Training Sessions! ποΈββοΈ This repository aims to introduce a low-cost, and efficient embedded device that can transform the way you monitor
cycling training sessions. Allow us to present AST-Monitor.To begin, we invite you to explore the paper that introduces the capabilities of AST-Monitor. Dive into the future of artificial sports trainers by reading this [paper](https://arxiv.org/abs/2109.13334). ππ‘
* **Free software:** MIT license
* **Python versions:** 3.8.x, 3.9.x, 3.10.x, 3.11.x, 3.12.x
* **Documentation:** [https://ast-monitor.readthedocs.io/en/latest](https://ast-monitor.readthedocs.io/en/latest)
* **Tested OS:** Windows, Ubuntu, Fedora, Alpine, Arch, macOS. **However, that does not mean it does not work on others**## π» Graphical User Interface
### Basic data: Power at Your Fingertips πͺ
![]()
The initial page of the AST-Monitor application presents essential parameters, providing real-time insights into an athlete's performance. Gain access to information such as the athlete's current speed and heart rate. After a training session, you'll also receive a comprehensive overview, including total distance covered, session duration, and total ascent conquered. π±π΄ββοΈ### Interactive map: Embark on a Visual Journey πΊοΈπ
![]()
As you navigate uncharted territories, this map reveals your precise location in real-time. And allows you to track your progress on the route in real time. ππ΄ββοΈπΊοΈ### Interval training data: Unleash Your Inner Athlete πββοΈπͺ
![]()
Discover the duration of each phase, track your current heart rate, and marvel at the average heart rate achieved. But that's not allβbrace yourself for the Digital Twin proposed heart rate and witness the thrilling difference between your current heart rate and the proposed target. Prepare to dominate your workouts with the AST-Monitor! ποΈββοΈ### Interval training plan: Unleash the Potential π―ππ₯
![]()
Load up and embark on thrilling interval trainings that await you in the "AST-Monitor/development/trainings" folder. These trainings, meticulously crafted in the domain-specific language AST-TDL, are designed to take you to the next level. Once successfully loaded, witness the training plan come to life before your eyes. πππ₯## βοΈ Hardware
### Where Innovation Meets Performance βοΈπ©π‘Prepare to be dazzled by the complete hardware setup featured in AST-Monitor.
![]()
Let's take a closer look at the components:
* **A platform with fixing straps** that securely attach to your bicycle, ensuring a seamless training experience. π²π
* **The powerful Raspberry Pi 4 Model B micro-controller**, powered by the dynamic Raspbian OS. π»
* **A five-inch LCD touchscreen display**, allowing the interaction with AST-Monitor during the training. β¨π₯οΈ
* **Equipped with a USB ANT+ stick**, AST-Monitor captures the heartbeat of your training, providing crucial data for your journey to greatness. π‘
* **Adafruit's Ultimate GPS HAT module** joins the lineup, empowering you with location information and paving the way for GPS integration (coming soon!). ππ°οΈBut that's not all:
A Serial Peripheral Interface (SPI) protocol ensures seamless communication between the Raspberry Pi and the GPS
peripheral, guaranteeing accurate and timely data. The screen display, connected using a physically shortened HDMI
cable, ensures a sleek and compact design that doesn't compromise performance.During the testing phase, the AST-Monitor prototype was powered by Trust's 5 VDC power bank, providing unparalleled
endurance. While the current prototype may be a bit bulky, rest assured, our team is hard at work, exploring sleeker and
more discreet solutions. πͺπ¦For those who crave a glimpse inside AST-Monitor:
![]()
Welcome to the next stage of sports training. Welcome to AST-Monitorβyour ultimate companion on the road to victory!
πππ## π₯οΈ Software
### Dependencies π¦π
List of dependencies:
| Package | Version | Platform |
|---------------------------|:-------:|:--------:|
| PyQt6 | ^5.15.6 | All |
| matplotlib | ^3.5.1 | All |
| geopy | ^2.2.0 | All |
| openant | ^1.2.0 | All |
| pyqt-feedback-flow | ^0.1.0 | All |
| tcxreader | ^0.4.1 | All |
| sport-activities-features | ^0.3.6 | All |Additional note: adafruit-circuitpython-gps package must be installed in order to work with the GPS sensor:
```sh
$ pip install adafruit-circuitpython-gps
```## π¦ Installation
Install AST-Monitor with pip:
```sh
$ pip install ast-monitor
```In case you want to install directly from the source code, use:
```sh
$ git clone https://github.com/firefly-cpp/AST-Monitor.git
$ cd AST-Monitor
$ poetry build
$ python setup.py install
```To install AST-Monitor on Fedora Linux, please use:
```sh
$ dnf install python3-ast-monitor
```To install AST-Monitor on Alpine Linux, please use:
```sh
$ apk add py3-ast-monitor
```To install AST-Monitor on Arch Linux, please use an [AUR helper](https://wiki.archlinux.org/title/AUR_helpers):
```sh
$ yay -Syyu python-ast-monitor
```## π’ Deployment
Our project was deployed on a Raspberry Pi device using Raspberry Pi OS.
The hardware configuration of AST-Monitor using Raspberry Pi OS is described
in
HARDWARE_CONFIGURATION.md.## π Examples
### Basic run
```python
import os
import sysfrom PyQt6 import QtWidgets
try:
from ast_monitor.model import AST
except ModuleNotFoundError:
sys.path.append('../')
from ast_monitor.model import AST# Paths to the files with heart rates and GPS data.
hr_data = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'sensor_data', 'hr.txt')
gps_data = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'sensor_data', 'gps.txt')
route_data = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'development', 'routes', 'route.json')if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
window = AST(hr_data, gps_data, route_data)
window.show()
sys.exit(app.exec())
```## π 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!## π Cite us
LukaΔ, L., Fister Jr., I., Fister,
I. "[Digital Twin in Sport: From an Idea to Realization](https://www.mdpi.com/2076-3417/12/24/12741)." Applied Sciences
12.24 (2022): 12741, DOI: [10.3390/app122412741](http://dx.doi.org/10.3390/app122412741).## π Further read
[1] [Awesome Computational Intelligence in Sports](https://github.com/firefly-cpp/awesome-computational-intelligence-in-sports)## π Related packages/frameworks
[1] [sport-activities-features: A minimalistic toolbox for extracting features from sports activity files written in Python](https://github.com/firefly-cpp/sport-activities-features)
[2] [ast-tdl: Training Description Language for Artificial Sport Trainer](https://github.com/firefly-cpp/ast-tdl)
## π References
Fister Jr, I., Fister, I., Iglesias, A., Galvez, A., Deb, S., & Fister, D. (2021). On deploying the Artificial Sport
Trainer into practice. arXiv preprint [arXiv:2109.13334](https://arxiv.org/abs/2109.13334).Fister Jr, I., Salcedo-Sanz, S., Iglesias, A., Fister, D., GΓ‘lvez, A., & Fister, I. (2021). New Perspectives in the
Development of the Artificial Sport Trainer. Applied Sciences, 11(23), 11452.
DOI: [10.3390/app112311452](https://doi.org/10.3390/app112311452)## π« Contributors
Iztok Fister Jr.
π π π» π§ π§βπ« π¦
luckyLukac
π π π» π¨
Oromion
π¦
alenrajsp
π π» π§ π
Tatookie
π π
rhododendrom
π¨
Sertonix
π
Tadej Lahovnik
π π» π