A free and open source performance monitor for rowing machines
Go to file
Jaap van Ekris 7ee25292fc
Improved Rowing Engine (#24)
* Update to accomodate the new RowingEngine

Update of the MovingFlankDetector to provide the values needed to determine the speeds at the beginning of the flank.

* Created the MovingAverager for RowingEngine 2.0

Added the MovingAverager to accomodate the RowingEngine 2.0

* Update to RowingEngine 2.0

Update based on the great theoretical work of Anu Dudhia and the practical experiences of Dave Venrooy.

* Added to explain RowingEngine 2.0 design

A rationale for explaining the RowingEngine 2.0 design, based on the great theoretical work of Anu Dudhia, and the practical work of Dave Venrooy and Marinus van Holst, as well as the great feedback from Lars Berning.

* Update to accomodate the new RowingEngine

Update to the rower settings to accommodate the new RowingEngine. Please note that the modifications need to be verified by the respective users.

* Modifications to the RX800 tests

Modifications to the RX800 to bring it in line with the Concept2 Power and distance measurements.

* BUGFIX: Prevent ghost-strokes at end of session

This change to isAccelerating prevents stroke-detection to detect a stroke when the currentDt "flatlines". This typically happens when the error correction kicks in when you quit rowing (and thus the rowerSettings.maximumTimeBetweenImpulses is exceeded). It is bad (flatlining isn't acceleration), and this ghost-stroke causes havoc in the GUI: all measurements are reset again to random values instead of the nice indicators normally used.

* BUGFIX: Prevent ghost-strokes at end of session

This change to isAccelerating prevents stroke-detection to detect a stroke when the currentDt "flatlines". This typically happens when the error correction kicks in when you quit rowing (and thus the rowerSettings.maximumTimeBetweenImpulses is exceeded). It is bad (flatlining isn't acceleration), and this ghost-stroke causes havoc in the GUI: all measurements are reset again to random values instead of the nice indicators normally used.

* Added defensive programming

In some rare cases not rounding led to a buffer overflow, so added defensive programming to prevent this.

* Update MovingFlankDetector.js

* Improved stroke detection algorithm accuracy

Improvement of the Stroke detection algorithm: when naturalDeceleration is specified in the settings, it will only consider something a Revocery when this level of deceleration is encountered for the FlankLength.

* Made the RowingEngine more stateful

Removed some bugs, added a lot of defensive programming and made the RowingEngine report the key statistics every impuls to create a more fluid experience on the monitor. To do this, the rowingEngine maintins and reports absolute values to rowingStatistics, instead of relative.

* Improved stroke detection algorithm accuracy

Improvement of the Stroke detection algorithm: when naturalDeceleration is specified in the settings, it will only consider something a Revocery when this level of deceleration is encountered for the FlankLength.

* Modification to fit new RowingEngine

* Addition of new parameters for stroke detection

Added new parameters for stroke detection and monitor fluidity

* Fixed missing bracket

* Updated to more fluid RowingStatistics

Moved the timer from a static timer to the raw measurements of the flywheel, and the distance more frequently updated, to keep all data consistent. Also made the GUI-updates more fluid, responsive and dependent on settings: this more fluid GUI update mechanism is dependent on the screenUpdateInterval setting and moving averager dependent on a setting (numOfPhasesForAveragingScreenData)

* Made all monitor updates consistent

* Accommodate more frequent update of the monitors

Update to accommodate the more frequent updates, and to accommodate the reset for the RowingEngine

* improves some testcases, fixes some minor code styling and duplicate definitions

* Fixed a comment about dragfactor

* Added parameters for the new RowingStatistics.js

Added screenUpdateInterval, numOfPhasesForAveragingScreenData and maxCycleTimeBeforePause as config parameters to remove statically determined parameters in RowingStatistics.js

* Added RX800 as second testbed

* fixes some problems that caused the engine to crash

* uses non sanitized durations for now

* updates some settings, fixes some typos

* wires the correct timer configuration, fixes a problem where SPM would not reset to 0

* fixes a crash problem in workout recorder, fixes fallback value for strokeTime

* relaxes constraint on stroke time

* updates some explanatory text, updates some rower parameters

Co-authored-by: Lars Berning <151194+laberning@users.noreply.github.com>
2021-11-07 14:53:11 +01:00
.github/workflows updates node 14 version, preparations for node 16 2021-10-17 12:46:50 +02:00
app Improved Rowing Engine (#24) 2021-11-07 14:53:11 +01:00
bin enables installer to also set up a browser in kiosk mode 2021-05-22 20:31:16 +02:00
config Improved Rowing Engine (#24) 2021-11-07 14:53:11 +01:00
docs Improved Rowing Engine (#24) 2021-11-07 14:53:11 +01:00
install updates installer to now deploy node 16 2021-10-17 13:26:22 +02:00
recordings implements better flank detection, adds spreadsheet for analysis 2021-04-30 22:03:47 +02:00
.editorconfig first commit 2021-03-06 21:15:37 +01:00
.eslintrc.json moves rower configuration into a config file and adds rower presets 2021-04-20 21:48:34 +02:00
.gitignore implements tcx and raw export 2021-05-20 13:40:42 +02:00
.markdownlint.json adds linting pre commit hook, cleans documentation 2021-03-13 19:20:36 +00:00
LICENSE first commit 2021-03-06 21:15:37 +01:00
README.md Improved Rowing Engine (#24) 2021-11-07 14:53:11 +01:00
package-lock.json migrate package-lock to v2 2021-10-17 11:59:55 +02:00
package.json revert to eslint 7 for now since not all extensions are ready for 8 yet 2021-10-17 11:59:20 +02:00
snowpack.config.js adds frontend build tool 2021-03-26 23:15:12 +00:00

README.md

Open Rowing Monitor

An open source rowing monitor for rowing exercise machines. It upgrades a rowing machine into a real smart trainer that can be used with training applications and games.

Open Rowing Monitor is a Node.js application that runs on a Raspberry Pi and measures the rotation of the rower's flywheel (or similar) to calculate rowing specific metrics, such as power, split time, speed, stroke rate, distance and calories.

We currently develop and test it with a Sportstech WRX700 waterrower and a NordicTrack RX-800 hybrid magetic/airrower. But it should run fine with any rowing machine that uses an air or water resistance mechanism as long as you can add something to measure the speed of the flywheel. We suspect it works well with DIY rowing machines like the Openergo too.

Features

The following items describe most of the current features, more functionality will be added in the future, check the Development Roadmap if you are curious.

Rowing Metrics

Open Rowing Monitor implements a physics model to simulate the typical metrics of a rowing boat based on the pull on the handle. The physics model can be tuned to the specifics of a rower by changing some model parameters.

  • Stroke detection
  • Power (watts)
  • Split time (/500m)
  • Strokes per Minute
  • Calories used (kcal)
  • Training Duration
  • Heart Rate (supports BLE and ANT+ heart rate monitors, ANT+ requires an ANT+ USB stick)

Web Interface

The web interface visualizes the rowing metrics on any device that can run a web browser (i.e. a smartphone that you attach to your rowing machine while training). It uses web sockets to show the rowing status in realtime. It can also be used to reset the training metrics and to select the BLE Rower.

If you connect a screen to the Raspberry Pi, then this interface can also be directly shown on the device. The installation script can set up a web browser in kiosk mode that runs on the Raspberry Pi.


Bluetooth Low Energy (BLE)

Open Rowing Monitor also implements different Bluetooth Low Energy (BLE) protocols so you can use your rowing machine with different fitness applications.

Fitness Machine Service (FTMS) is a standardized GATT protocol for different types of fitness machines. Open Rowing Monitor currently supports the type FTMS Rower and simulates the type FTMS Indoor Bike.

FTMS Rower: This is the FTMS profile for rowing machines and supports all rowing specific metrics (such as stroke rate). So far not many training applications for this profile exist, but the market is evolving. I've successfully tested it with EXR, MyHomeFit and Kinomap.

FTMS Indoor Bike: This FTMS profile is used by Smart Bike Trainers and widely adopted by training applications for bike training. It does not support rowing specific metrics. But we can present metrics such as power and distance to the biking application and use cadence for stroke rate. So why not use your virtual rowing bike to row up a mountain in Zwift, Bkool, The Sufferfest or similar :-)

Concept2 PM: Open Rowing Monitor also implements part of the Concept2 PM Bluetooth Smart Communication Interface Definition. This is still work in progress and only implements the most common parts of the spec, so it will not work with all applications that support C2 rowing machines. It currently works with all the samples from The Erg Arcade, i.e. you can row in the clouds. This also works very well with EXR.

Export of Training Sessions

Open Rowing Monitor can create Training Center XML files (TCX). You can upload these files to training platforms like Strava, Garmin Connect or Trainingpeaks to track your training sessions.

Currently this is a manual step. The installer can set up a network share that contains all training data so it is easy to grab the files from there and upload them to the training platform of your choice.

Open Rowing Monitor can also store the raw measurements of the flywheel into CSV files. These files are great to start your own exploration of your rowing style and also to learn about the specifics of your rowing machine (some Excel files that can help with this are included in the docs folder).

Installation

You will need a Raspberry Pi Zero W, Raspberry Pi 3 or a Raspberry Pi 4 with a fresh installation of Raspberry Pi OS 10 (Lite) for this. Connect to the device with SSH and initiate the following command to set up all required dependencies and to install Open Rowing Monitor as an automatically starting system service:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/laberning/openrowingmonitor/HEAD/install/install.sh)"

Also have a look at the Detailed Installation Instructions for more information on the software installation and for instructions on how to connect the rowing machine.

How it all started

I originally started this project, because my rowing machine (Sportstech WRX700) has a very simple computer and I wanted to build something with a clean and simple interface that calculates more realistic metrics. Also, this was a good reason to learn a bit more about Bluetooth and all its specifics.

The original proof of concept version started as a sketch on an Arduino, but when I started adding things like a web frontend and BLE I moved it to the much more powerful Raspberry Pi. Maybe using a Raspberry Pi for this small IoT-project is a bit of an overkill, but it has the capacity for further features such as syncing training data or rowing games. And it has USB-Ports that I can use to charge my phone while rowing :-)

Further information

This project is already in a very usable stage, but some things are still a bit rough on the edges.

Feel free to leave a message in the GitHub Discussions if you have any questions or ideas related to this project.

I plan to add more features, here is the Development Roadmap.

This project uses some great work by others, see the Attribution here.