@sports-alliance/sports-lib 7.0.13 → 7.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/check-metrics.js +30 -0
- package/find-values.js +33 -0
- package/inspect-devices.js +21 -0
- package/inspect-session.js +27 -0
- package/lib/cjs/activities/devices/device.d.ts +1 -0
- package/lib/cjs/activities/devices/device.interface.d.ts +1 -0
- package/lib/cjs/activities/devices/device.js +1 -0
- package/lib/cjs/activities/devices/device.json.interface.d.ts +1 -0
- package/lib/cjs/data/data.age.d.ts +6 -0
- package/lib/cjs/data/data.age.js +12 -0
- package/lib/cjs/data/data.avg-flow.d.ts +5 -0
- package/lib/cjs/data/data.avg-flow.js +9 -0
- package/lib/cjs/data/data.avg-grit.d.ts +5 -0
- package/lib/cjs/data/data.avg-grit.js +9 -0
- package/lib/cjs/data/data.avg-respiration-rate.d.ts +5 -0
- package/lib/cjs/data/data.avg-respiration-rate.js +9 -0
- package/lib/cjs/data/data.avg-vam.d.ts +5 -0
- package/lib/cjs/data/data.avg-vam.js +9 -0
- package/lib/cjs/data/data.est-sweat-loss.d.ts +6 -0
- package/lib/cjs/data/data.est-sweat-loss.js +12 -0
- package/lib/cjs/data/data.flow.d.ts +5 -0
- package/lib/cjs/data/data.flow.js +9 -0
- package/lib/cjs/data/data.gender.d.ts +4 -0
- package/lib/cjs/data/data.gender.js +8 -0
- package/lib/cjs/data/data.grit.d.ts +5 -0
- package/lib/cjs/data/data.grit.js +9 -0
- package/lib/cjs/data/data.height.d.ts +6 -0
- package/lib/cjs/data/data.height.js +12 -0
- package/lib/cjs/data/data.jump-count.d.ts +6 -0
- package/lib/cjs/data/data.jump-count.js +12 -0
- package/lib/cjs/data/data.jump-event.d.ts +12 -0
- package/lib/cjs/data/data.jump-event.js +16 -0
- package/lib/cjs/data/data.left-pedal-smoothness.d.ts +6 -0
- package/lib/cjs/data/data.left-pedal-smoothness.js +12 -0
- package/lib/cjs/data/data.left-torque-effectiveness.d.ts +6 -0
- package/lib/cjs/data/data.left-torque-effectiveness.js +12 -0
- package/lib/cjs/data/data.max-respiration-rate.d.ts +5 -0
- package/lib/cjs/data/data.max-respiration-rate.js +9 -0
- package/lib/cjs/data/data.min-respiration-rate.d.ts +5 -0
- package/lib/cjs/data/data.min-respiration-rate.js +9 -0
- package/lib/cjs/data/data.primary-benefit.d.ts +6 -0
- package/lib/cjs/data/data.primary-benefit.js +12 -0
- package/lib/cjs/data/data.resting-calories.d.ts +5 -0
- package/lib/cjs/data/data.resting-calories.js +9 -0
- package/lib/cjs/data/data.right-pedal-smoothness.d.ts +6 -0
- package/lib/cjs/data/data.right-pedal-smoothness.js +12 -0
- package/lib/cjs/data/data.right-torque-effectiveness.d.ts +6 -0
- package/lib/cjs/data/data.right-torque-effectiveness.js +12 -0
- package/lib/cjs/data/data.store.js +54 -2
- package/lib/cjs/data/data.total-flow.d.ts +5 -0
- package/lib/cjs/data/data.total-flow.js +9 -0
- package/lib/cjs/data/data.total-grit.d.ts +5 -0
- package/lib/cjs/data/data.total-grit.js +9 -0
- package/lib/cjs/data/data.training-load-peak.d.ts +5 -0
- package/lib/cjs/data/data.training-load-peak.js +9 -0
- package/lib/cjs/data/data.weight.d.ts +6 -0
- package/lib/cjs/data/data.weight.js +12 -0
- package/lib/cjs/events/adapters/importers/fit/importer.fit.d.ts +3 -1
- package/lib/cjs/events/adapters/importers/fit/importer.fit.js +211 -6
- package/lib/cjs/events/adapters/importers/fit/importer.fit.mapper.js +42 -0
- package/lib/cjs/events/adapters/importers/fit/importer.fit.mtb.spec.d.ts +1 -0
- package/lib/cjs/events/adapters/importers/fit/importer.fit.mtb.spec.js +217 -0
- package/lib/cjs/events/adapters/importers/fit/importer.fit.road.spec.d.ts +1 -0
- package/lib/cjs/events/adapters/importers/fit/importer.fit.road.spec.js +103 -0
- package/lib/cjs/index.d.ts +4 -0
- package/lib/cjs/index.js +4 -0
- package/lib/esm/activities/devices/device.d.ts +1 -0
- package/lib/esm/activities/devices/device.interface.d.ts +1 -0
- package/lib/esm/activities/devices/device.json.interface.d.ts +1 -0
- package/lib/esm/data/data.age.d.ts +6 -0
- package/lib/esm/data/data.avg-flow.d.ts +5 -0
- package/lib/esm/data/data.avg-grit.d.ts +5 -0
- package/lib/esm/data/data.avg-respiration-rate.d.ts +5 -0
- package/lib/esm/data/data.avg-vam.d.ts +5 -0
- package/lib/esm/data/data.est-sweat-loss.d.ts +6 -0
- package/lib/esm/data/data.flow.d.ts +5 -0
- package/lib/esm/data/data.gender.d.ts +4 -0
- package/lib/esm/data/data.grit.d.ts +5 -0
- package/lib/esm/data/data.height.d.ts +6 -0
- package/lib/esm/data/data.jump-count.d.ts +6 -0
- package/lib/esm/data/data.jump-event.d.ts +12 -0
- package/lib/esm/data/data.left-pedal-smoothness.d.ts +6 -0
- package/lib/esm/data/data.left-torque-effectiveness.d.ts +6 -0
- package/lib/esm/data/data.max-respiration-rate.d.ts +5 -0
- package/lib/esm/data/data.min-respiration-rate.d.ts +5 -0
- package/lib/esm/data/data.primary-benefit.d.ts +6 -0
- package/lib/esm/data/data.resting-calories.d.ts +5 -0
- package/lib/esm/data/data.right-pedal-smoothness.d.ts +6 -0
- package/lib/esm/data/data.right-torque-effectiveness.d.ts +6 -0
- package/lib/esm/data/data.total-flow.d.ts +5 -0
- package/lib/esm/data/data.total-grit.d.ts +5 -0
- package/lib/esm/data/data.training-load-peak.d.ts +5 -0
- package/lib/esm/data/data.weight.d.ts +6 -0
- package/lib/esm/events/adapters/importers/fit/importer.fit.d.ts +3 -1
- package/lib/esm/events/adapters/importers/fit/importer.fit.mtb.spec.d.ts +1 -0
- package/lib/esm/events/adapters/importers/fit/importer.fit.road.spec.d.ts +1 -0
- package/lib/esm/index.d.ts +4 -0
- package/lib/esm/index.js +522 -4
- package/package.json +2 -2
package/check-metrics.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const FitParser = require('fit-file-parser').default;
|
|
3
|
+
|
|
4
|
+
const file = 'samples/fit/jumps-mtb.fit';
|
|
5
|
+
const content = fs.readFileSync(file);
|
|
6
|
+
|
|
7
|
+
const parser = new FitParser({
|
|
8
|
+
force: true,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
parser.parse(content, (error, data) => {
|
|
12
|
+
if (error) {
|
|
13
|
+
console.error(error);
|
|
14
|
+
} else {
|
|
15
|
+
// Dump ALL Events raw
|
|
16
|
+
if (data.events) {
|
|
17
|
+
console.log('Events count:', data.events.length);
|
|
18
|
+
data.events.forEach((e, i) => {
|
|
19
|
+
// Log only if value is interesting to avoid huge spam?
|
|
20
|
+
// No, I need to see them.
|
|
21
|
+
// Format as one line
|
|
22
|
+
if (e.data === 57 || e.data === 19 || e.data === 1164) {
|
|
23
|
+
console.log(`MATCH INDEX ${i}:`, e);
|
|
24
|
+
}
|
|
25
|
+
// Also logging first 20 and around typical spots
|
|
26
|
+
});
|
|
27
|
+
console.log("Done checking events.");
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
});
|
package/find-values.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const FitParser = require('fit-file-parser').default;
|
|
3
|
+
|
|
4
|
+
const file = 'samples/fit/jumps-mtb.fit';
|
|
5
|
+
const content = fs.readFileSync(file);
|
|
6
|
+
|
|
7
|
+
const parser = new FitParser({
|
|
8
|
+
force: true,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
function searchNumber(obj, targetValue, path = '', tolerance = 0.001) {
|
|
12
|
+
if (!obj) return;
|
|
13
|
+
if (typeof obj === 'number') {
|
|
14
|
+
if (Math.abs(obj - targetValue) < tolerance) {
|
|
15
|
+
console.log(`FOUND VALUE ${targetValue} at ${path}:`, obj);
|
|
16
|
+
}
|
|
17
|
+
} else if (typeof obj === 'object') {
|
|
18
|
+
for (const key in obj) {
|
|
19
|
+
searchNumber(obj[key], targetValue, path + '.' + key);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
parser.parse(content, (error, data) => {
|
|
25
|
+
if (error) {
|
|
26
|
+
console.error(error);
|
|
27
|
+
} else {
|
|
28
|
+
// Search for the first value in the HR zone array: 346.004
|
|
29
|
+
console.log('Searching for 346.004 ...');
|
|
30
|
+
searchNumber(data, 346.004, 'data');
|
|
31
|
+
console.log('Search complete.');
|
|
32
|
+
}
|
|
33
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import FitParser from '../fit-parser/src/binary.ts';
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
|
|
4
|
+
const content = fs.readFileSync('./samples/fit/road-with-power.fit');
|
|
5
|
+
const fitParser = new FitParser({
|
|
6
|
+
force: true,
|
|
7
|
+
speedUnit: 'km/h',
|
|
8
|
+
lengthUnit: 'km',
|
|
9
|
+
temperatureUnit: 'celsius',
|
|
10
|
+
elapsedRecordField: true,
|
|
11
|
+
mode: 'both',
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
fitParser.parse(content, (error, data) => {
|
|
15
|
+
if (error) {
|
|
16
|
+
console.error(error);
|
|
17
|
+
} else {
|
|
18
|
+
console.log('Device Infos:');
|
|
19
|
+
console.log(JSON.stringify(data.device_infos, null, 2));
|
|
20
|
+
}
|
|
21
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const FitParser = require('fit-file-parser').default;
|
|
3
|
+
|
|
4
|
+
const file = 'samples/fit/jumps-mtb.fit';
|
|
5
|
+
const content = fs.readFileSync(file);
|
|
6
|
+
|
|
7
|
+
const parser = new FitParser({
|
|
8
|
+
force: true,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
parser.parse(content, (error, data) => {
|
|
12
|
+
if (error) {
|
|
13
|
+
console.error(error);
|
|
14
|
+
} else {
|
|
15
|
+
if (data.laps && data.laps.length > 0) {
|
|
16
|
+
console.log('Lap Object Keys:', Object.keys(data.laps[0]));
|
|
17
|
+
console.log('Lap Object:', JSON.stringify(data.laps[0], null, 2));
|
|
18
|
+
} else {
|
|
19
|
+
console.log('No Laps found.');
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Also check session again just in case
|
|
23
|
+
if (data.sessions && data.sessions.length > 0) {
|
|
24
|
+
console.log('Session time_in_hr_zone:', data.sessions[0].time_in_hr_zone);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataAge = void 0;
|
|
4
|
+
const data_number_1 = require("./data.number");
|
|
5
|
+
class DataAge extends data_number_1.DataNumber {
|
|
6
|
+
getDisplayValue() {
|
|
7
|
+
return this.getValue().toString();
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.DataAge = DataAge;
|
|
11
|
+
DataAge.type = 'Age';
|
|
12
|
+
DataAge.unit = 'years';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataAvgFlow = void 0;
|
|
4
|
+
const data_number_1 = require("./data.number");
|
|
5
|
+
class DataAvgFlow extends data_number_1.DataNumber {
|
|
6
|
+
}
|
|
7
|
+
exports.DataAvgFlow = DataAvgFlow;
|
|
8
|
+
DataAvgFlow.type = 'Avg Flow';
|
|
9
|
+
DataAvgFlow.unit = '';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataAvgGrit = void 0;
|
|
4
|
+
const data_number_1 = require("./data.number");
|
|
5
|
+
class DataAvgGrit extends data_number_1.DataNumber {
|
|
6
|
+
}
|
|
7
|
+
exports.DataAvgGrit = DataAvgGrit;
|
|
8
|
+
DataAvgGrit.type = 'Avg Grit';
|
|
9
|
+
DataAvgGrit.unit = '';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataAvgRespirationRate = void 0;
|
|
4
|
+
const data_number_1 = require("./data.number");
|
|
5
|
+
class DataAvgRespirationRate extends data_number_1.DataNumber {
|
|
6
|
+
}
|
|
7
|
+
exports.DataAvgRespirationRate = DataAvgRespirationRate;
|
|
8
|
+
DataAvgRespirationRate.type = 'Avg Respiration Rate';
|
|
9
|
+
DataAvgRespirationRate.unit = 'br/min';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataAvgVAM = void 0;
|
|
4
|
+
const data_number_1 = require("./data.number");
|
|
5
|
+
class DataAvgVAM extends data_number_1.DataNumber {
|
|
6
|
+
}
|
|
7
|
+
exports.DataAvgVAM = DataAvgVAM;
|
|
8
|
+
DataAvgVAM.type = 'Avg VAM';
|
|
9
|
+
DataAvgVAM.unit = 'm/h';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataEstSweatLoss = void 0;
|
|
4
|
+
const data_number_1 = require("./data.number");
|
|
5
|
+
class DataEstSweatLoss extends data_number_1.DataNumber {
|
|
6
|
+
constructor(value) {
|
|
7
|
+
super(value);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.DataEstSweatLoss = DataEstSweatLoss;
|
|
11
|
+
DataEstSweatLoss.type = 'Est Sweat Loss';
|
|
12
|
+
DataEstSweatLoss.unit = 'ml';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataFlow = void 0;
|
|
4
|
+
const data_number_1 = require("./data.number");
|
|
5
|
+
class DataFlow extends data_number_1.DataNumber {
|
|
6
|
+
}
|
|
7
|
+
exports.DataFlow = DataFlow;
|
|
8
|
+
DataFlow.type = 'Flow';
|
|
9
|
+
DataFlow.unit = '';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataGender = void 0;
|
|
4
|
+
const data_string_1 = require("./data.string");
|
|
5
|
+
class DataGender extends data_string_1.DataString {
|
|
6
|
+
}
|
|
7
|
+
exports.DataGender = DataGender;
|
|
8
|
+
DataGender.type = 'Gender';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataGrit = void 0;
|
|
4
|
+
const data_number_1 = require("./data.number");
|
|
5
|
+
class DataGrit extends data_number_1.DataNumber {
|
|
6
|
+
}
|
|
7
|
+
exports.DataGrit = DataGrit;
|
|
8
|
+
DataGrit.type = 'Grit';
|
|
9
|
+
DataGrit.unit = '';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataHeight = void 0;
|
|
4
|
+
const data_number_1 = require("./data.number");
|
|
5
|
+
class DataHeight extends data_number_1.DataNumber {
|
|
6
|
+
getDisplayValue() {
|
|
7
|
+
return this.getValue().toFixed(2);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.DataHeight = DataHeight;
|
|
11
|
+
DataHeight.type = 'Height';
|
|
12
|
+
DataHeight.unit = 'm';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataJumpCount = void 0;
|
|
4
|
+
const data_number_1 = require("./data.number");
|
|
5
|
+
class DataJumpCount extends data_number_1.DataNumber {
|
|
6
|
+
constructor(jumpCount) {
|
|
7
|
+
super(jumpCount);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.DataJumpCount = DataJumpCount;
|
|
11
|
+
DataJumpCount.type = 'Jump Count';
|
|
12
|
+
DataJumpCount.unit = '';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DataEvent } from './data.event';
|
|
2
|
+
export interface JumpEventInterface {
|
|
3
|
+
distance: number;
|
|
4
|
+
height: number;
|
|
5
|
+
score: number;
|
|
6
|
+
}
|
|
7
|
+
export declare class DataJumpEvent extends DataEvent {
|
|
8
|
+
jumpData: JumpEventInterface;
|
|
9
|
+
static type: string;
|
|
10
|
+
constructor(timestamp: number, jumpData: JumpEventInterface);
|
|
11
|
+
toJSON(): any;
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataJumpEvent = void 0;
|
|
4
|
+
const data_event_1 = require("./data.event");
|
|
5
|
+
class DataJumpEvent extends data_event_1.DataEvent {
|
|
6
|
+
constructor(timestamp, jumpData) {
|
|
7
|
+
super(timestamp);
|
|
8
|
+
this.jumpData = jumpData;
|
|
9
|
+
}
|
|
10
|
+
toJSON() {
|
|
11
|
+
const json = super.toJSON();
|
|
12
|
+
return Object.assign(Object.assign({}, json), { jumpData: this.jumpData });
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.DataJumpEvent = DataJumpEvent;
|
|
16
|
+
DataJumpEvent.type = 'Jump Event';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataLeftPedalSmoothness = void 0;
|
|
4
|
+
const data_number_1 = require("./data.number");
|
|
5
|
+
class DataLeftPedalSmoothness extends data_number_1.DataNumber {
|
|
6
|
+
getDisplayValue() {
|
|
7
|
+
return Math.round(this.getValue());
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.DataLeftPedalSmoothness = DataLeftPedalSmoothness;
|
|
11
|
+
DataLeftPedalSmoothness.type = 'Left Pedal Smoothness';
|
|
12
|
+
DataLeftPedalSmoothness.unit = '%';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataLeftTorqueEffectiveness = void 0;
|
|
4
|
+
const data_number_1 = require("./data.number");
|
|
5
|
+
class DataLeftTorqueEffectiveness extends data_number_1.DataNumber {
|
|
6
|
+
getDisplayValue() {
|
|
7
|
+
return Math.round(this.getValue());
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.DataLeftTorqueEffectiveness = DataLeftTorqueEffectiveness;
|
|
11
|
+
DataLeftTorqueEffectiveness.type = 'Left Torque Effectiveness';
|
|
12
|
+
DataLeftTorqueEffectiveness.unit = '%';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataMaxRespirationRate = void 0;
|
|
4
|
+
const data_number_1 = require("./data.number");
|
|
5
|
+
class DataMaxRespirationRate extends data_number_1.DataNumber {
|
|
6
|
+
}
|
|
7
|
+
exports.DataMaxRespirationRate = DataMaxRespirationRate;
|
|
8
|
+
DataMaxRespirationRate.type = 'Max Respiration Rate';
|
|
9
|
+
DataMaxRespirationRate.unit = 'br/min';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataMinRespirationRate = void 0;
|
|
4
|
+
const data_number_1 = require("./data.number");
|
|
5
|
+
class DataMinRespirationRate extends data_number_1.DataNumber {
|
|
6
|
+
}
|
|
7
|
+
exports.DataMinRespirationRate = DataMinRespirationRate;
|
|
8
|
+
DataMinRespirationRate.type = 'Min Respiration Rate';
|
|
9
|
+
DataMinRespirationRate.unit = 'br/min';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataPrimaryBenefit = void 0;
|
|
4
|
+
const data_number_1 = require("./data.number");
|
|
5
|
+
class DataPrimaryBenefit extends data_number_1.DataNumber {
|
|
6
|
+
constructor(value) {
|
|
7
|
+
super(value);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.DataPrimaryBenefit = DataPrimaryBenefit;
|
|
11
|
+
DataPrimaryBenefit.type = 'Primary Benefit';
|
|
12
|
+
DataPrimaryBenefit.unit = '';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataRestingCalories = void 0;
|
|
4
|
+
const data_number_1 = require("./data.number");
|
|
5
|
+
class DataRestingCalories extends data_number_1.DataNumber {
|
|
6
|
+
}
|
|
7
|
+
exports.DataRestingCalories = DataRestingCalories;
|
|
8
|
+
DataRestingCalories.type = 'Resting Calories';
|
|
9
|
+
DataRestingCalories.unit = 'kcal';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataRightPedalSmoothness = void 0;
|
|
4
|
+
const data_number_1 = require("./data.number");
|
|
5
|
+
class DataRightPedalSmoothness extends data_number_1.DataNumber {
|
|
6
|
+
getDisplayValue() {
|
|
7
|
+
return Math.round(this.getValue());
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.DataRightPedalSmoothness = DataRightPedalSmoothness;
|
|
11
|
+
DataRightPedalSmoothness.type = 'Right Pedal Smoothness';
|
|
12
|
+
DataRightPedalSmoothness.unit = '%';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataRightTorqueEffectiveness = void 0;
|
|
4
|
+
const data_number_1 = require("./data.number");
|
|
5
|
+
class DataRightTorqueEffectiveness extends data_number_1.DataNumber {
|
|
6
|
+
getDisplayValue() {
|
|
7
|
+
return Math.round(this.getValue());
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.DataRightTorqueEffectiveness = DataRightTorqueEffectiveness;
|
|
11
|
+
DataRightTorqueEffectiveness.type = 'Right Torque Effectiveness';
|
|
12
|
+
DataRightTorqueEffectiveness.unit = '%';
|
|
@@ -175,6 +175,30 @@ const data_avg_stride_length_1 = require("./data.avg-stride-length");
|
|
|
175
175
|
const data_cycling_seated_time_1 = require("./data.cycling-seated-time");
|
|
176
176
|
const data_cycling_standing_time_1 = require("./data.cycling-standing-time");
|
|
177
177
|
const data_grade_smooth_1 = require("./data.grade-smooth");
|
|
178
|
+
const data_weight_1 = require("./data.weight");
|
|
179
|
+
const data_height_1 = require("./data.height");
|
|
180
|
+
const data_age_1 = require("./data.age");
|
|
181
|
+
const data_gender_1 = require("./data.gender");
|
|
182
|
+
const data_avg_flow_1 = require("./data.avg-flow");
|
|
183
|
+
const data_avg_grit_1 = require("./data.avg-grit");
|
|
184
|
+
const data_avg_respiration_rate_1 = require("./data.avg-respiration-rate");
|
|
185
|
+
const data_avg_vam_1 = require("./data.avg-vam");
|
|
186
|
+
const data_est_sweat_loss_1 = require("./data.est-sweat-loss");
|
|
187
|
+
const data_flow_1 = require("./data.flow");
|
|
188
|
+
const data_grit_1 = require("./data.grit");
|
|
189
|
+
const data_jump_count_1 = require("./data.jump-count");
|
|
190
|
+
const data_jump_event_1 = require("./data.jump-event");
|
|
191
|
+
const data_left_pedal_smoothness_1 = require("./data.left-pedal-smoothness");
|
|
192
|
+
const data_left_torque_effectiveness_1 = require("./data.left-torque-effectiveness");
|
|
193
|
+
const data_max_respiration_rate_1 = require("./data.max-respiration-rate");
|
|
194
|
+
const data_min_respiration_rate_1 = require("./data.min-respiration-rate");
|
|
195
|
+
const data_primary_benefit_1 = require("./data.primary-benefit");
|
|
196
|
+
const data_resting_calories_1 = require("./data.resting-calories");
|
|
197
|
+
const data_right_pedal_smoothness_1 = require("./data.right-pedal-smoothness");
|
|
198
|
+
const data_right_torque_effectiveness_1 = require("./data.right-torque-effectiveness");
|
|
199
|
+
const data_total_flow_1 = require("./data.total-flow");
|
|
200
|
+
const data_total_grit_1 = require("./data.total-grit");
|
|
201
|
+
const data_training_load_peak_1 = require("./data.training-load-peak");
|
|
178
202
|
// "Total Training effect" was renamed to "Aerobic Training Effect" in sports-lib 6.0
|
|
179
203
|
class DataTotalTrainingEffectLegacy extends data_aerobic_training_effect_1.DataAerobicTrainingEffect {
|
|
180
204
|
}
|
|
@@ -448,7 +472,31 @@ exports.DataStore = {
|
|
|
448
472
|
DataTargetSpeedZone: data_target_speed_zone_1.DataTargetSpeedZone,
|
|
449
473
|
DataTargetDistance: data_target_distance_1.DataTargetDistance,
|
|
450
474
|
DataTargetTime: data_target_time_1.DataTargetTime,
|
|
451
|
-
DataTotalTrainingEffectLegacy
|
|
475
|
+
DataTotalTrainingEffectLegacy,
|
|
476
|
+
DataWeight: data_weight_1.DataWeight,
|
|
477
|
+
DataHeight: data_height_1.DataHeight,
|
|
478
|
+
DataAge: data_age_1.DataAge,
|
|
479
|
+
DataGender: data_gender_1.DataGender,
|
|
480
|
+
DataAvgFlow: data_avg_flow_1.DataAvgFlow,
|
|
481
|
+
DataAvgGrit: data_avg_grit_1.DataAvgGrit,
|
|
482
|
+
DataAvgRespirationRate: data_avg_respiration_rate_1.DataAvgRespirationRate,
|
|
483
|
+
DataAvgVAM: data_avg_vam_1.DataAvgVAM,
|
|
484
|
+
DataEstSweatLoss: data_est_sweat_loss_1.DataEstSweatLoss,
|
|
485
|
+
DataFlow: data_flow_1.DataFlow,
|
|
486
|
+
DataGrit: data_grit_1.DataGrit,
|
|
487
|
+
DataJumpCount: data_jump_count_1.DataJumpCount,
|
|
488
|
+
DataJumpEvent: data_jump_event_1.DataJumpEvent,
|
|
489
|
+
DataLeftPedalSmoothness: data_left_pedal_smoothness_1.DataLeftPedalSmoothness,
|
|
490
|
+
DataLeftTorqueEffectiveness: data_left_torque_effectiveness_1.DataLeftTorqueEffectiveness,
|
|
491
|
+
DataMaxRespirationRate: data_max_respiration_rate_1.DataMaxRespirationRate,
|
|
492
|
+
DataMinRespirationRate: data_min_respiration_rate_1.DataMinRespirationRate,
|
|
493
|
+
DataPrimaryBenefit: data_primary_benefit_1.DataPrimaryBenefit,
|
|
494
|
+
DataRestingCalories: data_resting_calories_1.DataRestingCalories,
|
|
495
|
+
DataRightPedalSmoothness: data_right_pedal_smoothness_1.DataRightPedalSmoothness,
|
|
496
|
+
DataRightTorqueEffectiveness: data_right_torque_effectiveness_1.DataRightTorqueEffectiveness,
|
|
497
|
+
DataTotalFlow: data_total_flow_1.DataTotalFlow,
|
|
498
|
+
DataTotalGrit: data_total_grit_1.DataTotalGrit,
|
|
499
|
+
DataTrainingLoadPeak: data_training_load_peak_1.DataTrainingLoadPeak
|
|
452
500
|
};
|
|
453
501
|
class DynamicDataLoader {
|
|
454
502
|
static getDataInstanceFromDataType(dataType, opts) {
|
|
@@ -1030,7 +1078,11 @@ DynamicDataLoader.basicDataTypes = [
|
|
|
1030
1078
|
data_pace_1.DataPace.type,
|
|
1031
1079
|
data_grade_adjusted_speed_1.DataGradeAdjustedSpeed.type,
|
|
1032
1080
|
data_grade_adjusted_pace_1.DataGradeAdjustedPace.type,
|
|
1033
|
-
data_speed_1.DataSpeed.type
|
|
1081
|
+
data_speed_1.DataSpeed.type,
|
|
1082
|
+
data_weight_1.DataWeight.type,
|
|
1083
|
+
data_height_1.DataHeight.type,
|
|
1084
|
+
data_age_1.DataAge.type,
|
|
1085
|
+
data_gender_1.DataGender.type
|
|
1034
1086
|
];
|
|
1035
1087
|
DynamicDataLoader.advancedDataTypes = [
|
|
1036
1088
|
data_grade_1.DataGrade.type,
|