openrowingmonitor/config/default.config.js
Jaap van Ekris 9422716dca
Redesign of the rowing engine (#84)
* Looks like dead code

Dead code?????

* Improvement of the MovingAverager startup

Improvement of the MovingAverager's startup-behaviour, to allow use for the dragcalculation. In this approach, the defaultValue is only used when the array isn't sufficiently filled (less then two pushed values), but after that it is directly released and the average only depends on pushed values. This is especially important for the drag calculation, as the drag calcuation is sufficiently robust in handling errornous values, and drag factors might make big jumps in the beginning (i.e. from the middle setting to a maximum value).

* Allow the settings to set a specific priority

The nice-level of -20 is arbitrary and very counterproductive, as it dwarfs OS processes including the internal timer. This results in a more noisy measurement, even on a high-speced Pi 4. As the priority is dependent on the hardware/software configuration of the Pi anyway, I made the configuration setting more granular.

* Added Concept2 PM5 wiring diagram

Added wiring diagram for the PM5 (with 18V generator)

* Update server.js

* Delete app/engine/averager directory

* Creation of the series.js

Creation of a series of values, as an abstraction away from the array, with added standard functionality. This is the basis for the more complex functions like the regression series.

* Update the server.js to adapt to new architecture

Server.js has been adapted to fit the new architecture. It is now in control of the session, directing others how to proceed.

* Deleted Timer.js as it has become obselete

Deleted Timer.js as it has become obselete

* Updated to more abstract Flywheel.js

Renamed and rewritten to Flywheel.js. It provides an abstraction from the individual currentDt's and provides a more abstract view of the flywheel and its current state, which can be interrogated by Rower.js

* Created an initial testset for Flywheel.js

An initial set of tests to check whether Flywheel.js works as expected.

* Renaming variables and added new functionality

Renamed variables to fit the naming scheme of Rower.js. Added the option to create a RowingData file, hich can be read by RowingData, RowsAndAll and Excel. Also added new fields in the notes of a TCX, including HRR.

* Update Pm5Constants.js

* Update to the constants

Update to the constants, to make them closer to the actual firmware options. Also I added the Row to the name, as Concept2 also seems to do this on their current firmware.

* Added additional defensive programming

Added additional defensive programming

* updated variable names

Updated variable names to keep them in sync with RowingStatistics

* Added metrics and updated variable names

Added new metrics, like projected time and distance, stroke calories
Updated variable names to keep them in sync with RowingStatistics

* Added metric, states and variable rename

Added the dragfactor metric, aded the state for the workoutType, workoutDurationType, workoutState, RowingState and strokeState
Renamed most variable to allign them with RowingStatistics

* Added metrics, rename variables

Added several metrics (driveLength, driveTime, strokeRecoveryTime, strokeDistance, peakDriveForce, averageDriveForce and workPerStroke)
Alignment of variable names with RowingStatistics.js

* Renamed variables

Renamed variables to align them with the RowingStatistics naming convention

* Update variable definitions and naming

Update to the variable definition of speed: as almost all consumers use the m/s unit, we now use this internally, and only convert to km/h for the bike
Alignment with the naming scheme of RowingStatistics

* Update based on PM5 spec

workoutDurationType was a more complex enum

* Complete redesign

Complete redesign:
* Switched to a Finite State machine to maintain session state
* To reduce complexity, it directly inspects Rower.js, instead of awaiting messages to be processed
* Small snippets process all data, where updates are grouped based on their update moment
* Renaming all variables to clearly identify when they are updated (as determined by the state machine)
* Introduced a first version of interval management, as a preperation for future solutions with more complex training scheme's
This should help in reducing the code base while making the code easier to understand.

* Rename and adoptation to the new architecture

Split RowingEngine into two blocks:
* Rower (which represents the key metrics from the rower) and
* flywheel (which represents the key metrics of the flywheel, formally known as MovingFlankDetector). 
This should simplify the reading of the code, as Flywheel reports key metrics without the need to many specific configuration parameters.

Also added many metrics (including force curve, power curve and handle speed).

* Update and rename RowingEngine.test.js to Rower.test.js

Update to fit Rower.js better, includes testing with known rowers

* Introduction of VO2Max (Beta)

Introduction of a Beta-version of VO2-Max, which will be calculated each time a tcx-file is created.
It introduces two versions of VO2-Max calculation:
* extrapolation-based VO2Max: it extrapolates the power to maxpower based on MaxHR and the relation between HR and power in the session
* interpolation based VO2Max: it projects the session onto a 2K, and then calculates the VO2Max based on Concept2's research

* Beta version

Beta version of the BucketLinearSeries to accomodate VO2Max

* Create CurveAligner.js

CurveAligner for cleaning up the (power, force and handle velocity) curves

* Create Series.test.js

Added test-class to series.js, as it is so fundamental to OpenRowingMonitor

* Create StreamFilter.js

Streamfilter implements a running streamfilter. It is designed to be robust to outliers, and replaces all averaging functions.

* Create StreamFilter.test.js

Tests the steamfilter

* Create OLSLinearSeries.js

Creation of the OLSLinearSeries, to allow for drag calculation, VO2Max calculation and projecting calories, distance and time.

* Create OLSLinearSeries.test.js

Test of the Simple Linear Regression method

* Create FullTSQuadraticSeries.js

FullTSQuadraticSeries delivers Full Theil-Senn Quadratic regression, which is essential to determine Angular Velocity and Angular Acceleration in a noise-resistant way. These metrics are essential for force curve, power curve, handle velocity curve and stroke detection (as it is triggered by the force on the handle).

* Create FullTSQuadraticSeries.test.js

Test of the FullTSQuadraticSeries

* Create curveMetrics.js

Object to manage the specifics of curves

* Delete curveMetrics.js

* Create curveMetrics.js

Object to create curves and the associated curve metrics

* Update rowerProfiles.js

Update to accomodate the new RowingEngine, and its parameters

* Renaming variables

Renaming variables to align with the variable renaming in RowingStatistics.js

* Rename variables

Update variables to align with RowingStatistics naming conventions

* Update GpioTimerService.js

* Added example CurrentDt curve

Added example CurrentDt curve for explanation of good and bad noise.

* Testfile for Concept2 RowErg

Testfile for Concept2 RowErg, 2000 meters, for validation purposes

* Increasing consistency in logging

Increased consistency in logging specific messages

* Improved logging to facilitate configuration

Improved the logging of specific data to facilitate an easier setup for new rowers.

* Update backlog.md

* Update rower_settings.md

* Adaptation to the newly developed physics model

Adaptation of the text to the newly developed physics model.

* Removed the settings analysis as it isn't needed

Removed this tool, as it isn't up-to-date with the current physics model, and logging does a better job in helping the analysis.

* Updated to reflect the new approach

Updated the setup procedure to:

* Adapt it to the new physics model

* Adapt it to the new logging-based setup procedure.

* Added the Concept2 RowErg

Added the Concept2 RowErg configuration

* Added the Concept2 as test-object

Added the Concept2 as test-object

* Added the Concept2 as test-object

Added the Concept2 as test-object

* Update Rower.test.js

* Adaptation to C2 Flywheel Inertia change

Adaptation to C2 Flywheel Inertia change

* Created to explain the current architecture

Created an architecture document to explain the current architecture, as well as the major components in Open Rowing Monitor to maintainers and reviewers of the code.

* Create hardware_setup_Concept2_RowErg.md

* Added Concept 2 manual

Added concept 2 RowErg manual, as some minor updates

* Added performance improvement guide

Added a guide for improving the performance (Latency) of the Raspberry Pi.

* Fixed typos, filled in some blanks

Fixed some typos, improved some text for clarity and added some text to complete this description.

* Update to reflect new capabilities

Update to reflect new capabilities of OpenRowingMonitor and make the text easier to parse for novice users (make it less technical).

* Updated with new settings

Updated with the new settings available

* Update default.config.js

* Update to allow for the 64Bit PREEMPT kernel

Update of the install script to allow for the 64Bit PREEMPT kernel of Raspberry Pi, which handles low latency much better.

* Fixed a typo in a file reference

Thanks to @Abasz , dound a typo which i now fixed.

* Fixed typo

Fixed typo

Co-authored-by: Lars Berning <151194+laberning@users.noreply.github.com>

* Fixed a typo

Fixed a typo

Co-authored-by: Lars Berning <151194+laberning@users.noreply.github.com>

* Fixed a cut-copy-paste error

Fixed a cut-copy-paste error in the infinity symbol

* Fixed error in repo-name

Fixed an error in the repo-name when moving for the experimental branch to the PR branch

* Fixed a copy error in the Repo-name

Missed updating the repo-name when moving the code from private experimental branch to a production PR repo

* Updated ToDo descriptions

Updated ToDo descriptions

* Added more detailed ToDo's

Added more detailed ToDo's

* Better explanation of design issue

A much better (and English) and updated explanation of the open design issues in Flywheel.js

* Fixed a bug in the strokecount reinitialization

Fixed a bug in the stroke count reinitialization (great find by @Abasz), which was inconsistent with the normal init.

* Graphic showing systematic error

File showing systematic (periodic) deviations in the magnet placement

* Added an image of misaligned magnets

* Removed non-working code

Removed the trimmedMedian function, as its design contains fundamental mathematical errors. The initially proposed way is the only good way of doing it.

* Added observation about noise overfitting

Added a note about Noise overfitting, based on the Concept2 and the observation of Gordon_Shumway (see https://github.com/laberning/openrowingmonitor/discussions/87)

* Added the pigpio library

Added the pigpio library

* Added an explanation into the GPIO settings

Added an explanation of the GPIO settings

* Added the settings for the new GPIO library

Added the settings to configure the new GPIO library

* Replaced onoff with pigpio, added debounce param.

Replaced the onoff library (goodbye my old loyal friend) with pigpio, to facilitate much more accurate timing calculations and add more flexibility to the flank detection (including debounce)

* Replaced onoff with pigpio

Replaced onoff with pigpio library

* Replaced onoff with pigpio

Replaced onoff with pigpio

* Install and config pigpio dependency

Added the installation of the pigpio C-library and setting the key parameters.

* Added a bit clarification about the setup guide

Added a bit better description about the setup guides.

* Removed and added spaces....

* Remove an unnecessary space....

* Resolved open design issue in noise filter

In the previous design, we were uncertain that the noise filter would handle all cases. With pigpio, we are quite certain it will handle all cases internally, and here we detect any deviations. Please note, startup-behaviour after a cold or warm (re)start still has to be handled as time since the privious pulse tends to be in the minutes, throwing off all timekeeping functions.

* Removed obsolete variables

Removed two obsolete variables: lastKnownGoodDatapoint and numberOfErrorsAllowed

* Removed obsolete variable

Removed the now defunct variable numberOfErrorsAllowed

* Changes in startup and config

Due to changes in the gpio library, the startup behaviour of flywheel.js has changes, as have the Concept2 configuration settings. These changes modify the results of the testcase accordingly.

* Updated testcases after update pigpio

Due to changes in the gpio library, the startup behaviour of flywheel.js has changed, as have the Concept2 configuration settings. These changes modify the results of the testcase accordingly.

* Update testcase to accomodate lib change

Update testcase to accomodate lib change

* Update due to lib modification

Update due to lib modification

* Update Rower.test.js

* Update Rower.test.js

* Update Rower.test.js

* Update Rower.test.js

* Update due to gpio library change

* Update due to removal obsolete parameter

Update due to the removal of numberOfErrorsAllowed

* Removed obsolute parameter

Removed the numberOfErrorsAllowed parameter

* Performance improvement

A small performance improvement: by moving the evaluation of the flywheel.isPowered(), flywheel.isUnpowered() and flywheel.isDwelling() backwards, we move these potentially expensive operations further in the evaluation. As Javascript is using lazy evaluation, it won't be called unless all other conditions are true. Especially flywheel.isDwelling() checks if the entire flank is above maximumTimeBetweenImpulses, which is expensive (flywheel.isPowered() and flywheel.isUnpowered() are actually quite simple, but are moved along to maintain symmetry).

* Fixed a missing bracket

Fixed a missing bracket

* Allignment with main branch (64Bit support)

Alignment with the improvement of the install script of the main branch to support the 64 bit version of the Lite kernel.

* removes some obsolete variables

* adds a missing async statement

Signed-off-by: Lars Berning <151194+laberning@users.noreply.github.com>

* pin dependency

Signed-off-by: Lars Berning <151194+laberning@users.noreply.github.com>

* default setting should not fiddle with nice levels of os, otherwise we require root permissions by default

Signed-off-by: Lars Berning <151194+laberning@users.noreply.github.com>

* prettyfies a log message

Signed-off-by: Lars Berning <151194+laberning@users.noreply.github.com>

* unifies VO2max namings

Signed-off-by: Lars Berning <151194+laberning@users.noreply.github.com>

* Introduced appPriority as setting

Added the appPriority setting, to allow a clear entry to set the priority for the main process.

* Removed some obscure priority behaviour

Removed the obscure approach of using the gpio-priority to set the main app priority.

* Added a distinction between stop and pause

Based on a bugreport by @Carlito1979 about the pause behaviour, added a distinction between the stopMoving() and pauseMoving() command, as a pause would lead to an undesired stop state.

* Added a distinction between stop and pause

Based on a bugreport by @Carlito1979 about the pause behaviour, added a distinction between the stopMoving() and pauseMoving() command, as a pause would lead to an undesired stop state.

* Improved description of the various states

Based on bugs reported, and some internal soul searching, improved the description of states.

* Removed a trailing space

* Added profiles, put them in alphabetic order

Added the Force USA R3 Air Rower, and put the rowers in alphabetic order

* Removal of surplus comma

* Improvement of pause-behaviour

Improvement of the pause behaviour based on feedback from @Carlito1979

* Improved RestingHR behaviour, clarifications

Improvement of the resting HR functionality, it will now also trigger when rowing is paused
Clarification of "Stopped" sessionState behavior: this is a less than obvious but deliberate approach.

* Change to const postExerciseHR

Due to Lint error, changed postExerciseHR from "let" to "const"

* Create and advertising data builder

Since Bleno library does not provide a way to set/tweak appearance data
implement a builder that enables to add name and appearance information
to the advertisement data.

* Expose time of last completed stroke

For the CPS and CSC BLE Services the time stamp of the last stoke event
is necessary. This is available in the Rower as `drivePhaseStartTime` so
expose it

* Add 32bit capability to BufferBuilder

Since the wheel revolution count in the CSC and CPS measurement service
is a 32bin UINT extend the BufferBuilder to be able to handle it.

* Add static data and functions used in CSCS and CPS

Implement device information service (necessary for garmin to recognise
the device as sensor) a wrapper around static read characteristics to
ease creation.

* Add cycling speed and cadence profile

Add necessary services and related characteristics.
Implement CscPeripheral interface to be able to properly communicate to
the PeripheralManager.

* Add cycling power profile

Add necessary services and related characteristics.
Implement CpsPeripheral interface to be able to properly communicate to
the PeripheralManager.

* Wire up PeripheralManager with the new profiles

Add the new CSCP and CPP profiles to the PeripheralManager.
Update comments in settings and front end web view with the new profiles

* Add new Rower Profile Zoco Body Fit

Add a rowing profile for a Concept2 clone air rower

* Update FTMS profile with new services

Add device information service to the FTMS peripheral and move to the
new advertising data builder.

* Improvement of startup behaviour

Modification of the startup behaviour: now unrealistic values (i.e. above maximumTimeBetweenImpulses) are ignored. The rower will only start when all values in the flank are above the minmumSpeed (i.e. all currentDt's are below maximumTimeBetweenImpulses).

* Improvement of startup behaviour

Modification of the startup behaviour: now unrealistic values (i.e. above maximumTimeBetweenImpulses) are ignored. The rower will only start when all values in the flank are above the minmumSpeed (i.e. all currentDt's are below maximumTimeBetweenImpulses).

* Improvement of startup behaviour

Modification of the startup behaviour: now unrealistic values (i.e. above maximumTimeBetweenImpulses) are ignored. The rower will only start when all values in the flank are above the minmumSpeed (i.e. all currentDt's are below maximumTimeBetweenImpulses).

* Improvement of startup behaviour

Modification of the startup behaviour: now unrealistic values (i.e. above maximumTimeBetweenImpulses) are ignored. The rower will only start when all values in the flank are above the minmumSpeed (i.e. all currentDt's are below maximumTimeBetweenImpulses).

* Finalize Generic Air Rower profile

* Change name of displayed name of new profiles

* Rename lastStrokeTime to driveLastStartTime

* Fixed some small bugs

Fixed
* the missing pause command
* a small typo in the totalmovingtime

* Fixed a small bug

Fixed a small bug

* Improvement of browser performence

Improved some startup settings to increase browser performance (disables some security settings as they are not needed at a local system). Please note these settings are NOT RECOMENDED for general purpose browsers, but as we run on a localhost machine only, showing our GUI, this is quite acceptable.

* Update due to increased BLE profiles

Thanks to @Abasz, we can now use BLE Cycling Power Profile and the Cycling Speed and Cadence Profile.

* Added Abasz to the list of great contributors

* More expanded explanation of BLE profiles

* Update of the testfile to align with new GPIO conf

Update of the testfile to reflect the new GPIO-module

* Introduction of supporting Linear TS

Introduction of the Linear Theil-Senn algorithm to improve the Quadratic Theil-Senn algorithm

* Improvement of the Quad. Theil-Senn Algorithm

Improvement of the accuracy and robustness of the Quadratic Theil-Senn algorithm, as well as improving (reducing) the CPU load. It employs the Linear Theil-Senn Algorithm to calculate the optimal B and C for the selected A (instead of a marginally related B and C in the older algoithm).

* Update of the stroke detection algorithm

Update of the stroke detection algorithm: as the Qudratic Theil-Senn algorithm is more robust, we can rely on the sole combination of dragslope being gone and seeing torque.

* Updated to reflect more accurate algorithm

Updated the testscript to reflect the much more accurate and robust algorithm.

* Updated to reflect more improved algorithms

Updated test scripts to reflect the improvements in the Quadratic Theil-Senn algorithm and the Flywheel stroke detection algorithm.

* Updated to reflect more improved algorithms

Updated test scripts to reflect the improvements in the Quadratic Theil-Senn algorithm and the Flywheel stroke detection algorithm.

* Removed dead code

Removal of dead code

* Improvement of Code quality

* Improvement of code quality

Improvement of code quality

* Added space to survive Lint

Added space to survive Lint

* Addition of the isAboveMinimumSpeed function

Addition of the isAboveMinimumSpeed function

* Removed unused variable

* Add modification for new startup behaviour

Add modification for new startup behaviour

* Update to fix regression issues

Update to fix regression issues

* Update Rower.test.js

* Update of the C2 testcase

Update of the C2 testcase due to GPIO update

* Update of the C2 testcase due to GPIO changes

Update of the C2 testcase due to changing the testdata due to GPIO changes

* fixes some review findings

Signed-off-by: Lars Berning <151194+laberning@users.noreply.github.com>
Co-authored-by: Lars Berning <151194+laberning@users.noreply.github.com>
Co-authored-by: Abász <>
Co-authored-by: Abasz <32517724+Abasz@users.noreply.github.com>
2022-12-15 21:33:42 +01:00

197 lines
10 KiB
JavaScript

'use strict'
/*
Open Rowing Monitor, https://github.com/laberning/openrowingmonitor
This file contains the default configuration of the Open Rowing Monitor.
!!! Note that changes to this file will be OVERWRITTEN when you update to a new version
of Open Rowing Monitor. !!!
To change the settings you should modify the 'config/config.js' file. Simply copy the
options that you would like to change into that file. If 'config.js' does not exist, you
can use the example file from the 'install' folder.
*/
import rowerProfiles from './rowerProfiles.js'
export default {
// Available log levels: trace, debug, info, warn, error, silent
loglevel: {
// The default log level
default: 'info',
// The log level of of the rowing engine (stroke detection and physics model)
RowingEngine: 'warn'
},
// Defines the GPIO Pin that is used to read the sensor data from the rowing machine
// see: https://www.raspberrypi.org/documentation/usage/gpio for the pin layout of the device
// If you want to use the internal pull-up resistor of the Raspberry Pi you should
// also configure the pin for that in /boot/config.txt, i.e. 'gpio=17=pu,ip'
// see: https://www.raspberrypi.org/documentation/configuration/config-txt/gpio.md
gpioPin: 17,
// Enable this to boost or reduce the system level priority of the thread that measures the rotation
// speed of the flywheel. This might improve the precision of the measurements (especially
// on rowers with a fast spinning flywheel).
// This is the Linux NICE level: minimum setting is +19, theoretical maximum setting is -20
// Setting this below -1 on a non-PREEMPT kernel might cause the app to crash
// Going beyond -7 on a PREEMPT kernel seems to kill the timing of the app
// 0 keeps the systems default value.
// Also note that you will require root permissions if you set anything other than 0 here
gpioPriority: 0,
// GPIO polling interval: this is the interval at which the GPIO is inspected for state
// changes on the gpioPin, in microseconds (us).
// Valid values are 1 (i.e. 1,000,000 samples per second), 2 (i.e. 500,000 per second),
// 4 (i.e. 250,000 per second), 5 (i.e. 200,000 per second) and 10 (i.e. 100,000 per second).
// A high sample rate will burden your CPU more. Normal value is 5us.
// A raspberry pi 4 can handle a polling interval of 1 us, which results in a 16% CPU load.
gpioPollingInterval: 5,
// Type of flank: what flank should be detected by the GPIO detection?
// Valid values are 'Up' for the upward flank, 'Down' for the downward flank, 'Both' for both flanks
// In practice, it shouldn't matter much which flank you detect, although in the presence of debounce,
// a specific flank might provide better filtering capabilities.
// Some machines are even capable of using both, but this requires a strong symmetry in the signal.
gpioTriggeredFlank: 'Up',
// Minumum pulse length in microseconds. This is the minimum pulse length (i.e. a magnet should be
// present) before Open Rowing Monitor considers it a signal valid. Increasing this value reduces ghost readings
// due to bouncing reed switches etc., which typically are detected as very short measurements in the raw logs.
// Making this too long results in missed impulses. Both can be detected in the raw logs easily.
// Normal value is 50 us, but for some rowers, values up to 500 us are known to work.
gpioMinimumPulseLength: 50,
// Enable this to boost or reduce the system level priority of the thread that processes the flywheel and HR data
// Although this process is not time critical per se, it could get caught up in Linux housekeeping tasks, preventing
// it to process data in a timely manner.
// This is the Linux NICE level: minimum setting is +19, theoretical maximum setting is -20
// Setting this below -1 on a non-PREEMPT kernel might cause the app to crash
// Going beyond -5 on a PREEMPT kernel seems to kill the timing of the app
// 0 keeps the systems default value.
// Please make sure the app has a less high priority than gpioPriority
// Also note that you will require root permissions if you set anything other than 0 here
appPriority: 0,
// Selects the Bluetooth Low Energy Profile that is broadcasted to external peripherals and apps. Supported modes:
// - PM5: the Concept2 PM5 emulator (not functionally complete yet)
// - FTMS: the FTMS profile for rowing machines
// - FTMSBIKE: The FTMS profile is used by Smart Bike Trainers (please note: the speed and power are still aimed for rowing, NOT for a bike!)
// - CPS: The BLE Cycling Power Profile simulates a bike for more modern Garmin watches
// - CSC: The BLE Cycling Speed and Cadence Profile simulates a bike for older Garmin watches
bluetoothMode: 'FTMS',
// Turn this on if you want support for Bluetooth Low Energy heart rate monitors
// Will currenty connect to the first device found
heartrateMonitorBLE: true,
// Turn this on if you want support for ANT+ heart rate monitors
// You will need an ANT+ USB stick for this to work, the following models might work:
// - Garmin USB or USB2 ANT+ or an off-brand clone of it (ID 0x1008)
// - Garmin mini ANT+ (ID 0x1009)
heartrateMonitorANT: false,
// Defines the name that is used to announce the FTMS Rower via Bluetooth Low Energy (BLE)
// Some rowing training applications expect that the rowing device is announced with a certain name
ftmsRowerPeripheralName: 'OpenRowingMonitor',
// Defines the name that is used to announce the FTMS Bike via Bluetooth Low Energy (BLE)
// Most bike training applications are fine with any device name
ftmsBikePeripheralName: 'OpenRowingBike',
// The interval for updating all web clients (i.e. the monitor) in miliseconds
// Advised is to update at least once per second (1000 ms), to make sure the timer moves nice and smoothly.
// Around 100 ms results in a very smooth update experience for distance as well
// Please note that a smaller value will use more network and cpu ressources
webUpdateInterval: 200,
// Interval between updates of the bluetooth devices (miliseconds)
// Advised is to update at least once per second, as consumers expect this interval
// Some apps, like EXR like a more frequent interval of 200 ms to better sync the stroke
peripheralUpdateInterval: 1000,
// The number of stroke phases (i.e. Drive or Recovery) used to smoothen the data displayed on your
// screens (i.e. the monitor, but also bluetooth devices, etc.) and recorded data. A nice smooth experience is found at 6
// phases, a much more volatile (but more accurate and responsive) is found around 3. The minimum is 2,
// but for recreational rowers that might feel much too restless to be useful
numOfPhasesForAveragingScreenData: 6,
// The directory in which to store user specific content
// currently this directory holds the recorded training sessions
dataDirectory: 'data',
// Stores the training sessions as TCX files
createTcxFiles: true,
// Stores the (in-)stroke data in OpenRowingData CSV files
createRowingDataFiles: true,
// Stores the raw sensor data in CSV files
createRawDataFiles: false,
// Apply gzip compression to the recorded tcx training sessions file (tcx.gz)
// This will drastically reduce the file size of the files (only around 4% of the original file)
// Some training tools can directly work with gzipped tcx file, however for most training websites
// you will have to unzip the files before uploading
gzipTcxFiles: false,
// Apply gzip compression to the raw sensor data recording files (csv.gz)
gzipRawDataFiles: true,
// EXPERIMENTAL: Settings used for the VO2 Max calculation that is embedded in the tcx file comments
userSettings: {
// The resting Heartrate of the user, to filter abnomral HR values
restingHR: 40,
// The maximum observed heartrate during the last year. If unknown, you can use maxHr = 220 - age
// This is used for filtering abnormal HR values and to project the maximum power a rower produces
maxHR: 190,
// The minimum power a rower can produce, used for filtering abnormal power values
minPower: 50,
// The maximum power a rower can produce, used for filtering abnormal power values
maxPower: 500,
// The effect that doubling the distance has on the maximum achievable average pace. The proposed 5 is based on Paul's law,
// which states that doubling the distance leads to a slowdown in pace of 5 seconds. This value can be adapted if you know
// your PR (this pace) on both a 1000 meters and on 2000 meters, by substracting the pace.
distanceCorrectionFactor: 5,
// The weight of the rower in kilograms
weight: 80,
// The sex of the rower, as it is needed for Concept 2's calculation
// This can be "male" or "female"
sex: 'male',
// See for this definition: https://www.concept2.com/indoor-rowers/training/calculators/vo2max-calculator
highlyTrained: false
},
// The rower specific settings. Either choose a profile from config/rowerProfiles.js or
// define the settings individually. If you find good settings for a new rowing device
// please send them to us (together with a raw recording of 10 strokes) so we can add
// the device to the profiles.
// !! Only change this setting in the config/config.js file, and leave this on DEFAULT as that
// is the fallback for the default profile settings
rowerSettings: rowerProfiles.DEFAULT,
// command to shutdown the device via the user interface, leave empty to disable this feature
shutdownCommand: 'halt',
// Configures the connection to Strava (to directly upload workouts to Strava)
// Note that these values are not your Strava credentials
// Instead you have to create a Strava API Application as described here:
// https://developers.strava.com/docs/getting-started/#account and use the corresponding values
// When creating your Strava API application, set the "Authorization Callback Domain" to the IP address
// of your Raspberry Pi
// WARNING: if you enabled the network share via the installer script, then this config file will be
// exposed via network share on your local network. You might consider disabling (or password protect)
// the Configuration share in smb.conf
// The "Client ID" of your Strava API Application
stravaClientId: '',
// The "Client Secret" of your Strava API Application
stravaClientSecret: ''
}