@glandais/vcyclist-engine 2.0.0 → 3.0.0
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/README.md +91 -25
- package/kotlin-kotlin-stdlib.js +248 -202
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlinx-atomicfu.js +9 -9
- package/kotlinx-coroutines-core.js +58 -58
- package/kotlinx-serialization-kotlinx-serialization-core.js +1 -1
- package/package.json +1 -1
- package/vcyclist-elevation.js +581 -518
- package/vcyclist-elevation.js.map +1 -1
- package/vcyclist-engine.d.ts +8 -3
- package/vcyclist-engine.js +763 -627
- package/vcyclist-engine.js.map +1 -1
- package/vcyclist-fit.js +440 -285
- package/vcyclist-fit.js.map +1 -1
- package/vcyclist-gpx.js +995 -760
- package/vcyclist-gpx.js.map +1 -1
- package/xmlutil-core.js +2449 -2449
package/vcyclist-engine.js
CHANGED
|
@@ -25,78 +25,89 @@
|
|
|
25
25
|
'use strict';
|
|
26
26
|
//region block: imports
|
|
27
27
|
var imul = Math.imul;
|
|
28
|
-
var
|
|
29
|
-
var
|
|
28
|
+
var hypot = Math.hypot;
|
|
29
|
+
var sign = Math.sign;
|
|
30
|
+
var protoOf = kotlin_kotlin.$_$.a6;
|
|
31
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.m5;
|
|
30
32
|
var VOID = kotlin_kotlin.$_$.a;
|
|
31
|
-
var getNumberHashCode = kotlin_kotlin.$_$.
|
|
32
|
-
var equals = kotlin_kotlin.$_$.
|
|
33
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
34
|
-
var toString = kotlin_kotlin.$_$.
|
|
35
|
-
var hashCode = kotlin_kotlin.$_$.
|
|
36
|
-
var getBooleanHashCode = kotlin_kotlin.$_$.
|
|
37
|
-
var CoroutineImpl = kotlin_kotlin.$_$.
|
|
33
|
+
var getNumberHashCode = kotlin_kotlin.$_$.h5;
|
|
34
|
+
var equals = kotlin_kotlin.$_$.f5;
|
|
35
|
+
var initMetadataForClass = kotlin_kotlin.$_$.l5;
|
|
36
|
+
var toString = kotlin_kotlin.$_$.c6;
|
|
37
|
+
var hashCode = kotlin_kotlin.$_$.k5;
|
|
38
|
+
var getBooleanHashCode = kotlin_kotlin.$_$.g5;
|
|
39
|
+
var CoroutineImpl = kotlin_kotlin.$_$.f4;
|
|
38
40
|
var PointPerDistance_instance = kotlin_io_github_glandais_gpx.$_$.h;
|
|
39
41
|
var ElevationStep_instance = kotlin_io_github_glandais_gpx.$_$.e;
|
|
40
|
-
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.
|
|
42
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.q3;
|
|
41
43
|
var Unit_instance = kotlin_kotlin.$_$.t;
|
|
42
44
|
var PointPerSecond_instance = kotlin_io_github_glandais_gpx.$_$.i;
|
|
43
45
|
var PathSimplifier_instance = kotlin_io_github_glandais_gpx.$_$.f;
|
|
44
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.
|
|
45
|
-
var initMetadataForObject = kotlin_kotlin.$_$.
|
|
46
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.n5;
|
|
47
|
+
var initMetadataForObject = kotlin_kotlin.$_$.r5;
|
|
46
48
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.x;
|
|
47
49
|
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.m1;
|
|
48
50
|
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.w;
|
|
49
51
|
var last = kotlin_kotlin.$_$.y2;
|
|
50
|
-
var toIntArray = kotlin_kotlin.$_$.
|
|
51
|
-
var sortedWith = kotlin_kotlin.$_$.
|
|
52
|
-
var toMutableList = kotlin_kotlin.$_$.
|
|
52
|
+
var toIntArray = kotlin_kotlin.$_$.j3;
|
|
53
|
+
var sortedWith = kotlin_kotlin.$_$.h3;
|
|
54
|
+
var toMutableList = kotlin_kotlin.$_$.m3;
|
|
53
55
|
var first = kotlin_kotlin.$_$.s2;
|
|
54
56
|
var removeAll = kotlin_kotlin.$_$.c3;
|
|
55
|
-
var numberRangeToNumber = kotlin_kotlin.$_$.
|
|
57
|
+
var numberRangeToNumber = kotlin_kotlin.$_$.w5;
|
|
56
58
|
var collectionSizeOrDefault = kotlin_kotlin.$_$.j2;
|
|
57
|
-
var Vector3D = kotlin_io_github_glandais_elevation.$_$.
|
|
59
|
+
var Vector3D = kotlin_io_github_glandais_elevation.$_$.g;
|
|
58
60
|
var emptyList = kotlin_kotlin.$_$.p2;
|
|
59
|
-
var coerceIn = kotlin_kotlin.$_$.
|
|
61
|
+
var coerceIn = kotlin_kotlin.$_$.j6;
|
|
60
62
|
var DouglasPeucker_instance = kotlin_io_github_glandais_elevation.$_$.b;
|
|
61
|
-
var FunctionAdapter = kotlin_kotlin.$_$.
|
|
62
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
63
|
-
var Comparator = kotlin_kotlin.$_$.
|
|
64
|
-
var compareValues = kotlin_kotlin.$_$.
|
|
65
|
-
var until = kotlin_kotlin.$_$.
|
|
63
|
+
var FunctionAdapter = kotlin_kotlin.$_$.v4;
|
|
64
|
+
var isInterface = kotlin_kotlin.$_$.t5;
|
|
65
|
+
var Comparator = kotlin_kotlin.$_$.y7;
|
|
66
|
+
var compareValues = kotlin_kotlin.$_$.o3;
|
|
67
|
+
var until = kotlin_kotlin.$_$.n6;
|
|
68
|
+
var Pair = kotlin_kotlin.$_$.f8;
|
|
69
|
+
var listOf = kotlin_kotlin.$_$.z2;
|
|
66
70
|
var Default_getInstance = kotlin_kotlin.$_$.p;
|
|
67
|
-
var PointField_TEMPERATURE_getInstance = kotlin_io_github_glandais_gpx.$_$.
|
|
68
|
-
var isNaN_0 = kotlin_kotlin.$_$.
|
|
69
|
-
var get_entries = kotlin_io_github_glandais_gpx.$_$.
|
|
70
|
-
var Path = kotlin_io_github_glandais_gpx.$_$.
|
|
71
|
+
var PointField_TEMPERATURE_getInstance = kotlin_io_github_glandais_gpx.$_$.l;
|
|
72
|
+
var isNaN_0 = kotlin_kotlin.$_$.p8;
|
|
73
|
+
var get_entries = kotlin_io_github_glandais_gpx.$_$.u;
|
|
74
|
+
var Path = kotlin_io_github_glandais_gpx.$_$.t;
|
|
71
75
|
var GpxParser_instance = kotlin_io_github_glandais_gpx.$_$.a;
|
|
72
76
|
var copyToArray = kotlin_kotlin.$_$.o2;
|
|
73
|
-
var firstTrackAsPath = kotlin_io_github_glandais_gpx.$_$.
|
|
74
|
-
var tracksAsPaths = kotlin_io_github_glandais_gpx.$_$.
|
|
75
|
-
var segmentsAsPaths = kotlin_io_github_glandais_gpx.$_$.
|
|
77
|
+
var firstTrackAsPath = kotlin_io_github_glandais_gpx.$_$.n;
|
|
78
|
+
var tracksAsPaths = kotlin_io_github_glandais_gpx.$_$.q;
|
|
79
|
+
var segmentsAsPaths = kotlin_io_github_glandais_gpx.$_$.o;
|
|
80
|
+
var GpxPathKind_TRACK_getInstance = kotlin_io_github_glandais_gpx.$_$.k;
|
|
81
|
+
var setOf = kotlin_kotlin.$_$.f3;
|
|
82
|
+
var GpxPathKind_ROUTE_getInstance = kotlin_io_github_glandais_gpx.$_$.j;
|
|
76
83
|
var GpxWriter_instance = kotlin_io_github_glandais_gpx.$_$.b;
|
|
77
|
-
var toList = kotlin_kotlin.$_$.
|
|
78
|
-
var toGpxDocument = kotlin_io_github_glandais_gpx.$_$.
|
|
84
|
+
var toList = kotlin_kotlin.$_$.l3;
|
|
85
|
+
var toGpxDocument = kotlin_io_github_glandais_gpx.$_$.p;
|
|
79
86
|
var Companion_getInstance = kotlin_kotlin.$_$.r;
|
|
80
|
-
var numberToLong = kotlin_kotlin.$_$.
|
|
87
|
+
var numberToLong = kotlin_kotlin.$_$.s4;
|
|
81
88
|
var GlobalScope_instance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a;
|
|
82
89
|
var promise = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j;
|
|
83
90
|
var Companion_getInstance_0 = kotlin_io_github_glandais_gpx.$_$.g;
|
|
84
91
|
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.o1;
|
|
85
92
|
var CsvWriter_instance = kotlin_io_github_glandais_gpx.$_$.c;
|
|
86
|
-
var firstOrNull = kotlin_kotlin.$_$.
|
|
93
|
+
var firstOrNull = kotlin_kotlin.$_$.b7;
|
|
87
94
|
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.b;
|
|
88
|
-
var Char = kotlin_kotlin.$_$.
|
|
89
|
-
var CsvOptions = kotlin_io_github_glandais_gpx.$_$.
|
|
95
|
+
var Char = kotlin_kotlin.$_$.x7;
|
|
96
|
+
var CsvOptions = kotlin_io_github_glandais_gpx.$_$.r;
|
|
90
97
|
var JsonWriter_instance = kotlin_io_github_glandais_gpx.$_$.d;
|
|
91
|
-
var JsonOptions = kotlin_io_github_glandais_gpx.$_$.
|
|
98
|
+
var JsonOptions = kotlin_io_github_glandais_gpx.$_$.s;
|
|
92
99
|
var toFitBytes = kotlin_io_github_glandais_fit.$_$.a;
|
|
93
|
-
var
|
|
94
|
-
var
|
|
95
|
-
var
|
|
100
|
+
var Companion_getInstance_1 = kotlin_kotlin.$_$.q;
|
|
101
|
+
var DurationUnit_MILLISECONDS_getInstance = kotlin_kotlin.$_$.u;
|
|
102
|
+
var toDuration = kotlin_kotlin.$_$.w7;
|
|
103
|
+
var toFitBytes_0 = kotlin_io_github_glandais_fit.$_$.b;
|
|
104
|
+
var toNumber = kotlin_kotlin.$_$.u4;
|
|
105
|
+
var GpxWaypoint = kotlin_io_github_glandais_gpx.$_$.m;
|
|
106
|
+
var THROW_CCE = kotlin_kotlin.$_$.i8;
|
|
96
107
|
var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h;
|
|
97
|
-
var ElevationProvider = kotlin_io_github_glandais_elevation.$_$.
|
|
98
|
-
var initMetadataForLambda = kotlin_kotlin.$_$.
|
|
99
|
-
var constructCallableReference = kotlin_kotlin.$_$.
|
|
108
|
+
var ElevationProvider = kotlin_io_github_glandais_elevation.$_$.d;
|
|
109
|
+
var initMetadataForLambda = kotlin_kotlin.$_$.q5;
|
|
110
|
+
var constructCallableReference = kotlin_kotlin.$_$.d5;
|
|
100
111
|
//endregion
|
|
101
112
|
//region block: pre-declaration
|
|
102
113
|
initMetadataForCompanion(Companion);
|
|
@@ -147,36 +158,36 @@
|
|
|
147
158
|
//endregion
|
|
148
159
|
function Companion() {
|
|
149
160
|
Companion_instance = this;
|
|
150
|
-
this.
|
|
161
|
+
this.y1y_1 = new Bike();
|
|
151
162
|
}
|
|
152
163
|
var Companion_instance;
|
|
153
|
-
function
|
|
164
|
+
function Companion_getInstance_2() {
|
|
154
165
|
if (Companion_instance == null)
|
|
155
166
|
new Companion();
|
|
156
167
|
return Companion_instance;
|
|
157
168
|
}
|
|
158
169
|
function Bike(crr, inertiaFront, inertiaRear, wheelRadiusM, efficiency) {
|
|
159
|
-
|
|
170
|
+
Companion_getInstance_2();
|
|
160
171
|
crr = crr === VOID ? 0.004 : crr;
|
|
161
172
|
inertiaFront = inertiaFront === VOID ? 0.05 : inertiaFront;
|
|
162
173
|
inertiaRear = inertiaRear === VOID ? 0.07 : inertiaRear;
|
|
163
174
|
wheelRadiusM = wheelRadiusM === VOID ? 0.7 : wheelRadiusM;
|
|
164
175
|
efficiency = efficiency === VOID ? 0.976 : efficiency;
|
|
165
|
-
this.
|
|
166
|
-
this.
|
|
167
|
-
this.
|
|
168
|
-
this.
|
|
169
|
-
this.
|
|
176
|
+
this.z1y_1 = crr;
|
|
177
|
+
this.a1z_1 = inertiaFront;
|
|
178
|
+
this.b1z_1 = inertiaRear;
|
|
179
|
+
this.c1z_1 = wheelRadiusM;
|
|
180
|
+
this.d1z_1 = efficiency;
|
|
170
181
|
}
|
|
171
182
|
protoOf(Bike).toString = function () {
|
|
172
|
-
return 'Bike(crr=' + this.
|
|
183
|
+
return 'Bike(crr=' + this.z1y_1 + ', inertiaFront=' + this.a1z_1 + ', inertiaRear=' + this.b1z_1 + ', wheelRadiusM=' + this.c1z_1 + ', efficiency=' + this.d1z_1 + ')';
|
|
173
184
|
};
|
|
174
185
|
protoOf(Bike).hashCode = function () {
|
|
175
|
-
var result = getNumberHashCode(this.
|
|
176
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
177
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
178
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
179
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
186
|
+
var result = getNumberHashCode(this.z1y_1);
|
|
187
|
+
result = imul(result, 31) + getNumberHashCode(this.a1z_1) | 0;
|
|
188
|
+
result = imul(result, 31) + getNumberHashCode(this.b1z_1) | 0;
|
|
189
|
+
result = imul(result, 31) + getNumberHashCode(this.c1z_1) | 0;
|
|
190
|
+
result = imul(result, 31) + getNumberHashCode(this.d1z_1) | 0;
|
|
180
191
|
return result;
|
|
181
192
|
};
|
|
182
193
|
protoOf(Bike).equals = function (other) {
|
|
@@ -184,41 +195,41 @@
|
|
|
184
195
|
return true;
|
|
185
196
|
if (!(other instanceof Bike))
|
|
186
197
|
return false;
|
|
187
|
-
if (!equals(this.
|
|
198
|
+
if (!equals(this.z1y_1, other.z1y_1))
|
|
188
199
|
return false;
|
|
189
|
-
if (!equals(this.
|
|
200
|
+
if (!equals(this.a1z_1, other.a1z_1))
|
|
190
201
|
return false;
|
|
191
|
-
if (!equals(this.
|
|
202
|
+
if (!equals(this.b1z_1, other.b1z_1))
|
|
192
203
|
return false;
|
|
193
|
-
if (!equals(this.
|
|
204
|
+
if (!equals(this.c1z_1, other.c1z_1))
|
|
194
205
|
return false;
|
|
195
|
-
if (!equals(this.
|
|
206
|
+
if (!equals(this.d1z_1, other.d1z_1))
|
|
196
207
|
return false;
|
|
197
208
|
return true;
|
|
198
209
|
};
|
|
199
210
|
function Course(path, cyclist, bike) {
|
|
200
|
-
cyclist = cyclist === VOID ?
|
|
201
|
-
bike = bike === VOID ?
|
|
202
|
-
this.
|
|
203
|
-
this.
|
|
204
|
-
this.
|
|
211
|
+
cyclist = cyclist === VOID ? Companion_getInstance_4().e1z_1 : cyclist;
|
|
212
|
+
bike = bike === VOID ? Companion_getInstance_2().y1y_1 : bike;
|
|
213
|
+
this.f1z_1 = path;
|
|
214
|
+
this.g1z_1 = cyclist;
|
|
215
|
+
this.h1z_1 = bike;
|
|
205
216
|
}
|
|
206
|
-
protoOf(Course).
|
|
217
|
+
protoOf(Course).i1z = function (path, cyclist, bike) {
|
|
207
218
|
return new Course(path, cyclist, bike);
|
|
208
219
|
};
|
|
209
|
-
protoOf(Course).
|
|
210
|
-
path = path === VOID ? this.
|
|
211
|
-
cyclist = cyclist === VOID ? this.
|
|
212
|
-
bike = bike === VOID ? this.
|
|
213
|
-
return $super === VOID ? this.
|
|
220
|
+
protoOf(Course).j1z = function (path, cyclist, bike, $super) {
|
|
221
|
+
path = path === VOID ? this.f1z_1 : path;
|
|
222
|
+
cyclist = cyclist === VOID ? this.g1z_1 : cyclist;
|
|
223
|
+
bike = bike === VOID ? this.h1z_1 : bike;
|
|
224
|
+
return $super === VOID ? this.i1z(path, cyclist, bike) : $super.i1z.call(this, path, cyclist, bike);
|
|
214
225
|
};
|
|
215
226
|
protoOf(Course).toString = function () {
|
|
216
|
-
return 'Course(path=' + toString(this.
|
|
227
|
+
return 'Course(path=' + toString(this.f1z_1) + ', cyclist=' + this.g1z_1.toString() + ', bike=' + this.h1z_1.toString() + ')';
|
|
217
228
|
};
|
|
218
229
|
protoOf(Course).hashCode = function () {
|
|
219
|
-
var result = hashCode(this.
|
|
220
|
-
result = imul(result, 31) + this.
|
|
221
|
-
result = imul(result, 31) + this.
|
|
230
|
+
var result = hashCode(this.f1z_1);
|
|
231
|
+
result = imul(result, 31) + this.g1z_1.hashCode() | 0;
|
|
232
|
+
result = imul(result, 31) + this.h1z_1.hashCode() | 0;
|
|
222
233
|
return result;
|
|
223
234
|
};
|
|
224
235
|
protoOf(Course).equals = function (other) {
|
|
@@ -226,65 +237,65 @@
|
|
|
226
237
|
return true;
|
|
227
238
|
if (!(other instanceof Course))
|
|
228
239
|
return false;
|
|
229
|
-
if (!equals(this.
|
|
240
|
+
if (!equals(this.f1z_1, other.f1z_1))
|
|
230
241
|
return false;
|
|
231
|
-
if (!this.
|
|
242
|
+
if (!this.g1z_1.equals(other.g1z_1))
|
|
232
243
|
return false;
|
|
233
|
-
if (!this.
|
|
244
|
+
if (!this.h1z_1.equals(other.h1z_1))
|
|
234
245
|
return false;
|
|
235
246
|
return true;
|
|
236
247
|
};
|
|
237
248
|
function Companion_0() {
|
|
238
249
|
Companion_instance_0 = this;
|
|
239
|
-
this.
|
|
250
|
+
this.k1z_1 = new PowerProviderConstant(280.0);
|
|
240
251
|
}
|
|
241
252
|
var Companion_instance_0;
|
|
242
|
-
function
|
|
253
|
+
function Companion_getInstance_3() {
|
|
243
254
|
if (Companion_instance_0 == null)
|
|
244
255
|
new Companion_0();
|
|
245
256
|
return Companion_instance_0;
|
|
246
257
|
}
|
|
247
258
|
function CoursePhysics(course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider) {
|
|
248
|
-
|
|
259
|
+
Companion_getInstance_3();
|
|
249
260
|
rhoProvider = rhoProvider === VOID ? RhoProviderDefault_instance : rhoProvider;
|
|
250
261
|
aeroProvider = aeroProvider === VOID ? AeroProviderConstant_instance : aeroProvider;
|
|
251
262
|
windProvider = windProvider === VOID ? WindProviderNone_instance : windProvider;
|
|
252
|
-
cyclistPowerProvider = cyclistPowerProvider === VOID ?
|
|
253
|
-
this.
|
|
254
|
-
this.
|
|
255
|
-
this.
|
|
256
|
-
this.
|
|
257
|
-
this.
|
|
263
|
+
cyclistPowerProvider = cyclistPowerProvider === VOID ? Companion_getInstance_3().k1z_1 : cyclistPowerProvider;
|
|
264
|
+
this.l1z_1 = course;
|
|
265
|
+
this.m1z_1 = rhoProvider;
|
|
266
|
+
this.n1z_1 = aeroProvider;
|
|
267
|
+
this.o1z_1 = windProvider;
|
|
268
|
+
this.p1z_1 = cyclistPowerProvider;
|
|
258
269
|
}
|
|
259
|
-
protoOf(CoursePhysics).
|
|
260
|
-
return this.
|
|
270
|
+
protoOf(CoursePhysics).q1z = function () {
|
|
271
|
+
return this.l1z_1.f1z_1;
|
|
261
272
|
};
|
|
262
|
-
protoOf(CoursePhysics).
|
|
263
|
-
return this.
|
|
273
|
+
protoOf(CoursePhysics).r1z = function () {
|
|
274
|
+
return this.l1z_1.g1z_1;
|
|
264
275
|
};
|
|
265
|
-
protoOf(CoursePhysics).
|
|
266
|
-
return this.
|
|
276
|
+
protoOf(CoursePhysics).s1z = function () {
|
|
277
|
+
return this.l1z_1.h1z_1;
|
|
267
278
|
};
|
|
268
|
-
protoOf(CoursePhysics).
|
|
279
|
+
protoOf(CoursePhysics).t1z = function (course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider) {
|
|
269
280
|
return new CoursePhysics(course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider);
|
|
270
281
|
};
|
|
271
|
-
protoOf(CoursePhysics).
|
|
272
|
-
course = course === VOID ? this.
|
|
273
|
-
rhoProvider = rhoProvider === VOID ? this.
|
|
274
|
-
aeroProvider = aeroProvider === VOID ? this.
|
|
275
|
-
windProvider = windProvider === VOID ? this.
|
|
276
|
-
cyclistPowerProvider = cyclistPowerProvider === VOID ? this.
|
|
277
|
-
return $super === VOID ? this.
|
|
282
|
+
protoOf(CoursePhysics).u1z = function (course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider, $super) {
|
|
283
|
+
course = course === VOID ? this.l1z_1 : course;
|
|
284
|
+
rhoProvider = rhoProvider === VOID ? this.m1z_1 : rhoProvider;
|
|
285
|
+
aeroProvider = aeroProvider === VOID ? this.n1z_1 : aeroProvider;
|
|
286
|
+
windProvider = windProvider === VOID ? this.o1z_1 : windProvider;
|
|
287
|
+
cyclistPowerProvider = cyclistPowerProvider === VOID ? this.p1z_1 : cyclistPowerProvider;
|
|
288
|
+
return $super === VOID ? this.t1z(course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider) : $super.t1z.call(this, course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider);
|
|
278
289
|
};
|
|
279
290
|
protoOf(CoursePhysics).toString = function () {
|
|
280
|
-
return 'CoursePhysics(course=' + this.
|
|
291
|
+
return 'CoursePhysics(course=' + this.l1z_1.toString() + ', rhoProvider=' + toString(this.m1z_1) + ', aeroProvider=' + toString(this.n1z_1) + ', windProvider=' + toString(this.o1z_1) + ', cyclistPowerProvider=' + toString(this.p1z_1) + ')';
|
|
281
292
|
};
|
|
282
293
|
protoOf(CoursePhysics).hashCode = function () {
|
|
283
|
-
var result = this.
|
|
284
|
-
result = imul(result, 31) + hashCode(this.
|
|
285
|
-
result = imul(result, 31) + hashCode(this.
|
|
286
|
-
result = imul(result, 31) + hashCode(this.
|
|
287
|
-
result = imul(result, 31) + hashCode(this.
|
|
294
|
+
var result = this.l1z_1.hashCode();
|
|
295
|
+
result = imul(result, 31) + hashCode(this.m1z_1) | 0;
|
|
296
|
+
result = imul(result, 31) + hashCode(this.n1z_1) | 0;
|
|
297
|
+
result = imul(result, 31) + hashCode(this.o1z_1) | 0;
|
|
298
|
+
result = imul(result, 31) + hashCode(this.p1z_1) | 0;
|
|
288
299
|
return result;
|
|
289
300
|
};
|
|
290
301
|
protoOf(CoursePhysics).equals = function (other) {
|
|
@@ -292,64 +303,64 @@
|
|
|
292
303
|
return true;
|
|
293
304
|
if (!(other instanceof CoursePhysics))
|
|
294
305
|
return false;
|
|
295
|
-
if (!this.
|
|
306
|
+
if (!this.l1z_1.equals(other.l1z_1))
|
|
296
307
|
return false;
|
|
297
|
-
if (!equals(this.
|
|
308
|
+
if (!equals(this.m1z_1, other.m1z_1))
|
|
298
309
|
return false;
|
|
299
|
-
if (!equals(this.
|
|
310
|
+
if (!equals(this.n1z_1, other.n1z_1))
|
|
300
311
|
return false;
|
|
301
|
-
if (!equals(this.
|
|
312
|
+
if (!equals(this.o1z_1, other.o1z_1))
|
|
302
313
|
return false;
|
|
303
|
-
if (!equals(this.
|
|
314
|
+
if (!equals(this.p1z_1, other.p1z_1))
|
|
304
315
|
return false;
|
|
305
316
|
return true;
|
|
306
317
|
};
|
|
307
318
|
function Companion_1() {
|
|
308
319
|
Companion_instance_1 = this;
|
|
309
|
-
this.
|
|
320
|
+
this.e1z_1 = new Cyclist();
|
|
310
321
|
}
|
|
311
322
|
var Companion_instance_1;
|
|
312
|
-
function
|
|
323
|
+
function Companion_getInstance_4() {
|
|
313
324
|
if (Companion_instance_1 == null)
|
|
314
325
|
new Companion_1();
|
|
315
326
|
return Companion_instance_1;
|
|
316
327
|
}
|
|
317
328
|
function Cyclist(massKg, maxBrakeG, cd, frontalAreaM2, maxLeanAngleDeg, maxSpeedKmH) {
|
|
318
|
-
|
|
329
|
+
Companion_getInstance_4();
|
|
319
330
|
massKg = massKg === VOID ? 80.0 : massKg;
|
|
320
331
|
maxBrakeG = maxBrakeG === VOID ? 0.6 : maxBrakeG;
|
|
321
332
|
cd = cd === VOID ? 0.7 : cd;
|
|
322
333
|
frontalAreaM2 = frontalAreaM2 === VOID ? 0.5 : frontalAreaM2;
|
|
323
334
|
maxLeanAngleDeg = maxLeanAngleDeg === VOID ? 35.0 : maxLeanAngleDeg;
|
|
324
335
|
maxSpeedKmH = maxSpeedKmH === VOID ? 100.0 : maxSpeedKmH;
|
|
325
|
-
this.
|
|
326
|
-
this.
|
|
327
|
-
this.
|
|
328
|
-
this.
|
|
329
|
-
this.
|
|
330
|
-
this.
|
|
331
|
-
}
|
|
332
|
-
protoOf(Cyclist).
|
|
336
|
+
this.v1z_1 = massKg;
|
|
337
|
+
this.w1z_1 = maxBrakeG;
|
|
338
|
+
this.x1z_1 = cd;
|
|
339
|
+
this.y1z_1 = frontalAreaM2;
|
|
340
|
+
this.z1z_1 = maxLeanAngleDeg;
|
|
341
|
+
this.a20_1 = maxSpeedKmH;
|
|
342
|
+
}
|
|
343
|
+
protoOf(Cyclist).b20 = function () {
|
|
333
344
|
// Inline function 'kotlin.math.tan' call
|
|
334
|
-
var x = this.
|
|
345
|
+
var x = this.z1z_1 * 3.141592653589793 / 180.0;
|
|
335
346
|
return Math.tan(x);
|
|
336
347
|
};
|
|
337
|
-
protoOf(Cyclist).
|
|
338
|
-
return this.
|
|
348
|
+
protoOf(Cyclist).c20 = function () {
|
|
349
|
+
return this.w1z_1 * 9.8;
|
|
339
350
|
};
|
|
340
|
-
protoOf(Cyclist).
|
|
341
|
-
return this.
|
|
351
|
+
protoOf(Cyclist).d20 = function () {
|
|
352
|
+
return this.a20_1 / 3.6;
|
|
342
353
|
};
|
|
343
354
|
protoOf(Cyclist).toString = function () {
|
|
344
|
-
return 'Cyclist(massKg=' + this.
|
|
355
|
+
return 'Cyclist(massKg=' + this.v1z_1 + ', maxBrakeG=' + this.w1z_1 + ', cd=' + this.x1z_1 + ', frontalAreaM2=' + this.y1z_1 + ', maxLeanAngleDeg=' + this.z1z_1 + ', maxSpeedKmH=' + this.a20_1 + ')';
|
|
345
356
|
};
|
|
346
357
|
protoOf(Cyclist).hashCode = function () {
|
|
347
|
-
var result = getNumberHashCode(this.
|
|
348
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
349
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
350
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
351
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
352
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
358
|
+
var result = getNumberHashCode(this.v1z_1);
|
|
359
|
+
result = imul(result, 31) + getNumberHashCode(this.w1z_1) | 0;
|
|
360
|
+
result = imul(result, 31) + getNumberHashCode(this.x1z_1) | 0;
|
|
361
|
+
result = imul(result, 31) + getNumberHashCode(this.y1z_1) | 0;
|
|
362
|
+
result = imul(result, 31) + getNumberHashCode(this.z1z_1) | 0;
|
|
363
|
+
result = imul(result, 31) + getNumberHashCode(this.a20_1) | 0;
|
|
353
364
|
return result;
|
|
354
365
|
};
|
|
355
366
|
protoOf(Cyclist).equals = function (other) {
|
|
@@ -357,17 +368,17 @@
|
|
|
357
368
|
return true;
|
|
358
369
|
if (!(other instanceof Cyclist))
|
|
359
370
|
return false;
|
|
360
|
-
if (!equals(this.
|
|
371
|
+
if (!equals(this.v1z_1, other.v1z_1))
|
|
361
372
|
return false;
|
|
362
|
-
if (!equals(this.
|
|
373
|
+
if (!equals(this.w1z_1, other.w1z_1))
|
|
363
374
|
return false;
|
|
364
|
-
if (!equals(this.
|
|
375
|
+
if (!equals(this.x1z_1, other.x1z_1))
|
|
365
376
|
return false;
|
|
366
|
-
if (!equals(this.
|
|
377
|
+
if (!equals(this.y1z_1, other.y1z_1))
|
|
367
378
|
return false;
|
|
368
|
-
if (!equals(this.
|
|
379
|
+
if (!equals(this.z1z_1, other.z1z_1))
|
|
369
380
|
return false;
|
|
370
|
-
if (!equals(this.
|
|
381
|
+
if (!equals(this.a20_1, other.a20_1))
|
|
371
382
|
return false;
|
|
372
383
|
return true;
|
|
373
384
|
};
|
|
@@ -375,17 +386,17 @@
|
|
|
375
386
|
enabled = enabled === VOID ? true : enabled;
|
|
376
387
|
toleranceM = toleranceM === VOID ? 10.0 : toleranceM;
|
|
377
388
|
zExaggeration = zExaggeration === VOID ? 3.0 : zExaggeration;
|
|
378
|
-
this.
|
|
379
|
-
this.
|
|
380
|
-
this.
|
|
389
|
+
this.e20_1 = enabled;
|
|
390
|
+
this.f20_1 = toleranceM;
|
|
391
|
+
this.g20_1 = zExaggeration;
|
|
381
392
|
}
|
|
382
393
|
protoOf(SimplifyPathOptions).toString = function () {
|
|
383
|
-
return 'SimplifyPathOptions(enabled=' + this.
|
|
394
|
+
return 'SimplifyPathOptions(enabled=' + this.e20_1 + ', toleranceM=' + this.f20_1 + ', zExaggeration=' + this.g20_1 + ')';
|
|
384
395
|
};
|
|
385
396
|
protoOf(SimplifyPathOptions).hashCode = function () {
|
|
386
|
-
var result = getBooleanHashCode(this.
|
|
387
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
388
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
397
|
+
var result = getBooleanHashCode(this.e20_1);
|
|
398
|
+
result = imul(result, 31) + getNumberHashCode(this.f20_1) | 0;
|
|
399
|
+
result = imul(result, 31) + getNumberHashCode(this.g20_1) | 0;
|
|
389
400
|
return result;
|
|
390
401
|
};
|
|
391
402
|
protoOf(SimplifyPathOptions).equals = function (other) {
|
|
@@ -393,46 +404,46 @@
|
|
|
393
404
|
return true;
|
|
394
405
|
if (!(other instanceof SimplifyPathOptions))
|
|
395
406
|
return false;
|
|
396
|
-
if (!(this.
|
|
407
|
+
if (!(this.e20_1 === other.e20_1))
|
|
397
408
|
return false;
|
|
398
|
-
if (!equals(this.
|
|
409
|
+
if (!equals(this.f20_1, other.f20_1))
|
|
399
410
|
return false;
|
|
400
|
-
if (!equals(this.
|
|
411
|
+
if (!equals(this.g20_1, other.g20_1))
|
|
401
412
|
return false;
|
|
402
413
|
return true;
|
|
403
414
|
};
|
|
404
415
|
function Companion_2() {
|
|
405
416
|
Companion_instance_2 = this;
|
|
406
|
-
this.
|
|
417
|
+
this.h20_1 = new EnhanceOptions();
|
|
407
418
|
}
|
|
408
419
|
var Companion_instance_2;
|
|
409
|
-
function
|
|
420
|
+
function Companion_getInstance_5() {
|
|
410
421
|
if (Companion_instance_2 == null)
|
|
411
422
|
new Companion_2();
|
|
412
423
|
return Companion_instance_2;
|
|
413
424
|
}
|
|
414
425
|
function EnhanceOptions(fixElevation, computeMaxSpeeds, virtualizeTrack, computeOnePointPerSecond, simplifyPath) {
|
|
415
|
-
|
|
426
|
+
Companion_getInstance_5();
|
|
416
427
|
fixElevation = fixElevation === VOID ? true : fixElevation;
|
|
417
428
|
computeMaxSpeeds = computeMaxSpeeds === VOID ? true : computeMaxSpeeds;
|
|
418
429
|
virtualizeTrack = virtualizeTrack === VOID ? true : virtualizeTrack;
|
|
419
430
|
computeOnePointPerSecond = computeOnePointPerSecond === VOID ? true : computeOnePointPerSecond;
|
|
420
431
|
simplifyPath = simplifyPath === VOID ? new SimplifyPathOptions() : simplifyPath;
|
|
421
|
-
this.
|
|
422
|
-
this.
|
|
423
|
-
this.
|
|
424
|
-
this.
|
|
425
|
-
this.
|
|
432
|
+
this.i20_1 = fixElevation;
|
|
433
|
+
this.j20_1 = computeMaxSpeeds;
|
|
434
|
+
this.k20_1 = virtualizeTrack;
|
|
435
|
+
this.l20_1 = computeOnePointPerSecond;
|
|
436
|
+
this.m20_1 = simplifyPath;
|
|
426
437
|
}
|
|
427
438
|
protoOf(EnhanceOptions).toString = function () {
|
|
428
|
-
return 'EnhanceOptions(fixElevation=' + this.
|
|
439
|
+
return 'EnhanceOptions(fixElevation=' + this.i20_1 + ', computeMaxSpeeds=' + this.j20_1 + ', virtualizeTrack=' + this.k20_1 + ', computeOnePointPerSecond=' + this.l20_1 + ', simplifyPath=' + this.m20_1.toString() + ')';
|
|
429
440
|
};
|
|
430
441
|
protoOf(EnhanceOptions).hashCode = function () {
|
|
431
|
-
var result = getBooleanHashCode(this.
|
|
432
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
433
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
434
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
435
|
-
result = imul(result, 31) + this.
|
|
442
|
+
var result = getBooleanHashCode(this.i20_1);
|
|
443
|
+
result = imul(result, 31) + getBooleanHashCode(this.j20_1) | 0;
|
|
444
|
+
result = imul(result, 31) + getBooleanHashCode(this.k20_1) | 0;
|
|
445
|
+
result = imul(result, 31) + getBooleanHashCode(this.l20_1) | 0;
|
|
446
|
+
result = imul(result, 31) + this.m20_1.hashCode() | 0;
|
|
436
447
|
return result;
|
|
437
448
|
};
|
|
438
449
|
protoOf(EnhanceOptions).equals = function (other) {
|
|
@@ -440,24 +451,24 @@
|
|
|
440
451
|
return true;
|
|
441
452
|
if (!(other instanceof EnhanceOptions))
|
|
442
453
|
return false;
|
|
443
|
-
if (!(this.
|
|
454
|
+
if (!(this.i20_1 === other.i20_1))
|
|
444
455
|
return false;
|
|
445
|
-
if (!(this.
|
|
456
|
+
if (!(this.j20_1 === other.j20_1))
|
|
446
457
|
return false;
|
|
447
|
-
if (!(this.
|
|
458
|
+
if (!(this.k20_1 === other.k20_1))
|
|
448
459
|
return false;
|
|
449
|
-
if (!(this.
|
|
460
|
+
if (!(this.l20_1 === other.l20_1))
|
|
450
461
|
return false;
|
|
451
|
-
if (!this.
|
|
462
|
+
if (!this.m20_1.equals(other.m20_1))
|
|
452
463
|
return false;
|
|
453
464
|
return true;
|
|
454
465
|
};
|
|
455
466
|
function $enhanceCourseCOROUTINE$(_this__u8e3s4, course, options, elevationProvider, resultContinuation) {
|
|
456
467
|
CoroutineImpl.call(this, resultContinuation);
|
|
457
|
-
this.
|
|
458
|
-
this.
|
|
459
|
-
this.
|
|
460
|
-
this.
|
|
468
|
+
this.v20_1 = _this__u8e3s4;
|
|
469
|
+
this.w20_1 = course;
|
|
470
|
+
this.x20_1 = options;
|
|
471
|
+
this.y20_1 = elevationProvider;
|
|
461
472
|
}
|
|
462
473
|
protoOf($enhanceCourseCOROUTINE$).p6 = function () {
|
|
463
474
|
var suspendResult = this.j6_1;
|
|
@@ -467,11 +478,11 @@
|
|
|
467
478
|
switch (tmp) {
|
|
468
479
|
case 0:
|
|
469
480
|
this.i6_1 = 3;
|
|
470
|
-
this.
|
|
471
|
-
this.
|
|
472
|
-
if (this.
|
|
481
|
+
this.z20_1 = this.w20_1.q1z();
|
|
482
|
+
this.z20_1 = PointPerDistance_instance.a1x(this.z20_1, -1.0, 30.0);
|
|
483
|
+
if (this.x20_1.i20_1 && !(this.y20_1 == null)) {
|
|
473
484
|
this.h6_1 = 1;
|
|
474
|
-
suspendResult = ElevationStep_instance.
|
|
485
|
+
suspendResult = ElevationStep_instance.s1u(this.z20_1, this.y20_1, this);
|
|
475
486
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
476
487
|
return suspendResult;
|
|
477
488
|
}
|
|
@@ -482,31 +493,31 @@
|
|
|
482
493
|
}
|
|
483
494
|
|
|
484
495
|
case 1:
|
|
485
|
-
this.
|
|
496
|
+
this.z20_1 = suspendResult;
|
|
486
497
|
this.h6_1 = 2;
|
|
487
498
|
continue $sm;
|
|
488
499
|
case 2:
|
|
489
|
-
this.
|
|
490
|
-
this.
|
|
491
|
-
var working = this.
|
|
492
|
-
if (this.
|
|
493
|
-
MaxSpeedComputer_instance.
|
|
500
|
+
this.z20_1 = PointPerDistance_instance.a1x(this.z20_1, 1.0, 2.0);
|
|
501
|
+
this.z20_1 = ElevationStep_instance.v1u(this.z20_1);
|
|
502
|
+
var working = this.w20_1.u1z(this.w20_1.l1z_1.j1z(this.z20_1));
|
|
503
|
+
if (this.x20_1.j20_1 || this.x20_1.k20_1) {
|
|
504
|
+
MaxSpeedComputer_instance.f21(working.l1z_1);
|
|
494
505
|
}
|
|
495
506
|
|
|
496
|
-
if (this.
|
|
497
|
-
this.
|
|
498
|
-
working = working.
|
|
507
|
+
if (this.x20_1.k20_1) {
|
|
508
|
+
this.z20_1 = VirtualizeService_instance.h21(working);
|
|
509
|
+
working = working.u1z(working.l1z_1.j1z(this.z20_1));
|
|
499
510
|
}
|
|
500
511
|
|
|
501
|
-
if (this.l20_1
|
|
502
|
-
this.
|
|
512
|
+
if (this.x20_1.l20_1) {
|
|
513
|
+
this.z20_1 = PointPerSecond_instance.g1x(this.z20_1);
|
|
503
514
|
}
|
|
504
515
|
|
|
505
|
-
if (this.
|
|
506
|
-
this.
|
|
516
|
+
if (this.x20_1.m20_1.e20_1) {
|
|
517
|
+
this.z20_1 = PathSimplifier_instance.o1w(this.z20_1, this.x20_1.m20_1.f20_1, this.x20_1.m20_1.g20_1);
|
|
507
518
|
}
|
|
508
519
|
|
|
509
|
-
return this.
|
|
520
|
+
return this.z20_1;
|
|
510
521
|
case 3:
|
|
511
522
|
throw this.k6_1;
|
|
512
523
|
}
|
|
@@ -523,13 +534,13 @@
|
|
|
523
534
|
};
|
|
524
535
|
function Enhancer() {
|
|
525
536
|
}
|
|
526
|
-
protoOf(Enhancer).
|
|
537
|
+
protoOf(Enhancer).i21 = function (path) {
|
|
527
538
|
return new CoursePhysics(new Course(path), RhoProviderEstimate_instance, AeroProviderConstant_instance, WindProviderNone_instance, new PowerProviderConstant(280.0));
|
|
528
539
|
};
|
|
529
|
-
protoOf(Enhancer).
|
|
530
|
-
return this.
|
|
540
|
+
protoOf(Enhancer).j21 = function (path, elevationProvider, options, $completion) {
|
|
541
|
+
return this.k21(this.i21(path), options, elevationProvider, $completion);
|
|
531
542
|
};
|
|
532
|
-
protoOf(Enhancer).
|
|
543
|
+
protoOf(Enhancer).k21 = function (course, options, elevationProvider, $completion) {
|
|
533
544
|
var tmp = new $enhanceCourseCOROUTINE$(this, course, options, elevationProvider, $completion);
|
|
534
545
|
tmp.j6_1 = Unit_instance;
|
|
535
546
|
tmp.k6_1 = null;
|
|
@@ -540,34 +551,34 @@
|
|
|
540
551
|
return Enhancer_instance;
|
|
541
552
|
}
|
|
542
553
|
function Climb(startIndex, endIndex, startDistanceM, endDistanceM, startElevationM, endElevationM, positiveElevationM, negativeElevationM, parts) {
|
|
543
|
-
this.
|
|
544
|
-
this.
|
|
545
|
-
this.
|
|
546
|
-
this.
|
|
547
|
-
this.
|
|
548
|
-
this.
|
|
549
|
-
this.
|
|
550
|
-
this.
|
|
551
|
-
this.
|
|
552
|
-
}
|
|
553
|
-
protoOf(Climb).
|
|
554
|
-
return this.
|
|
555
|
-
};
|
|
556
|
-
protoOf(Climb).
|
|
557
|
-
return this.
|
|
558
|
-
};
|
|
559
|
-
protoOf(Climb).
|
|
560
|
-
return this.
|
|
561
|
-
};
|
|
562
|
-
protoOf(Climb).
|
|
554
|
+
this.l21_1 = startIndex;
|
|
555
|
+
this.m21_1 = endIndex;
|
|
556
|
+
this.n21_1 = startDistanceM;
|
|
557
|
+
this.o21_1 = endDistanceM;
|
|
558
|
+
this.p21_1 = startElevationM;
|
|
559
|
+
this.q21_1 = endElevationM;
|
|
560
|
+
this.r21_1 = positiveElevationM;
|
|
561
|
+
this.s21_1 = negativeElevationM;
|
|
562
|
+
this.t21_1 = parts;
|
|
563
|
+
}
|
|
564
|
+
protoOf(Climb).u21 = function () {
|
|
565
|
+
return this.o21_1 - this.n21_1;
|
|
566
|
+
};
|
|
567
|
+
protoOf(Climb).v21 = function () {
|
|
568
|
+
return this.q21_1 - this.p21_1;
|
|
569
|
+
};
|
|
570
|
+
protoOf(Climb).w21 = function () {
|
|
571
|
+
return this.u21() === 0.0 ? 0.0 : this.v21() / this.u21();
|
|
572
|
+
};
|
|
573
|
+
protoOf(Climb).x21 = function () {
|
|
563
574
|
// Inline function 'kotlin.collections.filter' call
|
|
564
|
-
var tmp0 = this.
|
|
575
|
+
var tmp0 = this.t21_1;
|
|
565
576
|
// Inline function 'kotlin.collections.filterTo' call
|
|
566
577
|
var destination = ArrayList_init_$Create$();
|
|
567
578
|
var _iterator__ex2g4s = tmp0.i();
|
|
568
579
|
while (_iterator__ex2g4s.j()) {
|
|
569
580
|
var element = _iterator__ex2g4s.k();
|
|
570
|
-
if (element.
|
|
581
|
+
if (element.v21() > 0) {
|
|
571
582
|
destination.h(element);
|
|
572
583
|
}
|
|
573
584
|
}
|
|
@@ -577,24 +588,24 @@
|
|
|
577
588
|
while (_iterator__ex2g4s_0.j()) {
|
|
578
589
|
var element_0 = _iterator__ex2g4s_0.k();
|
|
579
590
|
var tmp = sum;
|
|
580
|
-
sum = tmp + element_0.
|
|
591
|
+
sum = tmp + element_0.u21();
|
|
581
592
|
}
|
|
582
593
|
var climbingLength = sum;
|
|
583
|
-
return climbingLength === 0.0 ? 0.0 : this.
|
|
594
|
+
return climbingLength === 0.0 ? 0.0 : this.r21_1 / climbingLength;
|
|
584
595
|
};
|
|
585
596
|
protoOf(Climb).toString = function () {
|
|
586
|
-
return 'Climb(startIndex=' + this.
|
|
597
|
+
return 'Climb(startIndex=' + this.l21_1 + ', endIndex=' + this.m21_1 + ', startDistanceM=' + this.n21_1 + ', endDistanceM=' + this.o21_1 + ', startElevationM=' + this.p21_1 + ', endElevationM=' + this.q21_1 + ', positiveElevationM=' + this.r21_1 + ', negativeElevationM=' + this.s21_1 + ', parts=' + toString(this.t21_1) + ')';
|
|
587
598
|
};
|
|
588
599
|
protoOf(Climb).hashCode = function () {
|
|
589
|
-
var result = this.
|
|
590
|
-
result = imul(result, 31) + this.
|
|
591
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
592
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
593
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
594
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
595
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
596
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
597
|
-
result = imul(result, 31) + hashCode(this.
|
|
600
|
+
var result = this.l21_1;
|
|
601
|
+
result = imul(result, 31) + this.m21_1 | 0;
|
|
602
|
+
result = imul(result, 31) + getNumberHashCode(this.n21_1) | 0;
|
|
603
|
+
result = imul(result, 31) + getNumberHashCode(this.o21_1) | 0;
|
|
604
|
+
result = imul(result, 31) + getNumberHashCode(this.p21_1) | 0;
|
|
605
|
+
result = imul(result, 31) + getNumberHashCode(this.q21_1) | 0;
|
|
606
|
+
result = imul(result, 31) + getNumberHashCode(this.r21_1) | 0;
|
|
607
|
+
result = imul(result, 31) + getNumberHashCode(this.s21_1) | 0;
|
|
608
|
+
result = imul(result, 31) + hashCode(this.t21_1) | 0;
|
|
598
609
|
return result;
|
|
599
610
|
};
|
|
600
611
|
protoOf(Climb).equals = function (other) {
|
|
@@ -602,49 +613,49 @@
|
|
|
602
613
|
return true;
|
|
603
614
|
if (!(other instanceof Climb))
|
|
604
615
|
return false;
|
|
605
|
-
if (!(this.
|
|
616
|
+
if (!(this.l21_1 === other.l21_1))
|
|
606
617
|
return false;
|
|
607
|
-
if (!(this.
|
|
618
|
+
if (!(this.m21_1 === other.m21_1))
|
|
608
619
|
return false;
|
|
609
|
-
if (!equals(this.
|
|
620
|
+
if (!equals(this.n21_1, other.n21_1))
|
|
610
621
|
return false;
|
|
611
|
-
if (!equals(this.
|
|
622
|
+
if (!equals(this.o21_1, other.o21_1))
|
|
612
623
|
return false;
|
|
613
|
-
if (!equals(this.
|
|
624
|
+
if (!equals(this.p21_1, other.p21_1))
|
|
614
625
|
return false;
|
|
615
|
-
if (!equals(this.
|
|
626
|
+
if (!equals(this.q21_1, other.q21_1))
|
|
616
627
|
return false;
|
|
617
|
-
if (!equals(this.
|
|
628
|
+
if (!equals(this.r21_1, other.r21_1))
|
|
618
629
|
return false;
|
|
619
|
-
if (!equals(this.
|
|
630
|
+
if (!equals(this.s21_1, other.s21_1))
|
|
620
631
|
return false;
|
|
621
|
-
if (!equals(this.
|
|
632
|
+
if (!equals(this.t21_1, other.t21_1))
|
|
622
633
|
return false;
|
|
623
634
|
return true;
|
|
624
635
|
};
|
|
625
636
|
function ClimbPart(startDistanceM, endDistanceM, startElevationM, endElevationM) {
|
|
626
|
-
this.
|
|
627
|
-
this.
|
|
628
|
-
this.
|
|
629
|
-
this.
|
|
637
|
+
this.y21_1 = startDistanceM;
|
|
638
|
+
this.z21_1 = endDistanceM;
|
|
639
|
+
this.a22_1 = startElevationM;
|
|
640
|
+
this.b22_1 = endElevationM;
|
|
630
641
|
}
|
|
631
|
-
protoOf(ClimbPart).
|
|
632
|
-
return this.
|
|
642
|
+
protoOf(ClimbPart).u21 = function () {
|
|
643
|
+
return this.z21_1 - this.y21_1;
|
|
633
644
|
};
|
|
634
|
-
protoOf(ClimbPart).
|
|
635
|
-
return this.
|
|
645
|
+
protoOf(ClimbPart).v21 = function () {
|
|
646
|
+
return this.b22_1 - this.a22_1;
|
|
636
647
|
};
|
|
637
|
-
protoOf(ClimbPart).
|
|
638
|
-
return this.
|
|
648
|
+
protoOf(ClimbPart).c22 = function () {
|
|
649
|
+
return this.u21() === 0.0 ? 0.0 : this.v21() / this.u21();
|
|
639
650
|
};
|
|
640
651
|
protoOf(ClimbPart).toString = function () {
|
|
641
|
-
return 'ClimbPart(startDistanceM=' + this.
|
|
652
|
+
return 'ClimbPart(startDistanceM=' + this.y21_1 + ', endDistanceM=' + this.z21_1 + ', startElevationM=' + this.a22_1 + ', endElevationM=' + this.b22_1 + ')';
|
|
642
653
|
};
|
|
643
654
|
protoOf(ClimbPart).hashCode = function () {
|
|
644
|
-
var result = getNumberHashCode(this.
|
|
645
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
646
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
647
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
655
|
+
var result = getNumberHashCode(this.y21_1);
|
|
656
|
+
result = imul(result, 31) + getNumberHashCode(this.z21_1) | 0;
|
|
657
|
+
result = imul(result, 31) + getNumberHashCode(this.a22_1) | 0;
|
|
658
|
+
result = imul(result, 31) + getNumberHashCode(this.b22_1) | 0;
|
|
648
659
|
return result;
|
|
649
660
|
};
|
|
650
661
|
protoOf(ClimbPart).equals = function (other) {
|
|
@@ -652,28 +663,28 @@
|
|
|
652
663
|
return true;
|
|
653
664
|
if (!(other instanceof ClimbPart))
|
|
654
665
|
return false;
|
|
655
|
-
if (!equals(this.
|
|
666
|
+
if (!equals(this.y21_1, other.y21_1))
|
|
656
667
|
return false;
|
|
657
|
-
if (!equals(this.
|
|
668
|
+
if (!equals(this.z21_1, other.z21_1))
|
|
658
669
|
return false;
|
|
659
|
-
if (!equals(this.
|
|
670
|
+
if (!equals(this.a22_1, other.a22_1))
|
|
660
671
|
return false;
|
|
661
|
-
if (!equals(this.
|
|
672
|
+
if (!equals(this.b22_1, other.b22_1))
|
|
662
673
|
return false;
|
|
663
674
|
return true;
|
|
664
675
|
};
|
|
665
676
|
function Companion_3() {
|
|
666
677
|
Companion_instance_3 = this;
|
|
667
|
-
this.
|
|
678
|
+
this.d22_1 = new ClimbOptions();
|
|
668
679
|
}
|
|
669
680
|
var Companion_instance_3;
|
|
670
|
-
function
|
|
681
|
+
function Companion_getInstance_6() {
|
|
671
682
|
if (Companion_instance_3 == null)
|
|
672
683
|
new Companion_3();
|
|
673
684
|
return Companion_instance_3;
|
|
674
685
|
}
|
|
675
686
|
function ClimbOptions(minMinClimbElevationM, maxMinClimbElevationM, minClimbElevationRatio, minGradePercent, maxDiffRealGradeRatio, booster, maxAnalysisPoints) {
|
|
676
|
-
|
|
687
|
+
Companion_getInstance_6();
|
|
677
688
|
minMinClimbElevationM = minMinClimbElevationM === VOID ? 10.0 : minMinClimbElevationM;
|
|
678
689
|
maxMinClimbElevationM = maxMinClimbElevationM === VOID ? 35.0 : maxMinClimbElevationM;
|
|
679
690
|
minClimbElevationRatio = minClimbElevationRatio === VOID ? 100.0 : minClimbElevationRatio;
|
|
@@ -681,30 +692,30 @@
|
|
|
681
692
|
maxDiffRealGradeRatio = maxDiffRealGradeRatio === VOID ? 1.3 : maxDiffRealGradeRatio;
|
|
682
693
|
booster = booster === VOID ? 1.3 : booster;
|
|
683
694
|
maxAnalysisPoints = maxAnalysisPoints === VOID ? 3000 : maxAnalysisPoints;
|
|
684
|
-
this.
|
|
685
|
-
this.
|
|
686
|
-
this.
|
|
687
|
-
this.
|
|
688
|
-
this.
|
|
689
|
-
this.
|
|
690
|
-
this.
|
|
695
|
+
this.e22_1 = minMinClimbElevationM;
|
|
696
|
+
this.f22_1 = maxMinClimbElevationM;
|
|
697
|
+
this.g22_1 = minClimbElevationRatio;
|
|
698
|
+
this.h22_1 = minGradePercent;
|
|
699
|
+
this.i22_1 = maxDiffRealGradeRatio;
|
|
700
|
+
this.j22_1 = booster;
|
|
701
|
+
this.k22_1 = maxAnalysisPoints;
|
|
691
702
|
// Inline function 'kotlin.require' call
|
|
692
|
-
if (!(this.
|
|
703
|
+
if (!(this.k22_1 >= 2)) {
|
|
693
704
|
var message = 'maxAnalysisPoints must be at least 2';
|
|
694
705
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
695
706
|
}
|
|
696
707
|
}
|
|
697
708
|
protoOf(ClimbOptions).toString = function () {
|
|
698
|
-
return 'ClimbOptions(minMinClimbElevationM=' + this.
|
|
709
|
+
return 'ClimbOptions(minMinClimbElevationM=' + this.e22_1 + ', maxMinClimbElevationM=' + this.f22_1 + ', minClimbElevationRatio=' + this.g22_1 + ', minGradePercent=' + this.h22_1 + ', maxDiffRealGradeRatio=' + this.i22_1 + ', booster=' + this.j22_1 + ', maxAnalysisPoints=' + this.k22_1 + ')';
|
|
699
710
|
};
|
|
700
711
|
protoOf(ClimbOptions).hashCode = function () {
|
|
701
|
-
var result = getNumberHashCode(this.
|
|
702
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
703
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
704
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
705
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
706
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
707
|
-
result = imul(result, 31) + this.
|
|
712
|
+
var result = getNumberHashCode(this.e22_1);
|
|
713
|
+
result = imul(result, 31) + getNumberHashCode(this.f22_1) | 0;
|
|
714
|
+
result = imul(result, 31) + getNumberHashCode(this.g22_1) | 0;
|
|
715
|
+
result = imul(result, 31) + getNumberHashCode(this.h22_1) | 0;
|
|
716
|
+
result = imul(result, 31) + getNumberHashCode(this.i22_1) | 0;
|
|
717
|
+
result = imul(result, 31) + getNumberHashCode(this.j22_1) | 0;
|
|
718
|
+
result = imul(result, 31) + this.k22_1 | 0;
|
|
708
719
|
return result;
|
|
709
720
|
};
|
|
710
721
|
protoOf(ClimbOptions).equals = function (other) {
|
|
@@ -712,29 +723,29 @@
|
|
|
712
723
|
return true;
|
|
713
724
|
if (!(other instanceof ClimbOptions))
|
|
714
725
|
return false;
|
|
715
|
-
if (!equals(this.
|
|
726
|
+
if (!equals(this.e22_1, other.e22_1))
|
|
716
727
|
return false;
|
|
717
|
-
if (!equals(this.
|
|
728
|
+
if (!equals(this.f22_1, other.f22_1))
|
|
718
729
|
return false;
|
|
719
|
-
if (!equals(this.
|
|
730
|
+
if (!equals(this.g22_1, other.g22_1))
|
|
720
731
|
return false;
|
|
721
|
-
if (!equals(this.
|
|
732
|
+
if (!equals(this.h22_1, other.h22_1))
|
|
722
733
|
return false;
|
|
723
|
-
if (!equals(this.
|
|
734
|
+
if (!equals(this.i22_1, other.i22_1))
|
|
724
735
|
return false;
|
|
725
|
-
if (!equals(this.
|
|
736
|
+
if (!equals(this.j22_1, other.j22_1))
|
|
726
737
|
return false;
|
|
727
|
-
if (!(this.
|
|
738
|
+
if (!(this.k22_1 === other.k22_1))
|
|
728
739
|
return false;
|
|
729
740
|
return true;
|
|
730
741
|
};
|
|
731
742
|
function Companion_4() {
|
|
732
743
|
}
|
|
733
|
-
protoOf(Companion_4).
|
|
744
|
+
protoOf(Companion_4).l22 = function (path, maxPoints) {
|
|
734
745
|
var tmp;
|
|
735
|
-
if (path.
|
|
746
|
+
if (path.f1r_1 <= maxPoints) {
|
|
736
747
|
var tmp_0 = 0;
|
|
737
|
-
var tmp_1 = path.
|
|
748
|
+
var tmp_1 = path.f1r_1;
|
|
738
749
|
var tmp_2 = new Int32Array(tmp_1);
|
|
739
750
|
while (tmp_0 < tmp_1) {
|
|
740
751
|
var tmp_3 = tmp_0;
|
|
@@ -743,15 +754,15 @@
|
|
|
743
754
|
}
|
|
744
755
|
tmp = tmp_2;
|
|
745
756
|
} else {
|
|
746
|
-
var stride = ((path.
|
|
757
|
+
var stride = ((path.f1r_1 + maxPoints | 0) - 1 | 0) / maxPoints | 0;
|
|
747
758
|
var kept = ArrayList_init_$Create$_0(maxPoints + 1 | 0);
|
|
748
759
|
var i = 0;
|
|
749
|
-
while (i < path.
|
|
760
|
+
while (i < path.f1r_1) {
|
|
750
761
|
kept.h(i);
|
|
751
762
|
i = i + stride | 0;
|
|
752
763
|
}
|
|
753
|
-
if (!(last(kept) === (path.
|
|
754
|
-
kept.h(path.
|
|
764
|
+
if (!(last(kept) === (path.f1r_1 - 1 | 0))) {
|
|
765
|
+
kept.h(path.f1r_1 - 1 | 0);
|
|
755
766
|
}
|
|
756
767
|
tmp = toIntArray(kept);
|
|
757
768
|
}
|
|
@@ -761,7 +772,7 @@
|
|
|
761
772
|
var tmp_6 = new Float64Array(tmp_5);
|
|
762
773
|
while (tmp_4 < tmp_5) {
|
|
763
774
|
var tmp_7 = tmp_4;
|
|
764
|
-
tmp_6[tmp_7] = path.
|
|
775
|
+
tmp_6[tmp_7] = path.w1u(indices[tmp_7]);
|
|
765
776
|
tmp_4 = tmp_4 + 1 | 0;
|
|
766
777
|
}
|
|
767
778
|
var tmp_8 = 0;
|
|
@@ -769,26 +780,26 @@
|
|
|
769
780
|
var tmp_10 = new Float64Array(tmp_9);
|
|
770
781
|
while (tmp_8 < tmp_9) {
|
|
771
782
|
var tmp_11 = tmp_8;
|
|
772
|
-
tmp_10[tmp_11] = path.
|
|
783
|
+
tmp_10[tmp_11] = path.j1r(indices[tmp_11]);
|
|
773
784
|
tmp_8 = tmp_8 + 1 | 0;
|
|
774
785
|
}
|
|
775
786
|
return new Profile(tmp_6, tmp_10, indices);
|
|
776
787
|
};
|
|
777
788
|
var Companion_instance_4;
|
|
778
|
-
function
|
|
789
|
+
function Companion_getInstance_7() {
|
|
779
790
|
return Companion_instance_4;
|
|
780
791
|
}
|
|
781
792
|
function Profile(distance, elevation, sourceIndex) {
|
|
782
|
-
this.
|
|
783
|
-
this.
|
|
784
|
-
this.
|
|
793
|
+
this.m22_1 = distance;
|
|
794
|
+
this.n22_1 = elevation;
|
|
795
|
+
this.o22_1 = sourceIndex;
|
|
785
796
|
}
|
|
786
797
|
protoOf(Profile).l = function () {
|
|
787
|
-
return this.
|
|
798
|
+
return this.m22_1.length;
|
|
788
799
|
};
|
|
789
800
|
function bestCandidateFrom($this, profile, i, minClimbElevation, options) {
|
|
790
|
-
var startDist = profile.
|
|
791
|
-
var startEle = profile.
|
|
801
|
+
var startDist = profile.m22_1[i];
|
|
802
|
+
var startEle = profile.n22_1[i];
|
|
792
803
|
var positiveElevation = 0.0;
|
|
793
804
|
var negativeElevation = 0.0;
|
|
794
805
|
var distClimbing = 0.0;
|
|
@@ -800,12 +811,12 @@
|
|
|
800
811
|
$l$loop: do {
|
|
801
812
|
var j = inductionVariable;
|
|
802
813
|
inductionVariable = inductionVariable + 1 | 0;
|
|
803
|
-
var endDist = profile.
|
|
804
|
-
var endEle = profile.
|
|
805
|
-
var dEle = endEle - profile.
|
|
814
|
+
var endDist = profile.m22_1[j];
|
|
815
|
+
var endEle = profile.n22_1[j];
|
|
816
|
+
var dEle = endEle - profile.n22_1[j - 1 | 0];
|
|
806
817
|
if (dEle > 0) {
|
|
807
818
|
positiveElevation = positiveElevation + dEle;
|
|
808
|
-
distClimbing = distClimbing + (endDist - profile.
|
|
819
|
+
distClimbing = distClimbing + (endDist - profile.m22_1[j - 1 | 0]);
|
|
809
820
|
} else {
|
|
810
821
|
negativeElevation = negativeElevation + dEle;
|
|
811
822
|
}
|
|
@@ -816,9 +827,9 @@
|
|
|
816
827
|
var gradePercent = 100.0 * netElevation / length;
|
|
817
828
|
var climbingGradePercent = distClimbing > 0 ? 100.0 * positiveElevation / distClimbing : 0.0;
|
|
818
829
|
// Inline function 'kotlin.math.pow' call
|
|
819
|
-
var x = options.
|
|
830
|
+
var x = options.j22_1;
|
|
820
831
|
var score = length * Math.pow(gradePercent, x);
|
|
821
|
-
var qualifies = gradePercent >= options.
|
|
832
|
+
var qualifies = gradePercent >= options.h22_1 && netElevation >= minClimbElevation && score >= bestScore && climbingGradePercent / gradePercent <= options.i22_1;
|
|
822
833
|
if (qualifies) {
|
|
823
834
|
bestScore = score;
|
|
824
835
|
best = new Candidate(i, j, score, positiveElevation, negativeElevation);
|
|
@@ -848,7 +859,7 @@
|
|
|
848
859
|
return kept;
|
|
849
860
|
}
|
|
850
861
|
function toClimb($this, $receiver, path, profile) {
|
|
851
|
-
return new Climb(profile.
|
|
862
|
+
return new Climb(profile.o22_1[$receiver.p22_1], profile.o22_1[$receiver.q22_1], profile.m22_1[$receiver.p22_1], profile.m22_1[$receiver.q22_1], profile.n22_1[$receiver.p22_1], profile.n22_1[$receiver.q22_1], $receiver.s22_1, $receiver.t22_1, splitIntoParts($this, profile, $receiver.p22_1, $receiver.q22_1));
|
|
852
863
|
}
|
|
853
864
|
function splitIntoParts($this, profile, startIndex, endIndex) {
|
|
854
865
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -862,16 +873,16 @@
|
|
|
862
873
|
var item = inductionVariable;
|
|
863
874
|
inductionVariable = inductionVariable + 1 | 0;
|
|
864
875
|
var i = item;
|
|
865
|
-
var tmp$ret$2 = new Vector3D(profile.
|
|
876
|
+
var tmp$ret$2 = new Vector3D(profile.m22_1[i], profile.n22_1[i], 0.0);
|
|
866
877
|
destination.h(tmp$ret$2);
|
|
867
878
|
}
|
|
868
879
|
while (!(item === last));
|
|
869
880
|
var points = destination;
|
|
870
881
|
if (points.l() < 2)
|
|
871
882
|
return emptyList();
|
|
872
|
-
var elevationGain = profile.
|
|
883
|
+
var elevationGain = profile.n22_1[endIndex] - profile.n22_1[startIndex];
|
|
873
884
|
var tolerance = coerceIn(elevationGain / 50.0, 10.0, 50.0);
|
|
874
|
-
var keptIndices = DouglasPeucker_instance.
|
|
885
|
+
var keptIndices = DouglasPeucker_instance.gx(points, tolerance);
|
|
875
886
|
var tmp$ret$3;
|
|
876
887
|
$l$block: {
|
|
877
888
|
// Inline function 'kotlin.collections.zipWithNext' call
|
|
@@ -886,10 +897,10 @@
|
|
|
886
897
|
while (iterator.j()) {
|
|
887
898
|
var next = iterator.k();
|
|
888
899
|
var a = current;
|
|
889
|
-
var tmp0_startDistanceM = points.m(a).
|
|
890
|
-
var tmp1_startElevationM = points.m(a).
|
|
891
|
-
var tmp2_endDistanceM = points.m(next).
|
|
892
|
-
var tmp3_endElevationM = points.m(next).
|
|
900
|
+
var tmp0_startDistanceM = points.m(a).bx_1;
|
|
901
|
+
var tmp1_startElevationM = points.m(a).cx_1;
|
|
902
|
+
var tmp2_endDistanceM = points.m(next).bx_1;
|
|
903
|
+
var tmp3_endElevationM = points.m(next).cx_1;
|
|
893
904
|
var tmp$ret$5 = new ClimbPart(tmp0_startDistanceM, tmp2_endDistanceM, tmp1_startElevationM, tmp3_endElevationM);
|
|
894
905
|
result.h(tmp$ret$5);
|
|
895
906
|
current = next;
|
|
@@ -899,24 +910,24 @@
|
|
|
899
910
|
return tmp$ret$3;
|
|
900
911
|
}
|
|
901
912
|
function Candidate(startIndex, endIndex, score, positiveElevationM, negativeElevationM) {
|
|
902
|
-
this.
|
|
903
|
-
this.
|
|
904
|
-
this.
|
|
905
|
-
this.
|
|
906
|
-
this.
|
|
913
|
+
this.p22_1 = startIndex;
|
|
914
|
+
this.q22_1 = endIndex;
|
|
915
|
+
this.r22_1 = score;
|
|
916
|
+
this.s22_1 = positiveElevationM;
|
|
917
|
+
this.t22_1 = negativeElevationM;
|
|
907
918
|
}
|
|
908
|
-
protoOf(Candidate).
|
|
909
|
-
return other.
|
|
919
|
+
protoOf(Candidate).u22 = function (other) {
|
|
920
|
+
return other.p22_1 <= this.p22_1 && this.p22_1 <= other.q22_1 || (other.p22_1 <= this.q22_1 && this.q22_1 <= other.q22_1) || (this.p22_1 <= other.p22_1 && other.q22_1 <= this.q22_1);
|
|
910
921
|
};
|
|
911
922
|
protoOf(Candidate).toString = function () {
|
|
912
|
-
return 'Candidate(startIndex=' + this.
|
|
923
|
+
return 'Candidate(startIndex=' + this.p22_1 + ', endIndex=' + this.q22_1 + ', score=' + this.r22_1 + ', positiveElevationM=' + this.s22_1 + ', negativeElevationM=' + this.t22_1 + ')';
|
|
913
924
|
};
|
|
914
925
|
protoOf(Candidate).hashCode = function () {
|
|
915
|
-
var result = this.
|
|
916
|
-
result = imul(result, 31) + this.
|
|
917
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
918
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
919
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
926
|
+
var result = this.p22_1;
|
|
927
|
+
result = imul(result, 31) + this.q22_1 | 0;
|
|
928
|
+
result = imul(result, 31) + getNumberHashCode(this.r22_1) | 0;
|
|
929
|
+
result = imul(result, 31) + getNumberHashCode(this.s22_1) | 0;
|
|
930
|
+
result = imul(result, 31) + getNumberHashCode(this.t22_1) | 0;
|
|
920
931
|
return result;
|
|
921
932
|
};
|
|
922
933
|
protoOf(Candidate).equals = function (other) {
|
|
@@ -924,29 +935,29 @@
|
|
|
924
935
|
return true;
|
|
925
936
|
if (!(other instanceof Candidate))
|
|
926
937
|
return false;
|
|
927
|
-
if (!(this.
|
|
938
|
+
if (!(this.p22_1 === other.p22_1))
|
|
928
939
|
return false;
|
|
929
|
-
if (!(this.
|
|
940
|
+
if (!(this.q22_1 === other.q22_1))
|
|
930
941
|
return false;
|
|
931
|
-
if (!equals(this.
|
|
942
|
+
if (!equals(this.r22_1, other.r22_1))
|
|
932
943
|
return false;
|
|
933
|
-
if (!equals(this.
|
|
944
|
+
if (!equals(this.s22_1, other.s22_1))
|
|
934
945
|
return false;
|
|
935
|
-
if (!equals(this.
|
|
946
|
+
if (!equals(this.t22_1, other.t22_1))
|
|
936
947
|
return false;
|
|
937
948
|
return true;
|
|
938
949
|
};
|
|
939
950
|
function sam$kotlin_Comparator$0(function_0) {
|
|
940
|
-
this.
|
|
951
|
+
this.v22_1 = function_0;
|
|
941
952
|
}
|
|
942
953
|
protoOf(sam$kotlin_Comparator$0).l9 = function (a, b) {
|
|
943
|
-
return this.
|
|
954
|
+
return this.v22_1(a, b);
|
|
944
955
|
};
|
|
945
956
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
946
957
|
return this.l9(a, b);
|
|
947
958
|
};
|
|
948
959
|
protoOf(sam$kotlin_Comparator$0).x1 = function () {
|
|
949
|
-
return this.
|
|
960
|
+
return this.v22_1;
|
|
950
961
|
};
|
|
951
962
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
952
963
|
var tmp;
|
|
@@ -967,16 +978,16 @@
|
|
|
967
978
|
return hashCode(this.x1());
|
|
968
979
|
};
|
|
969
980
|
function sam$kotlin_Comparator$0_0(function_0) {
|
|
970
|
-
this.
|
|
981
|
+
this.w22_1 = function_0;
|
|
971
982
|
}
|
|
972
983
|
protoOf(sam$kotlin_Comparator$0_0).l9 = function (a, b) {
|
|
973
|
-
return this.
|
|
984
|
+
return this.w22_1(a, b);
|
|
974
985
|
};
|
|
975
986
|
protoOf(sam$kotlin_Comparator$0_0).compare = function (a, b) {
|
|
976
987
|
return this.l9(a, b);
|
|
977
988
|
};
|
|
978
989
|
protoOf(sam$kotlin_Comparator$0_0).x1 = function () {
|
|
979
|
-
return this.
|
|
990
|
+
return this.w22_1;
|
|
980
991
|
};
|
|
981
992
|
protoOf(sam$kotlin_Comparator$0_0).equals = function (other) {
|
|
982
993
|
var tmp;
|
|
@@ -998,38 +1009,38 @@
|
|
|
998
1009
|
};
|
|
999
1010
|
function ClimbDetector$detect$lambda(a, b) {
|
|
1000
1011
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
1001
|
-
var tmp = a.
|
|
1002
|
-
var tmp$ret$2 = b.
|
|
1012
|
+
var tmp = a.p22_1;
|
|
1013
|
+
var tmp$ret$2 = b.p22_1;
|
|
1003
1014
|
return compareValues(tmp, tmp$ret$2);
|
|
1004
1015
|
}
|
|
1005
1016
|
function ClimbDetector$dedupeByScore$lambda(a, b) {
|
|
1006
1017
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
1007
|
-
var tmp = b.
|
|
1008
|
-
var tmp$ret$2 = a.
|
|
1018
|
+
var tmp = b.r22_1;
|
|
1019
|
+
var tmp$ret$2 = a.r22_1;
|
|
1009
1020
|
return compareValues(tmp, tmp$ret$2);
|
|
1010
1021
|
}
|
|
1011
1022
|
function ClimbDetector$dedupeByScore$lambda_0($best) {
|
|
1012
1023
|
return function (it) {
|
|
1013
|
-
return it.
|
|
1024
|
+
return it.u22($best);
|
|
1014
1025
|
};
|
|
1015
1026
|
}
|
|
1016
1027
|
function ClimbDetector() {
|
|
1017
|
-
this.
|
|
1018
|
-
this.
|
|
1019
|
-
this.
|
|
1020
|
-
this.
|
|
1028
|
+
this.x22_1 = 10.0;
|
|
1029
|
+
this.y22_1 = 10.0;
|
|
1030
|
+
this.z22_1 = 50.0;
|
|
1031
|
+
this.a23_1 = 50.0;
|
|
1021
1032
|
}
|
|
1022
|
-
protoOf(ClimbDetector).
|
|
1023
|
-
if (path.
|
|
1033
|
+
protoOf(ClimbDetector).b23 = function (path, options) {
|
|
1034
|
+
if (path.f1r_1 < 2)
|
|
1024
1035
|
return emptyList();
|
|
1025
|
-
var tmp0 = options.
|
|
1026
|
-
var tmp0_0 = options.
|
|
1036
|
+
var tmp0 = options.e22_1;
|
|
1037
|
+
var tmp0_0 = options.f22_1;
|
|
1027
1038
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1028
|
-
var b = path.
|
|
1039
|
+
var b = path.m1s_1 / options.g22_1;
|
|
1029
1040
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
1030
1041
|
var b_0 = Math.min(tmp0_0, b);
|
|
1031
1042
|
var minClimbElevation = Math.max(tmp0, b_0);
|
|
1032
|
-
var profile = Companion_instance_4.
|
|
1043
|
+
var profile = Companion_instance_4.l22(path, options.k22_1);
|
|
1033
1044
|
// Inline function 'kotlin.collections.mapNotNull' call
|
|
1034
1045
|
var tmp0_1 = until(0, profile.l());
|
|
1035
1046
|
// Inline function 'kotlin.collections.mapNotNullTo' call
|
|
@@ -1069,24 +1080,115 @@
|
|
|
1069
1080
|
}
|
|
1070
1081
|
return destination_0;
|
|
1071
1082
|
};
|
|
1072
|
-
protoOf(ClimbDetector).
|
|
1073
|
-
options = options === VOID ?
|
|
1074
|
-
return $super === VOID ? this.
|
|
1083
|
+
protoOf(ClimbDetector).c23 = function (path, options, $super) {
|
|
1084
|
+
options = options === VOID ? Companion_getInstance_6().d22_1 : options;
|
|
1085
|
+
return $super === VOID ? this.b23(path, options) : $super.b23.call(this, path, options);
|
|
1075
1086
|
};
|
|
1076
1087
|
var ClimbDetector_instance;
|
|
1077
1088
|
function ClimbDetector_getInstance() {
|
|
1078
1089
|
return ClimbDetector_instance;
|
|
1079
1090
|
}
|
|
1091
|
+
function dominantHeadwindDirection(_this__u8e3s4) {
|
|
1092
|
+
var sumX = 0.0;
|
|
1093
|
+
var sumY = 0.0;
|
|
1094
|
+
var contributing = 0;
|
|
1095
|
+
var _iterator__ex2g4s = _this__u8e3s4.i();
|
|
1096
|
+
$l$loop: while (_iterator__ex2g4s.j()) {
|
|
1097
|
+
var path = _iterator__ex2g4s.k();
|
|
1098
|
+
var tmp0_elvis_lhs = meanDirectionFromStart(path);
|
|
1099
|
+
var tmp;
|
|
1100
|
+
if (tmp0_elvis_lhs == null) {
|
|
1101
|
+
continue $l$loop;
|
|
1102
|
+
} else {
|
|
1103
|
+
tmp = tmp0_elvis_lhs;
|
|
1104
|
+
}
|
|
1105
|
+
var mean = tmp;
|
|
1106
|
+
sumX = sumX + mean.oe_1;
|
|
1107
|
+
sumY = sumY + mean.pe_1;
|
|
1108
|
+
contributing = contributing + 1 | 0;
|
|
1109
|
+
}
|
|
1110
|
+
if (contributing === 0)
|
|
1111
|
+
return null;
|
|
1112
|
+
var tmp0 = sumX;
|
|
1113
|
+
// Inline function 'kotlin.math.hypot' call
|
|
1114
|
+
var y = sumY;
|
|
1115
|
+
var magnitude = hypot(tmp0, y);
|
|
1116
|
+
if (magnitude < 1.0E-12)
|
|
1117
|
+
return null;
|
|
1118
|
+
return new Vector3D(-sumX / magnitude, -sumY / magnitude, 0.0);
|
|
1119
|
+
}
|
|
1120
|
+
function meanDirectionFromStart(_this__u8e3s4) {
|
|
1121
|
+
if (_this__u8e3s4.f1r_1 <= 3)
|
|
1122
|
+
return null;
|
|
1123
|
+
var lat0 = _this__u8e3s4.h1r(0);
|
|
1124
|
+
var lon0 = _this__u8e3s4.i1r(0);
|
|
1125
|
+
// Inline function 'kotlin.math.cos' call
|
|
1126
|
+
var cosLat0 = Math.cos(lat0);
|
|
1127
|
+
var sumX = 0.0;
|
|
1128
|
+
var sumY = 0.0;
|
|
1129
|
+
var inductionVariable = 1;
|
|
1130
|
+
var last = _this__u8e3s4.f1r_1;
|
|
1131
|
+
if (inductionVariable < last)
|
|
1132
|
+
$l$loop: do {
|
|
1133
|
+
var i = inductionVariable;
|
|
1134
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
1135
|
+
var dx = (_this__u8e3s4.i1r(i) - lon0) * cosLat0;
|
|
1136
|
+
var dy = _this__u8e3s4.h1r(i) - lat0;
|
|
1137
|
+
// Inline function 'kotlin.math.hypot' call
|
|
1138
|
+
var length = hypot(dx, dy);
|
|
1139
|
+
if (length < 1.0E-12)
|
|
1140
|
+
continue $l$loop;
|
|
1141
|
+
sumX = sumX + dx / length;
|
|
1142
|
+
sumY = sumY + dy / length;
|
|
1143
|
+
}
|
|
1144
|
+
while (inductionVariable < last);
|
|
1145
|
+
var n = _this__u8e3s4.f1r_1 - 1 | 0;
|
|
1146
|
+
return new Pair(sumX / n, sumY / n);
|
|
1147
|
+
}
|
|
1148
|
+
function dominantHeadwindAzimuthDeg(_this__u8e3s4) {
|
|
1149
|
+
return dominantHeadwindAzimuthDeg_0(listOf(_this__u8e3s4));
|
|
1150
|
+
}
|
|
1151
|
+
function dominantHeadwindAzimuthDeg_0(_this__u8e3s4) {
|
|
1152
|
+
var tmp0_elvis_lhs = dominantHeadwindDirection(_this__u8e3s4);
|
|
1153
|
+
var tmp;
|
|
1154
|
+
if (tmp0_elvis_lhs == null) {
|
|
1155
|
+
return NaN;
|
|
1156
|
+
} else {
|
|
1157
|
+
tmp = tmp0_elvis_lhs;
|
|
1158
|
+
}
|
|
1159
|
+
var direction = tmp;
|
|
1160
|
+
var tmp0 = direction.bx_1;
|
|
1161
|
+
// Inline function 'kotlin.math.atan2' call
|
|
1162
|
+
var x = direction.cx_1;
|
|
1163
|
+
// Inline function 'kotlin.mod' call
|
|
1164
|
+
var r = Math.atan2(tmp0, x) * 57.29577951308232 % 360.0;
|
|
1165
|
+
var tmp_0;
|
|
1166
|
+
var tmp_1;
|
|
1167
|
+
if (!(r === 0.0)) {
|
|
1168
|
+
// Inline function 'kotlin.math.sign' call
|
|
1169
|
+
var tmp_2 = sign(r);
|
|
1170
|
+
// Inline function 'kotlin.math.sign' call
|
|
1171
|
+
tmp_1 = !(tmp_2 === sign(360.0));
|
|
1172
|
+
} else {
|
|
1173
|
+
tmp_1 = false;
|
|
1174
|
+
}
|
|
1175
|
+
if (tmp_1) {
|
|
1176
|
+
tmp_0 = r + 360.0;
|
|
1177
|
+
} else {
|
|
1178
|
+
tmp_0 = r;
|
|
1179
|
+
}
|
|
1180
|
+
return tmp_0;
|
|
1181
|
+
}
|
|
1080
1182
|
function computeWithWind($this, path, i, aeroCoef, wind) {
|
|
1081
|
-
var speed = path.
|
|
1082
|
-
var bearing = path.
|
|
1083
|
-
path.
|
|
1084
|
-
path.
|
|
1085
|
-
var windDirectionAsBearing = 3.141592653589793 / 2.0 - wind.
|
|
1086
|
-
path.
|
|
1183
|
+
var speed = path.x1v(i);
|
|
1184
|
+
var bearing = path.d1v(i);
|
|
1185
|
+
path.d1w(i, wind.d23_1);
|
|
1186
|
+
path.e1w(i, wind.e23_1);
|
|
1187
|
+
var windDirectionAsBearing = 3.141592653589793 / 2.0 - wind.e23_1;
|
|
1188
|
+
path.j1v(i, windDirectionAsBearing);
|
|
1087
1189
|
var alpha = windDirectionAsBearing - bearing;
|
|
1088
|
-
path.
|
|
1089
|
-
var v = wind.
|
|
1190
|
+
path.k1v(i, alpha);
|
|
1191
|
+
var v = wind.d23_1;
|
|
1090
1192
|
// Inline function 'kotlin.math.cos' call
|
|
1091
1193
|
var l1 = speed + v * Math.cos(alpha);
|
|
1092
1194
|
var l2 = l1 * l1;
|
|
@@ -1101,21 +1203,21 @@
|
|
|
1101
1203
|
return tmp_1 * Math.sqrt(l3) * l1 * speed;
|
|
1102
1204
|
}
|
|
1103
1205
|
function AeroPowerProvider() {
|
|
1104
|
-
this.
|
|
1206
|
+
this.f23_1 = 1.2;
|
|
1105
1207
|
}
|
|
1106
|
-
protoOf(AeroPowerProvider).
|
|
1107
|
-
var aeroCoef = course.
|
|
1108
|
-
path.
|
|
1109
|
-
var wind = course.
|
|
1208
|
+
protoOf(AeroPowerProvider).g23 = function (course, path, pointIndex) {
|
|
1209
|
+
var aeroCoef = course.n1z_1.h23(course, path, pointIndex);
|
|
1210
|
+
path.i1v(pointIndex, aeroCoef);
|
|
1211
|
+
var wind = course.o1z_1.i23(course.l1z_1, path, pointIndex);
|
|
1110
1212
|
var tmp;
|
|
1111
|
-
if (wind.
|
|
1112
|
-
var v = path.
|
|
1213
|
+
if (wind.d23_1 === 0.0) {
|
|
1214
|
+
var v = path.x1v(pointIndex);
|
|
1113
1215
|
tmp = -aeroCoef * v * v * v;
|
|
1114
1216
|
} else {
|
|
1115
1217
|
tmp = computeWithWind(this, path, pointIndex, aeroCoef, wind);
|
|
1116
1218
|
}
|
|
1117
1219
|
var pAir = tmp;
|
|
1118
|
-
path.
|
|
1220
|
+
path.l1v(pointIndex, pAir);
|
|
1119
1221
|
return pAir;
|
|
1120
1222
|
};
|
|
1121
1223
|
var AeroPowerProvider_instance;
|
|
@@ -1124,28 +1226,28 @@
|
|
|
1124
1226
|
}
|
|
1125
1227
|
function AeroProviderConstant() {
|
|
1126
1228
|
}
|
|
1127
|
-
protoOf(AeroProviderConstant).
|
|
1128
|
-
var rho = course.
|
|
1129
|
-
return course.
|
|
1229
|
+
protoOf(AeroProviderConstant).h23 = function (course, path, pointIndex) {
|
|
1230
|
+
var rho = course.m1z_1.j23(course.l1z_1, path, pointIndex);
|
|
1231
|
+
return course.r1z().x1z_1 * course.r1z().y1z_1 * rho / 2.0;
|
|
1130
1232
|
};
|
|
1131
1233
|
var AeroProviderConstant_instance;
|
|
1132
1234
|
function AeroProviderConstant_getInstance() {
|
|
1133
1235
|
return AeroProviderConstant_instance;
|
|
1134
1236
|
}
|
|
1135
1237
|
function Companion_5() {
|
|
1136
|
-
this.
|
|
1137
|
-
this.
|
|
1238
|
+
this.k23_1 = 0.05;
|
|
1239
|
+
this.l23_1 = 3.0;
|
|
1138
1240
|
}
|
|
1139
1241
|
var Companion_instance_5;
|
|
1140
|
-
function
|
|
1242
|
+
function Companion_getInstance_8() {
|
|
1141
1243
|
return Companion_instance_5;
|
|
1142
1244
|
}
|
|
1143
1245
|
function CyclistPowerProviderBase(useHarmonics, random) {
|
|
1144
1246
|
random = random === VOID ? Default_getInstance() : random;
|
|
1145
|
-
this.
|
|
1247
|
+
this.m23_1 = useHarmonics;
|
|
1146
1248
|
var tmp = this;
|
|
1147
1249
|
var tmp_0;
|
|
1148
|
-
if (this.
|
|
1250
|
+
if (this.m23_1) {
|
|
1149
1251
|
// Inline function 'kotlin.collections.List' call
|
|
1150
1252
|
// Inline function 'kotlin.collections.MutableList' call
|
|
1151
1253
|
var list = ArrayList_init_$Create$_0(20);
|
|
@@ -1163,40 +1265,40 @@
|
|
|
1163
1265
|
} else {
|
|
1164
1266
|
tmp_0 = emptyList();
|
|
1165
1267
|
}
|
|
1166
|
-
tmp.
|
|
1167
|
-
}
|
|
1168
|
-
protoOf(CyclistPowerProviderBase).
|
|
1169
|
-
var power = this.
|
|
1170
|
-
path.
|
|
1171
|
-
if (this.
|
|
1172
|
-
var x = path.
|
|
1173
|
-
var _iterator__ex2g4s = this.
|
|
1268
|
+
tmp.n23_1 = tmp_0;
|
|
1269
|
+
}
|
|
1270
|
+
protoOf(CyclistPowerProviderBase).g23 = function (course, path, pointIndex) {
|
|
1271
|
+
var power = this.o23(course, path, pointIndex);
|
|
1272
|
+
path.p1v(pointIndex, power);
|
|
1273
|
+
if (this.m23_1) {
|
|
1274
|
+
var x = path.k1r(pointIndex) / 10000.0;
|
|
1275
|
+
var _iterator__ex2g4s = this.n23_1.i();
|
|
1174
1276
|
while (_iterator__ex2g4s.j()) {
|
|
1175
1277
|
var h = _iterator__ex2g4s.k();
|
|
1176
1278
|
var tmp = power;
|
|
1177
|
-
var tmp_0 = h.
|
|
1279
|
+
var tmp_0 = h.r23_1 * power;
|
|
1178
1280
|
// Inline function 'kotlin.math.cos' call
|
|
1179
|
-
var x_0 = h.
|
|
1281
|
+
var x_0 = h.p23_1 * x - h.q23_1;
|
|
1180
1282
|
power = tmp + tmp_0 * Math.cos(x_0);
|
|
1181
1283
|
}
|
|
1182
1284
|
}
|
|
1183
|
-
path.
|
|
1184
|
-
var powerNeeded = -PowerComputer_instance.
|
|
1185
|
-
path.
|
|
1285
|
+
path.q1v(pointIndex, power);
|
|
1286
|
+
var powerNeeded = -PowerComputer_instance.s23(course, path, pointIndex, false);
|
|
1287
|
+
path.r1v(pointIndex, powerNeeded);
|
|
1186
1288
|
return power;
|
|
1187
1289
|
};
|
|
1188
1290
|
function GravPowerProvider() {
|
|
1189
1291
|
}
|
|
1190
|
-
protoOf(GravPowerProvider).
|
|
1191
|
-
var m = course.
|
|
1192
|
-
var grade = path.
|
|
1193
|
-
var speed = path.
|
|
1292
|
+
protoOf(GravPowerProvider).g23 = function (course, path, pointIndex) {
|
|
1293
|
+
var m = course.r1z().v1z_1;
|
|
1294
|
+
var grade = path.f1v(pointIndex);
|
|
1295
|
+
var speed = path.x1v(pointIndex);
|
|
1194
1296
|
var tmp = -m * 9.8 * speed;
|
|
1195
1297
|
// Inline function 'kotlin.math.atan' call
|
|
1196
1298
|
// Inline function 'kotlin.math.sin' call
|
|
1197
1299
|
var x = Math.atan(grade);
|
|
1198
1300
|
var p = tmp * Math.sin(x);
|
|
1199
|
-
path.
|
|
1301
|
+
path.m1v(pointIndex, p);
|
|
1200
1302
|
return p;
|
|
1201
1303
|
};
|
|
1202
1304
|
var GravPowerProvider_instance;
|
|
@@ -1204,17 +1306,17 @@
|
|
|
1204
1306
|
return GravPowerProvider_instance;
|
|
1205
1307
|
}
|
|
1206
1308
|
function Harmonic(freqRadS, phaseRad, amp) {
|
|
1207
|
-
this.
|
|
1208
|
-
this.
|
|
1209
|
-
this.
|
|
1309
|
+
this.p23_1 = freqRadS;
|
|
1310
|
+
this.q23_1 = phaseRad;
|
|
1311
|
+
this.r23_1 = amp;
|
|
1210
1312
|
}
|
|
1211
1313
|
protoOf(Harmonic).toString = function () {
|
|
1212
|
-
return 'Harmonic(freqRadS=' + this.
|
|
1314
|
+
return 'Harmonic(freqRadS=' + this.p23_1 + ', phaseRad=' + this.q23_1 + ', amp=' + this.r23_1 + ')';
|
|
1213
1315
|
};
|
|
1214
1316
|
protoOf(Harmonic).hashCode = function () {
|
|
1215
|
-
var result = getNumberHashCode(this.
|
|
1216
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1217
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1317
|
+
var result = getNumberHashCode(this.p23_1);
|
|
1318
|
+
result = imul(result, 31) + getNumberHashCode(this.q23_1) | 0;
|
|
1319
|
+
result = imul(result, 31) + getNumberHashCode(this.r23_1) | 0;
|
|
1218
1320
|
return result;
|
|
1219
1321
|
};
|
|
1220
1322
|
protoOf(Harmonic).equals = function (other) {
|
|
@@ -1222,39 +1324,39 @@
|
|
|
1222
1324
|
return true;
|
|
1223
1325
|
if (!(other instanceof Harmonic))
|
|
1224
1326
|
return false;
|
|
1225
|
-
if (!equals(this.
|
|
1327
|
+
if (!equals(this.p23_1, other.p23_1))
|
|
1226
1328
|
return false;
|
|
1227
|
-
if (!equals(this.
|
|
1329
|
+
if (!equals(this.q23_1, other.q23_1))
|
|
1228
1330
|
return false;
|
|
1229
|
-
if (!equals(this.
|
|
1331
|
+
if (!equals(this.r23_1, other.r23_1))
|
|
1230
1332
|
return false;
|
|
1231
1333
|
return true;
|
|
1232
1334
|
};
|
|
1233
1335
|
function computeCorneringLimit($this, course, currentIndex, window_0) {
|
|
1234
|
-
var path = course.
|
|
1336
|
+
var path = course.f1z_1;
|
|
1235
1337
|
var radius = computeRadiusWindowed($this, path, currentIndex, window_0);
|
|
1236
1338
|
// Inline function 'kotlin.math.sqrt' call
|
|
1237
|
-
var x = 9.8 * radius * course.
|
|
1339
|
+
var x = 9.8 * radius * course.g1z_1.b20();
|
|
1238
1340
|
var vMax = Math.sqrt(x);
|
|
1239
1341
|
// Inline function 'kotlin.math.min' call
|
|
1240
|
-
var a = course.
|
|
1342
|
+
var a = course.g1z_1.d20();
|
|
1241
1343
|
var result = Math.min(a, vMax);
|
|
1242
|
-
path.
|
|
1344
|
+
path.b1w(currentIndex, result);
|
|
1243
1345
|
return result;
|
|
1244
1346
|
}
|
|
1245
1347
|
function computeRadiusWindowed($this, path, i, k) {
|
|
1246
1348
|
// Inline function 'kotlin.math.max' call
|
|
1247
1349
|
var b = i - k | 0;
|
|
1248
1350
|
var mini = Math.max(0, b);
|
|
1249
|
-
var tmp0 = path.
|
|
1351
|
+
var tmp0 = path.f1r_1 - 1 | 0;
|
|
1250
1352
|
// Inline function 'kotlin.math.min' call
|
|
1251
1353
|
var b_0 = i + k | 0;
|
|
1252
1354
|
var maxi = Math.min(tmp0, b_0);
|
|
1253
|
-
var totalBearingChange = $this.
|
|
1254
|
-
var totalDistance = path.
|
|
1355
|
+
var totalBearingChange = $this.t23(path.d1v(maxi) - path.d1v(mini));
|
|
1356
|
+
var totalDistance = path.w1u(maxi) - path.w1u(mini);
|
|
1255
1357
|
// Inline function 'kotlin.math.abs' call
|
|
1256
1358
|
if (Math.abs(totalBearingChange) < 0.001) {
|
|
1257
|
-
path.
|
|
1359
|
+
path.h1v(i, 200.0);
|
|
1258
1360
|
return 200.0;
|
|
1259
1361
|
}
|
|
1260
1362
|
// Inline function 'kotlin.math.abs' call
|
|
@@ -1263,47 +1365,47 @@
|
|
|
1263
1365
|
// Inline function 'kotlin.math.max' call
|
|
1264
1366
|
var b_1 = Math.min(200.0, raw);
|
|
1265
1367
|
var clamped = Math.max(5.0, b_1);
|
|
1266
|
-
path.
|
|
1368
|
+
path.h1v(i, clamped);
|
|
1267
1369
|
return clamped;
|
|
1268
1370
|
}
|
|
1269
1371
|
function computeBrakingLimit($this, course, currentIndex, nextIndex) {
|
|
1270
|
-
var path = course.
|
|
1271
|
-
var vf = path.
|
|
1272
|
-
var a = course.
|
|
1273
|
-
var d = path.
|
|
1372
|
+
var path = course.f1z_1;
|
|
1373
|
+
var vf = path.z1v(nextIndex);
|
|
1374
|
+
var a = course.g1z_1.c20();
|
|
1375
|
+
var d = path.w1u(nextIndex) - path.w1u(currentIndex);
|
|
1274
1376
|
// Inline function 'kotlin.math.sqrt' call
|
|
1275
1377
|
var x = vf * vf + 2.0 * a * d;
|
|
1276
1378
|
return Math.sqrt(x);
|
|
1277
1379
|
}
|
|
1278
1380
|
function MaxSpeedComputer() {
|
|
1279
|
-
this.
|
|
1280
|
-
this.
|
|
1281
|
-
this.
|
|
1282
|
-
this.
|
|
1283
|
-
this.
|
|
1284
|
-
}
|
|
1285
|
-
protoOf(MaxSpeedComputer).
|
|
1286
|
-
var path = course.
|
|
1287
|
-
var n = path.
|
|
1381
|
+
this.a21_1 = 200.0;
|
|
1382
|
+
this.b21_1 = 5.0;
|
|
1383
|
+
this.c21_1 = 2.0;
|
|
1384
|
+
this.d21_1 = 0.001;
|
|
1385
|
+
this.e21_1 = 10;
|
|
1386
|
+
}
|
|
1387
|
+
protoOf(MaxSpeedComputer).f21 = function (course) {
|
|
1388
|
+
var path = course.f1z_1;
|
|
1389
|
+
var n = path.f1r_1;
|
|
1288
1390
|
var inductionVariable = n - 1 | 0;
|
|
1289
1391
|
if (0 <= inductionVariable)
|
|
1290
1392
|
do {
|
|
1291
1393
|
var i = inductionVariable;
|
|
1292
1394
|
inductionVariable = inductionVariable + -1 | 0;
|
|
1293
1395
|
if (i === (n - 1 | 0)) {
|
|
1294
|
-
path.
|
|
1396
|
+
path.a1w(i, 2.0);
|
|
1295
1397
|
} else {
|
|
1296
1398
|
var cornering = computeCorneringLimit(this, course, i, 10);
|
|
1297
1399
|
var braking = computeBrakingLimit(this, course, i, i + 1 | 0);
|
|
1298
1400
|
// Inline function 'kotlin.math.min' call
|
|
1299
1401
|
var tmp$ret$0 = Math.min(cornering, braking);
|
|
1300
|
-
path.
|
|
1402
|
+
path.a1w(i, tmp$ret$0);
|
|
1301
1403
|
}
|
|
1302
1404
|
}
|
|
1303
1405
|
while (0 <= inductionVariable);
|
|
1304
|
-
path.
|
|
1406
|
+
path.q1s();
|
|
1305
1407
|
};
|
|
1306
|
-
protoOf(MaxSpeedComputer).
|
|
1408
|
+
protoOf(MaxSpeedComputer).t23 = function (angleIn) {
|
|
1307
1409
|
var a = angleIn;
|
|
1308
1410
|
while (a > 3.141592653589793)
|
|
1309
1411
|
a = a - 2.0 * 3.141592653589793;
|
|
@@ -1317,11 +1419,11 @@
|
|
|
1317
1419
|
}
|
|
1318
1420
|
function MuscularPowerProvider() {
|
|
1319
1421
|
}
|
|
1320
|
-
protoOf(MuscularPowerProvider).
|
|
1321
|
-
var muscular = course.
|
|
1322
|
-
path.
|
|
1323
|
-
var wheel = muscular * course.
|
|
1324
|
-
path.
|
|
1422
|
+
protoOf(MuscularPowerProvider).g23 = function (course, path, pointIndex) {
|
|
1423
|
+
var muscular = course.p1z_1.g23(course, path, pointIndex);
|
|
1424
|
+
path.s1v(pointIndex, muscular);
|
|
1425
|
+
var wheel = muscular * course.s1z().d1z_1;
|
|
1426
|
+
path.t1v(pointIndex, wheel);
|
|
1325
1427
|
return wheel;
|
|
1326
1428
|
};
|
|
1327
1429
|
var MuscularPowerProvider_instance;
|
|
@@ -1334,7 +1436,7 @@
|
|
|
1334
1436
|
var tol = dx / 1.0E7;
|
|
1335
1437
|
while (dt2 - dt1 >= tol) {
|
|
1336
1438
|
var dtMid = (dt1 + dt2) / 2.0;
|
|
1337
|
-
var dxMid = $this.
|
|
1439
|
+
var dxMid = $this.u23(pSum, equivalentMass, currentSpeed, dtMid);
|
|
1338
1440
|
if (dxMid < dx)
|
|
1339
1441
|
dt1 = dtMid;
|
|
1340
1442
|
else
|
|
@@ -1344,18 +1446,18 @@
|
|
|
1344
1446
|
}
|
|
1345
1447
|
function PowerComputer() {
|
|
1346
1448
|
}
|
|
1347
|
-
protoOf(PowerComputer).
|
|
1449
|
+
protoOf(PowerComputer).s23 = function (course, path, pointIndex, withCyclist) {
|
|
1348
1450
|
var pSum = 0.0;
|
|
1349
|
-
pSum = pSum + WheelBearingsPowerProvider_instance.
|
|
1350
|
-
pSum = pSum + RollingResistancePowerProvider_instance.
|
|
1351
|
-
pSum = pSum + AeroPowerProvider_instance.
|
|
1352
|
-
pSum = pSum + GravPowerProvider_instance.
|
|
1451
|
+
pSum = pSum + WheelBearingsPowerProvider_instance.g23(course, path, pointIndex);
|
|
1452
|
+
pSum = pSum + RollingResistancePowerProvider_instance.g23(course, path, pointIndex);
|
|
1453
|
+
pSum = pSum + AeroPowerProvider_instance.g23(course, path, pointIndex);
|
|
1454
|
+
pSum = pSum + GravPowerProvider_instance.g23(course, path, pointIndex);
|
|
1353
1455
|
if (withCyclist) {
|
|
1354
|
-
pSum = pSum + MuscularPowerProvider_instance.
|
|
1456
|
+
pSum = pSum + MuscularPowerProvider_instance.g23(course, path, pointIndex);
|
|
1355
1457
|
}
|
|
1356
1458
|
return pSum;
|
|
1357
1459
|
};
|
|
1358
|
-
protoOf(PowerComputer).
|
|
1460
|
+
protoOf(PowerComputer).u23 = function (pSum, equivalentMass, currentSpeed, dt) {
|
|
1359
1461
|
// Inline function 'kotlin.math.sqrt' call
|
|
1360
1462
|
var x = dt * pSum / (0.5 * equivalentMass) + currentSpeed * currentSpeed;
|
|
1361
1463
|
var tmp0 = Math.sqrt(x);
|
|
@@ -1364,40 +1466,40 @@
|
|
|
1364
1466
|
var newSpeed = Math.max(tmp0, b);
|
|
1365
1467
|
return (currentSpeed + newSpeed) * dt / 2.0;
|
|
1366
1468
|
};
|
|
1367
|
-
protoOf(PowerComputer).
|
|
1469
|
+
protoOf(PowerComputer).v23 = function (equivalentMass, s1, s2, dt) {
|
|
1368
1470
|
return 0.5 * equivalentMass * (s2 * s2 - s1 * s1) / dt;
|
|
1369
1471
|
};
|
|
1370
|
-
protoOf(PowerComputer).
|
|
1472
|
+
protoOf(PowerComputer).w23 = function (pSum, equivalentMass, currentSpeed, dx) {
|
|
1371
1473
|
var dt = 0.1;
|
|
1372
|
-
while (this.
|
|
1474
|
+
while (this.u23(pSum, equivalentMass, currentSpeed, dt) <= dx) {
|
|
1373
1475
|
dt = dt + 0.1;
|
|
1374
1476
|
}
|
|
1375
1477
|
return getDtInner(this, pSum, equivalentMass, currentSpeed, dx, dt - 0.1, dt);
|
|
1376
1478
|
};
|
|
1377
|
-
protoOf(PowerComputer).
|
|
1479
|
+
protoOf(PowerComputer).x23 = function (course, path, equivalentMass, i) {
|
|
1378
1480
|
if (i === 0) {
|
|
1379
|
-
path.
|
|
1481
|
+
path.w1v(i, 0.0);
|
|
1380
1482
|
return Unit_instance;
|
|
1381
1483
|
}
|
|
1382
|
-
var resistive = this.
|
|
1383
|
-
var s1 = path.
|
|
1384
|
-
var s2 = path.
|
|
1385
|
-
var dtSeconds = path.
|
|
1386
|
-
var totPower = this.
|
|
1387
|
-
path.
|
|
1484
|
+
var resistive = this.s23(course, path, i - 1 | 0, false);
|
|
1485
|
+
var s1 = path.x1v(i - 1 | 0);
|
|
1486
|
+
var s2 = path.x1v(i);
|
|
1487
|
+
var dtSeconds = path.b1v(i) / 1000.0;
|
|
1488
|
+
var totPower = this.v23(equivalentMass, s1, s2, dtSeconds);
|
|
1489
|
+
path.u1v(i, totPower);
|
|
1388
1490
|
var powerWheel = totPower - resistive;
|
|
1389
|
-
path.
|
|
1491
|
+
path.v1v(i, powerWheel);
|
|
1390
1492
|
// Inline function 'kotlin.math.max' call
|
|
1391
|
-
var computed = Math.max(0.0, powerWheel) / course.
|
|
1392
|
-
path.
|
|
1493
|
+
var computed = Math.max(0.0, powerWheel) / course.s1z().d1z_1;
|
|
1494
|
+
path.w1v(i, computed);
|
|
1393
1495
|
};
|
|
1394
|
-
protoOf(PowerComputer).
|
|
1395
|
-
var m = course.
|
|
1396
|
-
var totalInertia = course.
|
|
1397
|
-
return m + totalInertia / (course.
|
|
1496
|
+
protoOf(PowerComputer).y23 = function (course) {
|
|
1497
|
+
var m = course.g1z_1.v1z_1;
|
|
1498
|
+
var totalInertia = course.h1z_1.a1z_1 + course.h1z_1.b1z_1;
|
|
1499
|
+
return m + totalInertia / (course.h1z_1.c1z_1 * course.h1z_1.c1z_1);
|
|
1398
1500
|
};
|
|
1399
|
-
protoOf(PowerComputer).
|
|
1400
|
-
return this.
|
|
1501
|
+
protoOf(PowerComputer).z23 = function (course) {
|
|
1502
|
+
return this.y23(course.l1z_1);
|
|
1401
1503
|
};
|
|
1402
1504
|
var PowerComputer_instance;
|
|
1403
1505
|
function PowerComputer_getInstance() {
|
|
@@ -1407,34 +1509,34 @@
|
|
|
1407
1509
|
useHarmonics = useHarmonics === VOID ? false : useHarmonics;
|
|
1408
1510
|
random = random === VOID ? Default_getInstance() : random;
|
|
1409
1511
|
CyclistPowerProviderBase.call(this, useHarmonics, random);
|
|
1410
|
-
this.
|
|
1512
|
+
this.c24_1 = power;
|
|
1411
1513
|
}
|
|
1412
|
-
protoOf(PowerProviderConstant).
|
|
1413
|
-
return this.
|
|
1514
|
+
protoOf(PowerProviderConstant).o23 = function (course, path, pointIndex) {
|
|
1515
|
+
return this.c24_1;
|
|
1414
1516
|
};
|
|
1415
1517
|
function PowerProviderConstantWithTiring(power, useHarmonics, durationSeconds, random) {
|
|
1416
1518
|
useHarmonics = useHarmonics === VOID ? false : useHarmonics;
|
|
1417
1519
|
random = random === VOID ? Default_getInstance() : random;
|
|
1418
1520
|
CyclistPowerProviderBase.call(this, useHarmonics, random);
|
|
1419
|
-
this.
|
|
1420
|
-
this.
|
|
1521
|
+
this.f24_1 = power;
|
|
1522
|
+
this.g24_1 = durationSeconds;
|
|
1421
1523
|
// Inline function 'kotlin.require' call
|
|
1422
|
-
if (!(this.
|
|
1423
|
-
var message = 'durationSeconds must be > 0, got ' + this.
|
|
1524
|
+
if (!(this.g24_1 > 0.0)) {
|
|
1525
|
+
var message = 'durationSeconds must be > 0, got ' + this.g24_1;
|
|
1424
1526
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1425
1527
|
}
|
|
1426
1528
|
}
|
|
1427
|
-
protoOf(PowerProviderConstantWithTiring).
|
|
1428
|
-
var elapsedS = path.
|
|
1529
|
+
protoOf(PowerProviderConstantWithTiring).o23 = function (course, path, pointIndex) {
|
|
1530
|
+
var elapsedS = path.z1u(pointIndex) / 1000.0;
|
|
1429
1531
|
// Inline function 'kotlin.math.max' call
|
|
1430
|
-
var b = 1.0 - 0.6 * elapsedS / this.
|
|
1532
|
+
var b = 1.0 - 0.6 * elapsedS / this.g24_1;
|
|
1431
1533
|
var c = Math.max(0.5, b);
|
|
1432
|
-
return this.
|
|
1534
|
+
return this.f24_1 * c;
|
|
1433
1535
|
};
|
|
1434
1536
|
function PowerProviderFromData() {
|
|
1435
1537
|
}
|
|
1436
|
-
protoOf(PowerProviderFromData).
|
|
1437
|
-
return path.
|
|
1538
|
+
protoOf(PowerProviderFromData).g23 = function (course, path, pointIndex) {
|
|
1539
|
+
return path.o1r(pointIndex);
|
|
1438
1540
|
};
|
|
1439
1541
|
var PowerProviderFromData_instance;
|
|
1440
1542
|
function PowerProviderFromData_getInstance() {
|
|
@@ -1442,7 +1544,7 @@
|
|
|
1442
1544
|
}
|
|
1443
1545
|
function RhoProviderDefault() {
|
|
1444
1546
|
}
|
|
1445
|
-
protoOf(RhoProviderDefault).
|
|
1547
|
+
protoOf(RhoProviderDefault).j23 = function (course, path, pointIndex) {
|
|
1446
1548
|
return 1.225;
|
|
1447
1549
|
};
|
|
1448
1550
|
var RhoProviderDefault_instance;
|
|
@@ -1450,16 +1552,16 @@
|
|
|
1450
1552
|
return RhoProviderDefault_instance;
|
|
1451
1553
|
}
|
|
1452
1554
|
function RhoProviderEstimate() {
|
|
1453
|
-
this.
|
|
1454
|
-
this.
|
|
1455
|
-
this.
|
|
1456
|
-
this.
|
|
1457
|
-
this.
|
|
1458
|
-
}
|
|
1459
|
-
protoOf(RhoProviderEstimate).
|
|
1460
|
-
var providedTemp = path.
|
|
1555
|
+
this.h24_1 = 101325.0;
|
|
1556
|
+
this.i24_1 = 288.15;
|
|
1557
|
+
this.j24_1 = 9.80665;
|
|
1558
|
+
this.k24_1 = 0.0065;
|
|
1559
|
+
this.l24_1 = 287.05;
|
|
1560
|
+
}
|
|
1561
|
+
protoOf(RhoProviderEstimate).j23 = function (course, path, pointIndex) {
|
|
1562
|
+
var providedTemp = path.y1t(pointIndex, PointField_TEMPERATURE_getInstance());
|
|
1461
1563
|
var temperatureC = isNaN_0(providedTemp) ? 15.0 : providedTemp;
|
|
1462
|
-
var providedElevation = path.
|
|
1564
|
+
var providedElevation = path.j1r(pointIndex);
|
|
1463
1565
|
var altitude = isNaN_0(providedElevation) ? 0.0 : providedElevation;
|
|
1464
1566
|
var tKelvin = temperatureC + 273.15;
|
|
1465
1567
|
var tmp0 = 1.0 - 0.0065 * altitude / 288.15;
|
|
@@ -1474,17 +1576,17 @@
|
|
|
1474
1576
|
}
|
|
1475
1577
|
function RollingResistancePowerProvider() {
|
|
1476
1578
|
}
|
|
1477
|
-
protoOf(RollingResistancePowerProvider).
|
|
1478
|
-
var m = course.
|
|
1479
|
-
var crr = course.
|
|
1480
|
-
var grade = path.
|
|
1481
|
-
var speed = path.
|
|
1579
|
+
protoOf(RollingResistancePowerProvider).g23 = function (course, path, pointIndex) {
|
|
1580
|
+
var m = course.r1z().v1z_1;
|
|
1581
|
+
var crr = course.s1z().z1y_1;
|
|
1582
|
+
var grade = path.f1v(pointIndex);
|
|
1583
|
+
var speed = path.x1v(pointIndex);
|
|
1482
1584
|
// Inline function 'kotlin.math.atan' call
|
|
1483
1585
|
// Inline function 'kotlin.math.cos' call
|
|
1484
1586
|
var x = Math.atan(grade);
|
|
1485
1587
|
var coef = Math.cos(x);
|
|
1486
1588
|
var p = -coef * m * 9.8 * speed * crr;
|
|
1487
|
-
path.
|
|
1589
|
+
path.n1v(pointIndex, p);
|
|
1488
1590
|
return p;
|
|
1489
1591
|
};
|
|
1490
1592
|
var RollingResistancePowerProvider_instance;
|
|
@@ -1495,15 +1597,15 @@
|
|
|
1495
1597
|
var _iterator__ex2g4s = get_entries().i();
|
|
1496
1598
|
while (_iterator__ex2g4s.j()) {
|
|
1497
1599
|
var field = _iterator__ex2g4s.k();
|
|
1498
|
-
dst.
|
|
1600
|
+
dst.f1u(j, field, src.y1t(i, field));
|
|
1499
1601
|
}
|
|
1500
1602
|
}
|
|
1501
1603
|
function VirtualizeService() {
|
|
1502
|
-
this.
|
|
1604
|
+
this.g21_1 = 100000;
|
|
1503
1605
|
}
|
|
1504
|
-
protoOf(VirtualizeService).
|
|
1505
|
-
var input = course.
|
|
1506
|
-
var n = input.
|
|
1606
|
+
protoOf(VirtualizeService).h21 = function (course) {
|
|
1607
|
+
var input = course.q1z();
|
|
1608
|
+
var n = input.f1r_1;
|
|
1507
1609
|
if (n === 0)
|
|
1508
1610
|
return new Path(0);
|
|
1509
1611
|
if (n === 1) {
|
|
@@ -1511,54 +1613,54 @@
|
|
|
1511
1613
|
copyAllFields(this, input, 0, singleton, 0);
|
|
1512
1614
|
return singleton;
|
|
1513
1615
|
}
|
|
1514
|
-
var mEq = PowerComputer_instance.
|
|
1616
|
+
var mEq = PowerComputer_instance.z23(course);
|
|
1515
1617
|
var out = new Path(n);
|
|
1516
1618
|
copyAllFields(this, input, 0, out, 0);
|
|
1517
1619
|
var speed = 0.5555555555555556;
|
|
1518
1620
|
var startTimeMs = 0.0;
|
|
1519
1621
|
var timeMs = startTimeMs;
|
|
1520
|
-
out.
|
|
1521
|
-
out.
|
|
1522
|
-
out.
|
|
1523
|
-
out.
|
|
1622
|
+
out.c1s(0, timeMs);
|
|
1623
|
+
out.a1v(0, 0.0);
|
|
1624
|
+
out.y1v(0, speed);
|
|
1625
|
+
out.c1w(0, speed);
|
|
1524
1626
|
var i = 1;
|
|
1525
1627
|
var iter = 0;
|
|
1526
1628
|
$l$loop: while (i < n) {
|
|
1527
|
-
var dx = input.
|
|
1528
|
-
var pSum = PowerComputer_instance.
|
|
1529
|
-
var dt = PowerComputer_instance.
|
|
1629
|
+
var dx = input.w1u(i) - input.w1u(i - 1 | 0);
|
|
1630
|
+
var pSum = PowerComputer_instance.s23(course, out, i - 1 | 0, true);
|
|
1631
|
+
var dt = PowerComputer_instance.w23(pSum, mEq, speed, dx);
|
|
1530
1632
|
var speedNew = 2.0 * dx / dt - speed;
|
|
1531
1633
|
copyAllFields(this, input, i, out, i);
|
|
1532
|
-
var speedMax = input.
|
|
1634
|
+
var speedMax = input.z1v(i);
|
|
1533
1635
|
if (speedNew > speedMax) {
|
|
1534
1636
|
speedNew = speedMax;
|
|
1535
1637
|
dt = 2.0 * dx / (speedNew + speed);
|
|
1536
1638
|
}
|
|
1537
1639
|
speed = speedNew;
|
|
1538
1640
|
timeMs = timeMs + dt * 1000.0;
|
|
1539
|
-
out.
|
|
1540
|
-
out.
|
|
1541
|
-
out.
|
|
1542
|
-
out.
|
|
1543
|
-
out.
|
|
1544
|
-
out.
|
|
1641
|
+
out.c1s(i, timeMs);
|
|
1642
|
+
out.a1v(i, timeMs - startTimeMs);
|
|
1643
|
+
out.y1u(i, dx);
|
|
1644
|
+
out.c1v(i, dt * 1000.0);
|
|
1645
|
+
out.y1v(i, speed);
|
|
1646
|
+
out.c1w(i, speed);
|
|
1545
1647
|
i = i + 1 | 0;
|
|
1546
1648
|
var _unary__edvuaz = iter;
|
|
1547
1649
|
iter = _unary__edvuaz + 1 | 0;
|
|
1548
1650
|
if (_unary__edvuaz > 100000)
|
|
1549
1651
|
break $l$loop;
|
|
1550
1652
|
}
|
|
1551
|
-
var progression = out.
|
|
1653
|
+
var progression = out.k1w();
|
|
1552
1654
|
var inductionVariable = progression.lc_1;
|
|
1553
1655
|
var last = progression.mc_1;
|
|
1554
1656
|
if (inductionVariable <= last)
|
|
1555
1657
|
do {
|
|
1556
1658
|
var j = inductionVariable;
|
|
1557
1659
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1558
|
-
PowerComputer_instance.
|
|
1660
|
+
PowerComputer_instance.x23(course, out, mEq, j);
|
|
1559
1661
|
}
|
|
1560
1662
|
while (!(j === last));
|
|
1561
|
-
out.
|
|
1663
|
+
out.q1s();
|
|
1562
1664
|
return out;
|
|
1563
1665
|
};
|
|
1564
1666
|
var VirtualizeService_instance;
|
|
@@ -1567,10 +1669,10 @@
|
|
|
1567
1669
|
}
|
|
1568
1670
|
function WheelBearingsPowerProvider() {
|
|
1569
1671
|
}
|
|
1570
|
-
protoOf(WheelBearingsPowerProvider).
|
|
1571
|
-
var speed = path.
|
|
1672
|
+
protoOf(WheelBearingsPowerProvider).g23 = function (course, path, pointIndex) {
|
|
1673
|
+
var speed = path.x1v(pointIndex);
|
|
1572
1674
|
var p = -speed * (91.0 + 8.7 * speed) / 1000.0;
|
|
1573
|
-
path.
|
|
1675
|
+
path.o1v(pointIndex, p);
|
|
1574
1676
|
return p;
|
|
1575
1677
|
};
|
|
1576
1678
|
var WheelBearingsPowerProvider_instance;
|
|
@@ -1579,25 +1681,25 @@
|
|
|
1579
1681
|
}
|
|
1580
1682
|
function Companion_6() {
|
|
1581
1683
|
Companion_instance_6 = this;
|
|
1582
|
-
this.
|
|
1684
|
+
this.m24_1 = new Wind(0.0, 0.0);
|
|
1583
1685
|
}
|
|
1584
1686
|
var Companion_instance_6;
|
|
1585
|
-
function
|
|
1687
|
+
function Companion_getInstance_9() {
|
|
1586
1688
|
if (Companion_instance_6 == null)
|
|
1587
1689
|
new Companion_6();
|
|
1588
1690
|
return Companion_instance_6;
|
|
1589
1691
|
}
|
|
1590
1692
|
function Wind(speedMS, directionRad) {
|
|
1591
|
-
|
|
1592
|
-
this.
|
|
1593
|
-
this.
|
|
1693
|
+
Companion_getInstance_9();
|
|
1694
|
+
this.d23_1 = speedMS;
|
|
1695
|
+
this.e23_1 = directionRad;
|
|
1594
1696
|
}
|
|
1595
1697
|
protoOf(Wind).toString = function () {
|
|
1596
|
-
return 'Wind(speedMS=' + this.
|
|
1698
|
+
return 'Wind(speedMS=' + this.d23_1 + ', directionRad=' + this.e23_1 + ')';
|
|
1597
1699
|
};
|
|
1598
1700
|
protoOf(Wind).hashCode = function () {
|
|
1599
|
-
var result = getNumberHashCode(this.
|
|
1600
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1701
|
+
var result = getNumberHashCode(this.d23_1);
|
|
1702
|
+
result = imul(result, 31) + getNumberHashCode(this.e23_1) | 0;
|
|
1601
1703
|
return result;
|
|
1602
1704
|
};
|
|
1603
1705
|
protoOf(Wind).equals = function (other) {
|
|
@@ -1605,30 +1707,30 @@
|
|
|
1605
1707
|
return true;
|
|
1606
1708
|
if (!(other instanceof Wind))
|
|
1607
1709
|
return false;
|
|
1608
|
-
if (!equals(this.
|
|
1710
|
+
if (!equals(this.d23_1, other.d23_1))
|
|
1609
1711
|
return false;
|
|
1610
|
-
if (!equals(this.
|
|
1712
|
+
if (!equals(this.e23_1, other.e23_1))
|
|
1611
1713
|
return false;
|
|
1612
1714
|
return true;
|
|
1613
1715
|
};
|
|
1614
1716
|
function WindProviderNone() {
|
|
1615
1717
|
}
|
|
1616
|
-
protoOf(WindProviderNone).
|
|
1617
|
-
return
|
|
1718
|
+
protoOf(WindProviderNone).i23 = function (course, path, pointIndex) {
|
|
1719
|
+
return Companion_getInstance_9().m24_1;
|
|
1618
1720
|
};
|
|
1619
1721
|
var WindProviderNone_instance;
|
|
1620
1722
|
function WindProviderNone_getInstance() {
|
|
1621
1723
|
return WindProviderNone_instance;
|
|
1622
1724
|
}
|
|
1623
1725
|
function WindProviderConstant(wind) {
|
|
1624
|
-
this.
|
|
1726
|
+
this.n24_1 = wind;
|
|
1625
1727
|
}
|
|
1626
|
-
protoOf(WindProviderConstant).
|
|
1627
|
-
return this.
|
|
1728
|
+
protoOf(WindProviderConstant).i23 = function (course, path, pointIndex) {
|
|
1729
|
+
return this.n24_1;
|
|
1628
1730
|
};
|
|
1629
1731
|
function parseGpxWaypoints(xml) {
|
|
1630
1732
|
// Inline function 'kotlin.collections.map' call
|
|
1631
|
-
var this_0 = GpxParser_instance.
|
|
1733
|
+
var this_0 = GpxParser_instance.y1r(xml).n1q_1;
|
|
1632
1734
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1633
1735
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
1634
1736
|
var _iterator__ex2g4s = this_0.i();
|
|
@@ -1641,19 +1743,29 @@
|
|
|
1641
1743
|
return copyToArray(destination);
|
|
1642
1744
|
}
|
|
1643
1745
|
function parseGpx(xml) {
|
|
1644
|
-
return firstTrackAsPath(GpxParser_instance.
|
|
1746
|
+
return firstTrackAsPath(GpxParser_instance.y1r(xml));
|
|
1645
1747
|
}
|
|
1646
1748
|
function parseGpxTracks(xml) {
|
|
1647
1749
|
// Inline function 'kotlin.collections.toTypedArray' call
|
|
1648
|
-
var this_0 = tracksAsPaths(GpxParser_instance.
|
|
1750
|
+
var this_0 = tracksAsPaths(GpxParser_instance.y1r(xml));
|
|
1649
1751
|
return copyToArray(this_0);
|
|
1650
1752
|
}
|
|
1651
1753
|
function parseGpxSegments(xml) {
|
|
1652
1754
|
// Inline function 'kotlin.collections.toTypedArray' call
|
|
1653
|
-
var this_0 = segmentsAsPaths(GpxParser_instance.
|
|
1755
|
+
var this_0 = segmentsAsPaths(GpxParser_instance.y1r(xml));
|
|
1654
1756
|
return copyToArray(this_0);
|
|
1655
1757
|
}
|
|
1656
|
-
function
|
|
1758
|
+
function parseGpxTracksOnly(xml) {
|
|
1759
|
+
// Inline function 'kotlin.collections.toTypedArray' call
|
|
1760
|
+
var this_0 = tracksAsPaths(GpxParser_instance.y1r(xml), setOf(GpxPathKind_TRACK_getInstance()));
|
|
1761
|
+
return copyToArray(this_0);
|
|
1762
|
+
}
|
|
1763
|
+
function parseGpxRoutesOnly(xml) {
|
|
1764
|
+
// Inline function 'kotlin.collections.toTypedArray' call
|
|
1765
|
+
var this_0 = tracksAsPaths(GpxParser_instance.y1r(xml), setOf(GpxPathKind_ROUTE_getInstance()));
|
|
1766
|
+
return copyToArray(this_0);
|
|
1767
|
+
}
|
|
1768
|
+
function writeGpxTracks(paths, waypoints, writeExtensions) {
|
|
1657
1769
|
var tmp;
|
|
1658
1770
|
if (waypoints === VOID) {
|
|
1659
1771
|
// Inline function 'kotlin.emptyArray' call
|
|
@@ -1662,6 +1774,7 @@
|
|
|
1662
1774
|
tmp = waypoints;
|
|
1663
1775
|
}
|
|
1664
1776
|
waypoints = tmp;
|
|
1777
|
+
writeExtensions = writeExtensions === VOID ? true : writeExtensions;
|
|
1665
1778
|
var tmp_0 = GpxWriter_instance;
|
|
1666
1779
|
var tmp_1 = toList(paths);
|
|
1667
1780
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -1675,31 +1788,33 @@
|
|
|
1675
1788
|
var tmp$ret$3 = toGpxWaypoint(item);
|
|
1676
1789
|
destination.h(tmp$ret$3);
|
|
1677
1790
|
}
|
|
1678
|
-
return tmp_0.
|
|
1791
|
+
return tmp_0.a1t(tmp_1, VOID, VOID, destination, VOID, writeExtensions);
|
|
1679
1792
|
}
|
|
1680
1793
|
function pathSize(path) {
|
|
1681
|
-
return path.
|
|
1794
|
+
return path.f1r_1;
|
|
1682
1795
|
}
|
|
1683
1796
|
function pathTotalDistance(path) {
|
|
1684
|
-
return path.
|
|
1797
|
+
return path.j1s_1;
|
|
1685
1798
|
}
|
|
1686
1799
|
function pathDurationMs(path) {
|
|
1687
|
-
return path.
|
|
1800
|
+
return path.o1s_1;
|
|
1688
1801
|
}
|
|
1689
1802
|
function pathElevationGain(path) {
|
|
1690
|
-
return path.
|
|
1803
|
+
return path.m1s_1;
|
|
1691
1804
|
}
|
|
1692
1805
|
function pathElevationLoss(path) {
|
|
1693
|
-
return path.
|
|
1806
|
+
return path.n1s_1;
|
|
1694
1807
|
}
|
|
1695
1808
|
function pointAt(path, i) {
|
|
1696
|
-
return pointObj(path.
|
|
1809
|
+
return pointObj(path.l1w(i), path.m1w(i), path.j1r(i), path.k1r(i), path.x1v(i), path.p1r(i), path.w1u(i), path.f1v(i));
|
|
1697
1810
|
}
|
|
1698
|
-
function writeGpx(path) {
|
|
1699
|
-
|
|
1811
|
+
function writeGpx(path, writeExtensions) {
|
|
1812
|
+
writeExtensions = writeExtensions === VOID ? true : writeExtensions;
|
|
1813
|
+
return GpxWriter_instance.y1s(toGpxDocument(path, VOID, 'virtualized'), writeExtensions);
|
|
1700
1814
|
}
|
|
1701
|
-
function writeGpxAt(path, startTimeEpochMs) {
|
|
1702
|
-
|
|
1815
|
+
function writeGpxAt(path, startTimeEpochMs, writeExtensions) {
|
|
1816
|
+
writeExtensions = writeExtensions === VOID ? true : writeExtensions;
|
|
1817
|
+
return GpxWriter_instance.y1s(toGpxDocument(path, VOID, 'virtualized', Companion_getInstance().nd(numberToLong(startTimeEpochMs))), writeExtensions);
|
|
1703
1818
|
}
|
|
1704
1819
|
function enhance(path, options) {
|
|
1705
1820
|
var tmp = GlobalScope_instance;
|
|
@@ -1710,7 +1825,7 @@
|
|
|
1710
1825
|
return promise(tmp, VOID, VOID, enhanceWithCourse$slambda_0(options, path, cyclist, bike, wind, power, null));
|
|
1711
1826
|
}
|
|
1712
1827
|
function getField(path, i, fieldProp) {
|
|
1713
|
-
var tmp0_elvis_lhs = Companion_getInstance_0().
|
|
1828
|
+
var tmp0_elvis_lhs = Companion_getInstance_0().r1w(fieldProp);
|
|
1714
1829
|
var tmp;
|
|
1715
1830
|
if (tmp0_elvis_lhs == null) {
|
|
1716
1831
|
// Inline function 'kotlin.error' call
|
|
@@ -1720,7 +1835,7 @@
|
|
|
1720
1835
|
tmp = tmp0_elvis_lhs;
|
|
1721
1836
|
}
|
|
1722
1837
|
var field = tmp;
|
|
1723
|
-
return path.
|
|
1838
|
+
return path.y1t(i, field);
|
|
1724
1839
|
}
|
|
1725
1840
|
function fieldDefinitions() {
|
|
1726
1841
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -1731,13 +1846,13 @@
|
|
|
1731
1846
|
while (_iterator__ex2g4s.j()) {
|
|
1732
1847
|
var item = _iterator__ex2g4s.k();
|
|
1733
1848
|
var o = {};
|
|
1734
|
-
o.prop = item.
|
|
1735
|
-
o.unit = item.
|
|
1736
|
-
o.shortDescription = item.
|
|
1737
|
-
o.categoryId = item.
|
|
1738
|
-
o.categoryName = item.
|
|
1739
|
-
o.notSelectable = item.
|
|
1740
|
-
o.anglesInRadians = item.
|
|
1849
|
+
o.prop = item.m1t_1;
|
|
1850
|
+
o.unit = item.n1t_1;
|
|
1851
|
+
o.shortDescription = item.o1t_1;
|
|
1852
|
+
o.categoryId = item.p1t_1.u1w_1;
|
|
1853
|
+
o.categoryName = item.p1t_1.v1w_1;
|
|
1854
|
+
o.notSelectable = item.q1t_1;
|
|
1855
|
+
o.anglesInRadians = item.r1t_1;
|
|
1741
1856
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1742
1857
|
destination.h(o);
|
|
1743
1858
|
}
|
|
@@ -1745,10 +1860,10 @@
|
|
|
1745
1860
|
return copyToArray(destination);
|
|
1746
1861
|
}
|
|
1747
1862
|
function pathLatitudeDeg(path, i) {
|
|
1748
|
-
return path.
|
|
1863
|
+
return path.l1w(i);
|
|
1749
1864
|
}
|
|
1750
1865
|
function pathLongitudeDeg(path, i) {
|
|
1751
|
-
return path.
|
|
1866
|
+
return path.m1w(i);
|
|
1752
1867
|
}
|
|
1753
1868
|
function pathToCsv(path, separator, unitsInHeader) {
|
|
1754
1869
|
var tmp = CsvWriter_instance;
|
|
@@ -1760,17 +1875,33 @@
|
|
|
1760
1875
|
} else {
|
|
1761
1876
|
tmp_0 = tmp0_elvis_lhs;
|
|
1762
1877
|
}
|
|
1763
|
-
return tmp.
|
|
1878
|
+
return tmp.x1t(path, new CsvOptions(VOID, tmp_0, unitsInHeader));
|
|
1764
1879
|
}
|
|
1765
1880
|
function pathToJson(path, pretty) {
|
|
1766
|
-
return JsonWriter_instance.
|
|
1881
|
+
return JsonWriter_instance.e1u(path, new JsonOptions(VOID, pretty));
|
|
1767
1882
|
}
|
|
1768
1883
|
function pathToFit(path, name, startTimeEpochMs) {
|
|
1769
1884
|
return toFitBytes(path, name, Companion_getInstance().nd(numberToLong(startTimeEpochMs)));
|
|
1770
1885
|
}
|
|
1886
|
+
function pathsToFit(paths, name, startTimeEpochMs, interPathGapMs) {
|
|
1887
|
+
interPathGapMs = interPathGapMs === VOID ? 0.0 : interPathGapMs;
|
|
1888
|
+
var tmp = toList(paths);
|
|
1889
|
+
var tmp_0 = Companion_getInstance().nd(numberToLong(startTimeEpochMs));
|
|
1890
|
+
Companion_getInstance_1();
|
|
1891
|
+
// Inline function 'kotlin.time.Companion.milliseconds' call
|
|
1892
|
+
var this_0 = numberToLong(interPathGapMs);
|
|
1893
|
+
var tmp$ret$0 = toDuration(this_0, DurationUnit_MILLISECONDS_getInstance());
|
|
1894
|
+
return toFitBytes_0(tmp, name, tmp_0, VOID, tmp$ret$0);
|
|
1895
|
+
}
|
|
1896
|
+
function dominantHeadwindAzimuth(path) {
|
|
1897
|
+
return dominantHeadwindAzimuthDeg(path);
|
|
1898
|
+
}
|
|
1899
|
+
function dominantHeadwindAzimuthOfTracks(paths) {
|
|
1900
|
+
return dominantHeadwindAzimuthDeg_0(toList(paths));
|
|
1901
|
+
}
|
|
1771
1902
|
function detectClimbs(path) {
|
|
1772
1903
|
// Inline function 'kotlin.collections.map' call
|
|
1773
|
-
var this_0 = ClimbDetector_instance.
|
|
1904
|
+
var this_0 = ClimbDetector_instance.c23(path);
|
|
1774
1905
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1775
1906
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
1776
1907
|
var _iterator__ex2g4s = this_0.i();
|
|
@@ -1784,7 +1915,7 @@
|
|
|
1784
1915
|
}
|
|
1785
1916
|
function detectClimbsWithOptions(path, minMinClimbElevationM, maxMinClimbElevationM, minClimbElevationRatio, minGradePercent, maxDiffRealGrade, booster) {
|
|
1786
1917
|
// Inline function 'kotlin.collections.map' call
|
|
1787
|
-
var this_0 = ClimbDetector_instance.
|
|
1918
|
+
var this_0 = ClimbDetector_instance.b23(path, new ClimbOptions(minMinClimbElevationM, maxMinClimbElevationM, minClimbElevationRatio, minGradePercent, maxDiffRealGrade, booster));
|
|
1788
1919
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1789
1920
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
1790
1921
|
var _iterator__ex2g4s = this_0.i();
|
|
@@ -1798,14 +1929,14 @@
|
|
|
1798
1929
|
}
|
|
1799
1930
|
function waypointObj(w) {
|
|
1800
1931
|
var o = {};
|
|
1801
|
-
o.latitudeDeg = w.
|
|
1802
|
-
o.longitudeDeg = w.
|
|
1803
|
-
o.elevationM = w.
|
|
1804
|
-
o.name = w.
|
|
1805
|
-
o.description = w.
|
|
1806
|
-
o.symbol = w.
|
|
1807
|
-
o.type = w.
|
|
1808
|
-
var tmp0_safe_receiver = w.
|
|
1932
|
+
o.latitudeDeg = w.d1q_1;
|
|
1933
|
+
o.longitudeDeg = w.e1q_1;
|
|
1934
|
+
o.elevationM = w.f1q_1;
|
|
1935
|
+
o.name = w.g1q_1;
|
|
1936
|
+
o.description = w.h1q_1;
|
|
1937
|
+
o.symbol = w.i1q_1;
|
|
1938
|
+
o.type = w.j1q_1;
|
|
1939
|
+
var tmp0_safe_receiver = w.k1q_1;
|
|
1809
1940
|
o.timeEpochMs = tmp0_safe_receiver == null ? null : toNumber(tmp0_safe_receiver);
|
|
1810
1941
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1811
1942
|
return o;
|
|
@@ -1902,32 +2033,32 @@
|
|
|
1902
2033
|
}
|
|
1903
2034
|
function toDto(_this__u8e3s4) {
|
|
1904
2035
|
var o = {};
|
|
1905
|
-
o.startDistanceM = _this__u8e3s4.
|
|
1906
|
-
o.endDistanceM = _this__u8e3s4.
|
|
1907
|
-
o.startElevationM = _this__u8e3s4.
|
|
1908
|
-
o.endElevationM = _this__u8e3s4.
|
|
1909
|
-
o.lengthM = _this__u8e3s4.
|
|
1910
|
-
o.elevationGainM = _this__u8e3s4.
|
|
1911
|
-
o.grade = _this__u8e3s4.
|
|
2036
|
+
o.startDistanceM = _this__u8e3s4.y21_1;
|
|
2037
|
+
o.endDistanceM = _this__u8e3s4.z21_1;
|
|
2038
|
+
o.startElevationM = _this__u8e3s4.a22_1;
|
|
2039
|
+
o.endElevationM = _this__u8e3s4.b22_1;
|
|
2040
|
+
o.lengthM = _this__u8e3s4.u21();
|
|
2041
|
+
o.elevationGainM = _this__u8e3s4.v21();
|
|
2042
|
+
o.grade = _this__u8e3s4.c22();
|
|
1912
2043
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1913
2044
|
return o;
|
|
1914
2045
|
}
|
|
1915
2046
|
function toDto_0(_this__u8e3s4) {
|
|
1916
2047
|
var o = {};
|
|
1917
|
-
o.startIndex = _this__u8e3s4.
|
|
1918
|
-
o.endIndex = _this__u8e3s4.
|
|
1919
|
-
o.startDistanceM = _this__u8e3s4.
|
|
1920
|
-
o.endDistanceM = _this__u8e3s4.
|
|
1921
|
-
o.startElevationM = _this__u8e3s4.
|
|
1922
|
-
o.endElevationM = _this__u8e3s4.
|
|
1923
|
-
o.lengthM = _this__u8e3s4.
|
|
1924
|
-
o.elevationGainM = _this__u8e3s4.
|
|
1925
|
-
o.averageGrade = _this__u8e3s4.
|
|
1926
|
-
o.climbingGrade = _this__u8e3s4.
|
|
1927
|
-
o.positiveElevationM = _this__u8e3s4.
|
|
1928
|
-
o.negativeElevationM = _this__u8e3s4.
|
|
2048
|
+
o.startIndex = _this__u8e3s4.l21_1;
|
|
2049
|
+
o.endIndex = _this__u8e3s4.m21_1;
|
|
2050
|
+
o.startDistanceM = _this__u8e3s4.n21_1;
|
|
2051
|
+
o.endDistanceM = _this__u8e3s4.o21_1;
|
|
2052
|
+
o.startElevationM = _this__u8e3s4.p21_1;
|
|
2053
|
+
o.endElevationM = _this__u8e3s4.q21_1;
|
|
2054
|
+
o.lengthM = _this__u8e3s4.u21();
|
|
2055
|
+
o.elevationGainM = _this__u8e3s4.v21();
|
|
2056
|
+
o.averageGrade = _this__u8e3s4.w21();
|
|
2057
|
+
o.climbingGrade = _this__u8e3s4.x21();
|
|
2058
|
+
o.positiveElevationM = _this__u8e3s4.r21_1;
|
|
2059
|
+
o.negativeElevationM = _this__u8e3s4.s21_1;
|
|
1929
2060
|
// Inline function 'kotlin.collections.map' call
|
|
1930
|
-
var this_0 = _this__u8e3s4.
|
|
2061
|
+
var this_0 = _this__u8e3s4.t21_1;
|
|
1931
2062
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1932
2063
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
1933
2064
|
var _iterator__ex2g4s = this_0.i();
|
|
@@ -1942,18 +2073,18 @@
|
|
|
1942
2073
|
return o;
|
|
1943
2074
|
}
|
|
1944
2075
|
function enhance$slambda($options, $path, resultContinuation) {
|
|
1945
|
-
this.
|
|
1946
|
-
this.
|
|
2076
|
+
this.w24_1 = $options;
|
|
2077
|
+
this.x24_1 = $path;
|
|
1947
2078
|
CoroutineImpl.call(this, resultContinuation);
|
|
1948
2079
|
}
|
|
1949
|
-
protoOf(enhance$slambda).
|
|
1950
|
-
var tmp = this.
|
|
2080
|
+
protoOf(enhance$slambda).z24 = function ($this$promise, $completion) {
|
|
2081
|
+
var tmp = this.l11($this$promise, $completion);
|
|
1951
2082
|
tmp.j6_1 = Unit_instance;
|
|
1952
2083
|
tmp.k6_1 = null;
|
|
1953
2084
|
return tmp.p6();
|
|
1954
2085
|
};
|
|
1955
2086
|
protoOf(enhance$slambda).x6 = function (p1, $completion) {
|
|
1956
|
-
return this.
|
|
2087
|
+
return this.z24((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
1957
2088
|
};
|
|
1958
2089
|
protoOf(enhance$slambda).p6 = function () {
|
|
1959
2090
|
var suspendResult = this.j6_1;
|
|
@@ -1963,10 +2094,10 @@
|
|
|
1963
2094
|
switch (tmp) {
|
|
1964
2095
|
case 0:
|
|
1965
2096
|
this.i6_1 = 2;
|
|
1966
|
-
var opts = toEnhanceOptions(this.
|
|
1967
|
-
var provider = opts.
|
|
2097
|
+
var opts = toEnhanceOptions(this.w24_1);
|
|
2098
|
+
var provider = opts.i20_1 ? new ElevationProvider() : null;
|
|
1968
2099
|
this.h6_1 = 1;
|
|
1969
|
-
suspendResult = Enhancer_instance.
|
|
2100
|
+
suspendResult = Enhancer_instance.j21(this.x24_1, provider, opts, this);
|
|
1970
2101
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1971
2102
|
return suspendResult;
|
|
1972
2103
|
}
|
|
@@ -1988,34 +2119,34 @@
|
|
|
1988
2119
|
}
|
|
1989
2120
|
while (true);
|
|
1990
2121
|
};
|
|
1991
|
-
protoOf(enhance$slambda).
|
|
1992
|
-
var i = new enhance$slambda(this.
|
|
1993
|
-
i.
|
|
2122
|
+
protoOf(enhance$slambda).l11 = function ($this$promise, completion) {
|
|
2123
|
+
var i = new enhance$slambda(this.w24_1, this.x24_1, completion);
|
|
2124
|
+
i.y24_1 = $this$promise;
|
|
1994
2125
|
return i;
|
|
1995
2126
|
};
|
|
1996
2127
|
function enhance$slambda_0($options, $path, resultContinuation) {
|
|
1997
2128
|
var i = new enhance$slambda($options, $path, resultContinuation);
|
|
1998
2129
|
return constructCallableReference(function ($this$promise, $completion) {
|
|
1999
|
-
return i.
|
|
2130
|
+
return i.z24($this$promise, $completion);
|
|
2000
2131
|
}, 1);
|
|
2001
2132
|
}
|
|
2002
2133
|
function enhanceWithCourse$slambda($options, $path, $cyclist, $bike, $wind, $power, resultContinuation) {
|
|
2003
|
-
this.
|
|
2004
|
-
this.
|
|
2005
|
-
this.
|
|
2006
|
-
this.
|
|
2007
|
-
this.
|
|
2008
|
-
this.
|
|
2134
|
+
this.i25_1 = $options;
|
|
2135
|
+
this.j25_1 = $path;
|
|
2136
|
+
this.k25_1 = $cyclist;
|
|
2137
|
+
this.l25_1 = $bike;
|
|
2138
|
+
this.m25_1 = $wind;
|
|
2139
|
+
this.n25_1 = $power;
|
|
2009
2140
|
CoroutineImpl.call(this, resultContinuation);
|
|
2010
2141
|
}
|
|
2011
|
-
protoOf(enhanceWithCourse$slambda).
|
|
2012
|
-
var tmp = this.
|
|
2142
|
+
protoOf(enhanceWithCourse$slambda).z24 = function ($this$promise, $completion) {
|
|
2143
|
+
var tmp = this.l11($this$promise, $completion);
|
|
2013
2144
|
tmp.j6_1 = Unit_instance;
|
|
2014
2145
|
tmp.k6_1 = null;
|
|
2015
2146
|
return tmp.p6();
|
|
2016
2147
|
};
|
|
2017
2148
|
protoOf(enhanceWithCourse$slambda).x6 = function (p1, $completion) {
|
|
2018
|
-
return this.
|
|
2149
|
+
return this.z24((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
2019
2150
|
};
|
|
2020
2151
|
protoOf(enhanceWithCourse$slambda).p6 = function () {
|
|
2021
2152
|
var suspendResult = this.j6_1;
|
|
@@ -2025,11 +2156,11 @@
|
|
|
2025
2156
|
switch (tmp) {
|
|
2026
2157
|
case 0:
|
|
2027
2158
|
this.i6_1 = 2;
|
|
2028
|
-
var opts = toEnhanceOptions(this.
|
|
2029
|
-
var provider = opts.
|
|
2030
|
-
var course = new CoursePhysics(new Course(this.
|
|
2159
|
+
var opts = toEnhanceOptions(this.i25_1);
|
|
2160
|
+
var provider = opts.i20_1 ? new ElevationProvider() : null;
|
|
2161
|
+
var course = new CoursePhysics(new Course(this.j25_1, toCyclist(this.k25_1), toBike(this.l25_1)), RhoProviderEstimate_instance, AeroProviderConstant_instance, toWindProvider(this.m25_1), toCyclistPowerProvider(this.n25_1));
|
|
2031
2162
|
this.h6_1 = 1;
|
|
2032
|
-
suspendResult = Enhancer_instance.
|
|
2163
|
+
suspendResult = Enhancer_instance.k21(course, opts, provider, this);
|
|
2033
2164
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2034
2165
|
return suspendResult;
|
|
2035
2166
|
}
|
|
@@ -2051,15 +2182,15 @@
|
|
|
2051
2182
|
}
|
|
2052
2183
|
while (true);
|
|
2053
2184
|
};
|
|
2054
|
-
protoOf(enhanceWithCourse$slambda).
|
|
2055
|
-
var i = new enhanceWithCourse$slambda(this.
|
|
2056
|
-
i.
|
|
2185
|
+
protoOf(enhanceWithCourse$slambda).l11 = function ($this$promise, completion) {
|
|
2186
|
+
var i = new enhanceWithCourse$slambda(this.i25_1, this.j25_1, this.k25_1, this.l25_1, this.m25_1, this.n25_1, completion);
|
|
2187
|
+
i.o25_1 = $this$promise;
|
|
2057
2188
|
return i;
|
|
2058
2189
|
};
|
|
2059
2190
|
function enhanceWithCourse$slambda_0($options, $path, $cyclist, $bike, $wind, $power, resultContinuation) {
|
|
2060
2191
|
var i = new enhanceWithCourse$slambda($options, $path, $cyclist, $bike, $wind, $power, resultContinuation);
|
|
2061
2192
|
return constructCallableReference(function ($this$promise, $completion) {
|
|
2062
|
-
return i.
|
|
2193
|
+
return i.z24($this$promise, $completion);
|
|
2063
2194
|
}, 1);
|
|
2064
2195
|
}
|
|
2065
2196
|
//region block: init
|
|
@@ -2091,6 +2222,8 @@
|
|
|
2091
2222
|
engine.parseGpx = parseGpx;
|
|
2092
2223
|
engine.parseGpxTracks = parseGpxTracks;
|
|
2093
2224
|
engine.parseGpxSegments = parseGpxSegments;
|
|
2225
|
+
engine.parseGpxTracksOnly = parseGpxTracksOnly;
|
|
2226
|
+
engine.parseGpxRoutesOnly = parseGpxRoutesOnly;
|
|
2094
2227
|
engine.writeGpxTracks = writeGpxTracks;
|
|
2095
2228
|
engine.pathSize = pathSize;
|
|
2096
2229
|
engine.pathTotalDistance = pathTotalDistance;
|
|
@@ -2109,6 +2242,9 @@
|
|
|
2109
2242
|
engine.pathToCsv = pathToCsv;
|
|
2110
2243
|
engine.pathToJson = pathToJson;
|
|
2111
2244
|
engine.pathToFit = pathToFit;
|
|
2245
|
+
engine.pathsToFit = pathsToFit;
|
|
2246
|
+
engine.dominantHeadwindAzimuth = dominantHeadwindAzimuth;
|
|
2247
|
+
engine.dominantHeadwindAzimuthOfTracks = dominantHeadwindAzimuthOfTracks;
|
|
2112
2248
|
engine.detectClimbs = detectClimbs;
|
|
2113
2249
|
engine.detectClimbsWithOptions = detectClimbsWithOptions;
|
|
2114
2250
|
}
|