Commit Graph

164 Commits

Author SHA1 Message Date
Lars Berning 9471ff758b
fixes some code duplications in the engine initialization routine 2022-01-28 20:23:50 +01:00
Jaap van Ekris 335083c37d
Improvement of the startup behaviour and external stroke definition (#46)
* Improvement of the startup behaviour

These changes improve the startup behaviour: ORM will now always start with a detected drive-phase, which will trigger recording etc. This changes several initialisations of variables to make sure they enable the triggering of a "Drive" at the beginning of a stroke. Also workoutHandler.handleStrokeEnd has been renamed to workoutHandler.handleDriveEnd, as this is the clear end of that stroke-phase.

* Renamed handleStrokeEnd to handleDriveEnd

Renamed handleStrokeEnd to handleDriveEnd, as this is the clear end of that stroke-phase, as the current model alternates between Drive+Recovery and Recovery+Drive strokes to keep feeding the metrics, there isn't a very clear "End of the Stroke".

* Redefinition of a stroke

Traditionally, a stroke is defined as a Drive phase, followed by a Recovery Phase. This is also expected by Garmin and EXR as Concept2 implements it this way as well. This implementation makes it more consistent with that interpretation, while leaving room for intermediate updates. This should make Bluetooth behaviour and metrics recording more consistent.
2022-01-28 19:56:55 +01:00
Lars Berning 426f982683
refactores frontend styling, updates some dependencies 2022-01-28 19:52:21 +01:00
Lars Berning 2df753f165
fixes #55 problem with kms driver, fixes problem with older git versions 2022-01-27 21:45:38 +01:00
Lars Berning 9a50378504
disables touchscreen pinch, updates documentation 2022-01-26 20:35:32 +01:00
Lars Berning 5a0afce81f
fixes #52 installer did not set the main branch branch correctly 2022-01-22 20:59:01 +01:00
Lars Berning 0c55c1ae71
Merge pull request #51 from laberning/frontend_redesign
Changes Architecture of the Web Frontend to use Web Components
2022-01-17 21:42:39 +01:00
Lars Berning 77845e4732
fixes a bug, where update-script could not be called from any directory 2022-01-17 21:29:50 +01:00
Lars Berning d1c607f2bf
small fix for version display if not started via npm 2022-01-17 21:22:27 +01:00
Lars Berning 0159a5f3c3
shows fullscreen button only on browsers that support this feature 2022-01-17 21:19:30 +01:00
Lars Berning a9ddd0489c
Merge branch 'main' into frontend_redesign 2022-01-16 22:36:18 +01:00
Lars Berning e21fb1aa53
adds auto restart of backend in dev setting 2022-01-16 22:21:26 +01:00
Lars Berning 7efa0b7961
adds a first simple frontend testcase 2022-01-16 20:40:24 +01:00
Lars Berning 5fcf43b0c1
some code cleanup 2022-01-16 13:31:31 +01:00
Lars Berning f5ff252f95
moves formatting of metrics to the displaying components 2022-01-15 12:29:48 +01:00
Lars Berning 424ba431c7
implements global state, restructures code 2022-01-14 19:26:47 +01:00
Lars Berning 9b2d14f157
adds badges, updates documentation 2022-01-14 19:22:02 +01:00
Lars Berning 799d7bd1f0
adds a security analysis pipeline and improves build pipeline (#45)
* adds a security pipeline, updates pipeline triggers

* prevent pipeline from running twice, if PR is open
2022-01-13 23:15:04 +01:00
Lars Berning b6dab1c038
updates some dependencies 2022-01-13 20:50:48 +01:00
Lars Berning c753cb4cf4
adds handling of some initial events 2022-01-10 22:31:00 +01:00
Jaap van Ekris 47e71ea5ef
Drag poising bugfix (#44)
* Bugfix for dragfilter poisoning prevention

Implementation of a more refined version of the dragfactor calculation to prevent the dragfactor being stuck at certain values after pauses, etc.

* Addition of new settings

Implementation of a more refined version of the dragfactor calculation to prevent the dragfactor being stuck at certain values after pauses, etc.

Two changes:
* Made the smoothing function of the dragfactor configurable from the config-file (dampingConstantSmoothing) instead of hardcoded. as it should have been from day one
* Implementation of a new filter to prevent dragfactor poisoning by noisy data, based on another setting (dampingConstantMaxChange). The new filter will not get stuck but will follow the direction of the change but is limited to the setting..
2022-01-10 21:41:21 +01:00
Lars Berning 582c5fd41c
updates and fixes some dependencies 2022-01-10 20:05:19 +01:00
Lars Berning bbd009453e
Merge branch 'main' into frontend_redesign 2022-01-09 22:22:13 +01:00
Lars Berning 2eed3fa6dd
adds a first test for a working global frontend state 2022-01-09 22:00:58 +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
Lars Berning ab02153c2d
fixes a dependency problem that causes ble to not work, pins all dependencies 2022-01-02 14:20:09 +01:00
Lars Berning fae38b58fb
adds support for raspberry os 11, fixes armv6 issue 2021-12-13 22:26:42 +01:00
Lars Berning a083af9e49
updates some references and some dependencies 2021-12-13 21:05:07 +01:00
Lars Berning 4737669216 improves conditional rendering 2021-12-13 20:37:21 +01:00
Jaap van Ekris 19ec4f28bb
Code Cleanup and Documentation Update (#30)
* Moved .doc to .md

Moved the Word document to a more open format

* Update of the file based on the new settings

Update of the settings documentation due to the introduction of the new RowingEngine

* Moved .doc to .md

Moved the information to the .md file, updated with the design decissions made in the new RowingEngine.

* Splitting the hardware set-ups for specific rowers

Split off the WRX700 hardware set-up from the generic setup, to allow for other rower-specific set-ups to be created (easier to read and better for search engines).

* Removal of generic text

* SPlit the generic from the WRX700

* Fixed a very rare bug

A very rare condition can cause the noise correction filter to get stuck and dismiss all subsequent values. Now the number of corrections is maximised preventing that situation.

* Code refactoring

Refactoring of the code (added calculateLinearVelocity(), calculateCyclePower(), calculateTorque() functions) to reduce code duplication across phases.

* Fixed a very rare bug

A very rare condition can cause the noise correction filter to get stuck and dismiss all subsequent values. Now the number of corrections is maximised preventing that situation.

* Code refactoring

Refactoring of the code (added calculateLinearVelocity(), calculateCyclePower(), calculateTorque() functions) to reduce code duplication across phases.

* fixes some typos, fixes some links, renames some files

Co-authored-by: Lars Berning <151194+laberning@users.noreply.github.com>
2021-12-13 20:01:28 +01:00
Lars Berning 80360e70f8
fixes some edge cases, removes some unneeded dependencies 2021-11-29 15:24:51 +01:00
Lars Berning 2b7baf8f28
update script has option to change to another feature branch 2021-11-29 13:36:58 +01:00
Lars Berning 76a5e004f2
adds bundling with rollup 2021-11-29 10:30:45 +01:00
Lars Berning 6bccb9bccd
uses babel preset-env 2021-11-28 11:15:41 +01:00
Lars Berning 70a86d0914
initial attempt to refactor frontend with lit 2021-11-27 17:17:58 +01:00
Lars Berning 66ec2070bc
makes pipeline run on all branches 2021-11-21 22:35:17 +01:00
Lars Berning 9e03c01a53
adds lightweight tooling for adding web components with lit 2021-11-21 22:28:44 +01:00
Lars Berning 6b384d7f31
updates some dependencies 2021-11-21 21:50:01 +01:00
Lars Berning a3730f9a9c
improves GitHub page (#29)
* adds verification information

* gets description directly from github

* reduces some margins

* removes header and footer in print view

* some test adjustments

* adds some metadata

* fixes a warning

* updates backlog
2021-11-15 10:37:16 +01:00
Lars Berning e9edce56ec adds nodejs17 to the test configuration 2021-11-11 21:17:58 +01:00
Lars Berning 68f4313518
Adds support for GitHub pages (#27)
* moves readme to docs folder

* Set theme jekyll-theme-cayman

* adjusts some colors

* adjusts image margin

* adds some styling and a navigation menu
2021-11-11 21:11:07 +01:00
Lars Berning 4196009237
adds documentation on the physics model (#25)
* adds documentation on the physics model
2021-11-08 11:32:08 +01:00
Lars Berning 67e7dbb36c
unifies interface of averagers 2021-11-08 09:00:45 +01:00
Lars Berning 36fe899e81
adds more tests to averagers 2021-11-08 08:47:56 +01:00
Lars Berning f6c46c0f9f
updates some documentation 2021-11-07 22:02:15 +01:00
Lars Berning 02359e819d
updates documentation, fixes typos 2021-11-07 21:51:11 +01:00
Lars Berning 8f064a0aab
fixes typos, updates documentation to new names 2021-11-07 15:14:51 +01:00
Lars Berning dd36e2b141
updates some dependencies, fixes linter config, bumps version 2021-11-07 15:03:44 +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 ce62f2af84
updates installer to now deploy node 16 2021-10-17 13:26:22 +02:00