@sports-alliance/sports-lib 7.2.2 → 7.2.4
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/.agent/README.md +16 -0
- package/inspect_jump_raw.js +24 -0
- package/lib/cjs/data/data.event.d.ts +1 -0
- package/lib/cjs/data/data.event.js +3 -0
- package/lib/cjs/data/data.jump-event.d.ts +26 -5
- package/lib/cjs/data/data.jump-event.js +52 -5
- package/lib/cjs/data/data.jump-event.spec.d.ts +1 -0
- package/lib/cjs/data/data.jump-event.spec.js +82 -0
- package/lib/cjs/data/data.jump-stats.d.ts +91 -0
- package/lib/cjs/data/data.jump-stats.js +112 -0
- package/lib/cjs/data/data.rider-position-change-event.d.ts +4 -1
- package/lib/cjs/data/data.rider-position-change-event.js +9 -3
- package/lib/cjs/data/data.store.js +22 -1
- package/lib/cjs/events/adapters/importers/fit/importer.fit.js +107 -9
- package/lib/cjs/events/adapters/importers/fit/importer.fit.mtb.spec.js +36 -8
- package/lib/cjs/index.d.ts +2 -0
- package/lib/cjs/index.js +2 -0
- package/lib/esm/data/data.event.d.ts +1 -0
- package/lib/esm/data/data.jump-event.d.ts +26 -5
- package/lib/esm/data/data.jump-event.spec.d.ts +1 -0
- package/lib/esm/data/data.jump-stats.d.ts +91 -0
- package/lib/esm/data/data.rider-position-change-event.d.ts +4 -1
- package/lib/esm/index.d.ts +2 -0
- package/lib/esm/index.js +359 -17
- package/package.json +2 -2
package/.agent/README.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Agent Configuration for sports-lib
|
|
2
|
+
|
|
3
|
+
This directory contains configuration, skills, and workflows for AI agents working on the `sports-lib` project.
|
|
4
|
+
|
|
5
|
+
## Structure
|
|
6
|
+
|
|
7
|
+
- **skills/**: Contains specialized "skills" (instructions + scripts) for the agent.
|
|
8
|
+
- `debug-utils`: Instructions for using the project's ad-hoc FIT file debugging scripts.
|
|
9
|
+
- **workflows/**: Contains step-by-step guides for common tasks.
|
|
10
|
+
- `add-new-data.md`: How to identify and add new data fields from FIT files.
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
When asking an agent to help with debugging or adding data, you can refer them to these specific skills or workflows if they don't automatically pick them up.
|
|
15
|
+
- "Use the debug-utils skill to inspect this file."
|
|
16
|
+
- "Follow the add-new-data workflow."
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const FitParser = require('fit-file-parser').default;
|
|
3
|
+
|
|
4
|
+
const content = fs.readFileSync('./samples/fit/jumps-mtb.fit');
|
|
5
|
+
const fitParser = new FitParser({ force: true, mode: 'both' });
|
|
6
|
+
|
|
7
|
+
fitParser.parse(content, (error, data) => {
|
|
8
|
+
if (error) {
|
|
9
|
+
console.error(error);
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
console.log('=== ROOT KEYS ===');
|
|
13
|
+
console.log(Object.keys(data).join('\n'));
|
|
14
|
+
|
|
15
|
+
if (data.jumps) {
|
|
16
|
+
console.log('\n=== FIRST JUMP ===');
|
|
17
|
+
console.log(data.jumps[0]);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (data.user_profiles) {
|
|
21
|
+
console.log('\n=== USER PROFILES ===');
|
|
22
|
+
console.log(data.user_profiles);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
@@ -3,5 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DataEvent = void 0;
|
|
4
4
|
const data_number_1 = require("./data.number");
|
|
5
5
|
class DataEvent extends data_number_1.DataNumber {
|
|
6
|
+
get timestamp() {
|
|
7
|
+
return this.getValue();
|
|
8
|
+
}
|
|
6
9
|
}
|
|
7
10
|
exports.DataEvent = DataEvent;
|
|
@@ -1,12 +1,33 @@
|
|
|
1
1
|
import { DataEvent } from './data.event';
|
|
2
|
+
import { DataDistance } from './data.distance';
|
|
3
|
+
import { DataSpeed } from './data.speed';
|
|
4
|
+
import { DataDuration } from './data.duration';
|
|
5
|
+
import { DataNumber } from './data.number';
|
|
6
|
+
import { DataLatitudeDegrees } from './data.latitude-degrees';
|
|
7
|
+
import { DataLongitudeDegrees } from './data.longitude-degrees';
|
|
8
|
+
export declare class DataScore extends DataNumber {
|
|
9
|
+
static type: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class DataRotations extends DataNumber {
|
|
12
|
+
static type: string;
|
|
13
|
+
}
|
|
2
14
|
export interface JumpEventInterface {
|
|
3
|
-
distance:
|
|
4
|
-
height
|
|
5
|
-
score:
|
|
15
|
+
distance: DataDistance;
|
|
16
|
+
height?: DataDistance;
|
|
17
|
+
score: DataScore;
|
|
18
|
+
hang_time?: DataDuration;
|
|
19
|
+
position_lat?: DataLatitudeDegrees;
|
|
20
|
+
position_long?: DataLongitudeDegrees;
|
|
21
|
+
speed?: DataSpeed;
|
|
22
|
+
rotations?: DataRotations;
|
|
6
23
|
}
|
|
7
24
|
export declare class DataJumpEvent extends DataEvent {
|
|
8
|
-
jumpData: JumpEventInterface;
|
|
9
25
|
static type: string;
|
|
10
|
-
|
|
26
|
+
jumpData: JumpEventInterface;
|
|
27
|
+
constructor(timestampOrObj: number | {
|
|
28
|
+
timestamp: number;
|
|
29
|
+
jumpData: any;
|
|
30
|
+
}, jumpData?: any);
|
|
31
|
+
private hydrate;
|
|
11
32
|
toJSON(): any;
|
|
12
33
|
}
|
|
@@ -1,15 +1,62 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DataJumpEvent = void 0;
|
|
3
|
+
exports.DataJumpEvent = exports.DataRotations = exports.DataScore = void 0;
|
|
4
4
|
const data_event_1 = require("./data.event");
|
|
5
|
+
const data_distance_1 = require("./data.distance");
|
|
6
|
+
const data_speed_1 = require("./data.speed");
|
|
7
|
+
const data_duration_1 = require("./data.duration");
|
|
8
|
+
const data_number_1 = require("./data.number");
|
|
9
|
+
const data_latitude_degrees_1 = require("./data.latitude-degrees");
|
|
10
|
+
const data_longitude_degrees_1 = require("./data.longitude-degrees");
|
|
11
|
+
class DataScore extends data_number_1.DataNumber {
|
|
12
|
+
}
|
|
13
|
+
exports.DataScore = DataScore;
|
|
14
|
+
DataScore.type = 'Score';
|
|
15
|
+
class DataRotations extends data_number_1.DataNumber {
|
|
16
|
+
}
|
|
17
|
+
exports.DataRotations = DataRotations;
|
|
18
|
+
DataRotations.type = 'Rotations';
|
|
5
19
|
class DataJumpEvent extends data_event_1.DataEvent {
|
|
6
|
-
constructor(
|
|
7
|
-
|
|
8
|
-
|
|
20
|
+
constructor(timestampOrObj, jumpData) {
|
|
21
|
+
if (typeof timestampOrObj === 'object') {
|
|
22
|
+
super(timestampOrObj.timestamp);
|
|
23
|
+
this.jumpData = this.hydrate(timestampOrObj.jumpData);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
super(timestampOrObj);
|
|
27
|
+
this.jumpData = this.hydrate(jumpData);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
hydrate(data) {
|
|
31
|
+
return {
|
|
32
|
+
distance: data.distance instanceof data_distance_1.DataDistance ? data.distance : new data_distance_1.DataDistance(data.distance),
|
|
33
|
+
height: data.height ? (data.height instanceof data_distance_1.DataDistance ? data.height : new data_distance_1.DataDistance(data.height)) : undefined,
|
|
34
|
+
score: data.score instanceof DataScore ? data.score : new DataScore(data.score),
|
|
35
|
+
hang_time: data.hang_time ? (data.hang_time instanceof data_duration_1.DataDuration ? data.hang_time : new data_duration_1.DataDuration(data.hang_time)) : undefined,
|
|
36
|
+
position_lat: data.position_lat ? (data.position_lat instanceof data_latitude_degrees_1.DataLatitudeDegrees ? data.position_lat : new data_latitude_degrees_1.DataLatitudeDegrees(data.position_lat)) : undefined,
|
|
37
|
+
position_long: data.position_long ? (data.position_long instanceof data_longitude_degrees_1.DataLongitudeDegrees ? data.position_long : new data_longitude_degrees_1.DataLongitudeDegrees(data.position_long)) : undefined,
|
|
38
|
+
speed: data.speed ? (data.speed instanceof data_speed_1.DataSpeed ? data.speed : new data_speed_1.DataSpeed(data.speed)) : undefined,
|
|
39
|
+
rotations: data.rotations ? (data.rotations instanceof DataRotations ? data.rotations : new DataRotations(data.rotations)) : undefined,
|
|
40
|
+
};
|
|
9
41
|
}
|
|
10
42
|
toJSON() {
|
|
43
|
+
var _a, _b, _c, _d, _e, _f;
|
|
11
44
|
const json = super.toJSON();
|
|
12
|
-
return
|
|
45
|
+
return {
|
|
46
|
+
[DataJumpEvent.type]: {
|
|
47
|
+
timestamp: this.getValue(),
|
|
48
|
+
jumpData: {
|
|
49
|
+
distance: this.jumpData.distance.getValue(),
|
|
50
|
+
height: (_a = this.jumpData.height) === null || _a === void 0 ? void 0 : _a.getValue(),
|
|
51
|
+
score: this.jumpData.score.getValue(),
|
|
52
|
+
hang_time: (_b = this.jumpData.hang_time) === null || _b === void 0 ? void 0 : _b.getValue(),
|
|
53
|
+
position_lat: (_c = this.jumpData.position_lat) === null || _c === void 0 ? void 0 : _c.getValue(),
|
|
54
|
+
position_long: (_d = this.jumpData.position_long) === null || _d === void 0 ? void 0 : _d.getValue(),
|
|
55
|
+
speed: (_e = this.jumpData.speed) === null || _e === void 0 ? void 0 : _e.getValue(),
|
|
56
|
+
rotations: (_f = this.jumpData.rotations) === null || _f === void 0 ? void 0 : _f.getValue(),
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
13
60
|
}
|
|
14
61
|
}
|
|
15
62
|
exports.DataJumpEvent = DataJumpEvent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const data_jump_event_1 = require("./data.jump-event");
|
|
4
|
+
const data_distance_1 = require("./data.distance");
|
|
5
|
+
const data_speed_1 = require("./data.speed");
|
|
6
|
+
const data_duration_1 = require("./data.duration");
|
|
7
|
+
const data_latitude_degrees_1 = require("./data.latitude-degrees");
|
|
8
|
+
const data_longitude_degrees_1 = require("./data.longitude-degrees");
|
|
9
|
+
describe('DataJumpEvent', () => {
|
|
10
|
+
const timestamp = 1234567890;
|
|
11
|
+
// Manual creation requires Data objects
|
|
12
|
+
const jumpData = {
|
|
13
|
+
distance: new data_distance_1.DataDistance(5.5),
|
|
14
|
+
height: new data_distance_1.DataDistance(1.2),
|
|
15
|
+
score: new data_jump_event_1.DataScore(85),
|
|
16
|
+
hang_time: new data_duration_1.DataDuration(0.8),
|
|
17
|
+
position_lat: new data_latitude_degrees_1.DataLatitudeDegrees(40.7128),
|
|
18
|
+
position_long: new data_longitude_degrees_1.DataLongitudeDegrees(-74.0060),
|
|
19
|
+
speed: new data_speed_1.DataSpeed(15.2),
|
|
20
|
+
rotations: new data_jump_event_1.DataRotations(0)
|
|
21
|
+
};
|
|
22
|
+
it('should be created using constructor with separate arguments (Manual)', () => {
|
|
23
|
+
const jumpEvent = new data_jump_event_1.DataJumpEvent(timestamp, jumpData);
|
|
24
|
+
expect(jumpEvent.getType()).toBe('Jump Event');
|
|
25
|
+
expect(jumpEvent.getValue()).toBe(timestamp);
|
|
26
|
+
// Expect exact object match
|
|
27
|
+
expect(jumpEvent.jumpData).toEqual(jumpData);
|
|
28
|
+
});
|
|
29
|
+
it('should be created using constructor with object argument (Manual Object)', () => {
|
|
30
|
+
const jumpEvent = new data_jump_event_1.DataJumpEvent({ timestamp, jumpData });
|
|
31
|
+
expect(jumpEvent.getType()).toBe('Jump Event');
|
|
32
|
+
expect(jumpEvent.getValue()).toBe(timestamp);
|
|
33
|
+
expect(jumpEvent.jumpData).toEqual(jumpData);
|
|
34
|
+
});
|
|
35
|
+
it('should serialize to JSON correctly', () => {
|
|
36
|
+
const jumpEvent = new data_jump_event_1.DataJumpEvent(timestamp, jumpData);
|
|
37
|
+
const json = jumpEvent.toJSON();
|
|
38
|
+
// toJSON output should be simple values
|
|
39
|
+
expect(json).toEqual({
|
|
40
|
+
'Jump Event': {
|
|
41
|
+
timestamp: timestamp,
|
|
42
|
+
jumpData: {
|
|
43
|
+
distance: 5.5,
|
|
44
|
+
height: 1.2,
|
|
45
|
+
score: 85,
|
|
46
|
+
hang_time: 0.8,
|
|
47
|
+
position_lat: 40.7128,
|
|
48
|
+
position_long: -74.0060,
|
|
49
|
+
speed: 15.2,
|
|
50
|
+
rotations: 0
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
it('should hydrate from JSON object correctly (simulating generic importer)', () => {
|
|
56
|
+
// Generic importer passes primitive values
|
|
57
|
+
const jsonValue = {
|
|
58
|
+
timestamp,
|
|
59
|
+
jumpData: {
|
|
60
|
+
distance: 5.5,
|
|
61
|
+
height: 1.2,
|
|
62
|
+
score: 85,
|
|
63
|
+
hang_time: 0.8,
|
|
64
|
+
position_lat: 40.7128,
|
|
65
|
+
position_long: -74.0060,
|
|
66
|
+
speed: 15.2,
|
|
67
|
+
rotations: 0
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
// Constructor should hydrate primitives into Data objects
|
|
71
|
+
const jumpEvent = new data_jump_event_1.DataJumpEvent(jsonValue);
|
|
72
|
+
expect(jumpEvent.getType()).toBe('Jump Event');
|
|
73
|
+
expect(jumpEvent.getValue()).toBe(timestamp);
|
|
74
|
+
// Assertions check if properties are converted to Data objects
|
|
75
|
+
expect(jumpEvent.jumpData.distance).toBeInstanceOf(data_distance_1.DataDistance);
|
|
76
|
+
expect(jumpEvent.jumpData.distance.getValue()).toBe(5.5);
|
|
77
|
+
expect(jumpEvent.jumpData.score).toBeInstanceOf(data_jump_event_1.DataScore);
|
|
78
|
+
expect(jumpEvent.jumpData.score.getValue()).toBe(85);
|
|
79
|
+
expect(jumpEvent.jumpData.speed).toBeInstanceOf(data_speed_1.DataSpeed);
|
|
80
|
+
expect(jumpEvent.jumpData.speed.getValue()).toBe(15.2);
|
|
81
|
+
});
|
|
82
|
+
});
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { DataNumber } from './data.number';
|
|
2
|
+
export declare class DataJumpHangTimeMin extends DataNumber {
|
|
3
|
+
static type: string;
|
|
4
|
+
static unit: string;
|
|
5
|
+
constructor(value: number);
|
|
6
|
+
}
|
|
7
|
+
export declare class DataJumpHangTimeMax extends DataNumber {
|
|
8
|
+
static type: string;
|
|
9
|
+
static unit: string;
|
|
10
|
+
constructor(value: number);
|
|
11
|
+
}
|
|
12
|
+
export declare class DataJumpHangTimeAvg extends DataNumber {
|
|
13
|
+
static type: string;
|
|
14
|
+
static unit: string;
|
|
15
|
+
constructor(value: number);
|
|
16
|
+
}
|
|
17
|
+
export declare class DataJumpDistanceMin extends DataNumber {
|
|
18
|
+
static type: string;
|
|
19
|
+
static unit: string;
|
|
20
|
+
constructor(value: number);
|
|
21
|
+
}
|
|
22
|
+
export declare class DataJumpDistanceMax extends DataNumber {
|
|
23
|
+
static type: string;
|
|
24
|
+
static unit: string;
|
|
25
|
+
constructor(value: number);
|
|
26
|
+
}
|
|
27
|
+
export declare class DataJumpDistanceAvg extends DataNumber {
|
|
28
|
+
static type: string;
|
|
29
|
+
static unit: string;
|
|
30
|
+
constructor(value: number);
|
|
31
|
+
}
|
|
32
|
+
export declare class DataJumpSpeedMin extends DataNumber {
|
|
33
|
+
static type: string;
|
|
34
|
+
static unit: string;
|
|
35
|
+
constructor(value: number);
|
|
36
|
+
}
|
|
37
|
+
export declare class DataJumpSpeedMax extends DataNumber {
|
|
38
|
+
static type: string;
|
|
39
|
+
static unit: string;
|
|
40
|
+
constructor(value: number);
|
|
41
|
+
}
|
|
42
|
+
export declare class DataJumpSpeedAvg extends DataNumber {
|
|
43
|
+
static type: string;
|
|
44
|
+
static unit: string;
|
|
45
|
+
constructor(value: number);
|
|
46
|
+
}
|
|
47
|
+
export declare class DataJumpRotationsMin extends DataNumber {
|
|
48
|
+
static type: string;
|
|
49
|
+
static unit: string;
|
|
50
|
+
constructor(value: number);
|
|
51
|
+
}
|
|
52
|
+
export declare class DataJumpRotationsMax extends DataNumber {
|
|
53
|
+
static type: string;
|
|
54
|
+
static unit: string;
|
|
55
|
+
constructor(value: number);
|
|
56
|
+
}
|
|
57
|
+
export declare class DataJumpRotationsAvg extends DataNumber {
|
|
58
|
+
static type: string;
|
|
59
|
+
static unit: string;
|
|
60
|
+
constructor(value: number);
|
|
61
|
+
}
|
|
62
|
+
export declare class DataJumpScoreMin extends DataNumber {
|
|
63
|
+
static type: string;
|
|
64
|
+
static unit: string;
|
|
65
|
+
constructor(value: number);
|
|
66
|
+
}
|
|
67
|
+
export declare class DataJumpScoreMax extends DataNumber {
|
|
68
|
+
static type: string;
|
|
69
|
+
static unit: string;
|
|
70
|
+
constructor(value: number);
|
|
71
|
+
}
|
|
72
|
+
export declare class DataJumpScoreAvg extends DataNumber {
|
|
73
|
+
static type: string;
|
|
74
|
+
static unit: string;
|
|
75
|
+
constructor(value: number);
|
|
76
|
+
}
|
|
77
|
+
export declare class DataJumpHeightMin extends DataNumber {
|
|
78
|
+
static type: string;
|
|
79
|
+
static unit: string;
|
|
80
|
+
constructor(value: number);
|
|
81
|
+
}
|
|
82
|
+
export declare class DataJumpHeightMax extends DataNumber {
|
|
83
|
+
static type: string;
|
|
84
|
+
static unit: string;
|
|
85
|
+
constructor(value: number);
|
|
86
|
+
}
|
|
87
|
+
export declare class DataJumpHeightAvg extends DataNumber {
|
|
88
|
+
static type: string;
|
|
89
|
+
static unit: string;
|
|
90
|
+
constructor(value: number);
|
|
91
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataJumpHeightAvg = exports.DataJumpHeightMax = exports.DataJumpHeightMin = exports.DataJumpScoreAvg = exports.DataJumpScoreMax = exports.DataJumpScoreMin = exports.DataJumpRotationsAvg = exports.DataJumpRotationsMax = exports.DataJumpRotationsMin = exports.DataJumpSpeedAvg = exports.DataJumpSpeedMax = exports.DataJumpSpeedMin = exports.DataJumpDistanceAvg = exports.DataJumpDistanceMax = exports.DataJumpDistanceMin = exports.DataJumpHangTimeAvg = exports.DataJumpHangTimeMax = exports.DataJumpHangTimeMin = void 0;
|
|
4
|
+
const data_number_1 = require("./data.number");
|
|
5
|
+
class DataJumpHangTimeMin extends data_number_1.DataNumber {
|
|
6
|
+
constructor(value) { super(value); }
|
|
7
|
+
}
|
|
8
|
+
exports.DataJumpHangTimeMin = DataJumpHangTimeMin;
|
|
9
|
+
DataJumpHangTimeMin.type = 'Jump Hang Time Min';
|
|
10
|
+
DataJumpHangTimeMin.unit = 's';
|
|
11
|
+
class DataJumpHangTimeMax extends data_number_1.DataNumber {
|
|
12
|
+
constructor(value) { super(value); }
|
|
13
|
+
}
|
|
14
|
+
exports.DataJumpHangTimeMax = DataJumpHangTimeMax;
|
|
15
|
+
DataJumpHangTimeMax.type = 'Jump Hang Time Max';
|
|
16
|
+
DataJumpHangTimeMax.unit = 's';
|
|
17
|
+
class DataJumpHangTimeAvg extends data_number_1.DataNumber {
|
|
18
|
+
constructor(value) { super(value); }
|
|
19
|
+
}
|
|
20
|
+
exports.DataJumpHangTimeAvg = DataJumpHangTimeAvg;
|
|
21
|
+
DataJumpHangTimeAvg.type = 'Jump Hang Time Avg';
|
|
22
|
+
DataJumpHangTimeAvg.unit = 's';
|
|
23
|
+
class DataJumpDistanceMin extends data_number_1.DataNumber {
|
|
24
|
+
constructor(value) { super(value); }
|
|
25
|
+
}
|
|
26
|
+
exports.DataJumpDistanceMin = DataJumpDistanceMin;
|
|
27
|
+
DataJumpDistanceMin.type = 'Jump Distance Min';
|
|
28
|
+
DataJumpDistanceMin.unit = 'm';
|
|
29
|
+
class DataJumpDistanceMax extends data_number_1.DataNumber {
|
|
30
|
+
constructor(value) { super(value); }
|
|
31
|
+
}
|
|
32
|
+
exports.DataJumpDistanceMax = DataJumpDistanceMax;
|
|
33
|
+
DataJumpDistanceMax.type = 'Jump Distance Max';
|
|
34
|
+
DataJumpDistanceMax.unit = 'm';
|
|
35
|
+
class DataJumpDistanceAvg extends data_number_1.DataNumber {
|
|
36
|
+
constructor(value) { super(value); }
|
|
37
|
+
}
|
|
38
|
+
exports.DataJumpDistanceAvg = DataJumpDistanceAvg;
|
|
39
|
+
DataJumpDistanceAvg.type = 'Jump Distance Avg';
|
|
40
|
+
DataJumpDistanceAvg.unit = 'm';
|
|
41
|
+
class DataJumpSpeedMin extends data_number_1.DataNumber {
|
|
42
|
+
constructor(value) { super(value); }
|
|
43
|
+
}
|
|
44
|
+
exports.DataJumpSpeedMin = DataJumpSpeedMin;
|
|
45
|
+
DataJumpSpeedMin.type = 'Jump Speed Min';
|
|
46
|
+
DataJumpSpeedMin.unit = 'm/s';
|
|
47
|
+
class DataJumpSpeedMax extends data_number_1.DataNumber {
|
|
48
|
+
constructor(value) { super(value); }
|
|
49
|
+
}
|
|
50
|
+
exports.DataJumpSpeedMax = DataJumpSpeedMax;
|
|
51
|
+
DataJumpSpeedMax.type = 'Jump Speed Max';
|
|
52
|
+
DataJumpSpeedMax.unit = 'm/s';
|
|
53
|
+
class DataJumpSpeedAvg extends data_number_1.DataNumber {
|
|
54
|
+
constructor(value) { super(value); }
|
|
55
|
+
}
|
|
56
|
+
exports.DataJumpSpeedAvg = DataJumpSpeedAvg;
|
|
57
|
+
DataJumpSpeedAvg.type = 'Jump Speed Avg';
|
|
58
|
+
DataJumpSpeedAvg.unit = 'm/s';
|
|
59
|
+
class DataJumpRotationsMin extends data_number_1.DataNumber {
|
|
60
|
+
constructor(value) { super(value); }
|
|
61
|
+
}
|
|
62
|
+
exports.DataJumpRotationsMin = DataJumpRotationsMin;
|
|
63
|
+
DataJumpRotationsMin.type = 'Jump Rotations Min';
|
|
64
|
+
DataJumpRotationsMin.unit = '';
|
|
65
|
+
class DataJumpRotationsMax extends data_number_1.DataNumber {
|
|
66
|
+
constructor(value) { super(value); }
|
|
67
|
+
}
|
|
68
|
+
exports.DataJumpRotationsMax = DataJumpRotationsMax;
|
|
69
|
+
DataJumpRotationsMax.type = 'Jump Rotations Max';
|
|
70
|
+
DataJumpRotationsMax.unit = '';
|
|
71
|
+
class DataJumpRotationsAvg extends data_number_1.DataNumber {
|
|
72
|
+
constructor(value) { super(value); }
|
|
73
|
+
}
|
|
74
|
+
exports.DataJumpRotationsAvg = DataJumpRotationsAvg;
|
|
75
|
+
DataJumpRotationsAvg.type = 'Jump Rotations Avg';
|
|
76
|
+
DataJumpRotationsAvg.unit = '';
|
|
77
|
+
class DataJumpScoreMin extends data_number_1.DataNumber {
|
|
78
|
+
constructor(value) { super(value); }
|
|
79
|
+
}
|
|
80
|
+
exports.DataJumpScoreMin = DataJumpScoreMin;
|
|
81
|
+
DataJumpScoreMin.type = 'Jump Score Min';
|
|
82
|
+
DataJumpScoreMin.unit = '';
|
|
83
|
+
class DataJumpScoreMax extends data_number_1.DataNumber {
|
|
84
|
+
constructor(value) { super(value); }
|
|
85
|
+
}
|
|
86
|
+
exports.DataJumpScoreMax = DataJumpScoreMax;
|
|
87
|
+
DataJumpScoreMax.type = 'Jump Score Max';
|
|
88
|
+
DataJumpScoreMax.unit = '';
|
|
89
|
+
class DataJumpScoreAvg extends data_number_1.DataNumber {
|
|
90
|
+
constructor(value) { super(value); }
|
|
91
|
+
}
|
|
92
|
+
exports.DataJumpScoreAvg = DataJumpScoreAvg;
|
|
93
|
+
DataJumpScoreAvg.type = 'Jump Score Avg';
|
|
94
|
+
DataJumpScoreAvg.unit = '';
|
|
95
|
+
class DataJumpHeightMin extends data_number_1.DataNumber {
|
|
96
|
+
constructor(value) { super(value); }
|
|
97
|
+
}
|
|
98
|
+
exports.DataJumpHeightMin = DataJumpHeightMin;
|
|
99
|
+
DataJumpHeightMin.type = 'Jump Height Min';
|
|
100
|
+
DataJumpHeightMin.unit = 'm';
|
|
101
|
+
class DataJumpHeightMax extends data_number_1.DataNumber {
|
|
102
|
+
constructor(value) { super(value); }
|
|
103
|
+
}
|
|
104
|
+
exports.DataJumpHeightMax = DataJumpHeightMax;
|
|
105
|
+
DataJumpHeightMax.type = 'Jump Height Max';
|
|
106
|
+
DataJumpHeightMax.unit = 'm';
|
|
107
|
+
class DataJumpHeightAvg extends data_number_1.DataNumber {
|
|
108
|
+
constructor(value) { super(value); }
|
|
109
|
+
}
|
|
110
|
+
exports.DataJumpHeightAvg = DataJumpHeightAvg;
|
|
111
|
+
DataJumpHeightAvg.type = 'Jump Height Avg';
|
|
112
|
+
DataJumpHeightAvg.unit = 'm';
|
|
@@ -3,5 +3,8 @@ import { RiderPosition } from './data.cycling-position';
|
|
|
3
3
|
export declare class DataRiderPositionChangeEvent extends DataEvent {
|
|
4
4
|
static type: string;
|
|
5
5
|
positionChange: RiderPosition;
|
|
6
|
-
constructor(
|
|
6
|
+
constructor(indexOrObj: number | {
|
|
7
|
+
index: number;
|
|
8
|
+
positionChange: RiderPosition;
|
|
9
|
+
}, positionChange?: RiderPosition);
|
|
7
10
|
}
|
|
@@ -3,9 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DataRiderPositionChangeEvent = void 0;
|
|
4
4
|
const data_event_1 = require("./data.event");
|
|
5
5
|
class DataRiderPositionChangeEvent extends data_event_1.DataEvent {
|
|
6
|
-
constructor(
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
constructor(indexOrObj, positionChange) {
|
|
7
|
+
if (typeof indexOrObj === 'object') {
|
|
8
|
+
super(indexOrObj.index);
|
|
9
|
+
this.positionChange = indexOrObj.positionChange;
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
super(indexOrObj);
|
|
13
|
+
this.positionChange = positionChange;
|
|
14
|
+
}
|
|
9
15
|
}
|
|
10
16
|
}
|
|
11
17
|
exports.DataRiderPositionChangeEvent = DataRiderPositionChangeEvent;
|
|
@@ -213,6 +213,7 @@ const data_fitness_age_1 = require("./data.fitness-age");
|
|
|
213
213
|
const data_max_hr_setting_1 = require("./data.max-hr-setting");
|
|
214
214
|
const data_depth_1 = require("./data.depth");
|
|
215
215
|
const data_depth_max_1 = require("./data.depth-max");
|
|
216
|
+
const data_jump_stats_1 = require("./data.jump-stats");
|
|
216
217
|
// "Total Training effect" was renamed to "Aerobic Training Effect" in sports-lib 6.0
|
|
217
218
|
class DataTotalTrainingEffectLegacy extends data_aerobic_training_effect_1.DataAerobicTrainingEffect {
|
|
218
219
|
}
|
|
@@ -500,6 +501,8 @@ exports.DataStore = {
|
|
|
500
501
|
DataGrit: data_grit_1.DataGrit,
|
|
501
502
|
DataJumpCount: data_jump_count_1.DataJumpCount,
|
|
502
503
|
DataJumpEvent: data_jump_event_1.DataJumpEvent,
|
|
504
|
+
DataScore: data_jump_event_1.DataScore,
|
|
505
|
+
DataRotations: data_jump_event_1.DataRotations,
|
|
503
506
|
DataLeftPedalSmoothness: data_left_pedal_smoothness_1.DataLeftPedalSmoothness,
|
|
504
507
|
DataLeftTorqueEffectiveness: data_left_torque_effectiveness_1.DataLeftTorqueEffectiveness,
|
|
505
508
|
DataMaxRespirationRate: data_max_respiration_rate_1.DataMaxRespirationRate,
|
|
@@ -524,7 +527,25 @@ exports.DataStore = {
|
|
|
524
527
|
DataFitnessAge: data_fitness_age_1.DataFitnessAge,
|
|
525
528
|
DataMaxHRSetting: data_max_hr_setting_1.DataMaxHRSetting,
|
|
526
529
|
DataDepth: data_depth_1.DataDepth,
|
|
527
|
-
DataDepthMax: data_depth_max_1.DataDepthMax
|
|
530
|
+
DataDepthMax: data_depth_max_1.DataDepthMax,
|
|
531
|
+
DataJumpHangTimeMin: data_jump_stats_1.DataJumpHangTimeMin,
|
|
532
|
+
DataJumpHangTimeMax: data_jump_stats_1.DataJumpHangTimeMax,
|
|
533
|
+
DataJumpHangTimeAvg: data_jump_stats_1.DataJumpHangTimeAvg,
|
|
534
|
+
DataJumpDistanceMin: data_jump_stats_1.DataJumpDistanceMin,
|
|
535
|
+
DataJumpDistanceMax: data_jump_stats_1.DataJumpDistanceMax,
|
|
536
|
+
DataJumpDistanceAvg: data_jump_stats_1.DataJumpDistanceAvg,
|
|
537
|
+
DataJumpSpeedMin: data_jump_stats_1.DataJumpSpeedMin,
|
|
538
|
+
DataJumpSpeedMax: data_jump_stats_1.DataJumpSpeedMax,
|
|
539
|
+
DataJumpSpeedAvg: data_jump_stats_1.DataJumpSpeedAvg,
|
|
540
|
+
DataJumpRotationsMin: data_jump_stats_1.DataJumpRotationsMin,
|
|
541
|
+
DataJumpRotationsMax: data_jump_stats_1.DataJumpRotationsMax,
|
|
542
|
+
DataJumpRotationsAvg: data_jump_stats_1.DataJumpRotationsAvg,
|
|
543
|
+
DataJumpScoreMin: data_jump_stats_1.DataJumpScoreMin,
|
|
544
|
+
DataJumpScoreMax: data_jump_stats_1.DataJumpScoreMax,
|
|
545
|
+
DataJumpScoreAvg: data_jump_stats_1.DataJumpScoreAvg,
|
|
546
|
+
DataJumpHeightMin: data_jump_stats_1.DataJumpHeightMin,
|
|
547
|
+
DataJumpHeightMax: data_jump_stats_1.DataJumpHeightMax,
|
|
548
|
+
DataJumpHeightAvg: data_jump_stats_1.DataJumpHeightAvg
|
|
528
549
|
};
|
|
529
550
|
class DynamicDataLoader {
|
|
530
551
|
static getDataInstanceFromDataType(dataType, opts) {
|