Commit Graph

23 Commits

Author SHA1 Message Date
Lars Berning 6792ca77c1
fixes #57 where diagram would show spikes 2022-01-31 19:47:18 +01:00
Lars Berning 8d634b0a65
updates eslint to v8, adds some more linting rules 2022-01-29 14:15:33 +01:00
Jaap van Ekris e85491acb9
More refined session state (#33)
* A more refined rowing session state (PM5)

Introduces a more refined session state needed for the PM5 rower session simulation, as well as a cleaner setup for the metrics to stop when the rower is stopped.

* Added the WorkoutState and rowingState

Added the WorkoutState and rowingState to the PM5 interface, to prevent EXR to start too early.

* Added a link to the brilliant work of Nomath

Added a link to Nomath's work, as it is a brilliant piece of work that independently verifies our calculations and provides a basis for support of the Concept2 rower.

* Bugfix in Instantanous Torque calculation

The Instantanous Torque calculation wasn't cleaned up sufficiently, causing issues in the powercurve.

* unifies reset of heartrate value at different places

* unifies naming with other variables status -> state

* just some minor link adjustments in documentation

Co-authored-by: Lars Berning <151194+laberning@users.noreply.github.com>
2022-01-09 12:09:02 +01:00
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
Lars Berning a618419702
simplifies git hooks 2021-05-21 14:38:21 +02:00
Lars Berning 4e844b0722
makes low level integrations less dependent on raspberry pi hardware 2021-05-03 10:05:07 +02:00
Lars Berning 15c1553e42 adds an option to configure the ftms device names 2021-04-21 20:39:27 +02:00
Lars Berning 55cde69ce6 moves rower configuration into a config file and adds rower presets 2021-04-20 21:48:34 +02:00
Lars Berning 6fcf649d65 adds strokes per minute to ftms bike via cadence value 2021-04-15 21:29:35 +02:00
Lars Berning 43fa45bf29 adds support for BLE heart rate monitors 2021-04-14 22:13:24 +02:00
Lars Berning 1c135a0c1f replaces unit testing framework ava -> uvu 2021-03-26 23:37:36 +00:00
Lars Berning 1ce1a2136a add heart rate and elapsed time to ftms profiles 2021-03-26 22:15:02 +00:00
Lars Berning f1c0091a7a set split to infinity while pausing 2021-03-26 21:06:02 +00:00
Lars Berning e5e579f3fc notifies PM5 central when stroke state changes 2021-03-20 22:04:52 +00:00
Lars Berning 2e3654fabd adds selection of ble profile to frontend 2021-03-20 21:12:04 +00:00
Lars Berning d90fa9ea1f adds config file and additional metrics 2021-03-19 19:56:02 +00:00
Lars Berning 37c32829d8 implements PM5 protocol, simplifies code 2021-03-18 20:17:57 +00:00
Lars Berning efe13f4804 begins implementation of the PM5 protocol 2021-03-13 20:35:36 +00:00
Lars Berning 6c5c1b8cb8 adds linting pre commit hook, cleans documentation 2021-03-13 19:20:36 +00:00
Lars Berning 3d08f06336 implements handling of rowing pauses 2021-03-10 19:08:56 +00:00
Lars Berning 197c714b03 improves websocket connections
- enables multiple simultaneous websocket connections
- adds automatic reconnect on dropped websocket connection
2021-03-09 20:52:27 +00:00
Lars Berning 361e1c65f8 adds logging framework, cleans documentation 2021-03-09 19:39:42 +00:00
Lars Berning 6a4779dfa3 first commit 2021-03-06 21:15:37 +01:00