@glandais/vcyclist-engine 1.0.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -2
- package/kotlin-kotlin-stdlib.js +73 -68
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlinx-atomicfu.js +2 -2
- package/kotlinx-coroutines-core.js +20 -20
- package/package.json +3 -2
- package/vcyclist-elevation.js +265 -15
- package/vcyclist-elevation.js.map +1 -1
- package/vcyclist-engine.js +801 -799
- package/vcyclist-engine.js.map +1 -1
- package/xmlutil-core.js +1040 -1040
package/vcyclist-engine.js
CHANGED
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
'use strict';
|
|
23
23
|
//region block: imports
|
|
24
24
|
var imul = Math.imul;
|
|
25
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
25
|
+
var protoOf = kotlin_kotlin.$_$.f5;
|
|
26
26
|
var initMetadataForCompanion = kotlin_kotlin.$_$.t4;
|
|
27
27
|
var VOID = kotlin_kotlin.$_$.a;
|
|
28
28
|
var getNumberHashCode = kotlin_kotlin.$_$.o4;
|
|
29
29
|
var equals = kotlin_kotlin.$_$.m4;
|
|
30
30
|
var initMetadataForClass = kotlin_kotlin.$_$.s4;
|
|
31
|
-
var toString = kotlin_kotlin.$_$.
|
|
31
|
+
var toString = kotlin_kotlin.$_$.h5;
|
|
32
32
|
var hashCode = kotlin_kotlin.$_$.r4;
|
|
33
33
|
var getBooleanHashCode = kotlin_kotlin.$_$.n4;
|
|
34
34
|
var CoroutineImpl = kotlin_kotlin.$_$.m3;
|
|
@@ -37,28 +37,28 @@
|
|
|
37
37
|
var initMetadataForCoroutine = kotlin_kotlin.$_$.u4;
|
|
38
38
|
var initMetadataForObject = kotlin_kotlin.$_$.y4;
|
|
39
39
|
var getStringHashCode = kotlin_kotlin.$_$.q4;
|
|
40
|
-
var toString_0 = kotlin_kotlin.$_$.
|
|
40
|
+
var toString_0 = kotlin_kotlin.$_$.b7;
|
|
41
41
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.i;
|
|
42
42
|
var MathConstants_getInstance = kotlin_io_github_glandais_elevation.$_$.d;
|
|
43
|
-
var isNaN_0 = kotlin_kotlin.$_$.
|
|
43
|
+
var isNaN_0 = kotlin_kotlin.$_$.w6;
|
|
44
44
|
var numberToLong = kotlin_kotlin.$_$.a4;
|
|
45
|
-
var Long = kotlin_kotlin.$_$.
|
|
45
|
+
var Long = kotlin_kotlin.$_$.m6;
|
|
46
46
|
var compare = kotlin_kotlin.$_$.t3;
|
|
47
|
-
var roundToInt = kotlin_kotlin.$_$.
|
|
47
|
+
var roundToInt = kotlin_kotlin.$_$.i5;
|
|
48
48
|
var listOf = kotlin_kotlin.$_$.p2;
|
|
49
49
|
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.y;
|
|
50
50
|
var EventType_START_ELEMENT_getInstance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.a;
|
|
51
51
|
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.j;
|
|
52
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
52
|
+
var THROW_CCE = kotlin_kotlin.$_$.q6;
|
|
53
53
|
var isCharSequence = kotlin_kotlin.$_$.z4;
|
|
54
|
-
var trim = kotlin_kotlin.$_$.
|
|
54
|
+
var trim = kotlin_kotlin.$_$.g6;
|
|
55
55
|
var charSequenceLength = kotlin_kotlin.$_$.j4;
|
|
56
|
-
var isBlank = kotlin_kotlin.$_$.
|
|
57
|
-
var toDoubleOrNull = kotlin_kotlin.$_$.
|
|
58
|
-
var numberToInt = kotlin_kotlin.$_$.
|
|
56
|
+
var isBlank = kotlin_kotlin.$_$.w5;
|
|
57
|
+
var toDoubleOrNull = kotlin_kotlin.$_$.a6;
|
|
58
|
+
var numberToInt = kotlin_kotlin.$_$.d5;
|
|
59
59
|
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.s;
|
|
60
60
|
var Companion_getInstance = kotlin_kotlin.$_$.e;
|
|
61
|
-
var IllegalArgumentException = kotlin_kotlin.$_$.
|
|
61
|
+
var IllegalArgumentException = kotlin_kotlin.$_$.l6;
|
|
62
62
|
var get_xmlStreaming = kotlin_io_github_pdvrieze_xmlutil_core.$_$.e;
|
|
63
63
|
var IllegalArgumentException_init_$Create$_0 = kotlin_kotlin.$_$.z;
|
|
64
64
|
var XmlException = kotlin_io_github_pdvrieze_xmlutil_core.$_$.c;
|
|
@@ -67,20 +67,20 @@
|
|
|
67
67
|
var toNumber = kotlin_kotlin.$_$.c4;
|
|
68
68
|
var XmlDeclMode_None_getInstance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.b;
|
|
69
69
|
var newGenericWriter = kotlin_io_github_pdvrieze_xmlutil_core.$_$.d;
|
|
70
|
-
var LatLon = kotlin_io_github_glandais_elevation.$_$.
|
|
70
|
+
var LatLon = kotlin_io_github_glandais_elevation.$_$.g;
|
|
71
71
|
var ElevationSmoother_instance = kotlin_io_github_glandais_elevation.$_$.c;
|
|
72
|
-
var until = kotlin_kotlin.$_$.
|
|
73
|
-
var LatLonElevation = kotlin_io_github_glandais_elevation.$_$.
|
|
72
|
+
var until = kotlin_kotlin.$_$.p5;
|
|
73
|
+
var LatLonElevation = kotlin_io_github_glandais_elevation.$_$.f;
|
|
74
74
|
var arrayCopy = kotlin_kotlin.$_$.a2;
|
|
75
75
|
var Distance_instance = kotlin_io_github_glandais_elevation.$_$.a;
|
|
76
76
|
var DouglasPeucker_instance = kotlin_io_github_glandais_elevation.$_$.b;
|
|
77
77
|
var collectionSizeOrDefault = kotlin_kotlin.$_$.c2;
|
|
78
78
|
var mapCapacity = kotlin_kotlin.$_$.r2;
|
|
79
|
-
var coerceAtLeast = kotlin_kotlin.$_$.
|
|
79
|
+
var coerceAtLeast = kotlin_kotlin.$_$.l5;
|
|
80
80
|
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.m;
|
|
81
81
|
var enumEntries = kotlin_kotlin.$_$.o3;
|
|
82
|
-
var Enum = kotlin_kotlin.$_$.
|
|
83
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.
|
|
82
|
+
var Enum = kotlin_kotlin.$_$.i6;
|
|
83
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.y6;
|
|
84
84
|
var LinkedHashMap_init_$Create$_0 = kotlin_kotlin.$_$.n;
|
|
85
85
|
var multiply = kotlin_kotlin.$_$.z3;
|
|
86
86
|
var subtract = kotlin_kotlin.$_$.b4;
|
|
@@ -94,6 +94,7 @@
|
|
|
94
94
|
var promise = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j;
|
|
95
95
|
var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h;
|
|
96
96
|
var isInterface = kotlin_kotlin.$_$.a5;
|
|
97
|
+
var ElevationProvider = kotlin_io_github_glandais_elevation.$_$.e;
|
|
97
98
|
var initMetadataForLambda = kotlin_kotlin.$_$.x4;
|
|
98
99
|
//endregion
|
|
99
100
|
//region block: pre-declaration
|
|
@@ -154,7 +155,7 @@
|
|
|
154
155
|
//endregion
|
|
155
156
|
function Companion() {
|
|
156
157
|
Companion_instance = this;
|
|
157
|
-
this.
|
|
158
|
+
this.r1e_1 = new Bike();
|
|
158
159
|
}
|
|
159
160
|
var Companion_instance;
|
|
160
161
|
function Companion_getInstance_0() {
|
|
@@ -169,21 +170,21 @@
|
|
|
169
170
|
inertiaRear = inertiaRear === VOID ? 0.07 : inertiaRear;
|
|
170
171
|
wheelRadiusM = wheelRadiusM === VOID ? 0.7 : wheelRadiusM;
|
|
171
172
|
efficiency = efficiency === VOID ? 0.976 : efficiency;
|
|
172
|
-
this.
|
|
173
|
-
this.
|
|
174
|
-
this.
|
|
175
|
-
this.
|
|
176
|
-
this.
|
|
173
|
+
this.s1e_1 = crr;
|
|
174
|
+
this.t1e_1 = inertiaFront;
|
|
175
|
+
this.u1e_1 = inertiaRear;
|
|
176
|
+
this.v1e_1 = wheelRadiusM;
|
|
177
|
+
this.w1e_1 = efficiency;
|
|
177
178
|
}
|
|
178
179
|
protoOf(Bike).toString = function () {
|
|
179
|
-
return 'Bike(crr=' + this.
|
|
180
|
+
return 'Bike(crr=' + this.s1e_1 + ', inertiaFront=' + this.t1e_1 + ', inertiaRear=' + this.u1e_1 + ', wheelRadiusM=' + this.v1e_1 + ', efficiency=' + this.w1e_1 + ')';
|
|
180
181
|
};
|
|
181
182
|
protoOf(Bike).hashCode = function () {
|
|
182
|
-
var result = getNumberHashCode(this.
|
|
183
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
184
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
185
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
186
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
183
|
+
var result = getNumberHashCode(this.s1e_1);
|
|
184
|
+
result = imul(result, 31) + getNumberHashCode(this.t1e_1) | 0;
|
|
185
|
+
result = imul(result, 31) + getNumberHashCode(this.u1e_1) | 0;
|
|
186
|
+
result = imul(result, 31) + getNumberHashCode(this.v1e_1) | 0;
|
|
187
|
+
result = imul(result, 31) + getNumberHashCode(this.w1e_1) | 0;
|
|
187
188
|
return result;
|
|
188
189
|
};
|
|
189
190
|
protoOf(Bike).equals = function (other) {
|
|
@@ -191,41 +192,41 @@
|
|
|
191
192
|
return true;
|
|
192
193
|
if (!(other instanceof Bike))
|
|
193
194
|
return false;
|
|
194
|
-
if (!equals(this.
|
|
195
|
+
if (!equals(this.s1e_1, other.s1e_1))
|
|
195
196
|
return false;
|
|
196
|
-
if (!equals(this.
|
|
197
|
+
if (!equals(this.t1e_1, other.t1e_1))
|
|
197
198
|
return false;
|
|
198
|
-
if (!equals(this.
|
|
199
|
+
if (!equals(this.u1e_1, other.u1e_1))
|
|
199
200
|
return false;
|
|
200
|
-
if (!equals(this.
|
|
201
|
+
if (!equals(this.v1e_1, other.v1e_1))
|
|
201
202
|
return false;
|
|
202
|
-
if (!equals(this.
|
|
203
|
+
if (!equals(this.w1e_1, other.w1e_1))
|
|
203
204
|
return false;
|
|
204
205
|
return true;
|
|
205
206
|
};
|
|
206
207
|
function Course(path, cyclist, bike) {
|
|
207
|
-
cyclist = cyclist === VOID ? Companion_getInstance_2().
|
|
208
|
-
bike = bike === VOID ? Companion_getInstance_0().
|
|
209
|
-
this.
|
|
210
|
-
this.
|
|
211
|
-
this.
|
|
208
|
+
cyclist = cyclist === VOID ? Companion_getInstance_2().x1e_1 : cyclist;
|
|
209
|
+
bike = bike === VOID ? Companion_getInstance_0().r1e_1 : bike;
|
|
210
|
+
this.y1e_1 = path;
|
|
211
|
+
this.z1e_1 = cyclist;
|
|
212
|
+
this.a1f_1 = bike;
|
|
212
213
|
}
|
|
213
|
-
protoOf(Course).
|
|
214
|
+
protoOf(Course).b1f = function (path, cyclist, bike) {
|
|
214
215
|
return new Course(path, cyclist, bike);
|
|
215
216
|
};
|
|
216
|
-
protoOf(Course).
|
|
217
|
-
path = path === VOID ? this.
|
|
218
|
-
cyclist = cyclist === VOID ? this.
|
|
219
|
-
bike = bike === VOID ? this.
|
|
220
|
-
return $super === VOID ? this.
|
|
217
|
+
protoOf(Course).c1f = function (path, cyclist, bike, $super) {
|
|
218
|
+
path = path === VOID ? this.y1e_1 : path;
|
|
219
|
+
cyclist = cyclist === VOID ? this.z1e_1 : cyclist;
|
|
220
|
+
bike = bike === VOID ? this.a1f_1 : bike;
|
|
221
|
+
return $super === VOID ? this.b1f(path, cyclist, bike) : $super.b1f.call(this, path, cyclist, bike);
|
|
221
222
|
};
|
|
222
223
|
protoOf(Course).toString = function () {
|
|
223
|
-
return 'Course(path=' + toString(this.
|
|
224
|
+
return 'Course(path=' + toString(this.y1e_1) + ', cyclist=' + this.z1e_1.toString() + ', bike=' + this.a1f_1.toString() + ')';
|
|
224
225
|
};
|
|
225
226
|
protoOf(Course).hashCode = function () {
|
|
226
|
-
var result = hashCode(this.
|
|
227
|
-
result = imul(result, 31) + this.
|
|
228
|
-
result = imul(result, 31) + this.
|
|
227
|
+
var result = hashCode(this.y1e_1);
|
|
228
|
+
result = imul(result, 31) + this.z1e_1.hashCode() | 0;
|
|
229
|
+
result = imul(result, 31) + this.a1f_1.hashCode() | 0;
|
|
229
230
|
return result;
|
|
230
231
|
};
|
|
231
232
|
protoOf(Course).equals = function (other) {
|
|
@@ -233,17 +234,17 @@
|
|
|
233
234
|
return true;
|
|
234
235
|
if (!(other instanceof Course))
|
|
235
236
|
return false;
|
|
236
|
-
if (!equals(this.
|
|
237
|
+
if (!equals(this.y1e_1, other.y1e_1))
|
|
237
238
|
return false;
|
|
238
|
-
if (!this.
|
|
239
|
+
if (!this.z1e_1.equals(other.z1e_1))
|
|
239
240
|
return false;
|
|
240
|
-
if (!this.
|
|
241
|
+
if (!this.a1f_1.equals(other.a1f_1))
|
|
241
242
|
return false;
|
|
242
243
|
return true;
|
|
243
244
|
};
|
|
244
245
|
function Companion_0() {
|
|
245
246
|
Companion_instance_0 = this;
|
|
246
|
-
this.
|
|
247
|
+
this.d1f_1 = new PowerProviderConstant(280.0);
|
|
247
248
|
}
|
|
248
249
|
var Companion_instance_0;
|
|
249
250
|
function Companion_getInstance_1() {
|
|
@@ -256,42 +257,42 @@
|
|
|
256
257
|
rhoProvider = rhoProvider === VOID ? RhoProviderDefault_instance : rhoProvider;
|
|
257
258
|
aeroProvider = aeroProvider === VOID ? AeroProviderConstant_instance : aeroProvider;
|
|
258
259
|
windProvider = windProvider === VOID ? WindProviderNone_instance : windProvider;
|
|
259
|
-
cyclistPowerProvider = cyclistPowerProvider === VOID ? Companion_getInstance_1().
|
|
260
|
-
this.
|
|
261
|
-
this.
|
|
262
|
-
this.
|
|
263
|
-
this.
|
|
264
|
-
this.
|
|
260
|
+
cyclistPowerProvider = cyclistPowerProvider === VOID ? Companion_getInstance_1().d1f_1 : cyclistPowerProvider;
|
|
261
|
+
this.e1f_1 = course;
|
|
262
|
+
this.f1f_1 = rhoProvider;
|
|
263
|
+
this.g1f_1 = aeroProvider;
|
|
264
|
+
this.h1f_1 = windProvider;
|
|
265
|
+
this.i1f_1 = cyclistPowerProvider;
|
|
265
266
|
}
|
|
266
|
-
protoOf(CoursePhysics).
|
|
267
|
-
return this.
|
|
267
|
+
protoOf(CoursePhysics).j1f = function () {
|
|
268
|
+
return this.e1f_1.y1e_1;
|
|
268
269
|
};
|
|
269
|
-
protoOf(CoursePhysics).
|
|
270
|
-
return this.
|
|
270
|
+
protoOf(CoursePhysics).k1f = function () {
|
|
271
|
+
return this.e1f_1.z1e_1;
|
|
271
272
|
};
|
|
272
|
-
protoOf(CoursePhysics).
|
|
273
|
-
return this.
|
|
273
|
+
protoOf(CoursePhysics).l1f = function () {
|
|
274
|
+
return this.e1f_1.a1f_1;
|
|
274
275
|
};
|
|
275
|
-
protoOf(CoursePhysics).
|
|
276
|
+
protoOf(CoursePhysics).m1f = function (course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider) {
|
|
276
277
|
return new CoursePhysics(course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider);
|
|
277
278
|
};
|
|
278
|
-
protoOf(CoursePhysics).
|
|
279
|
-
course = course === VOID ? this.
|
|
280
|
-
rhoProvider = rhoProvider === VOID ? this.
|
|
281
|
-
aeroProvider = aeroProvider === VOID ? this.
|
|
282
|
-
windProvider = windProvider === VOID ? this.
|
|
283
|
-
cyclistPowerProvider = cyclistPowerProvider === VOID ? this.
|
|
284
|
-
return $super === VOID ? this.
|
|
279
|
+
protoOf(CoursePhysics).n1f = function (course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider, $super) {
|
|
280
|
+
course = course === VOID ? this.e1f_1 : course;
|
|
281
|
+
rhoProvider = rhoProvider === VOID ? this.f1f_1 : rhoProvider;
|
|
282
|
+
aeroProvider = aeroProvider === VOID ? this.g1f_1 : aeroProvider;
|
|
283
|
+
windProvider = windProvider === VOID ? this.h1f_1 : windProvider;
|
|
284
|
+
cyclistPowerProvider = cyclistPowerProvider === VOID ? this.i1f_1 : cyclistPowerProvider;
|
|
285
|
+
return $super === VOID ? this.m1f(course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider) : $super.m1f.call(this, course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider);
|
|
285
286
|
};
|
|
286
287
|
protoOf(CoursePhysics).toString = function () {
|
|
287
|
-
return 'CoursePhysics(course=' + this.
|
|
288
|
+
return 'CoursePhysics(course=' + this.e1f_1.toString() + ', rhoProvider=' + toString(this.f1f_1) + ', aeroProvider=' + toString(this.g1f_1) + ', windProvider=' + toString(this.h1f_1) + ', cyclistPowerProvider=' + toString(this.i1f_1) + ')';
|
|
288
289
|
};
|
|
289
290
|
protoOf(CoursePhysics).hashCode = function () {
|
|
290
|
-
var result = this.
|
|
291
|
-
result = imul(result, 31) + hashCode(this.
|
|
292
|
-
result = imul(result, 31) + hashCode(this.
|
|
293
|
-
result = imul(result, 31) + hashCode(this.
|
|
294
|
-
result = imul(result, 31) + hashCode(this.
|
|
291
|
+
var result = this.e1f_1.hashCode();
|
|
292
|
+
result = imul(result, 31) + hashCode(this.f1f_1) | 0;
|
|
293
|
+
result = imul(result, 31) + hashCode(this.g1f_1) | 0;
|
|
294
|
+
result = imul(result, 31) + hashCode(this.h1f_1) | 0;
|
|
295
|
+
result = imul(result, 31) + hashCode(this.i1f_1) | 0;
|
|
295
296
|
return result;
|
|
296
297
|
};
|
|
297
298
|
protoOf(CoursePhysics).equals = function (other) {
|
|
@@ -299,21 +300,21 @@
|
|
|
299
300
|
return true;
|
|
300
301
|
if (!(other instanceof CoursePhysics))
|
|
301
302
|
return false;
|
|
302
|
-
if (!this.
|
|
303
|
+
if (!this.e1f_1.equals(other.e1f_1))
|
|
303
304
|
return false;
|
|
304
|
-
if (!equals(this.
|
|
305
|
+
if (!equals(this.f1f_1, other.f1f_1))
|
|
305
306
|
return false;
|
|
306
|
-
if (!equals(this.
|
|
307
|
+
if (!equals(this.g1f_1, other.g1f_1))
|
|
307
308
|
return false;
|
|
308
|
-
if (!equals(this.
|
|
309
|
+
if (!equals(this.h1f_1, other.h1f_1))
|
|
309
310
|
return false;
|
|
310
|
-
if (!equals(this.
|
|
311
|
+
if (!equals(this.i1f_1, other.i1f_1))
|
|
311
312
|
return false;
|
|
312
313
|
return true;
|
|
313
314
|
};
|
|
314
315
|
function Companion_1() {
|
|
315
316
|
Companion_instance_1 = this;
|
|
316
|
-
this.
|
|
317
|
+
this.x1e_1 = new Cyclist();
|
|
317
318
|
}
|
|
318
319
|
var Companion_instance_1;
|
|
319
320
|
function Companion_getInstance_2() {
|
|
@@ -329,34 +330,34 @@
|
|
|
329
330
|
frontalAreaM2 = frontalAreaM2 === VOID ? 0.5 : frontalAreaM2;
|
|
330
331
|
maxLeanAngleDeg = maxLeanAngleDeg === VOID ? 35.0 : maxLeanAngleDeg;
|
|
331
332
|
maxSpeedKmH = maxSpeedKmH === VOID ? 100.0 : maxSpeedKmH;
|
|
332
|
-
this.
|
|
333
|
-
this.
|
|
334
|
-
this.
|
|
335
|
-
this.
|
|
336
|
-
this.
|
|
337
|
-
this.
|
|
338
|
-
}
|
|
339
|
-
protoOf(Cyclist).
|
|
333
|
+
this.o1f_1 = massKg;
|
|
334
|
+
this.p1f_1 = maxBrakeG;
|
|
335
|
+
this.q1f_1 = cd;
|
|
336
|
+
this.r1f_1 = frontalAreaM2;
|
|
337
|
+
this.s1f_1 = maxLeanAngleDeg;
|
|
338
|
+
this.t1f_1 = maxSpeedKmH;
|
|
339
|
+
}
|
|
340
|
+
protoOf(Cyclist).u1f = function () {
|
|
340
341
|
// Inline function 'kotlin.math.tan' call
|
|
341
|
-
var x = this.
|
|
342
|
+
var x = this.s1f_1 * 3.141592653589793 / 180.0;
|
|
342
343
|
return Math.tan(x);
|
|
343
344
|
};
|
|
344
|
-
protoOf(Cyclist).
|
|
345
|
-
return this.
|
|
345
|
+
protoOf(Cyclist).v1f = function () {
|
|
346
|
+
return this.p1f_1 * 9.8;
|
|
346
347
|
};
|
|
347
|
-
protoOf(Cyclist).
|
|
348
|
-
return this.
|
|
348
|
+
protoOf(Cyclist).w1f = function () {
|
|
349
|
+
return this.t1f_1 / 3.6;
|
|
349
350
|
};
|
|
350
351
|
protoOf(Cyclist).toString = function () {
|
|
351
|
-
return 'Cyclist(massKg=' + this.
|
|
352
|
+
return 'Cyclist(massKg=' + this.o1f_1 + ', maxBrakeG=' + this.p1f_1 + ', cd=' + this.q1f_1 + ', frontalAreaM2=' + this.r1f_1 + ', maxLeanAngleDeg=' + this.s1f_1 + ', maxSpeedKmH=' + this.t1f_1 + ')';
|
|
352
353
|
};
|
|
353
354
|
protoOf(Cyclist).hashCode = function () {
|
|
354
|
-
var result = getNumberHashCode(this.
|
|
355
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
356
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
357
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
358
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
359
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
355
|
+
var result = getNumberHashCode(this.o1f_1);
|
|
356
|
+
result = imul(result, 31) + getNumberHashCode(this.p1f_1) | 0;
|
|
357
|
+
result = imul(result, 31) + getNumberHashCode(this.q1f_1) | 0;
|
|
358
|
+
result = imul(result, 31) + getNumberHashCode(this.r1f_1) | 0;
|
|
359
|
+
result = imul(result, 31) + getNumberHashCode(this.s1f_1) | 0;
|
|
360
|
+
result = imul(result, 31) + getNumberHashCode(this.t1f_1) | 0;
|
|
360
361
|
return result;
|
|
361
362
|
};
|
|
362
363
|
protoOf(Cyclist).equals = function (other) {
|
|
@@ -364,17 +365,17 @@
|
|
|
364
365
|
return true;
|
|
365
366
|
if (!(other instanceof Cyclist))
|
|
366
367
|
return false;
|
|
367
|
-
if (!equals(this.
|
|
368
|
+
if (!equals(this.o1f_1, other.o1f_1))
|
|
368
369
|
return false;
|
|
369
|
-
if (!equals(this.
|
|
370
|
+
if (!equals(this.p1f_1, other.p1f_1))
|
|
370
371
|
return false;
|
|
371
|
-
if (!equals(this.
|
|
372
|
+
if (!equals(this.q1f_1, other.q1f_1))
|
|
372
373
|
return false;
|
|
373
|
-
if (!equals(this.
|
|
374
|
+
if (!equals(this.r1f_1, other.r1f_1))
|
|
374
375
|
return false;
|
|
375
|
-
if (!equals(this.
|
|
376
|
+
if (!equals(this.s1f_1, other.s1f_1))
|
|
376
377
|
return false;
|
|
377
|
-
if (!equals(this.
|
|
378
|
+
if (!equals(this.t1f_1, other.t1f_1))
|
|
378
379
|
return false;
|
|
379
380
|
return true;
|
|
380
381
|
};
|
|
@@ -382,17 +383,17 @@
|
|
|
382
383
|
enabled = enabled === VOID ? true : enabled;
|
|
383
384
|
toleranceM = toleranceM === VOID ? 10.0 : toleranceM;
|
|
384
385
|
zExaggeration = zExaggeration === VOID ? 3.0 : zExaggeration;
|
|
385
|
-
this.
|
|
386
|
-
this.
|
|
387
|
-
this.
|
|
386
|
+
this.x1f_1 = enabled;
|
|
387
|
+
this.y1f_1 = toleranceM;
|
|
388
|
+
this.z1f_1 = zExaggeration;
|
|
388
389
|
}
|
|
389
390
|
protoOf(SimplifyPathOptions).toString = function () {
|
|
390
|
-
return 'SimplifyPathOptions(enabled=' + this.
|
|
391
|
+
return 'SimplifyPathOptions(enabled=' + this.x1f_1 + ', toleranceM=' + this.y1f_1 + ', zExaggeration=' + this.z1f_1 + ')';
|
|
391
392
|
};
|
|
392
393
|
protoOf(SimplifyPathOptions).hashCode = function () {
|
|
393
|
-
var result = getBooleanHashCode(this.
|
|
394
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
395
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
394
|
+
var result = getBooleanHashCode(this.x1f_1);
|
|
395
|
+
result = imul(result, 31) + getNumberHashCode(this.y1f_1) | 0;
|
|
396
|
+
result = imul(result, 31) + getNumberHashCode(this.z1f_1) | 0;
|
|
396
397
|
return result;
|
|
397
398
|
};
|
|
398
399
|
protoOf(SimplifyPathOptions).equals = function (other) {
|
|
@@ -400,17 +401,17 @@
|
|
|
400
401
|
return true;
|
|
401
402
|
if (!(other instanceof SimplifyPathOptions))
|
|
402
403
|
return false;
|
|
403
|
-
if (!(this.
|
|
404
|
+
if (!(this.x1f_1 === other.x1f_1))
|
|
404
405
|
return false;
|
|
405
|
-
if (!equals(this.
|
|
406
|
+
if (!equals(this.y1f_1, other.y1f_1))
|
|
406
407
|
return false;
|
|
407
|
-
if (!equals(this.
|
|
408
|
+
if (!equals(this.z1f_1, other.z1f_1))
|
|
408
409
|
return false;
|
|
409
410
|
return true;
|
|
410
411
|
};
|
|
411
412
|
function Companion_2() {
|
|
412
413
|
Companion_instance_2 = this;
|
|
413
|
-
this.
|
|
414
|
+
this.a1g_1 = new EnhanceOptions();
|
|
414
415
|
}
|
|
415
416
|
var Companion_instance_2;
|
|
416
417
|
function Companion_getInstance_3() {
|
|
@@ -425,21 +426,21 @@
|
|
|
425
426
|
virtualizeTrack = virtualizeTrack === VOID ? true : virtualizeTrack;
|
|
426
427
|
computeOnePointPerSecond = computeOnePointPerSecond === VOID ? true : computeOnePointPerSecond;
|
|
427
428
|
simplifyPath = simplifyPath === VOID ? new SimplifyPathOptions() : simplifyPath;
|
|
428
|
-
this.
|
|
429
|
-
this.
|
|
430
|
-
this.
|
|
431
|
-
this.
|
|
432
|
-
this.
|
|
429
|
+
this.b1g_1 = fixElevation;
|
|
430
|
+
this.c1g_1 = computeMaxSpeeds;
|
|
431
|
+
this.d1g_1 = virtualizeTrack;
|
|
432
|
+
this.e1g_1 = computeOnePointPerSecond;
|
|
433
|
+
this.f1g_1 = simplifyPath;
|
|
433
434
|
}
|
|
434
435
|
protoOf(EnhanceOptions).toString = function () {
|
|
435
|
-
return 'EnhanceOptions(fixElevation=' + this.
|
|
436
|
+
return 'EnhanceOptions(fixElevation=' + this.b1g_1 + ', computeMaxSpeeds=' + this.c1g_1 + ', virtualizeTrack=' + this.d1g_1 + ', computeOnePointPerSecond=' + this.e1g_1 + ', simplifyPath=' + this.f1g_1.toString() + ')';
|
|
436
437
|
};
|
|
437
438
|
protoOf(EnhanceOptions).hashCode = function () {
|
|
438
|
-
var result = getBooleanHashCode(this.
|
|
439
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
440
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
441
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
442
|
-
result = imul(result, 31) + this.
|
|
439
|
+
var result = getBooleanHashCode(this.b1g_1);
|
|
440
|
+
result = imul(result, 31) + getBooleanHashCode(this.c1g_1) | 0;
|
|
441
|
+
result = imul(result, 31) + getBooleanHashCode(this.d1g_1) | 0;
|
|
442
|
+
result = imul(result, 31) + getBooleanHashCode(this.e1g_1) | 0;
|
|
443
|
+
result = imul(result, 31) + this.f1g_1.hashCode() | 0;
|
|
443
444
|
return result;
|
|
444
445
|
};
|
|
445
446
|
protoOf(EnhanceOptions).equals = function (other) {
|
|
@@ -447,24 +448,24 @@
|
|
|
447
448
|
return true;
|
|
448
449
|
if (!(other instanceof EnhanceOptions))
|
|
449
450
|
return false;
|
|
450
|
-
if (!(this.
|
|
451
|
+
if (!(this.b1g_1 === other.b1g_1))
|
|
451
452
|
return false;
|
|
452
|
-
if (!(this.
|
|
453
|
+
if (!(this.c1g_1 === other.c1g_1))
|
|
453
454
|
return false;
|
|
454
|
-
if (!(this.
|
|
455
|
+
if (!(this.d1g_1 === other.d1g_1))
|
|
455
456
|
return false;
|
|
456
|
-
if (!(this.
|
|
457
|
+
if (!(this.e1g_1 === other.e1g_1))
|
|
457
458
|
return false;
|
|
458
|
-
if (!this.
|
|
459
|
+
if (!this.f1g_1.equals(other.f1g_1))
|
|
459
460
|
return false;
|
|
460
461
|
return true;
|
|
461
462
|
};
|
|
462
463
|
function $enhanceCourseCOROUTINE$(_this__u8e3s4, course, options, elevationProvider, resultContinuation) {
|
|
463
464
|
CoroutineImpl.call(this, resultContinuation);
|
|
464
|
-
this.
|
|
465
|
-
this.
|
|
466
|
-
this.
|
|
467
|
-
this.
|
|
465
|
+
this.o1g_1 = _this__u8e3s4;
|
|
466
|
+
this.p1g_1 = course;
|
|
467
|
+
this.q1g_1 = options;
|
|
468
|
+
this.r1g_1 = elevationProvider;
|
|
468
469
|
}
|
|
469
470
|
protoOf($enhanceCourseCOROUTINE$).c6 = function () {
|
|
470
471
|
var suspendResult = this.w5_1;
|
|
@@ -474,11 +475,11 @@
|
|
|
474
475
|
switch (tmp) {
|
|
475
476
|
case 0:
|
|
476
477
|
this.v5_1 = 3;
|
|
477
|
-
this.
|
|
478
|
-
this.
|
|
479
|
-
if (this.
|
|
478
|
+
this.s1g_1 = this.p1g_1.j1f();
|
|
479
|
+
this.s1g_1 = PointPerDistance_instance.t1g(this.s1g_1, -1.0, 30.0);
|
|
480
|
+
if (this.q1g_1.b1g_1 && !(this.r1g_1 == null)) {
|
|
480
481
|
this.u5_1 = 1;
|
|
481
|
-
suspendResult = ElevationStep_instance.
|
|
482
|
+
suspendResult = ElevationStep_instance.v1g(this.s1g_1, this.r1g_1, this);
|
|
482
483
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
483
484
|
return suspendResult;
|
|
484
485
|
}
|
|
@@ -489,31 +490,31 @@
|
|
|
489
490
|
}
|
|
490
491
|
|
|
491
492
|
case 1:
|
|
492
|
-
this.
|
|
493
|
+
this.s1g_1 = suspendResult;
|
|
493
494
|
this.u5_1 = 2;
|
|
494
495
|
continue $sm;
|
|
495
496
|
case 2:
|
|
496
|
-
this.
|
|
497
|
-
this.
|
|
498
|
-
var working = this.
|
|
499
|
-
if (this.
|
|
500
|
-
MaxSpeedComputer_instance.
|
|
497
|
+
this.s1g_1 = PointPerDistance_instance.t1g(this.s1g_1, 1.0, 2.0);
|
|
498
|
+
this.s1g_1 = ElevationStep_instance.w1g(this.s1g_1);
|
|
499
|
+
var working = this.p1g_1.n1f(this.p1g_1.e1f_1.c1f(this.s1g_1));
|
|
500
|
+
if (this.q1g_1.c1g_1 || this.q1g_1.d1g_1) {
|
|
501
|
+
MaxSpeedComputer_instance.c1h(working.e1f_1);
|
|
501
502
|
}
|
|
502
503
|
|
|
503
|
-
if (this.
|
|
504
|
-
this.
|
|
505
|
-
working = working.
|
|
504
|
+
if (this.q1g_1.d1g_1) {
|
|
505
|
+
this.s1g_1 = VirtualizeService_instance.e1h(working);
|
|
506
|
+
working = working.n1f(working.e1f_1.c1f(this.s1g_1));
|
|
506
507
|
}
|
|
507
508
|
|
|
508
|
-
if (this.
|
|
509
|
-
this.
|
|
509
|
+
if (this.q1g_1.e1g_1) {
|
|
510
|
+
this.s1g_1 = PointPerSecond_instance.f1h(this.s1g_1);
|
|
510
511
|
}
|
|
511
512
|
|
|
512
|
-
if (this.
|
|
513
|
-
this.
|
|
513
|
+
if (this.q1g_1.f1g_1.x1f_1) {
|
|
514
|
+
this.s1g_1 = PathSimplifier_instance.g1h(this.s1g_1, this.q1g_1.f1g_1.y1f_1, this.q1g_1.f1g_1.z1f_1);
|
|
514
515
|
}
|
|
515
516
|
|
|
516
|
-
return this.
|
|
517
|
+
return this.s1g_1;
|
|
517
518
|
case 3:
|
|
518
519
|
throw this.x5_1;
|
|
519
520
|
}
|
|
@@ -530,13 +531,13 @@
|
|
|
530
531
|
};
|
|
531
532
|
function Enhancer() {
|
|
532
533
|
}
|
|
533
|
-
protoOf(Enhancer).
|
|
534
|
+
protoOf(Enhancer).h1h = function (path) {
|
|
534
535
|
return new CoursePhysics(new Course(path), RhoProviderEstimate_instance, AeroProviderConstant_instance, WindProviderNone_instance, new PowerProviderConstant(280.0));
|
|
535
536
|
};
|
|
536
|
-
protoOf(Enhancer).
|
|
537
|
-
return this.
|
|
537
|
+
protoOf(Enhancer).i1h = function (path, elevationProvider, options, $completion) {
|
|
538
|
+
return this.j1h(this.h1h(path), options, elevationProvider, $completion);
|
|
538
539
|
};
|
|
539
|
-
protoOf(Enhancer).
|
|
540
|
+
protoOf(Enhancer).j1h = function (course, options, elevationProvider, $completion) {
|
|
540
541
|
var tmp = new $enhanceCourseCOROUTINE$(this, course, options, elevationProvider, $completion);
|
|
541
542
|
tmp.w5_1 = Unit_instance;
|
|
542
543
|
tmp.x5_1 = null;
|
|
@@ -548,15 +549,15 @@
|
|
|
548
549
|
}
|
|
549
550
|
function GpxDocument(name, tracks) {
|
|
550
551
|
name = name === VOID ? 'noname' : name;
|
|
551
|
-
this.
|
|
552
|
-
this.
|
|
552
|
+
this.k1h_1 = name;
|
|
553
|
+
this.l1h_1 = tracks;
|
|
553
554
|
}
|
|
554
555
|
protoOf(GpxDocument).toString = function () {
|
|
555
|
-
return 'GpxDocument(name=' + this.
|
|
556
|
+
return 'GpxDocument(name=' + this.k1h_1 + ', tracks=' + toString(this.l1h_1) + ')';
|
|
556
557
|
};
|
|
557
558
|
protoOf(GpxDocument).hashCode = function () {
|
|
558
|
-
var result = getStringHashCode(this.
|
|
559
|
-
result = imul(result, 31) + hashCode(this.
|
|
559
|
+
var result = getStringHashCode(this.k1h_1);
|
|
560
|
+
result = imul(result, 31) + hashCode(this.l1h_1) | 0;
|
|
560
561
|
return result;
|
|
561
562
|
};
|
|
562
563
|
protoOf(GpxDocument).equals = function (other) {
|
|
@@ -564,26 +565,26 @@
|
|
|
564
565
|
return true;
|
|
565
566
|
if (!(other instanceof GpxDocument))
|
|
566
567
|
return false;
|
|
567
|
-
if (!(this.
|
|
568
|
+
if (!(this.k1h_1 === other.k1h_1))
|
|
568
569
|
return false;
|
|
569
|
-
if (!equals(this.
|
|
570
|
+
if (!equals(this.l1h_1, other.l1h_1))
|
|
570
571
|
return false;
|
|
571
572
|
return true;
|
|
572
573
|
};
|
|
573
574
|
function GpxTrack(name, type, points) {
|
|
574
575
|
name = name === VOID ? null : name;
|
|
575
576
|
type = type === VOID ? null : type;
|
|
576
|
-
this.
|
|
577
|
-
this.
|
|
578
|
-
this.
|
|
577
|
+
this.m1h_1 = name;
|
|
578
|
+
this.n1h_1 = type;
|
|
579
|
+
this.o1h_1 = points;
|
|
579
580
|
}
|
|
580
581
|
protoOf(GpxTrack).toString = function () {
|
|
581
|
-
return 'GpxTrack(name=' + this.
|
|
582
|
+
return 'GpxTrack(name=' + this.m1h_1 + ', type=' + this.n1h_1 + ', points=' + toString(this.o1h_1) + ')';
|
|
582
583
|
};
|
|
583
584
|
protoOf(GpxTrack).hashCode = function () {
|
|
584
|
-
var result = this.
|
|
585
|
-
result = imul(result, 31) + (this.
|
|
586
|
-
result = imul(result, 31) + hashCode(this.
|
|
585
|
+
var result = this.m1h_1 == null ? 0 : getStringHashCode(this.m1h_1);
|
|
586
|
+
result = imul(result, 31) + (this.n1h_1 == null ? 0 : getStringHashCode(this.n1h_1)) | 0;
|
|
587
|
+
result = imul(result, 31) + hashCode(this.o1h_1) | 0;
|
|
587
588
|
return result;
|
|
588
589
|
};
|
|
589
590
|
protoOf(GpxTrack).equals = function (other) {
|
|
@@ -591,11 +592,11 @@
|
|
|
591
592
|
return true;
|
|
592
593
|
if (!(other instanceof GpxTrack))
|
|
593
594
|
return false;
|
|
594
|
-
if (!(this.
|
|
595
|
+
if (!(this.m1h_1 == other.m1h_1))
|
|
595
596
|
return false;
|
|
596
|
-
if (!(this.
|
|
597
|
+
if (!(this.n1h_1 == other.n1h_1))
|
|
597
598
|
return false;
|
|
598
|
-
if (!equals(this.
|
|
599
|
+
if (!equals(this.o1h_1, other.o1h_1))
|
|
599
600
|
return false;
|
|
600
601
|
return true;
|
|
601
602
|
};
|
|
@@ -606,27 +607,27 @@
|
|
|
606
607
|
cadence = cadence === VOID ? null : cadence;
|
|
607
608
|
temperatureC = temperatureC === VOID ? null : temperatureC;
|
|
608
609
|
powerW = powerW === VOID ? null : powerW;
|
|
609
|
-
this.
|
|
610
|
-
this.
|
|
611
|
-
this.
|
|
612
|
-
this.
|
|
613
|
-
this.
|
|
614
|
-
this.
|
|
615
|
-
this.
|
|
616
|
-
this.
|
|
610
|
+
this.p1h_1 = latitudeDeg;
|
|
611
|
+
this.q1h_1 = longitudeDeg;
|
|
612
|
+
this.r1h_1 = elevationM;
|
|
613
|
+
this.s1h_1 = timeEpochMs;
|
|
614
|
+
this.t1h_1 = heartRate;
|
|
615
|
+
this.u1h_1 = cadence;
|
|
616
|
+
this.v1h_1 = temperatureC;
|
|
617
|
+
this.w1h_1 = powerW;
|
|
617
618
|
}
|
|
618
619
|
protoOf(GpxTrackPoint).toString = function () {
|
|
619
|
-
return 'GpxTrackPoint(latitudeDeg=' + this.
|
|
620
|
+
return 'GpxTrackPoint(latitudeDeg=' + this.p1h_1 + ', longitudeDeg=' + this.q1h_1 + ', elevationM=' + this.r1h_1 + ', timeEpochMs=' + toString_0(this.s1h_1) + ', heartRate=' + this.t1h_1 + ', cadence=' + this.u1h_1 + ', temperatureC=' + this.v1h_1 + ', powerW=' + this.w1h_1 + ')';
|
|
620
621
|
};
|
|
621
622
|
protoOf(GpxTrackPoint).hashCode = function () {
|
|
622
|
-
var result = getNumberHashCode(this.
|
|
623
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
624
|
-
result = imul(result, 31) + (this.
|
|
625
|
-
result = imul(result, 31) + (this.
|
|
626
|
-
result = imul(result, 31) + (this.
|
|
627
|
-
result = imul(result, 31) + (this.
|
|
628
|
-
result = imul(result, 31) + (this.
|
|
629
|
-
result = imul(result, 31) + (this.
|
|
623
|
+
var result = getNumberHashCode(this.p1h_1);
|
|
624
|
+
result = imul(result, 31) + getNumberHashCode(this.q1h_1) | 0;
|
|
625
|
+
result = imul(result, 31) + (this.r1h_1 == null ? 0 : getNumberHashCode(this.r1h_1)) | 0;
|
|
626
|
+
result = imul(result, 31) + (this.s1h_1 == null ? 0 : this.s1h_1.hashCode()) | 0;
|
|
627
|
+
result = imul(result, 31) + (this.t1h_1 == null ? 0 : this.t1h_1) | 0;
|
|
628
|
+
result = imul(result, 31) + (this.u1h_1 == null ? 0 : this.u1h_1) | 0;
|
|
629
|
+
result = imul(result, 31) + (this.v1h_1 == null ? 0 : getNumberHashCode(this.v1h_1)) | 0;
|
|
630
|
+
result = imul(result, 31) + (this.w1h_1 == null ? 0 : getNumberHashCode(this.w1h_1)) | 0;
|
|
630
631
|
return result;
|
|
631
632
|
};
|
|
632
633
|
protoOf(GpxTrackPoint).equals = function (other) {
|
|
@@ -634,21 +635,21 @@
|
|
|
634
635
|
return true;
|
|
635
636
|
if (!(other instanceof GpxTrackPoint))
|
|
636
637
|
return false;
|
|
637
|
-
if (!equals(this.
|
|
638
|
+
if (!equals(this.p1h_1, other.p1h_1))
|
|
638
639
|
return false;
|
|
639
|
-
if (!equals(this.
|
|
640
|
+
if (!equals(this.q1h_1, other.q1h_1))
|
|
640
641
|
return false;
|
|
641
|
-
if (!equals(this.
|
|
642
|
+
if (!equals(this.r1h_1, other.r1h_1))
|
|
642
643
|
return false;
|
|
643
|
-
if (!equals(this.
|
|
644
|
+
if (!equals(this.s1h_1, other.s1h_1))
|
|
644
645
|
return false;
|
|
645
|
-
if (!(this.
|
|
646
|
+
if (!(this.t1h_1 == other.t1h_1))
|
|
646
647
|
return false;
|
|
647
|
-
if (!(this.
|
|
648
|
+
if (!(this.u1h_1 == other.u1h_1))
|
|
648
649
|
return false;
|
|
649
|
-
if (!equals(this.
|
|
650
|
+
if (!equals(this.v1h_1, other.v1h_1))
|
|
650
651
|
return false;
|
|
651
|
-
if (!equals(this.
|
|
652
|
+
if (!equals(this.w1h_1, other.w1h_1))
|
|
652
653
|
return false;
|
|
653
654
|
return true;
|
|
654
655
|
};
|
|
@@ -657,7 +658,7 @@
|
|
|
657
658
|
type = type === VOID ? 'cycling' : type;
|
|
658
659
|
// Inline function 'kotlin.collections.List' call
|
|
659
660
|
// Inline function 'kotlin.collections.MutableList' call
|
|
660
|
-
var size = _this__u8e3s4.
|
|
661
|
+
var size = _this__u8e3s4.x1h_1;
|
|
661
662
|
var list = ArrayList_init_$Create$(size);
|
|
662
663
|
// Inline function 'kotlin.repeat' call
|
|
663
664
|
var inductionVariable = 0;
|
|
@@ -665,10 +666,10 @@
|
|
|
665
666
|
do {
|
|
666
667
|
var index = inductionVariable;
|
|
667
668
|
inductionVariable = inductionVariable + 1 | 0;
|
|
668
|
-
var tmp = _this__u8e3s4.
|
|
669
|
-
var tmp_0 = _this__u8e3s4.
|
|
669
|
+
var tmp = _this__u8e3s4.z1h(index) * MathConstants_getInstance().bv_1;
|
|
670
|
+
var tmp_0 = _this__u8e3s4.a1i(index) * MathConstants_getInstance().bv_1;
|
|
670
671
|
// Inline function 'kotlin.takeUnless' call
|
|
671
|
-
var this_0 = _this__u8e3s4.
|
|
672
|
+
var this_0 = _this__u8e3s4.b1i(index);
|
|
672
673
|
var tmp_1;
|
|
673
674
|
if (!isNaN_0(this_0)) {
|
|
674
675
|
tmp_1 = this_0;
|
|
@@ -677,7 +678,7 @@
|
|
|
677
678
|
}
|
|
678
679
|
var tmp_2 = tmp_1;
|
|
679
680
|
// Inline function 'kotlin.takeIf' call
|
|
680
|
-
var this_1 = numberToLong(_this__u8e3s4.
|
|
681
|
+
var this_1 = numberToLong(_this__u8e3s4.c1i(index));
|
|
681
682
|
var tmp_3;
|
|
682
683
|
if (compare(this_1, new Long(0, 0)) > 0) {
|
|
683
684
|
tmp_3 = this_1;
|
|
@@ -686,7 +687,7 @@
|
|
|
686
687
|
}
|
|
687
688
|
var tmp_4 = tmp_3;
|
|
688
689
|
// Inline function 'kotlin.takeUnless' call
|
|
689
|
-
var this_2 = _this__u8e3s4.
|
|
690
|
+
var this_2 = _this__u8e3s4.d1i(index);
|
|
690
691
|
var tmp_5;
|
|
691
692
|
if (!(isNaN_0(this_2) || this_2 === 0.0)) {
|
|
692
693
|
tmp_5 = this_2;
|
|
@@ -696,7 +697,7 @@
|
|
|
696
697
|
var tmp0_safe_receiver = tmp_5;
|
|
697
698
|
var tmp_6 = tmp0_safe_receiver == null ? null : roundToInt(tmp0_safe_receiver);
|
|
698
699
|
// Inline function 'kotlin.takeUnless' call
|
|
699
|
-
var this_3 = _this__u8e3s4.
|
|
700
|
+
var this_3 = _this__u8e3s4.e1i(index);
|
|
700
701
|
var tmp_7;
|
|
701
702
|
if (!(isNaN_0(this_3) || this_3 === 0.0)) {
|
|
702
703
|
tmp_7 = this_3;
|
|
@@ -706,7 +707,7 @@
|
|
|
706
707
|
var tmp1_safe_receiver = tmp_7;
|
|
707
708
|
var tmp_8 = tmp1_safe_receiver == null ? null : roundToInt(tmp1_safe_receiver);
|
|
708
709
|
// Inline function 'kotlin.takeUnless' call
|
|
709
|
-
var this_4 = _this__u8e3s4.
|
|
710
|
+
var this_4 = _this__u8e3s4.f1i(index);
|
|
710
711
|
var tmp_9;
|
|
711
712
|
if (!(isNaN_0(this_4) || this_4 === 0.0)) {
|
|
712
713
|
tmp_9 = this_4;
|
|
@@ -715,7 +716,7 @@
|
|
|
715
716
|
}
|
|
716
717
|
var tmp_10 = tmp_9;
|
|
717
718
|
// Inline function 'kotlin.takeUnless' call
|
|
718
|
-
var this_5 = _this__u8e3s4.
|
|
719
|
+
var this_5 = _this__u8e3s4.g1i(index);
|
|
719
720
|
var tmp_11;
|
|
720
721
|
if (!(isNaN_0(this_5) || this_5 === 0.0)) {
|
|
721
722
|
tmp_11 = this_5;
|
|
@@ -739,8 +740,8 @@
|
|
|
739
740
|
while (reader.j()) {
|
|
740
741
|
var ev = reader.k();
|
|
741
742
|
if (ev.equals(EventType_START_ELEMENT_getInstance())) {
|
|
742
|
-
if (!(reader.
|
|
743
|
-
throw IllegalArgumentException_init_$Create$('Invalid GPX file: missing gpx root element (found ' + reader.
|
|
743
|
+
if (!(reader.o15() === 'gpx')) {
|
|
744
|
+
throw IllegalArgumentException_init_$Create$('Invalid GPX file: missing gpx root element (found ' + reader.o15() + ')');
|
|
744
745
|
}
|
|
745
746
|
return parseGpxRoot($this, reader);
|
|
746
747
|
}
|
|
@@ -755,7 +756,7 @@
|
|
|
755
756
|
var ev = reader.k();
|
|
756
757
|
switch (ev.l1_1) {
|
|
757
758
|
case 1:
|
|
758
|
-
switch (reader.
|
|
759
|
+
switch (reader.o15()) {
|
|
759
760
|
case 'metadata':
|
|
760
761
|
var metaName = parseMetadataName($this, reader);
|
|
761
762
|
if (!(metaName == null))
|
|
@@ -784,7 +785,7 @@
|
|
|
784
785
|
var ev = reader.k();
|
|
785
786
|
switch (ev.l1_1) {
|
|
786
787
|
case 1:
|
|
787
|
-
if (reader.
|
|
788
|
+
if (reader.o15() === 'name' && name == null) {
|
|
788
789
|
// Inline function 'kotlin.text.trim' call
|
|
789
790
|
var this_0 = readElementText($this, reader);
|
|
790
791
|
// Inline function 'kotlin.text.ifEmpty' call
|
|
@@ -819,7 +820,7 @@
|
|
|
819
820
|
var ev = reader.k();
|
|
820
821
|
switch (ev.l1_1) {
|
|
821
822
|
case 1:
|
|
822
|
-
switch (reader.
|
|
823
|
+
switch (reader.o15()) {
|
|
823
824
|
case 'name':
|
|
824
825
|
// Inline function 'kotlin.text.trim' call
|
|
825
826
|
|
|
@@ -878,7 +879,7 @@
|
|
|
878
879
|
var ev = reader.k();
|
|
879
880
|
switch (ev.l1_1) {
|
|
880
881
|
case 1:
|
|
881
|
-
if (reader.
|
|
882
|
+
if (reader.o15() === 'trkpt') {
|
|
882
883
|
accum.h(parseTrackPoint($this, reader));
|
|
883
884
|
} else {
|
|
884
885
|
skipElement($this, reader);
|
|
@@ -893,8 +894,8 @@
|
|
|
893
894
|
}
|
|
894
895
|
}
|
|
895
896
|
function parseTrackPoint($this, reader) {
|
|
896
|
-
var latStr = reader.
|
|
897
|
-
var lonStr = reader.
|
|
897
|
+
var latStr = reader.z15(null, 'lat');
|
|
898
|
+
var lonStr = reader.z15(null, 'lon');
|
|
898
899
|
var tmp;
|
|
899
900
|
// Inline function 'kotlin.text.isNullOrBlank' call
|
|
900
901
|
if (latStr == null || isBlank(latStr)) {
|
|
@@ -929,7 +930,7 @@
|
|
|
929
930
|
var ev = reader.k();
|
|
930
931
|
switch (ev.l1_1) {
|
|
931
932
|
case 1:
|
|
932
|
-
switch (reader.
|
|
933
|
+
switch (reader.o15()) {
|
|
933
934
|
case 'ele':
|
|
934
935
|
// Inline function 'kotlin.text.trim' call
|
|
935
936
|
|
|
@@ -963,19 +964,19 @@
|
|
|
963
964
|
|
|
964
965
|
break;
|
|
965
966
|
case 2:
|
|
966
|
-
return new GpxTrackPoint(lat, lon, elevation, timeMs, ext.
|
|
967
|
+
return new GpxTrackPoint(lat, lon, elevation, timeMs, ext.h1i_1, ext.i1i_1, ext.j1i_1, ext.k1i_1);
|
|
967
968
|
default:
|
|
968
969
|
break;
|
|
969
970
|
}
|
|
970
971
|
}
|
|
971
|
-
return new GpxTrackPoint(lat, lon, elevation, timeMs, ext.
|
|
972
|
+
return new GpxTrackPoint(lat, lon, elevation, timeMs, ext.h1i_1, ext.i1i_1, ext.j1i_1, ext.k1i_1);
|
|
972
973
|
}
|
|
973
974
|
function parseExtensions($this, reader, ext) {
|
|
974
975
|
while (reader.j()) {
|
|
975
976
|
var ev = reader.k();
|
|
976
977
|
switch (ev.l1_1) {
|
|
977
978
|
case 1:
|
|
978
|
-
var ln = reader.
|
|
979
|
+
var ln = reader.o15();
|
|
979
980
|
// Inline function 'kotlin.text.lowercase' call
|
|
980
981
|
|
|
981
982
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -988,8 +989,8 @@
|
|
|
988
989
|
else {
|
|
989
990
|
// Inline function 'kotlin.let' call
|
|
990
991
|
var tmp = ext;
|
|
991
|
-
var tmp0_elvis_lhs = ext.
|
|
992
|
-
tmp.
|
|
992
|
+
var tmp0_elvis_lhs = ext.k1i_1;
|
|
993
|
+
tmp.k1i_1 = tmp0_elvis_lhs == null ? tmp2_safe_receiver : tmp0_elvis_lhs;
|
|
993
994
|
}
|
|
994
995
|
|
|
995
996
|
break;
|
|
@@ -1000,8 +1001,8 @@
|
|
|
1000
1001
|
null;
|
|
1001
1002
|
else {
|
|
1002
1003
|
// Inline function 'kotlin.let' call
|
|
1003
|
-
if (ext.
|
|
1004
|
-
ext.
|
|
1004
|
+
if (ext.h1i_1 == null)
|
|
1005
|
+
ext.h1i_1 = numberToInt(tmp3_safe_receiver);
|
|
1005
1006
|
}
|
|
1006
1007
|
|
|
1007
1008
|
break;
|
|
@@ -1012,8 +1013,8 @@
|
|
|
1012
1013
|
null;
|
|
1013
1014
|
else {
|
|
1014
1015
|
// Inline function 'kotlin.let' call
|
|
1015
|
-
if (ext.
|
|
1016
|
-
ext.
|
|
1016
|
+
if (ext.i1i_1 == null)
|
|
1017
|
+
ext.i1i_1 = numberToInt(tmp4_safe_receiver);
|
|
1017
1018
|
}
|
|
1018
1019
|
|
|
1019
1020
|
break;
|
|
@@ -1026,8 +1027,8 @@
|
|
|
1026
1027
|
else {
|
|
1027
1028
|
// Inline function 'kotlin.let' call
|
|
1028
1029
|
var tmp_0 = ext;
|
|
1029
|
-
var tmp0_elvis_lhs_0 = ext.
|
|
1030
|
-
tmp_0.
|
|
1030
|
+
var tmp0_elvis_lhs_0 = ext.j1i_1;
|
|
1031
|
+
tmp_0.j1i_1 = tmp0_elvis_lhs_0 == null ? tmp5_safe_receiver : tmp0_elvis_lhs_0;
|
|
1031
1032
|
}
|
|
1032
1033
|
|
|
1033
1034
|
break;
|
|
@@ -1052,7 +1053,7 @@
|
|
|
1052
1053
|
case 4:
|
|
1053
1054
|
case 5:
|
|
1054
1055
|
case 9:
|
|
1055
|
-
sb.j5(reader.
|
|
1056
|
+
sb.j5(reader.s15());
|
|
1056
1057
|
break;
|
|
1057
1058
|
case 1:
|
|
1058
1059
|
skipElement($this, reader);
|
|
@@ -1112,17 +1113,17 @@
|
|
|
1112
1113
|
cadence = cadence === VOID ? null : cadence;
|
|
1113
1114
|
temperatureC = temperatureC === VOID ? null : temperatureC;
|
|
1114
1115
|
powerW = powerW === VOID ? null : powerW;
|
|
1115
|
-
this.
|
|
1116
|
-
this.
|
|
1117
|
-
this.
|
|
1118
|
-
this.
|
|
1116
|
+
this.h1i_1 = heartRate;
|
|
1117
|
+
this.i1i_1 = cadence;
|
|
1118
|
+
this.j1i_1 = temperatureC;
|
|
1119
|
+
this.k1i_1 = powerW;
|
|
1119
1120
|
}
|
|
1120
1121
|
function GpxParser() {
|
|
1121
1122
|
}
|
|
1122
|
-
protoOf(GpxParser).
|
|
1123
|
+
protoOf(GpxParser).l1i = function (xml) {
|
|
1123
1124
|
var tmp;
|
|
1124
1125
|
try {
|
|
1125
|
-
tmp = get_xmlStreaming().
|
|
1126
|
+
tmp = get_xmlStreaming().t16(xml);
|
|
1126
1127
|
} catch ($p) {
|
|
1127
1128
|
var tmp_0;
|
|
1128
1129
|
if ($p instanceof XmlException) {
|
|
@@ -1146,7 +1147,7 @@
|
|
|
1146
1147
|
}
|
|
1147
1148
|
}
|
|
1148
1149
|
finally {
|
|
1149
|
-
reader.
|
|
1150
|
+
reader.b16();
|
|
1150
1151
|
}
|
|
1151
1152
|
return tmp_1;
|
|
1152
1153
|
};
|
|
@@ -1155,7 +1156,7 @@
|
|
|
1155
1156
|
return GpxParser_instance;
|
|
1156
1157
|
}
|
|
1157
1158
|
function firstTrackAsPath(_this__u8e3s4) {
|
|
1158
|
-
var tmp0_elvis_lhs = firstOrNull(_this__u8e3s4.
|
|
1159
|
+
var tmp0_elvis_lhs = firstOrNull(_this__u8e3s4.l1h_1);
|
|
1159
1160
|
var tmp;
|
|
1160
1161
|
if (tmp0_elvis_lhs == null) {
|
|
1161
1162
|
// Inline function 'kotlin.error' call
|
|
@@ -1168,182 +1169,182 @@
|
|
|
1168
1169
|
return toPath(track);
|
|
1169
1170
|
}
|
|
1170
1171
|
function toPath(_this__u8e3s4) {
|
|
1171
|
-
var n = _this__u8e3s4.
|
|
1172
|
+
var n = _this__u8e3s4.o1h_1.l();
|
|
1172
1173
|
var path = new Path(n);
|
|
1173
|
-
var iterator = _this__u8e3s4.
|
|
1174
|
+
var iterator = _this__u8e3s4.o1h_1.i();
|
|
1174
1175
|
var index = 0;
|
|
1175
1176
|
while (iterator.j()) {
|
|
1176
1177
|
var i = index;
|
|
1177
1178
|
index = index + 1 | 0;
|
|
1178
1179
|
var p = iterator.k();
|
|
1179
|
-
path.
|
|
1180
|
-
path.
|
|
1181
|
-
var tmp0_elvis_lhs = p.
|
|
1182
|
-
path.
|
|
1183
|
-
var tmp1_elvis_lhs = p.
|
|
1184
|
-
path.
|
|
1185
|
-
var tmp2_safe_receiver = p.
|
|
1180
|
+
path.m1i(i, p.p1h_1 * MathConstants_getInstance().av_1);
|
|
1181
|
+
path.n1i(i, p.q1h_1 * MathConstants_getInstance().av_1);
|
|
1182
|
+
var tmp0_elvis_lhs = p.r1h_1;
|
|
1183
|
+
path.o1i(i, tmp0_elvis_lhs == null ? 0.0 : tmp0_elvis_lhs);
|
|
1184
|
+
var tmp1_elvis_lhs = p.s1h_1;
|
|
1185
|
+
path.p1i(i, toNumber(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs));
|
|
1186
|
+
var tmp2_safe_receiver = p.w1h_1;
|
|
1186
1187
|
if (tmp2_safe_receiver == null)
|
|
1187
1188
|
null;
|
|
1188
1189
|
else {
|
|
1189
1190
|
// Inline function 'kotlin.let' call
|
|
1190
|
-
path.
|
|
1191
|
+
path.q1i(i, tmp2_safe_receiver);
|
|
1191
1192
|
}
|
|
1192
|
-
var tmp3_safe_receiver = p.
|
|
1193
|
+
var tmp3_safe_receiver = p.t1h_1;
|
|
1193
1194
|
if (tmp3_safe_receiver == null)
|
|
1194
1195
|
null;
|
|
1195
1196
|
else {
|
|
1196
1197
|
// Inline function 'kotlin.let' call
|
|
1197
|
-
path.
|
|
1198
|
+
path.r1i(i, tmp3_safe_receiver);
|
|
1198
1199
|
}
|
|
1199
|
-
var tmp4_safe_receiver = p.
|
|
1200
|
+
var tmp4_safe_receiver = p.u1h_1;
|
|
1200
1201
|
if (tmp4_safe_receiver == null)
|
|
1201
1202
|
null;
|
|
1202
1203
|
else {
|
|
1203
1204
|
// Inline function 'kotlin.let' call
|
|
1204
|
-
path.
|
|
1205
|
+
path.s1i(i, tmp4_safe_receiver);
|
|
1205
1206
|
}
|
|
1206
|
-
var tmp5_safe_receiver = p.
|
|
1207
|
+
var tmp5_safe_receiver = p.v1h_1;
|
|
1207
1208
|
if (tmp5_safe_receiver == null)
|
|
1208
1209
|
null;
|
|
1209
1210
|
else {
|
|
1210
1211
|
// Inline function 'kotlin.let' call
|
|
1211
|
-
path.
|
|
1212
|
+
path.t1i(i, tmp5_safe_receiver);
|
|
1212
1213
|
}
|
|
1213
1214
|
}
|
|
1214
|
-
path.
|
|
1215
|
+
path.d1j();
|
|
1215
1216
|
return path;
|
|
1216
1217
|
}
|
|
1217
1218
|
function writeDocument($this, w, document) {
|
|
1218
|
-
w.
|
|
1219
|
-
w.
|
|
1220
|
-
w.
|
|
1221
|
-
w.
|
|
1222
|
-
w.
|
|
1223
|
-
w.
|
|
1224
|
-
w.
|
|
1225
|
-
w.
|
|
1226
|
-
w.
|
|
1227
|
-
w.
|
|
1228
|
-
writeMetadata($this, w, document.
|
|
1229
|
-
var _iterator__ex2g4s = document.
|
|
1219
|
+
w.c17('', 'http://www.topografix.com/GPX/1/1');
|
|
1220
|
+
w.c17('xsi', 'http://www.w3.org/2001/XMLSchema-instance');
|
|
1221
|
+
w.c17('gpxtpx', 'http://www.garmin.com/xmlschemas/TrackPointExtension/v1');
|
|
1222
|
+
w.e17('http://www.topografix.com/GPX/1/1', 'gpx', '');
|
|
1223
|
+
w.g17(null, 'version', null, '1.1');
|
|
1224
|
+
w.g17(null, 'creator', null, '@glandais/vcyclist');
|
|
1225
|
+
w.d17('', 'http://www.topografix.com/GPX/1/1');
|
|
1226
|
+
w.d17('xsi', 'http://www.w3.org/2001/XMLSchema-instance');
|
|
1227
|
+
w.d17('gpxtpx', 'http://www.garmin.com/xmlschemas/TrackPointExtension/v1');
|
|
1228
|
+
w.g17('http://www.w3.org/2001/XMLSchema-instance', 'schemaLocation', 'xsi', 'http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd');
|
|
1229
|
+
writeMetadata($this, w, document.k1h_1);
|
|
1230
|
+
var _iterator__ex2g4s = document.l1h_1.i();
|
|
1230
1231
|
while (_iterator__ex2g4s.j()) {
|
|
1231
1232
|
var track = _iterator__ex2g4s.k();
|
|
1232
1233
|
writeTrack($this, w, track);
|
|
1233
1234
|
}
|
|
1234
|
-
w.
|
|
1235
|
+
w.j17('http://www.topografix.com/GPX/1/1', 'gpx', '');
|
|
1235
1236
|
}
|
|
1236
1237
|
function writeMetadata($this, w, name) {
|
|
1237
|
-
w.
|
|
1238
|
+
w.e17('http://www.topografix.com/GPX/1/1', 'metadata', '');
|
|
1238
1239
|
writeSimpleText($this, w, 'name', name);
|
|
1239
|
-
w.
|
|
1240
|
+
w.j17('http://www.topografix.com/GPX/1/1', 'metadata', '');
|
|
1240
1241
|
}
|
|
1241
1242
|
function writeTrack($this, w, track) {
|
|
1242
|
-
w.
|
|
1243
|
-
var tmp0_safe_receiver = track.
|
|
1243
|
+
w.e17('http://www.topografix.com/GPX/1/1', 'trk', '');
|
|
1244
|
+
var tmp0_safe_receiver = track.m1h_1;
|
|
1244
1245
|
if (tmp0_safe_receiver == null)
|
|
1245
1246
|
null;
|
|
1246
1247
|
else {
|
|
1247
1248
|
// Inline function 'kotlin.let' call
|
|
1248
1249
|
writeSimpleText(GpxWriter_instance, w, 'name', tmp0_safe_receiver);
|
|
1249
1250
|
}
|
|
1250
|
-
var tmp1_safe_receiver = track.
|
|
1251
|
+
var tmp1_safe_receiver = track.n1h_1;
|
|
1251
1252
|
if (tmp1_safe_receiver == null)
|
|
1252
1253
|
null;
|
|
1253
1254
|
else {
|
|
1254
1255
|
// Inline function 'kotlin.let' call
|
|
1255
1256
|
writeSimpleText(GpxWriter_instance, w, 'type', tmp1_safe_receiver);
|
|
1256
1257
|
}
|
|
1257
|
-
w.
|
|
1258
|
-
var _iterator__ex2g4s = track.
|
|
1258
|
+
w.e17('http://www.topografix.com/GPX/1/1', 'trkseg', '');
|
|
1259
|
+
var _iterator__ex2g4s = track.o1h_1.i();
|
|
1259
1260
|
while (_iterator__ex2g4s.j()) {
|
|
1260
1261
|
var p = _iterator__ex2g4s.k();
|
|
1261
1262
|
writeTrackPoint($this, w, p);
|
|
1262
1263
|
}
|
|
1263
|
-
w.
|
|
1264
|
-
w.
|
|
1264
|
+
w.j17('http://www.topografix.com/GPX/1/1', 'trkseg', '');
|
|
1265
|
+
w.j17('http://www.topografix.com/GPX/1/1', 'trk', '');
|
|
1265
1266
|
}
|
|
1266
1267
|
function writeTrackPoint($this, w, p) {
|
|
1267
|
-
w.
|
|
1268
|
-
w.
|
|
1269
|
-
w.
|
|
1270
|
-
var tmp0_safe_receiver = p.
|
|
1268
|
+
w.e17('http://www.topografix.com/GPX/1/1', 'trkpt', '');
|
|
1269
|
+
w.g17(null, 'lat', null, p.p1h_1.toString());
|
|
1270
|
+
w.g17(null, 'lon', null, p.q1h_1.toString());
|
|
1271
|
+
var tmp0_safe_receiver = p.s1h_1;
|
|
1271
1272
|
if (tmp0_safe_receiver == null)
|
|
1272
1273
|
null;
|
|
1273
1274
|
else {
|
|
1274
1275
|
// Inline function 'kotlin.let' call
|
|
1275
1276
|
writeSimpleText(GpxWriter_instance, w, 'time', Companion_getInstance().ib(tmp0_safe_receiver).toString());
|
|
1276
1277
|
}
|
|
1277
|
-
var tmp1_safe_receiver = p.
|
|
1278
|
+
var tmp1_safe_receiver = p.r1h_1;
|
|
1278
1279
|
if (tmp1_safe_receiver == null)
|
|
1279
1280
|
null;
|
|
1280
1281
|
else {
|
|
1281
1282
|
// Inline function 'kotlin.let' call
|
|
1282
1283
|
writeSimpleText(GpxWriter_instance, w, 'ele', tmp1_safe_receiver.toString());
|
|
1283
1284
|
}
|
|
1284
|
-
var hasGarminExt = !(p.
|
|
1285
|
-
var hasPower = !(p.
|
|
1285
|
+
var hasGarminExt = !(p.t1h_1 == null) || !(p.u1h_1 == null) || !(p.v1h_1 == null);
|
|
1286
|
+
var hasPower = !(p.w1h_1 == null);
|
|
1286
1287
|
if (hasGarminExt || hasPower) {
|
|
1287
|
-
w.
|
|
1288
|
+
w.e17('http://www.topografix.com/GPX/1/1', 'extensions', '');
|
|
1288
1289
|
if (hasPower) {
|
|
1289
|
-
writeSimpleText($this, w, 'power', p.
|
|
1290
|
+
writeSimpleText($this, w, 'power', p.w1h_1.toString());
|
|
1290
1291
|
}
|
|
1291
1292
|
if (hasGarminExt) {
|
|
1292
|
-
w.
|
|
1293
|
-
var tmp2_safe_receiver = p.
|
|
1293
|
+
w.e17('http://www.garmin.com/xmlschemas/TrackPointExtension/v1', 'TrackPointExtension', 'gpxtpx');
|
|
1294
|
+
var tmp2_safe_receiver = p.t1h_1;
|
|
1294
1295
|
if (tmp2_safe_receiver == null)
|
|
1295
1296
|
null;
|
|
1296
1297
|
else {
|
|
1297
1298
|
// Inline function 'kotlin.let' call
|
|
1298
1299
|
writeNamespaced(GpxWriter_instance, w, 'http://www.garmin.com/xmlschemas/TrackPointExtension/v1', 'hr', 'gpxtpx', tmp2_safe_receiver.toString());
|
|
1299
1300
|
}
|
|
1300
|
-
var tmp3_safe_receiver = p.
|
|
1301
|
+
var tmp3_safe_receiver = p.u1h_1;
|
|
1301
1302
|
if (tmp3_safe_receiver == null)
|
|
1302
1303
|
null;
|
|
1303
1304
|
else {
|
|
1304
1305
|
// Inline function 'kotlin.let' call
|
|
1305
1306
|
writeNamespaced(GpxWriter_instance, w, 'http://www.garmin.com/xmlschemas/TrackPointExtension/v1', 'cad', 'gpxtpx', tmp3_safe_receiver.toString());
|
|
1306
1307
|
}
|
|
1307
|
-
var tmp4_safe_receiver = p.
|
|
1308
|
+
var tmp4_safe_receiver = p.v1h_1;
|
|
1308
1309
|
if (tmp4_safe_receiver == null)
|
|
1309
1310
|
null;
|
|
1310
1311
|
else {
|
|
1311
1312
|
// Inline function 'kotlin.let' call
|
|
1312
1313
|
writeNamespaced(GpxWriter_instance, w, 'http://www.garmin.com/xmlschemas/TrackPointExtension/v1', 'atemp', 'gpxtpx', tmp4_safe_receiver.toString());
|
|
1313
1314
|
}
|
|
1314
|
-
w.
|
|
1315
|
+
w.j17('http://www.garmin.com/xmlschemas/TrackPointExtension/v1', 'TrackPointExtension', 'gpxtpx');
|
|
1315
1316
|
}
|
|
1316
|
-
w.
|
|
1317
|
+
w.j17('http://www.topografix.com/GPX/1/1', 'extensions', '');
|
|
1317
1318
|
}
|
|
1318
|
-
w.
|
|
1319
|
+
w.j17('http://www.topografix.com/GPX/1/1', 'trkpt', '');
|
|
1319
1320
|
}
|
|
1320
1321
|
function writeSimpleText($this, w, localName, text) {
|
|
1321
|
-
w.
|
|
1322
|
-
w.
|
|
1323
|
-
w.
|
|
1322
|
+
w.e17('http://www.topografix.com/GPX/1/1', localName, '');
|
|
1323
|
+
w.f17(text);
|
|
1324
|
+
w.j17('http://www.topografix.com/GPX/1/1', localName, '');
|
|
1324
1325
|
}
|
|
1325
1326
|
function writeNamespaced($this, w, namespace, localName, prefix, text) {
|
|
1326
|
-
w.
|
|
1327
|
-
w.
|
|
1328
|
-
w.
|
|
1327
|
+
w.e17(namespace, localName, prefix);
|
|
1328
|
+
w.f17(text);
|
|
1329
|
+
w.j17(namespace, localName, prefix);
|
|
1329
1330
|
}
|
|
1330
1331
|
function GpxWriter() {
|
|
1331
|
-
this.
|
|
1332
|
-
this.
|
|
1333
|
-
this.
|
|
1334
|
-
this.
|
|
1335
|
-
this.
|
|
1336
|
-
this.
|
|
1337
|
-
this.
|
|
1338
|
-
}
|
|
1339
|
-
protoOf(GpxWriter).
|
|
1332
|
+
this.e1j_1 = 'http://www.topografix.com/GPX/1/1';
|
|
1333
|
+
this.f1j_1 = 'http://www.w3.org/2001/XMLSchema-instance';
|
|
1334
|
+
this.g1j_1 = 'http://www.garmin.com/xmlschemas/TrackPointExtension/v1';
|
|
1335
|
+
this.h1j_1 = 'xsi';
|
|
1336
|
+
this.i1j_1 = 'gpxtpx';
|
|
1337
|
+
this.j1j_1 = 'http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd';
|
|
1338
|
+
this.k1j_1 = '@glandais/vcyclist';
|
|
1339
|
+
}
|
|
1340
|
+
protoOf(GpxWriter).l1j = function (document) {
|
|
1340
1341
|
var out = StringBuilder_init_$Create$();
|
|
1341
1342
|
out.j5('<?xml version="1.0" encoding="UTF-8"?>\n');
|
|
1342
1343
|
var writer = newGenericWriter(get_xmlStreaming(), out, false, XmlDeclMode_None_getInstance());
|
|
1343
1344
|
try {
|
|
1344
1345
|
writeDocument(this, writer, document);
|
|
1345
1346
|
}finally {
|
|
1346
|
-
writer.
|
|
1347
|
+
writer.b16();
|
|
1347
1348
|
}
|
|
1348
1349
|
return out.toString();
|
|
1349
1350
|
};
|
|
@@ -1352,9 +1353,9 @@
|
|
|
1352
1353
|
return GpxWriter_instance;
|
|
1353
1354
|
}
|
|
1354
1355
|
function copyAllSlots($this, source) {
|
|
1355
|
-
var out = new Path(source.
|
|
1356
|
+
var out = new Path(source.x1h_1);
|
|
1356
1357
|
var inductionVariable = 0;
|
|
1357
|
-
var last = source.
|
|
1358
|
+
var last = source.x1h_1;
|
|
1358
1359
|
if (inductionVariable < last)
|
|
1359
1360
|
do {
|
|
1360
1361
|
var i = inductionVariable;
|
|
@@ -1362,7 +1363,7 @@
|
|
|
1362
1363
|
var _iterator__ex2g4s = get_entries().i();
|
|
1363
1364
|
while (_iterator__ex2g4s.j()) {
|
|
1364
1365
|
var field = _iterator__ex2g4s.k();
|
|
1365
|
-
out.
|
|
1366
|
+
out.n1j(i, field, source.m1j(i, field));
|
|
1366
1367
|
}
|
|
1367
1368
|
}
|
|
1368
1369
|
while (inductionVariable < last);
|
|
@@ -1370,9 +1371,9 @@
|
|
|
1370
1371
|
}
|
|
1371
1372
|
function $fixElevationCOROUTINE$(_this__u8e3s4, source, provider, resultContinuation) {
|
|
1372
1373
|
CoroutineImpl.call(this, resultContinuation);
|
|
1373
|
-
this.
|
|
1374
|
-
this.
|
|
1375
|
-
this.
|
|
1374
|
+
this.w1j_1 = _this__u8e3s4;
|
|
1375
|
+
this.x1j_1 = source;
|
|
1376
|
+
this.y1j_1 = provider;
|
|
1376
1377
|
}
|
|
1377
1378
|
protoOf($fixElevationCOROUTINE$).c6 = function () {
|
|
1378
1379
|
var suspendResult = this.w5_1;
|
|
@@ -1382,21 +1383,21 @@
|
|
|
1382
1383
|
switch (tmp) {
|
|
1383
1384
|
case 0:
|
|
1384
1385
|
this.v5_1 = 2;
|
|
1385
|
-
if (this.
|
|
1386
|
+
if (this.x1j_1.x1h_1 === 0)
|
|
1386
1387
|
return new Path(0);
|
|
1387
|
-
var size = this.
|
|
1388
|
+
var size = this.x1j_1.x1h_1;
|
|
1388
1389
|
var list = ArrayList_init_$Create$(size);
|
|
1389
1390
|
var inductionVariable = 0;
|
|
1390
1391
|
if (inductionVariable < size)
|
|
1391
1392
|
do {
|
|
1392
1393
|
var index = inductionVariable;
|
|
1393
1394
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1394
|
-
list.h(new LatLon(this.
|
|
1395
|
+
list.h(new LatLon(this.x1j_1.z1h(index) * MathConstants_getInstance().bv_1, this.x1j_1.a1i(index) * MathConstants_getInstance().bv_1));
|
|
1395
1396
|
}
|
|
1396
1397
|
while (inductionVariable < size);
|
|
1397
1398
|
var coords = list;
|
|
1398
1399
|
this.u5_1 = 1;
|
|
1399
|
-
suspendResult = this.
|
|
1400
|
+
suspendResult = this.y1j_1.xy(coords, VOID, this);
|
|
1400
1401
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1401
1402
|
return suspendResult;
|
|
1402
1403
|
}
|
|
@@ -1404,17 +1405,17 @@
|
|
|
1404
1405
|
continue $sm;
|
|
1405
1406
|
case 1:
|
|
1406
1407
|
var corrected = suspendResult;
|
|
1407
|
-
var out = copyAllSlots(this.
|
|
1408
|
+
var out = copyAllSlots(this.w1j_1, this.x1j_1);
|
|
1408
1409
|
var inductionVariable_0 = 0;
|
|
1409
|
-
var last = out.
|
|
1410
|
+
var last = out.x1h_1;
|
|
1410
1411
|
if (inductionVariable_0 < last)
|
|
1411
1412
|
do {
|
|
1412
1413
|
var i = inductionVariable_0;
|
|
1413
1414
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
1414
|
-
out.
|
|
1415
|
+
out.o1i(i, corrected.m(i).fv());
|
|
1415
1416
|
}
|
|
1416
1417
|
while (inductionVariable_0 < last);
|
|
1417
|
-
out.
|
|
1418
|
+
out.d1j();
|
|
1418
1419
|
return out;
|
|
1419
1420
|
case 2:
|
|
1420
1421
|
throw this.x5_1;
|
|
@@ -1431,20 +1432,20 @@
|
|
|
1431
1432
|
while (true);
|
|
1432
1433
|
};
|
|
1433
1434
|
function ElevationStep() {
|
|
1434
|
-
this.
|
|
1435
|
+
this.u1g_1 = 150.0;
|
|
1435
1436
|
}
|
|
1436
|
-
protoOf(ElevationStep).
|
|
1437
|
+
protoOf(ElevationStep).v1g = function (source, provider, $completion) {
|
|
1437
1438
|
var tmp = new $fixElevationCOROUTINE$(this, source, provider, $completion);
|
|
1438
1439
|
tmp.w5_1 = Unit_instance;
|
|
1439
1440
|
tmp.x5_1 = null;
|
|
1440
1441
|
return tmp.c6();
|
|
1441
1442
|
};
|
|
1442
|
-
protoOf(ElevationStep).
|
|
1443
|
-
if (source.
|
|
1443
|
+
protoOf(ElevationStep).z1j = function (source, windowM) {
|
|
1444
|
+
if (source.x1h_1 === 0)
|
|
1444
1445
|
return new Path(0);
|
|
1445
1446
|
// Inline function 'kotlin.collections.List' call
|
|
1446
1447
|
// Inline function 'kotlin.collections.MutableList' call
|
|
1447
|
-
var size = source.
|
|
1448
|
+
var size = source.x1h_1;
|
|
1448
1449
|
var list = ArrayList_init_$Create$(size);
|
|
1449
1450
|
// Inline function 'kotlin.repeat' call
|
|
1450
1451
|
var inductionVariable = 0;
|
|
@@ -1452,7 +1453,7 @@
|
|
|
1452
1453
|
do {
|
|
1453
1454
|
var index = inductionVariable;
|
|
1454
1455
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1455
|
-
var tmp$ret$4 = source.
|
|
1456
|
+
var tmp$ret$4 = source.a1k(index);
|
|
1456
1457
|
list.h(tmp$ret$4);
|
|
1457
1458
|
}
|
|
1458
1459
|
while (inductionVariable < size);
|
|
@@ -1460,196 +1461,196 @@
|
|
|
1460
1461
|
var smoothed = ElevationSmoother_instance.uu(coords, windowM);
|
|
1461
1462
|
var out = copyAllSlots(this, source);
|
|
1462
1463
|
var inductionVariable_0 = 0;
|
|
1463
|
-
var last = out.
|
|
1464
|
+
var last = out.x1h_1;
|
|
1464
1465
|
if (inductionVariable_0 < last)
|
|
1465
1466
|
do {
|
|
1466
1467
|
var i = inductionVariable_0;
|
|
1467
1468
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
1468
|
-
out.
|
|
1469
|
+
out.o1i(i, smoothed.m(i).fv());
|
|
1469
1470
|
}
|
|
1470
1471
|
while (inductionVariable_0 < last);
|
|
1471
|
-
out.
|
|
1472
|
+
out.d1j();
|
|
1472
1473
|
return out;
|
|
1473
1474
|
};
|
|
1474
|
-
protoOf(ElevationStep).
|
|
1475
|
+
protoOf(ElevationStep).w1g = function (source, windowM, $super) {
|
|
1475
1476
|
windowM = windowM === VOID ? 150.0 : windowM;
|
|
1476
|
-
return $super === VOID ? this.
|
|
1477
|
+
return $super === VOID ? this.z1j(source, windowM) : $super.z1j.call(this, source, windowM);
|
|
1477
1478
|
};
|
|
1478
1479
|
var ElevationStep_instance;
|
|
1479
1480
|
function ElevationStep_getInstance() {
|
|
1480
1481
|
return ElevationStep_instance;
|
|
1481
1482
|
}
|
|
1482
1483
|
function GeneratedPath(size) {
|
|
1483
|
-
this.
|
|
1484
|
+
this.x1h_1 = size;
|
|
1484
1485
|
// Inline function 'kotlin.require' call
|
|
1485
|
-
if (!(this.
|
|
1486
|
-
var message = 'Negative size: ' + this.
|
|
1486
|
+
if (!(this.x1h_1 >= 0)) {
|
|
1487
|
+
var message = 'Negative size: ' + this.x1h_1;
|
|
1487
1488
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1488
1489
|
}
|
|
1489
|
-
this.
|
|
1490
|
+
this.y1h_1 = new Float64Array(imul(this.x1h_1, 36));
|
|
1490
1491
|
}
|
|
1491
|
-
protoOf(GeneratedPath).
|
|
1492
|
-
return this.
|
|
1492
|
+
protoOf(GeneratedPath).m1j = function (i, field) {
|
|
1493
|
+
return this.y1h_1[imul(i, 36) + field.l1_1 | 0];
|
|
1493
1494
|
};
|
|
1494
|
-
protoOf(GeneratedPath).
|
|
1495
|
-
this.
|
|
1495
|
+
protoOf(GeneratedPath).n1j = function (i, field, v) {
|
|
1496
|
+
this.y1h_1[imul(i, 36) + field.l1_1 | 0] = v;
|
|
1496
1497
|
};
|
|
1497
|
-
protoOf(GeneratedPath).
|
|
1498
|
-
return this.
|
|
1498
|
+
protoOf(GeneratedPath).z1h = function (i) {
|
|
1499
|
+
return this.y1h_1[imul(i, 36) + 0 | 0];
|
|
1499
1500
|
};
|
|
1500
|
-
protoOf(GeneratedPath).
|
|
1501
|
-
this.
|
|
1501
|
+
protoOf(GeneratedPath).m1i = function (i, v) {
|
|
1502
|
+
this.y1h_1[imul(i, 36) + 0 | 0] = v;
|
|
1502
1503
|
};
|
|
1503
|
-
protoOf(GeneratedPath).
|
|
1504
|
-
return this.
|
|
1504
|
+
protoOf(GeneratedPath).a1i = function (i) {
|
|
1505
|
+
return this.y1h_1[imul(i, 36) + 1 | 0];
|
|
1505
1506
|
};
|
|
1506
|
-
protoOf(GeneratedPath).
|
|
1507
|
-
this.
|
|
1507
|
+
protoOf(GeneratedPath).n1i = function (i, v) {
|
|
1508
|
+
this.y1h_1[imul(i, 36) + 1 | 0] = v;
|
|
1508
1509
|
};
|
|
1509
|
-
protoOf(GeneratedPath).
|
|
1510
|
-
return this.
|
|
1510
|
+
protoOf(GeneratedPath).b1k = function (i) {
|
|
1511
|
+
return this.y1h_1[imul(i, 36) + 2 | 0];
|
|
1511
1512
|
};
|
|
1512
|
-
protoOf(GeneratedPath).
|
|
1513
|
-
this.
|
|
1513
|
+
protoOf(GeneratedPath).c1k = function (i, v) {
|
|
1514
|
+
this.y1h_1[imul(i, 36) + 2 | 0] = v;
|
|
1514
1515
|
};
|
|
1515
|
-
protoOf(GeneratedPath).
|
|
1516
|
-
this.
|
|
1516
|
+
protoOf(GeneratedPath).d1k = function (i, v) {
|
|
1517
|
+
this.y1h_1[imul(i, 36) + 3 | 0] = v;
|
|
1517
1518
|
};
|
|
1518
|
-
protoOf(GeneratedPath).
|
|
1519
|
-
return this.
|
|
1519
|
+
protoOf(GeneratedPath).c1i = function (i) {
|
|
1520
|
+
return this.y1h_1[imul(i, 36) + 4 | 0];
|
|
1520
1521
|
};
|
|
1521
|
-
protoOf(GeneratedPath).
|
|
1522
|
-
this.
|
|
1522
|
+
protoOf(GeneratedPath).p1i = function (i, v) {
|
|
1523
|
+
this.y1h_1[imul(i, 36) + 4 | 0] = v;
|
|
1523
1524
|
};
|
|
1524
|
-
protoOf(GeneratedPath).
|
|
1525
|
-
this.
|
|
1525
|
+
protoOf(GeneratedPath).e1k = function (i, v) {
|
|
1526
|
+
this.y1h_1[imul(i, 36) + 5 | 0] = v;
|
|
1526
1527
|
};
|
|
1527
|
-
protoOf(GeneratedPath).
|
|
1528
|
-
return this.
|
|
1528
|
+
protoOf(GeneratedPath).f1k = function (i) {
|
|
1529
|
+
return this.y1h_1[imul(i, 36) + 6 | 0];
|
|
1529
1530
|
};
|
|
1530
|
-
protoOf(GeneratedPath).
|
|
1531
|
-
this.
|
|
1531
|
+
protoOf(GeneratedPath).g1k = function (i, v) {
|
|
1532
|
+
this.y1h_1[imul(i, 36) + 6 | 0] = v;
|
|
1532
1533
|
};
|
|
1533
|
-
protoOf(GeneratedPath).
|
|
1534
|
-
return this.
|
|
1534
|
+
protoOf(GeneratedPath).h1k = function (i) {
|
|
1535
|
+
return this.y1h_1[imul(i, 36) + 7 | 0];
|
|
1535
1536
|
};
|
|
1536
|
-
protoOf(GeneratedPath).
|
|
1537
|
-
this.
|
|
1537
|
+
protoOf(GeneratedPath).i1k = function (i, v) {
|
|
1538
|
+
this.y1h_1[imul(i, 36) + 7 | 0] = v;
|
|
1538
1539
|
};
|
|
1539
|
-
protoOf(GeneratedPath).
|
|
1540
|
-
return this.
|
|
1540
|
+
protoOf(GeneratedPath).b1i = function (i) {
|
|
1541
|
+
return this.y1h_1[imul(i, 36) + 8 | 0];
|
|
1541
1542
|
};
|
|
1542
|
-
protoOf(GeneratedPath).
|
|
1543
|
-
this.
|
|
1543
|
+
protoOf(GeneratedPath).o1i = function (i, v) {
|
|
1544
|
+
this.y1h_1[imul(i, 36) + 8 | 0] = v;
|
|
1544
1545
|
};
|
|
1545
|
-
protoOf(GeneratedPath).
|
|
1546
|
-
return this.
|
|
1546
|
+
protoOf(GeneratedPath).j1k = function (i) {
|
|
1547
|
+
return this.y1h_1[imul(i, 36) + 9 | 0];
|
|
1547
1548
|
};
|
|
1548
|
-
protoOf(GeneratedPath).
|
|
1549
|
-
this.
|
|
1549
|
+
protoOf(GeneratedPath).k1k = function (i, v) {
|
|
1550
|
+
this.y1h_1[imul(i, 36) + 9 | 0] = v;
|
|
1550
1551
|
};
|
|
1551
|
-
protoOf(GeneratedPath).
|
|
1552
|
-
this.
|
|
1552
|
+
protoOf(GeneratedPath).l1k = function (i, v) {
|
|
1553
|
+
this.y1h_1[imul(i, 36) + 10 | 0] = v;
|
|
1553
1554
|
};
|
|
1554
|
-
protoOf(GeneratedPath).
|
|
1555
|
-
this.
|
|
1555
|
+
protoOf(GeneratedPath).m1k = function (i, v) {
|
|
1556
|
+
this.y1h_1[imul(i, 36) + 11 | 0] = v;
|
|
1556
1557
|
};
|
|
1557
|
-
protoOf(GeneratedPath).
|
|
1558
|
-
this.
|
|
1558
|
+
protoOf(GeneratedPath).n1k = function (i, v) {
|
|
1559
|
+
this.y1h_1[imul(i, 36) + 12 | 0] = v;
|
|
1559
1560
|
};
|
|
1560
|
-
protoOf(GeneratedPath).
|
|
1561
|
-
this.
|
|
1561
|
+
protoOf(GeneratedPath).o1k = function (i, v) {
|
|
1562
|
+
this.y1h_1[imul(i, 36) + 13 | 0] = v;
|
|
1562
1563
|
};
|
|
1563
|
-
protoOf(GeneratedPath).
|
|
1564
|
-
this.
|
|
1564
|
+
protoOf(GeneratedPath).p1k = function (i, v) {
|
|
1565
|
+
this.y1h_1[imul(i, 36) + 14 | 0] = v;
|
|
1565
1566
|
};
|
|
1566
|
-
protoOf(GeneratedPath).
|
|
1567
|
-
this.
|
|
1567
|
+
protoOf(GeneratedPath).q1k = function (i, v) {
|
|
1568
|
+
this.y1h_1[imul(i, 36) + 15 | 0] = v;
|
|
1568
1569
|
};
|
|
1569
|
-
protoOf(GeneratedPath).
|
|
1570
|
-
this.
|
|
1570
|
+
protoOf(GeneratedPath).r1k = function (i, v) {
|
|
1571
|
+
this.y1h_1[imul(i, 36) + 16 | 0] = v;
|
|
1571
1572
|
};
|
|
1572
|
-
protoOf(GeneratedPath).
|
|
1573
|
-
this.
|
|
1573
|
+
protoOf(GeneratedPath).s1k = function (i, v) {
|
|
1574
|
+
this.y1h_1[imul(i, 36) + 17 | 0] = v;
|
|
1574
1575
|
};
|
|
1575
|
-
protoOf(GeneratedPath).
|
|
1576
|
-
return this.
|
|
1576
|
+
protoOf(GeneratedPath).g1i = function (i) {
|
|
1577
|
+
return this.y1h_1[imul(i, 36) + 18 | 0];
|
|
1577
1578
|
};
|
|
1578
|
-
protoOf(GeneratedPath).
|
|
1579
|
-
this.
|
|
1579
|
+
protoOf(GeneratedPath).q1i = function (i, v) {
|
|
1580
|
+
this.y1h_1[imul(i, 36) + 18 | 0] = v;
|
|
1580
1581
|
};
|
|
1581
|
-
protoOf(GeneratedPath).
|
|
1582
|
-
this.
|
|
1582
|
+
protoOf(GeneratedPath).t1k = function (i, v) {
|
|
1583
|
+
this.y1h_1[imul(i, 36) + 19 | 0] = v;
|
|
1583
1584
|
};
|
|
1584
|
-
protoOf(GeneratedPath).
|
|
1585
|
-
this.
|
|
1585
|
+
protoOf(GeneratedPath).u1k = function (i, v) {
|
|
1586
|
+
this.y1h_1[imul(i, 36) + 20 | 0] = v;
|
|
1586
1587
|
};
|
|
1587
|
-
protoOf(GeneratedPath).
|
|
1588
|
-
this.
|
|
1588
|
+
protoOf(GeneratedPath).v1k = function (i, v) {
|
|
1589
|
+
this.y1h_1[imul(i, 36) + 21 | 0] = v;
|
|
1589
1590
|
};
|
|
1590
|
-
protoOf(GeneratedPath).
|
|
1591
|
-
this.
|
|
1591
|
+
protoOf(GeneratedPath).w1k = function (i, v) {
|
|
1592
|
+
this.y1h_1[imul(i, 36) + 22 | 0] = v;
|
|
1592
1593
|
};
|
|
1593
|
-
protoOf(GeneratedPath).
|
|
1594
|
-
this.
|
|
1594
|
+
protoOf(GeneratedPath).x1k = function (i, v) {
|
|
1595
|
+
this.y1h_1[imul(i, 36) + 23 | 0] = v;
|
|
1595
1596
|
};
|
|
1596
|
-
protoOf(GeneratedPath).
|
|
1597
|
-
this.
|
|
1597
|
+
protoOf(GeneratedPath).y1k = function (i, v) {
|
|
1598
|
+
this.y1h_1[imul(i, 36) + 24 | 0] = v;
|
|
1598
1599
|
};
|
|
1599
|
-
protoOf(GeneratedPath).
|
|
1600
|
-
this.
|
|
1600
|
+
protoOf(GeneratedPath).z1k = function (i, v) {
|
|
1601
|
+
this.y1h_1[imul(i, 36) + 25 | 0] = v;
|
|
1601
1602
|
};
|
|
1602
|
-
protoOf(GeneratedPath).
|
|
1603
|
-
return this.
|
|
1603
|
+
protoOf(GeneratedPath).a1l = function (i) {
|
|
1604
|
+
return this.y1h_1[imul(i, 36) + 26 | 0];
|
|
1604
1605
|
};
|
|
1605
|
-
protoOf(GeneratedPath).
|
|
1606
|
-
this.
|
|
1606
|
+
protoOf(GeneratedPath).b1l = function (i, v) {
|
|
1607
|
+
this.y1h_1[imul(i, 36) + 26 | 0] = v;
|
|
1607
1608
|
};
|
|
1608
|
-
protoOf(GeneratedPath).
|
|
1609
|
-
return this.
|
|
1609
|
+
protoOf(GeneratedPath).c1l = function (i) {
|
|
1610
|
+
return this.y1h_1[imul(i, 36) + 27 | 0];
|
|
1610
1611
|
};
|
|
1611
|
-
protoOf(GeneratedPath).
|
|
1612
|
-
this.
|
|
1612
|
+
protoOf(GeneratedPath).d1l = function (i, v) {
|
|
1613
|
+
this.y1h_1[imul(i, 36) + 27 | 0] = v;
|
|
1613
1614
|
};
|
|
1614
|
-
protoOf(GeneratedPath).
|
|
1615
|
-
return this.
|
|
1615
|
+
protoOf(GeneratedPath).e1l = function (i) {
|
|
1616
|
+
return this.y1h_1[imul(i, 36) + 28 | 0];
|
|
1616
1617
|
};
|
|
1617
|
-
protoOf(GeneratedPath).
|
|
1618
|
-
this.
|
|
1618
|
+
protoOf(GeneratedPath).f1l = function (i, v) {
|
|
1619
|
+
this.y1h_1[imul(i, 36) + 28 | 0] = v;
|
|
1619
1620
|
};
|
|
1620
|
-
protoOf(GeneratedPath).
|
|
1621
|
-
this.
|
|
1621
|
+
protoOf(GeneratedPath).g1l = function (i, v) {
|
|
1622
|
+
this.y1h_1[imul(i, 36) + 29 | 0] = v;
|
|
1622
1623
|
};
|
|
1623
|
-
protoOf(GeneratedPath).
|
|
1624
|
-
this.
|
|
1624
|
+
protoOf(GeneratedPath).h1l = function (i, v) {
|
|
1625
|
+
this.y1h_1[imul(i, 36) + 30 | 0] = v;
|
|
1625
1626
|
};
|
|
1626
|
-
protoOf(GeneratedPath).
|
|
1627
|
-
return this.
|
|
1627
|
+
protoOf(GeneratedPath).f1i = function (i) {
|
|
1628
|
+
return this.y1h_1[imul(i, 36) + 31 | 0];
|
|
1628
1629
|
};
|
|
1629
|
-
protoOf(GeneratedPath).
|
|
1630
|
-
this.
|
|
1630
|
+
protoOf(GeneratedPath).t1i = function (i, v) {
|
|
1631
|
+
this.y1h_1[imul(i, 36) + 31 | 0] = v;
|
|
1631
1632
|
};
|
|
1632
|
-
protoOf(GeneratedPath).
|
|
1633
|
-
this.
|
|
1633
|
+
protoOf(GeneratedPath).i1l = function (i, v) {
|
|
1634
|
+
this.y1h_1[imul(i, 36) + 32 | 0] = v;
|
|
1634
1635
|
};
|
|
1635
|
-
protoOf(GeneratedPath).
|
|
1636
|
-
this.
|
|
1636
|
+
protoOf(GeneratedPath).j1l = function (i, v) {
|
|
1637
|
+
this.y1h_1[imul(i, 36) + 33 | 0] = v;
|
|
1637
1638
|
};
|
|
1638
|
-
protoOf(GeneratedPath).
|
|
1639
|
-
return this.
|
|
1639
|
+
protoOf(GeneratedPath).d1i = function (i) {
|
|
1640
|
+
return this.y1h_1[imul(i, 36) + 34 | 0];
|
|
1640
1641
|
};
|
|
1641
|
-
protoOf(GeneratedPath).
|
|
1642
|
-
this.
|
|
1642
|
+
protoOf(GeneratedPath).r1i = function (i, v) {
|
|
1643
|
+
this.y1h_1[imul(i, 36) + 34 | 0] = v;
|
|
1643
1644
|
};
|
|
1644
|
-
protoOf(GeneratedPath).
|
|
1645
|
-
return this.
|
|
1645
|
+
protoOf(GeneratedPath).e1i = function (i) {
|
|
1646
|
+
return this.y1h_1[imul(i, 36) + 35 | 0];
|
|
1646
1647
|
};
|
|
1647
|
-
protoOf(GeneratedPath).
|
|
1648
|
-
this.
|
|
1648
|
+
protoOf(GeneratedPath).s1i = function (i, v) {
|
|
1649
|
+
this.y1h_1[imul(i, 36) + 35 | 0] = v;
|
|
1649
1650
|
};
|
|
1650
1651
|
function Companion_3() {
|
|
1651
1652
|
Companion_instance_3 = this;
|
|
1652
|
-
this.
|
|
1653
|
+
this.k1l_1 = new BoundsRad(0.0, 0.0, 0.0, 0.0);
|
|
1653
1654
|
}
|
|
1654
1655
|
var Companion_instance_3;
|
|
1655
1656
|
function Companion_getInstance_4() {
|
|
@@ -1659,19 +1660,19 @@
|
|
|
1659
1660
|
}
|
|
1660
1661
|
function BoundsRad(minLat, maxLat, minLon, maxLon) {
|
|
1661
1662
|
Companion_getInstance_4();
|
|
1662
|
-
this.
|
|
1663
|
-
this.
|
|
1664
|
-
this.
|
|
1665
|
-
this.
|
|
1663
|
+
this.l1l_1 = minLat;
|
|
1664
|
+
this.m1l_1 = maxLat;
|
|
1665
|
+
this.n1l_1 = minLon;
|
|
1666
|
+
this.o1l_1 = maxLon;
|
|
1666
1667
|
}
|
|
1667
1668
|
protoOf(BoundsRad).toString = function () {
|
|
1668
|
-
return 'BoundsRad(minLat=' + this.
|
|
1669
|
+
return 'BoundsRad(minLat=' + this.l1l_1 + ', maxLat=' + this.m1l_1 + ', minLon=' + this.n1l_1 + ', maxLon=' + this.o1l_1 + ')';
|
|
1669
1670
|
};
|
|
1670
1671
|
protoOf(BoundsRad).hashCode = function () {
|
|
1671
|
-
var result = getNumberHashCode(this.
|
|
1672
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1673
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1674
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1672
|
+
var result = getNumberHashCode(this.l1l_1);
|
|
1673
|
+
result = imul(result, 31) + getNumberHashCode(this.m1l_1) | 0;
|
|
1674
|
+
result = imul(result, 31) + getNumberHashCode(this.n1l_1) | 0;
|
|
1675
|
+
result = imul(result, 31) + getNumberHashCode(this.o1l_1) | 0;
|
|
1675
1676
|
return result;
|
|
1676
1677
|
};
|
|
1677
1678
|
protoOf(BoundsRad).equals = function (other) {
|
|
@@ -1679,39 +1680,39 @@
|
|
|
1679
1680
|
return true;
|
|
1680
1681
|
if (!(other instanceof BoundsRad))
|
|
1681
1682
|
return false;
|
|
1682
|
-
if (!equals(this.
|
|
1683
|
+
if (!equals(this.l1l_1, other.l1l_1))
|
|
1683
1684
|
return false;
|
|
1684
|
-
if (!equals(this.
|
|
1685
|
+
if (!equals(this.m1l_1, other.m1l_1))
|
|
1685
1686
|
return false;
|
|
1686
|
-
if (!equals(this.
|
|
1687
|
+
if (!equals(this.n1l_1, other.n1l_1))
|
|
1687
1688
|
return false;
|
|
1688
|
-
if (!equals(this.
|
|
1689
|
+
if (!equals(this.o1l_1, other.o1l_1))
|
|
1689
1690
|
return false;
|
|
1690
1691
|
return true;
|
|
1691
1692
|
};
|
|
1692
1693
|
function copyStatsFrom($this, other) {
|
|
1693
|
-
$this.
|
|
1694
|
-
$this.
|
|
1695
|
-
$this.
|
|
1696
|
-
$this.
|
|
1697
|
-
$this.
|
|
1698
|
-
$this.
|
|
1699
|
-
$this.
|
|
1694
|
+
$this.w1i_1 = other.w1i_1;
|
|
1695
|
+
$this.x1i_1 = other.x1i_1;
|
|
1696
|
+
$this.y1i_1 = other.y1i_1;
|
|
1697
|
+
$this.z1i_1 = other.z1i_1;
|
|
1698
|
+
$this.a1j_1 = other.a1j_1;
|
|
1699
|
+
$this.b1j_1 = other.b1j_1;
|
|
1700
|
+
$this.c1j_1 = other.c1j_1;
|
|
1700
1701
|
}
|
|
1701
1702
|
function resetStats($this) {
|
|
1702
|
-
$this.
|
|
1703
|
-
$this.
|
|
1704
|
-
$this.
|
|
1705
|
-
$this.
|
|
1706
|
-
$this.
|
|
1707
|
-
$this.
|
|
1708
|
-
$this.
|
|
1703
|
+
$this.w1i_1 = 0.0;
|
|
1704
|
+
$this.x1i_1 = 0.0;
|
|
1705
|
+
$this.y1i_1 = 0.0;
|
|
1706
|
+
$this.z1i_1 = 0.0;
|
|
1707
|
+
$this.a1j_1 = 0.0;
|
|
1708
|
+
$this.b1j_1 = 0.0;
|
|
1709
|
+
$this.c1j_1 = Companion_getInstance_4().k1l_1;
|
|
1709
1710
|
}
|
|
1710
1711
|
function computeBearing($this, from, to) {
|
|
1711
|
-
var lat1 = $this.
|
|
1712
|
-
var lon1 = $this.
|
|
1713
|
-
var lat2 = $this.
|
|
1714
|
-
var lon2 = $this.
|
|
1712
|
+
var lat1 = $this.z1h(from);
|
|
1713
|
+
var lon1 = $this.a1i(from);
|
|
1714
|
+
var lat2 = $this.z1h(to);
|
|
1715
|
+
var lon2 = $this.a1i(to);
|
|
1715
1716
|
// Inline function 'kotlin.math.cos' call
|
|
1716
1717
|
var x1 = lon1 * Math.cos(lat1);
|
|
1717
1718
|
var y1 = lat1;
|
|
@@ -1732,32 +1733,32 @@
|
|
|
1732
1733
|
}
|
|
1733
1734
|
function Path(size) {
|
|
1734
1735
|
GeneratedPath.call(this, size);
|
|
1735
|
-
this.
|
|
1736
|
-
this.
|
|
1737
|
-
this.
|
|
1738
|
-
this.
|
|
1739
|
-
this.
|
|
1740
|
-
this.
|
|
1741
|
-
this.
|
|
1742
|
-
}
|
|
1743
|
-
protoOf(Path).
|
|
1744
|
-
return until(0, this.
|
|
1745
|
-
};
|
|
1746
|
-
protoOf(Path).
|
|
1747
|
-
return this.
|
|
1748
|
-
};
|
|
1749
|
-
protoOf(Path).
|
|
1750
|
-
return this.
|
|
1751
|
-
};
|
|
1752
|
-
protoOf(Path).
|
|
1753
|
-
return new LatLonElevation(this.
|
|
1754
|
-
};
|
|
1755
|
-
protoOf(Path).
|
|
1756
|
-
var out = new Path(this.
|
|
1757
|
-
var tmp0 = this.
|
|
1758
|
-
var tmp2 = out.
|
|
1736
|
+
this.w1i_1 = 0.0;
|
|
1737
|
+
this.x1i_1 = 0.0;
|
|
1738
|
+
this.y1i_1 = 0.0;
|
|
1739
|
+
this.z1i_1 = 0.0;
|
|
1740
|
+
this.a1j_1 = 0.0;
|
|
1741
|
+
this.b1j_1 = 0.0;
|
|
1742
|
+
this.c1j_1 = Companion_getInstance_4().k1l_1;
|
|
1743
|
+
}
|
|
1744
|
+
protoOf(Path).p1l = function () {
|
|
1745
|
+
return until(0, this.x1h_1);
|
|
1746
|
+
};
|
|
1747
|
+
protoOf(Path).q1l = function (i) {
|
|
1748
|
+
return this.z1h(i) * MathConstants_getInstance().bv_1;
|
|
1749
|
+
};
|
|
1750
|
+
protoOf(Path).r1l = function (i) {
|
|
1751
|
+
return this.a1i(i) * MathConstants_getInstance().bv_1;
|
|
1752
|
+
};
|
|
1753
|
+
protoOf(Path).a1k = function (i) {
|
|
1754
|
+
return new LatLonElevation(this.q1l(i), this.r1l(i), this.b1i(i));
|
|
1755
|
+
};
|
|
1756
|
+
protoOf(Path).s1l = function () {
|
|
1757
|
+
var out = new Path(this.x1h_1);
|
|
1758
|
+
var tmp0 = this.y1h_1;
|
|
1759
|
+
var tmp2 = out.y1h_1;
|
|
1759
1760
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1760
|
-
var endIndex = this.
|
|
1761
|
+
var endIndex = this.y1h_1.length;
|
|
1761
1762
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1762
1763
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1763
1764
|
var tmp = tmp0;
|
|
@@ -1767,11 +1768,11 @@
|
|
|
1767
1768
|
copyStatsFrom(out, this);
|
|
1768
1769
|
return out;
|
|
1769
1770
|
};
|
|
1770
|
-
protoOf(Path).
|
|
1771
|
+
protoOf(Path).d1j = function () {
|
|
1771
1772
|
resetStats(this);
|
|
1772
|
-
if (this.
|
|
1773
|
+
if (this.x1h_1 === 0)
|
|
1773
1774
|
return Unit_instance;
|
|
1774
|
-
var timeStart = this.
|
|
1775
|
+
var timeStart = this.c1i(0);
|
|
1775
1776
|
var cumDist = 0.0;
|
|
1776
1777
|
var minLat = Infinity;
|
|
1777
1778
|
var maxLat = -Infinity;
|
|
@@ -1782,14 +1783,14 @@
|
|
|
1782
1783
|
var gain = 0.0;
|
|
1783
1784
|
var loss = 0.0;
|
|
1784
1785
|
var inductionVariable = 0;
|
|
1785
|
-
var last = this.
|
|
1786
|
+
var last = this.x1h_1;
|
|
1786
1787
|
if (inductionVariable < last)
|
|
1787
1788
|
do {
|
|
1788
1789
|
var i = inductionVariable;
|
|
1789
1790
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1790
|
-
var lat = this.
|
|
1791
|
-
var lon = this.
|
|
1792
|
-
var ele = this.
|
|
1791
|
+
var lat = this.z1h(i);
|
|
1792
|
+
var lon = this.a1i(i);
|
|
1793
|
+
var ele = this.b1i(i);
|
|
1793
1794
|
// Inline function 'kotlin.math.min' call
|
|
1794
1795
|
var a = minLat;
|
|
1795
1796
|
minLat = Math.min(a, lat);
|
|
@@ -1809,67 +1810,67 @@
|
|
|
1809
1810
|
var a_4 = maxEle;
|
|
1810
1811
|
maxEle = Math.max(a_4, ele);
|
|
1811
1812
|
if (i > 0) {
|
|
1812
|
-
var prevCoord = new LatLon(this.
|
|
1813
|
-
var curCoord = new LatLon(this.
|
|
1813
|
+
var prevCoord = new LatLon(this.q1l(i - 1 | 0), this.r1l(i - 1 | 0));
|
|
1814
|
+
var curCoord = new LatLon(this.q1l(i), this.r1l(i));
|
|
1814
1815
|
cumDist = cumDist + Distance_instance.yu(prevCoord, curCoord);
|
|
1815
|
-
var dEle = ele - this.
|
|
1816
|
+
var dEle = ele - this.b1i(i - 1 | 0);
|
|
1816
1817
|
if (dEle > 0)
|
|
1817
1818
|
gain = gain + dEle;
|
|
1818
1819
|
else
|
|
1819
1820
|
loss = loss + dEle;
|
|
1820
1821
|
}
|
|
1821
|
-
this.
|
|
1822
|
+
this.c1k(i, cumDist);
|
|
1822
1823
|
}
|
|
1823
1824
|
while (inductionVariable < last);
|
|
1824
|
-
this.
|
|
1825
|
-
this.
|
|
1826
|
-
this.
|
|
1827
|
-
this.
|
|
1828
|
-
this.
|
|
1829
|
-
this.
|
|
1830
|
-
this.
|
|
1825
|
+
this.w1i_1 = cumDist;
|
|
1826
|
+
this.x1i_1 = minEle === Infinity ? 0.0 : minEle;
|
|
1827
|
+
this.y1i_1 = maxEle === -Infinity ? 0.0 : maxEle;
|
|
1828
|
+
this.z1i_1 = gain;
|
|
1829
|
+
this.a1j_1 = loss;
|
|
1830
|
+
this.c1j_1 = new BoundsRad(minLat, maxLat, minLon, maxLon);
|
|
1831
|
+
this.b1j_1 = this.x1h_1 >= 2 ? this.c1i(this.x1h_1 - 1 | 0) - timeStart : 0.0;
|
|
1831
1832
|
var inductionVariable_0 = 0;
|
|
1832
|
-
var last_0 = this.
|
|
1833
|
+
var last_0 = this.x1h_1;
|
|
1833
1834
|
if (inductionVariable_0 < last_0)
|
|
1834
1835
|
$l$loop: do {
|
|
1835
1836
|
var i_0 = inductionVariable_0;
|
|
1836
1837
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
1837
|
-
this.
|
|
1838
|
-
if (this.
|
|
1838
|
+
this.e1k(i_0, (this.c1i(i_0) - timeStart) / 1000.0);
|
|
1839
|
+
if (this.x1h_1 <= 1)
|
|
1839
1840
|
continue $l$loop;
|
|
1840
1841
|
// Inline function 'kotlin.math.max' call
|
|
1841
1842
|
var b = i_0 - 1 | 0;
|
|
1842
1843
|
var im1 = Math.max(0, b);
|
|
1843
|
-
var tmp0 = this.
|
|
1844
|
+
var tmp0 = this.x1h_1 - 1 | 0;
|
|
1844
1845
|
// Inline function 'kotlin.math.min' call
|
|
1845
1846
|
var b_0 = i_0 + 1 | 0;
|
|
1846
1847
|
var ip1 = Math.min(tmp0, b_0);
|
|
1847
|
-
this.
|
|
1848
|
-
var dDist = (this.
|
|
1849
|
-
var dEle_0 = (this.
|
|
1848
|
+
this.i1k(i_0, computeBearing(this, im1, ip1));
|
|
1849
|
+
var dDist = (this.b1k(ip1) - this.b1k(im1)) / 2.0;
|
|
1850
|
+
var dEle_0 = (this.b1i(ip1) - this.b1i(im1)) / 2.0;
|
|
1850
1851
|
var grade = dDist === 0.0 ? 0.0 : dEle_0 / dDist;
|
|
1851
|
-
this.
|
|
1852
|
-
var dTime = (this.
|
|
1853
|
-
this.
|
|
1854
|
-
this.
|
|
1855
|
-
this.
|
|
1852
|
+
this.k1k(i_0, grade);
|
|
1853
|
+
var dTime = (this.c1i(ip1) - this.c1i(im1)) / 2000.0;
|
|
1854
|
+
this.d1k(i_0, dDist);
|
|
1855
|
+
this.g1k(i_0, dTime);
|
|
1856
|
+
this.d1l(i_0, dTime === 0.0 ? 0.0 : dDist / dTime);
|
|
1856
1857
|
}
|
|
1857
1858
|
while (inductionVariable_0 < last_0);
|
|
1858
1859
|
};
|
|
1859
1860
|
function PathSimplifier() {
|
|
1860
1861
|
}
|
|
1861
|
-
protoOf(PathSimplifier).
|
|
1862
|
-
if (path.
|
|
1863
|
-
return path.
|
|
1864
|
-
var coords = ArrayList_init_$Create$(path.
|
|
1862
|
+
protoOf(PathSimplifier).g1h = function (path, toleranceM, zExaggeration) {
|
|
1863
|
+
if (path.x1h_1 <= 2)
|
|
1864
|
+
return path.s1l();
|
|
1865
|
+
var coords = ArrayList_init_$Create$(path.x1h_1);
|
|
1865
1866
|
var inductionVariable = 0;
|
|
1866
|
-
var last = path.
|
|
1867
|
+
var last = path.x1h_1;
|
|
1867
1868
|
if (inductionVariable < last)
|
|
1868
1869
|
do {
|
|
1869
1870
|
var i = inductionVariable;
|
|
1870
1871
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1871
1872
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
1872
|
-
var element = new LatLonElevation(path.
|
|
1873
|
+
var element = new LatLonElevation(path.z1h(i) * MathConstants_getInstance().bv_1, path.a1i(i) * MathConstants_getInstance().bv_1, path.b1i(i));
|
|
1873
1874
|
coords.h(element);
|
|
1874
1875
|
}
|
|
1875
1876
|
while (inductionVariable < last);
|
|
@@ -1902,10 +1903,10 @@
|
|
|
1902
1903
|
var _iterator__ex2g4s_0 = get_entries().i();
|
|
1903
1904
|
while (_iterator__ex2g4s_0.j()) {
|
|
1904
1905
|
var field = _iterator__ex2g4s_0.k();
|
|
1905
|
-
out.
|
|
1906
|
+
out.n1j(dstIdx, field, path.m1j(srcIdx, field));
|
|
1906
1907
|
}
|
|
1907
1908
|
}
|
|
1908
|
-
out.
|
|
1909
|
+
out.d1j();
|
|
1909
1910
|
return out;
|
|
1910
1911
|
};
|
|
1911
1912
|
var PathSimplifier_instance;
|
|
@@ -1950,7 +1951,7 @@
|
|
|
1950
1951
|
var PointField_CADENCE_instance;
|
|
1951
1952
|
function Companion_5() {
|
|
1952
1953
|
Companion_instance_5 = this;
|
|
1953
|
-
this.
|
|
1954
|
+
this.t1l_1 = 36;
|
|
1954
1955
|
var tmp = this;
|
|
1955
1956
|
// Inline function 'kotlin.collections.associateBy' call
|
|
1956
1957
|
var this_0 = get_entries();
|
|
@@ -1960,10 +1961,10 @@
|
|
|
1960
1961
|
var _iterator__ex2g4s = this_0.i();
|
|
1961
1962
|
while (_iterator__ex2g4s.j()) {
|
|
1962
1963
|
var element = _iterator__ex2g4s.k();
|
|
1963
|
-
var tmp$ret$2 = element.
|
|
1964
|
+
var tmp$ret$2 = element.x1l_1;
|
|
1964
1965
|
destination.p2(tmp$ret$2, element);
|
|
1965
1966
|
}
|
|
1966
|
-
tmp.
|
|
1967
|
+
tmp.u1l_1 = destination;
|
|
1967
1968
|
}
|
|
1968
1969
|
var Companion_instance_5;
|
|
1969
1970
|
function Companion_getInstance_6() {
|
|
@@ -2028,12 +2029,12 @@
|
|
|
2028
2029
|
notSelectable = notSelectable === VOID ? false : notSelectable;
|
|
2029
2030
|
anglesInRadians = anglesInRadians === VOID ? false : anglesInRadians;
|
|
2030
2031
|
Enum.call(this, name, ordinal);
|
|
2031
|
-
this.
|
|
2032
|
-
this.
|
|
2033
|
-
this.
|
|
2034
|
-
this.
|
|
2035
|
-
this.
|
|
2036
|
-
this.
|
|
2032
|
+
this.x1l_1 = prop;
|
|
2033
|
+
this.y1l_1 = unit;
|
|
2034
|
+
this.z1l_1 = shortDescription;
|
|
2035
|
+
this.a1m_1 = category;
|
|
2036
|
+
this.b1m_1 = notSelectable;
|
|
2037
|
+
this.c1m_1 = anglesInRadians;
|
|
2037
2038
|
}
|
|
2038
2039
|
function PointField_LATITUDE_getInstance() {
|
|
2039
2040
|
PointField_initEntries();
|
|
@@ -2215,8 +2216,8 @@
|
|
|
2215
2216
|
}
|
|
2216
2217
|
function PointFieldCategory(name, ordinal, id, displayName) {
|
|
2217
2218
|
Enum.call(this, name, ordinal);
|
|
2218
|
-
this.
|
|
2219
|
-
this.
|
|
2219
|
+
this.f1m_1 = id;
|
|
2220
|
+
this.g1m_1 = displayName;
|
|
2220
2221
|
}
|
|
2221
2222
|
function PointFieldCategory_COORDINATES_getInstance() {
|
|
2222
2223
|
PointFieldCategory_initEntries();
|
|
@@ -2275,35 +2276,35 @@
|
|
|
2275
2276
|
return PointFieldCategory_PHYSIOLOGICAL_instance;
|
|
2276
2277
|
}
|
|
2277
2278
|
function Copy(sourceIndex) {
|
|
2278
|
-
this.
|
|
2279
|
+
this.h1m_1 = sourceIndex;
|
|
2279
2280
|
}
|
|
2280
2281
|
protoOf(Copy).toString = function () {
|
|
2281
|
-
return 'Copy(sourceIndex=' + this.
|
|
2282
|
+
return 'Copy(sourceIndex=' + this.h1m_1 + ')';
|
|
2282
2283
|
};
|
|
2283
2284
|
protoOf(Copy).hashCode = function () {
|
|
2284
|
-
return this.
|
|
2285
|
+
return this.h1m_1;
|
|
2285
2286
|
};
|
|
2286
2287
|
protoOf(Copy).equals = function (other) {
|
|
2287
2288
|
if (this === other)
|
|
2288
2289
|
return true;
|
|
2289
2290
|
if (!(other instanceof Copy))
|
|
2290
2291
|
return false;
|
|
2291
|
-
if (!(this.
|
|
2292
|
+
if (!(this.h1m_1 === other.h1m_1))
|
|
2292
2293
|
return false;
|
|
2293
2294
|
return true;
|
|
2294
2295
|
};
|
|
2295
2296
|
function Interpolate(from, to, coef) {
|
|
2296
|
-
this.
|
|
2297
|
-
this.
|
|
2298
|
-
this.
|
|
2297
|
+
this.i1m_1 = from;
|
|
2298
|
+
this.j1m_1 = to;
|
|
2299
|
+
this.k1m_1 = coef;
|
|
2299
2300
|
}
|
|
2300
2301
|
protoOf(Interpolate).toString = function () {
|
|
2301
|
-
return 'Interpolate(from=' + this.
|
|
2302
|
+
return 'Interpolate(from=' + this.i1m_1 + ', to=' + this.j1m_1 + ', coef=' + this.k1m_1 + ')';
|
|
2302
2303
|
};
|
|
2303
2304
|
protoOf(Interpolate).hashCode = function () {
|
|
2304
|
-
var result = this.
|
|
2305
|
-
result = imul(result, 31) + this.
|
|
2306
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2305
|
+
var result = this.i1m_1;
|
|
2306
|
+
result = imul(result, 31) + this.j1m_1 | 0;
|
|
2307
|
+
result = imul(result, 31) + getNumberHashCode(this.k1m_1) | 0;
|
|
2307
2308
|
return result;
|
|
2308
2309
|
};
|
|
2309
2310
|
protoOf(Interpolate).equals = function (other) {
|
|
@@ -2311,28 +2312,28 @@
|
|
|
2311
2312
|
return true;
|
|
2312
2313
|
if (!(other instanceof Interpolate))
|
|
2313
2314
|
return false;
|
|
2314
|
-
if (!(this.
|
|
2315
|
+
if (!(this.i1m_1 === other.i1m_1))
|
|
2315
2316
|
return false;
|
|
2316
|
-
if (!(this.
|
|
2317
|
+
if (!(this.j1m_1 === other.j1m_1))
|
|
2317
2318
|
return false;
|
|
2318
|
-
if (!equals(this.
|
|
2319
|
+
if (!equals(this.k1m_1, other.k1m_1))
|
|
2319
2320
|
return false;
|
|
2320
2321
|
return true;
|
|
2321
2322
|
};
|
|
2322
2323
|
function buildPlan($this, source, minDistanceM, maxDistanceM) {
|
|
2323
|
-
var n = source.
|
|
2324
|
+
var n = source.x1h_1;
|
|
2324
2325
|
var plan = ArrayList_init_$Create$(n);
|
|
2325
2326
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
2326
2327
|
var element = new Copy(0);
|
|
2327
2328
|
plan.h(element);
|
|
2328
|
-
var lastAddedDistance = source.
|
|
2329
|
+
var lastAddedDistance = source.b1k(0);
|
|
2329
2330
|
var lastAddedIndex = 0;
|
|
2330
2331
|
var inductionVariable = 1;
|
|
2331
2332
|
if (inductionVariable < n)
|
|
2332
2333
|
$l$loop: do {
|
|
2333
2334
|
var i = inductionVariable;
|
|
2334
2335
|
inductionVariable = inductionVariable + 1 | 0;
|
|
2335
|
-
var curDist = source.
|
|
2336
|
+
var curDist = source.b1k(i);
|
|
2336
2337
|
var gap = curDist - lastAddedDistance;
|
|
2337
2338
|
if (gap < minDistanceM)
|
|
2338
2339
|
continue $l$loop;
|
|
@@ -2355,11 +2356,11 @@
|
|
|
2355
2356
|
var j = inductionVariable_0;
|
|
2356
2357
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
2357
2358
|
var targetDistance = lastAddedDistance + j * spacing;
|
|
2358
|
-
while (index1 < (i - 1 | 0) && source.
|
|
2359
|
+
while (index1 < (i - 1 | 0) && source.b1k(index1 + 1 | 0) < targetDistance) {
|
|
2359
2360
|
index1 = index1 + 1 | 0;
|
|
2360
2361
|
}
|
|
2361
|
-
var dist1 = source.
|
|
2362
|
-
var dist2 = source.
|
|
2362
|
+
var dist1 = source.b1k(index1);
|
|
2363
|
+
var dist2 = source.b1k(index1 + 1 | 0);
|
|
2363
2364
|
var coef = (targetDistance - dist1) / (dist2 - dist1);
|
|
2364
2365
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
2365
2366
|
var element_1 = new Interpolate(index1, index1 + 1 | 0, coef);
|
|
@@ -2385,52 +2386,52 @@
|
|
|
2385
2386
|
index = index + 1 | 0;
|
|
2386
2387
|
var op = iterator.k();
|
|
2387
2388
|
if (op instanceof Copy) {
|
|
2388
|
-
copyFields($this, source, op.
|
|
2389
|
+
copyFields($this, source, op.h1m_1, out, dstIdx);
|
|
2389
2390
|
} else {
|
|
2390
2391
|
if (op instanceof Interpolate) {
|
|
2391
|
-
interpolateFields($this, source, op.
|
|
2392
|
+
interpolateFields($this, source, op.i1m_1, op.j1m_1, op.k1m_1, out, dstIdx);
|
|
2392
2393
|
} else {
|
|
2393
2394
|
noWhenBranchMatchedException();
|
|
2394
2395
|
}
|
|
2395
2396
|
}
|
|
2396
2397
|
}
|
|
2397
|
-
out.
|
|
2398
|
+
out.d1j();
|
|
2398
2399
|
return out;
|
|
2399
2400
|
}
|
|
2400
2401
|
function copyFields($this, src, srcIdx, dst, dstIdx) {
|
|
2401
2402
|
var _iterator__ex2g4s = get_entries().i();
|
|
2402
2403
|
while (_iterator__ex2g4s.j()) {
|
|
2403
2404
|
var field = _iterator__ex2g4s.k();
|
|
2404
|
-
dst.
|
|
2405
|
+
dst.n1j(dstIdx, field, src.m1j(srcIdx, field));
|
|
2405
2406
|
}
|
|
2406
2407
|
}
|
|
2407
2408
|
function interpolateFields($this, src, i1, i2, coef, dst, dstIdx) {
|
|
2408
2409
|
var _iterator__ex2g4s = get_entries().i();
|
|
2409
2410
|
while (_iterator__ex2g4s.j()) {
|
|
2410
2411
|
var field = _iterator__ex2g4s.k();
|
|
2411
|
-
var v1 = src.
|
|
2412
|
-
var v2 = src.
|
|
2412
|
+
var v1 = src.m1j(i1, field);
|
|
2413
|
+
var v2 = src.m1j(i2, field);
|
|
2413
2414
|
var v = isNaN_0(v1) || isNaN_0(v2) ? NaN : v1 + (v2 - v1) * coef;
|
|
2414
|
-
dst.
|
|
2415
|
+
dst.n1j(dstIdx, field, v);
|
|
2415
2416
|
}
|
|
2416
2417
|
}
|
|
2417
2418
|
function PointPerDistance() {
|
|
2418
2419
|
}
|
|
2419
|
-
protoOf(PointPerDistance).
|
|
2420
|
-
return this.
|
|
2420
|
+
protoOf(PointPerDistance).t1g = function (source, minDistanceM, maxDistanceM) {
|
|
2421
|
+
return this.l1m(source, minDistanceM, maxDistanceM);
|
|
2421
2422
|
};
|
|
2422
|
-
protoOf(PointPerDistance).
|
|
2423
|
+
protoOf(PointPerDistance).l1m = function (source, minDistanceM, maxDistanceM) {
|
|
2423
2424
|
// Inline function 'kotlin.require' call
|
|
2424
2425
|
if (!(maxDistanceM > 0.0)) {
|
|
2425
2426
|
var message = 'maxDistanceM must be > 0, got ' + maxDistanceM;
|
|
2426
2427
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2427
2428
|
}
|
|
2428
|
-
if (source.
|
|
2429
|
+
if (source.x1h_1 === 0)
|
|
2429
2430
|
return new Path(0);
|
|
2430
|
-
if (source.
|
|
2431
|
+
if (source.x1h_1 === 1) {
|
|
2431
2432
|
var out = new Path(1);
|
|
2432
2433
|
copyFields(this, source, 0, out, 0);
|
|
2433
|
-
out.
|
|
2434
|
+
out.d1j();
|
|
2434
2435
|
return out;
|
|
2435
2436
|
}
|
|
2436
2437
|
var plan = buildPlan(this, source, minDistanceM, maxDistanceM);
|
|
@@ -2441,35 +2442,35 @@
|
|
|
2441
2442
|
return PointPerDistance_instance;
|
|
2442
2443
|
}
|
|
2443
2444
|
function Copy_0(sourceIndex) {
|
|
2444
|
-
this.
|
|
2445
|
+
this.m1m_1 = sourceIndex;
|
|
2445
2446
|
}
|
|
2446
2447
|
protoOf(Copy_0).toString = function () {
|
|
2447
|
-
return 'Copy(sourceIndex=' + this.
|
|
2448
|
+
return 'Copy(sourceIndex=' + this.m1m_1 + ')';
|
|
2448
2449
|
};
|
|
2449
2450
|
protoOf(Copy_0).hashCode = function () {
|
|
2450
|
-
return this.
|
|
2451
|
+
return this.m1m_1;
|
|
2451
2452
|
};
|
|
2452
2453
|
protoOf(Copy_0).equals = function (other) {
|
|
2453
2454
|
if (this === other)
|
|
2454
2455
|
return true;
|
|
2455
2456
|
if (!(other instanceof Copy_0))
|
|
2456
2457
|
return false;
|
|
2457
|
-
if (!(this.
|
|
2458
|
+
if (!(this.m1m_1 === other.m1m_1))
|
|
2458
2459
|
return false;
|
|
2459
2460
|
return true;
|
|
2460
2461
|
};
|
|
2461
2462
|
function Interpolate_0(from, to, coef) {
|
|
2462
|
-
this.
|
|
2463
|
-
this.
|
|
2464
|
-
this.
|
|
2463
|
+
this.n1m_1 = from;
|
|
2464
|
+
this.o1m_1 = to;
|
|
2465
|
+
this.p1m_1 = coef;
|
|
2465
2466
|
}
|
|
2466
2467
|
protoOf(Interpolate_0).toString = function () {
|
|
2467
|
-
return 'Interpolate(from=' + this.
|
|
2468
|
+
return 'Interpolate(from=' + this.n1m_1 + ', to=' + this.o1m_1 + ', coef=' + this.p1m_1 + ')';
|
|
2468
2469
|
};
|
|
2469
2470
|
protoOf(Interpolate_0).hashCode = function () {
|
|
2470
|
-
var result = this.
|
|
2471
|
-
result = imul(result, 31) + this.
|
|
2472
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2471
|
+
var result = this.n1m_1;
|
|
2472
|
+
result = imul(result, 31) + this.o1m_1 | 0;
|
|
2473
|
+
result = imul(result, 31) + getNumberHashCode(this.p1m_1) | 0;
|
|
2473
2474
|
return result;
|
|
2474
2475
|
};
|
|
2475
2476
|
protoOf(Interpolate_0).equals = function (other) {
|
|
@@ -2477,23 +2478,23 @@
|
|
|
2477
2478
|
return true;
|
|
2478
2479
|
if (!(other instanceof Interpolate_0))
|
|
2479
2480
|
return false;
|
|
2480
|
-
if (!(this.
|
|
2481
|
+
if (!(this.n1m_1 === other.n1m_1))
|
|
2481
2482
|
return false;
|
|
2482
|
-
if (!(this.
|
|
2483
|
+
if (!(this.o1m_1 === other.o1m_1))
|
|
2483
2484
|
return false;
|
|
2484
|
-
if (!equals(this.
|
|
2485
|
+
if (!equals(this.p1m_1, other.p1m_1))
|
|
2485
2486
|
return false;
|
|
2486
2487
|
return true;
|
|
2487
2488
|
};
|
|
2488
2489
|
function buildPlan_0($this, source) {
|
|
2489
2490
|
var plan = LinkedHashMap_init_$Create$_0();
|
|
2490
|
-
var n = source.
|
|
2491
|
+
var n = source.x1h_1;
|
|
2491
2492
|
var inductionVariable = 0;
|
|
2492
2493
|
if (inductionVariable < n)
|
|
2493
2494
|
$l$loop_0: do {
|
|
2494
2495
|
var i = inductionVariable;
|
|
2495
2496
|
inductionVariable = inductionVariable + 1 | 0;
|
|
2496
|
-
var time1 = source.
|
|
2497
|
+
var time1 = source.c1i(i);
|
|
2497
2498
|
// Inline function 'kotlin.math.floor' call
|
|
2498
2499
|
var x = time1 / 1000.0;
|
|
2499
2500
|
var tmp$ret$0 = Math.floor(x);
|
|
@@ -2513,7 +2514,7 @@
|
|
|
2513
2514
|
}
|
|
2514
2515
|
continue $l$loop_0;
|
|
2515
2516
|
}
|
|
2516
|
-
var time2 = source.
|
|
2517
|
+
var time2 = source.c1i(i + 1 | 0);
|
|
2517
2518
|
// Inline function 'kotlin.math.floor' call
|
|
2518
2519
|
var x_0 = time2 / 1000.0;
|
|
2519
2520
|
var tmp$ret$3 = Math.floor(x_0);
|
|
@@ -2558,40 +2559,40 @@
|
|
|
2558
2559
|
}
|
|
2559
2560
|
var data = tmp;
|
|
2560
2561
|
if (data instanceof Copy_0) {
|
|
2561
|
-
copyFields_0($this, source, data.
|
|
2562
|
+
copyFields_0($this, source, data.m1m_1, out, idx);
|
|
2562
2563
|
} else {
|
|
2563
2564
|
if (data instanceof Interpolate_0) {
|
|
2564
|
-
interpolateFields_0($this, source, data.
|
|
2565
|
+
interpolateFields_0($this, source, data.n1m_1, data.o1m_1, data.p1m_1, out, idx);
|
|
2565
2566
|
} else {
|
|
2566
2567
|
noWhenBranchMatchedException();
|
|
2567
2568
|
}
|
|
2568
2569
|
}
|
|
2569
|
-
out.
|
|
2570
|
+
out.p1i(idx, toNumber(multiply(epoch, new Long(1000, 0))));
|
|
2570
2571
|
}
|
|
2571
|
-
out.
|
|
2572
|
+
out.d1j();
|
|
2572
2573
|
return out;
|
|
2573
2574
|
}
|
|
2574
2575
|
function copyFields_0($this, src, srcIdx, dst, dstIdx) {
|
|
2575
2576
|
var _iterator__ex2g4s = get_entries().i();
|
|
2576
2577
|
while (_iterator__ex2g4s.j()) {
|
|
2577
2578
|
var field = _iterator__ex2g4s.k();
|
|
2578
|
-
dst.
|
|
2579
|
+
dst.n1j(dstIdx, field, src.m1j(srcIdx, field));
|
|
2579
2580
|
}
|
|
2580
2581
|
}
|
|
2581
2582
|
function interpolateFields_0($this, src, i1, i2, coef, dst, dstIdx) {
|
|
2582
2583
|
var _iterator__ex2g4s = get_entries().i();
|
|
2583
2584
|
while (_iterator__ex2g4s.j()) {
|
|
2584
2585
|
var field = _iterator__ex2g4s.k();
|
|
2585
|
-
var v1 = src.
|
|
2586
|
-
var v2 = src.
|
|
2586
|
+
var v1 = src.m1j(i1, field);
|
|
2587
|
+
var v2 = src.m1j(i2, field);
|
|
2587
2588
|
var v = isNaN_0(v1) || isNaN_0(v2) ? NaN : v1 + (v2 - v1) * coef;
|
|
2588
|
-
dst.
|
|
2589
|
+
dst.n1j(dstIdx, field, v);
|
|
2589
2590
|
}
|
|
2590
2591
|
}
|
|
2591
2592
|
function PointPerSecond() {
|
|
2592
2593
|
}
|
|
2593
|
-
protoOf(PointPerSecond).
|
|
2594
|
-
if (source.
|
|
2594
|
+
protoOf(PointPerSecond).f1h = function (source) {
|
|
2595
|
+
if (source.x1h_1 === 0)
|
|
2595
2596
|
return new Path(0);
|
|
2596
2597
|
var plan = buildPlan_0(this, source);
|
|
2597
2598
|
return materialize_0(this, source, plan);
|
|
@@ -2601,15 +2602,15 @@
|
|
|
2601
2602
|
return PointPerSecond_instance;
|
|
2602
2603
|
}
|
|
2603
2604
|
function computeWithWind($this, path, i, aeroCoef, wind) {
|
|
2604
|
-
var speed = path.
|
|
2605
|
-
var bearing = path.
|
|
2606
|
-
path.
|
|
2607
|
-
path.
|
|
2608
|
-
var windDirectionAsBearing = 3.141592653589793 / 2.0 - wind.
|
|
2609
|
-
path.
|
|
2605
|
+
var speed = path.c1l(i);
|
|
2606
|
+
var bearing = path.h1k(i);
|
|
2607
|
+
path.i1l(i, wind.q1m_1);
|
|
2608
|
+
path.j1l(i, wind.r1m_1);
|
|
2609
|
+
var windDirectionAsBearing = 3.141592653589793 / 2.0 - wind.r1m_1;
|
|
2610
|
+
path.n1k(i, windDirectionAsBearing);
|
|
2610
2611
|
var alpha = windDirectionAsBearing - bearing;
|
|
2611
|
-
path.
|
|
2612
|
-
var v = wind.
|
|
2612
|
+
path.o1k(i, alpha);
|
|
2613
|
+
var v = wind.q1m_1;
|
|
2613
2614
|
// Inline function 'kotlin.math.cos' call
|
|
2614
2615
|
var l1 = speed + v * Math.cos(alpha);
|
|
2615
2616
|
var l2 = l1 * l1;
|
|
@@ -2624,21 +2625,21 @@
|
|
|
2624
2625
|
return tmp_1 * Math.sqrt(l3) * l1 * speed;
|
|
2625
2626
|
}
|
|
2626
2627
|
function AeroPowerProvider() {
|
|
2627
|
-
this.
|
|
2628
|
+
this.s1m_1 = 1.2;
|
|
2628
2629
|
}
|
|
2629
|
-
protoOf(AeroPowerProvider).
|
|
2630
|
-
var aeroCoef = course.
|
|
2631
|
-
path.
|
|
2632
|
-
var wind = course.
|
|
2630
|
+
protoOf(AeroPowerProvider).t1m = function (course, path, pointIndex) {
|
|
2631
|
+
var aeroCoef = course.g1f_1.u1m(course, path, pointIndex);
|
|
2632
|
+
path.m1k(pointIndex, aeroCoef);
|
|
2633
|
+
var wind = course.h1f_1.v1m(course.e1f_1, path, pointIndex);
|
|
2633
2634
|
var tmp;
|
|
2634
|
-
if (wind.
|
|
2635
|
-
var v = path.
|
|
2635
|
+
if (wind.q1m_1 === 0.0) {
|
|
2636
|
+
var v = path.c1l(pointIndex);
|
|
2636
2637
|
tmp = -aeroCoef * v * v * v;
|
|
2637
2638
|
} else {
|
|
2638
2639
|
tmp = computeWithWind(this, path, pointIndex, aeroCoef, wind);
|
|
2639
2640
|
}
|
|
2640
2641
|
var pAir = tmp;
|
|
2641
|
-
path.
|
|
2642
|
+
path.p1k(pointIndex, pAir);
|
|
2642
2643
|
return pAir;
|
|
2643
2644
|
};
|
|
2644
2645
|
var AeroPowerProvider_instance;
|
|
@@ -2647,17 +2648,17 @@
|
|
|
2647
2648
|
}
|
|
2648
2649
|
function AeroProviderConstant() {
|
|
2649
2650
|
}
|
|
2650
|
-
protoOf(AeroProviderConstant).
|
|
2651
|
-
var rho = course.
|
|
2652
|
-
return course.
|
|
2651
|
+
protoOf(AeroProviderConstant).u1m = function (course, path, pointIndex) {
|
|
2652
|
+
var rho = course.f1f_1.w1m(course.e1f_1, path, pointIndex);
|
|
2653
|
+
return course.k1f().q1f_1 * course.k1f().r1f_1 * rho / 2.0;
|
|
2653
2654
|
};
|
|
2654
2655
|
var AeroProviderConstant_instance;
|
|
2655
2656
|
function AeroProviderConstant_getInstance() {
|
|
2656
2657
|
return AeroProviderConstant_instance;
|
|
2657
2658
|
}
|
|
2658
2659
|
function Companion_6() {
|
|
2659
|
-
this.
|
|
2660
|
-
this.
|
|
2660
|
+
this.x1m_1 = 0.05;
|
|
2661
|
+
this.y1m_1 = 3.0;
|
|
2661
2662
|
}
|
|
2662
2663
|
var Companion_instance_6;
|
|
2663
2664
|
function Companion_getInstance_7() {
|
|
@@ -2665,10 +2666,10 @@
|
|
|
2665
2666
|
}
|
|
2666
2667
|
function CyclistPowerProviderBase(useHarmonics, random) {
|
|
2667
2668
|
random = random === VOID ? Default_getInstance() : random;
|
|
2668
|
-
this.
|
|
2669
|
+
this.z1m_1 = useHarmonics;
|
|
2669
2670
|
var tmp = this;
|
|
2670
2671
|
var tmp_0;
|
|
2671
|
-
if (this.
|
|
2672
|
+
if (this.z1m_1) {
|
|
2672
2673
|
// Inline function 'kotlin.collections.List' call
|
|
2673
2674
|
// Inline function 'kotlin.collections.MutableList' call
|
|
2674
2675
|
var list = ArrayList_init_$Create$(20);
|
|
@@ -2686,40 +2687,40 @@
|
|
|
2686
2687
|
} else {
|
|
2687
2688
|
tmp_0 = emptyList();
|
|
2688
2689
|
}
|
|
2689
|
-
tmp.
|
|
2690
|
-
}
|
|
2691
|
-
protoOf(CyclistPowerProviderBase).
|
|
2692
|
-
var power = this.
|
|
2693
|
-
path.
|
|
2694
|
-
if (this.
|
|
2695
|
-
var x = path.
|
|
2696
|
-
var _iterator__ex2g4s = this.
|
|
2690
|
+
tmp.a1n_1 = tmp_0;
|
|
2691
|
+
}
|
|
2692
|
+
protoOf(CyclistPowerProviderBase).t1m = function (course, path, pointIndex) {
|
|
2693
|
+
var power = this.b1n(course, path, pointIndex);
|
|
2694
|
+
path.t1k(pointIndex, power);
|
|
2695
|
+
if (this.z1m_1) {
|
|
2696
|
+
var x = path.c1i(pointIndex) / 10000.0;
|
|
2697
|
+
var _iterator__ex2g4s = this.a1n_1.i();
|
|
2697
2698
|
while (_iterator__ex2g4s.j()) {
|
|
2698
2699
|
var h = _iterator__ex2g4s.k();
|
|
2699
2700
|
var tmp = power;
|
|
2700
|
-
var tmp_0 = h.
|
|
2701
|
+
var tmp_0 = h.e1n_1 * power;
|
|
2701
2702
|
// Inline function 'kotlin.math.cos' call
|
|
2702
|
-
var x_0 = h.
|
|
2703
|
+
var x_0 = h.c1n_1 * x - h.d1n_1;
|
|
2703
2704
|
power = tmp + tmp_0 * Math.cos(x_0);
|
|
2704
2705
|
}
|
|
2705
2706
|
}
|
|
2706
|
-
path.
|
|
2707
|
-
var powerNeeded = -PowerComputer_instance.
|
|
2708
|
-
path.
|
|
2707
|
+
path.u1k(pointIndex, power);
|
|
2708
|
+
var powerNeeded = -PowerComputer_instance.f1n(course, path, pointIndex, false);
|
|
2709
|
+
path.v1k(pointIndex, powerNeeded);
|
|
2709
2710
|
return power;
|
|
2710
2711
|
};
|
|
2711
2712
|
function GravPowerProvider() {
|
|
2712
2713
|
}
|
|
2713
|
-
protoOf(GravPowerProvider).
|
|
2714
|
-
var m = course.
|
|
2715
|
-
var grade = path.
|
|
2716
|
-
var speed = path.
|
|
2714
|
+
protoOf(GravPowerProvider).t1m = function (course, path, pointIndex) {
|
|
2715
|
+
var m = course.k1f().o1f_1;
|
|
2716
|
+
var grade = path.j1k(pointIndex);
|
|
2717
|
+
var speed = path.c1l(pointIndex);
|
|
2717
2718
|
var tmp = -m * 9.8 * speed;
|
|
2718
2719
|
// Inline function 'kotlin.math.atan' call
|
|
2719
2720
|
// Inline function 'kotlin.math.sin' call
|
|
2720
2721
|
var x = Math.atan(grade);
|
|
2721
2722
|
var p = tmp * Math.sin(x);
|
|
2722
|
-
path.
|
|
2723
|
+
path.q1k(pointIndex, p);
|
|
2723
2724
|
return p;
|
|
2724
2725
|
};
|
|
2725
2726
|
var GravPowerProvider_instance;
|
|
@@ -2727,17 +2728,17 @@
|
|
|
2727
2728
|
return GravPowerProvider_instance;
|
|
2728
2729
|
}
|
|
2729
2730
|
function Harmonic(freqRadS, phaseRad, amp) {
|
|
2730
|
-
this.
|
|
2731
|
-
this.
|
|
2732
|
-
this.
|
|
2731
|
+
this.c1n_1 = freqRadS;
|
|
2732
|
+
this.d1n_1 = phaseRad;
|
|
2733
|
+
this.e1n_1 = amp;
|
|
2733
2734
|
}
|
|
2734
2735
|
protoOf(Harmonic).toString = function () {
|
|
2735
|
-
return 'Harmonic(freqRadS=' + this.
|
|
2736
|
+
return 'Harmonic(freqRadS=' + this.c1n_1 + ', phaseRad=' + this.d1n_1 + ', amp=' + this.e1n_1 + ')';
|
|
2736
2737
|
};
|
|
2737
2738
|
protoOf(Harmonic).hashCode = function () {
|
|
2738
|
-
var result = getNumberHashCode(this.
|
|
2739
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2740
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2739
|
+
var result = getNumberHashCode(this.c1n_1);
|
|
2740
|
+
result = imul(result, 31) + getNumberHashCode(this.d1n_1) | 0;
|
|
2741
|
+
result = imul(result, 31) + getNumberHashCode(this.e1n_1) | 0;
|
|
2741
2742
|
return result;
|
|
2742
2743
|
};
|
|
2743
2744
|
protoOf(Harmonic).equals = function (other) {
|
|
@@ -2745,39 +2746,39 @@
|
|
|
2745
2746
|
return true;
|
|
2746
2747
|
if (!(other instanceof Harmonic))
|
|
2747
2748
|
return false;
|
|
2748
|
-
if (!equals(this.
|
|
2749
|
+
if (!equals(this.c1n_1, other.c1n_1))
|
|
2749
2750
|
return false;
|
|
2750
|
-
if (!equals(this.
|
|
2751
|
+
if (!equals(this.d1n_1, other.d1n_1))
|
|
2751
2752
|
return false;
|
|
2752
|
-
if (!equals(this.
|
|
2753
|
+
if (!equals(this.e1n_1, other.e1n_1))
|
|
2753
2754
|
return false;
|
|
2754
2755
|
return true;
|
|
2755
2756
|
};
|
|
2756
2757
|
function computeCorneringLimit($this, course, currentIndex, window_0) {
|
|
2757
|
-
var path = course.
|
|
2758
|
+
var path = course.y1e_1;
|
|
2758
2759
|
var radius = computeRadiusWindowed($this, path, currentIndex, window_0);
|
|
2759
2760
|
// Inline function 'kotlin.math.sqrt' call
|
|
2760
|
-
var x = 9.8 * radius * course.
|
|
2761
|
+
var x = 9.8 * radius * course.z1e_1.u1f();
|
|
2761
2762
|
var vMax = Math.sqrt(x);
|
|
2762
2763
|
// Inline function 'kotlin.math.min' call
|
|
2763
|
-
var a = course.
|
|
2764
|
+
var a = course.z1e_1.w1f();
|
|
2764
2765
|
var result = Math.min(a, vMax);
|
|
2765
|
-
path.
|
|
2766
|
+
path.g1l(currentIndex, result);
|
|
2766
2767
|
return result;
|
|
2767
2768
|
}
|
|
2768
2769
|
function computeRadiusWindowed($this, path, i, k) {
|
|
2769
2770
|
// Inline function 'kotlin.math.max' call
|
|
2770
2771
|
var b = i - k | 0;
|
|
2771
2772
|
var mini = Math.max(0, b);
|
|
2772
|
-
var tmp0 = path.
|
|
2773
|
+
var tmp0 = path.x1h_1 - 1 | 0;
|
|
2773
2774
|
// Inline function 'kotlin.math.min' call
|
|
2774
2775
|
var b_0 = i + k | 0;
|
|
2775
2776
|
var maxi = Math.min(tmp0, b_0);
|
|
2776
|
-
var totalBearingChange = $this.
|
|
2777
|
-
var totalDistance = path.
|
|
2777
|
+
var totalBearingChange = $this.g1n(path.h1k(maxi) - path.h1k(mini));
|
|
2778
|
+
var totalDistance = path.b1k(maxi) - path.b1k(mini);
|
|
2778
2779
|
// Inline function 'kotlin.math.abs' call
|
|
2779
2780
|
if (Math.abs(totalBearingChange) < 0.001) {
|
|
2780
|
-
path.
|
|
2781
|
+
path.l1k(i, 200.0);
|
|
2781
2782
|
return 200.0;
|
|
2782
2783
|
}
|
|
2783
2784
|
// Inline function 'kotlin.math.abs' call
|
|
@@ -2786,47 +2787,47 @@
|
|
|
2786
2787
|
// Inline function 'kotlin.math.max' call
|
|
2787
2788
|
var b_1 = Math.min(200.0, raw);
|
|
2788
2789
|
var clamped = Math.max(5.0, b_1);
|
|
2789
|
-
path.
|
|
2790
|
+
path.l1k(i, clamped);
|
|
2790
2791
|
return clamped;
|
|
2791
2792
|
}
|
|
2792
2793
|
function computeBrakingLimit($this, course, currentIndex, nextIndex) {
|
|
2793
|
-
var path = course.
|
|
2794
|
-
var vf = path.
|
|
2795
|
-
var a = course.
|
|
2796
|
-
var d = path.
|
|
2794
|
+
var path = course.y1e_1;
|
|
2795
|
+
var vf = path.e1l(nextIndex);
|
|
2796
|
+
var a = course.z1e_1.v1f();
|
|
2797
|
+
var d = path.b1k(nextIndex) - path.b1k(currentIndex);
|
|
2797
2798
|
// Inline function 'kotlin.math.sqrt' call
|
|
2798
2799
|
var x = vf * vf + 2.0 * a * d;
|
|
2799
2800
|
return Math.sqrt(x);
|
|
2800
2801
|
}
|
|
2801
2802
|
function MaxSpeedComputer() {
|
|
2802
|
-
this.
|
|
2803
|
-
this.
|
|
2804
|
-
this.
|
|
2805
|
-
this.
|
|
2806
|
-
this.
|
|
2807
|
-
}
|
|
2808
|
-
protoOf(MaxSpeedComputer).
|
|
2809
|
-
var path = course.
|
|
2810
|
-
var n = path.
|
|
2803
|
+
this.x1g_1 = 200.0;
|
|
2804
|
+
this.y1g_1 = 5.0;
|
|
2805
|
+
this.z1g_1 = 2.0;
|
|
2806
|
+
this.a1h_1 = 0.001;
|
|
2807
|
+
this.b1h_1 = 10;
|
|
2808
|
+
}
|
|
2809
|
+
protoOf(MaxSpeedComputer).c1h = function (course) {
|
|
2810
|
+
var path = course.y1e_1;
|
|
2811
|
+
var n = path.x1h_1;
|
|
2811
2812
|
var inductionVariable = n - 1 | 0;
|
|
2812
2813
|
if (0 <= inductionVariable)
|
|
2813
2814
|
do {
|
|
2814
2815
|
var i = inductionVariable;
|
|
2815
2816
|
inductionVariable = inductionVariable + -1 | 0;
|
|
2816
2817
|
if (i === (n - 1 | 0)) {
|
|
2817
|
-
path.
|
|
2818
|
+
path.f1l(i, 2.0);
|
|
2818
2819
|
} else {
|
|
2819
2820
|
var cornering = computeCorneringLimit(this, course, i, 10);
|
|
2820
2821
|
var braking = computeBrakingLimit(this, course, i, i + 1 | 0);
|
|
2821
2822
|
// Inline function 'kotlin.math.min' call
|
|
2822
2823
|
var tmp$ret$0 = Math.min(cornering, braking);
|
|
2823
|
-
path.
|
|
2824
|
+
path.f1l(i, tmp$ret$0);
|
|
2824
2825
|
}
|
|
2825
2826
|
}
|
|
2826
2827
|
while (0 <= inductionVariable);
|
|
2827
|
-
path.
|
|
2828
|
+
path.d1j();
|
|
2828
2829
|
};
|
|
2829
|
-
protoOf(MaxSpeedComputer).
|
|
2830
|
+
protoOf(MaxSpeedComputer).g1n = function (angleIn) {
|
|
2830
2831
|
var a = angleIn;
|
|
2831
2832
|
while (a > 3.141592653589793)
|
|
2832
2833
|
a = a - 2.0 * 3.141592653589793;
|
|
@@ -2840,11 +2841,11 @@
|
|
|
2840
2841
|
}
|
|
2841
2842
|
function MuscularPowerProvider() {
|
|
2842
2843
|
}
|
|
2843
|
-
protoOf(MuscularPowerProvider).
|
|
2844
|
-
var muscular = course.
|
|
2845
|
-
path.
|
|
2846
|
-
var wheel = muscular * course.
|
|
2847
|
-
path.
|
|
2844
|
+
protoOf(MuscularPowerProvider).t1m = function (course, path, pointIndex) {
|
|
2845
|
+
var muscular = course.i1f_1.t1m(course, path, pointIndex);
|
|
2846
|
+
path.w1k(pointIndex, muscular);
|
|
2847
|
+
var wheel = muscular * course.l1f().w1e_1;
|
|
2848
|
+
path.x1k(pointIndex, wheel);
|
|
2848
2849
|
return wheel;
|
|
2849
2850
|
};
|
|
2850
2851
|
var MuscularPowerProvider_instance;
|
|
@@ -2857,7 +2858,7 @@
|
|
|
2857
2858
|
var tol = dx / 1.0E7;
|
|
2858
2859
|
while (dt2 - dt1 >= tol) {
|
|
2859
2860
|
var dtMid = (dt1 + dt2) / 2.0;
|
|
2860
|
-
var dxMid = $this.
|
|
2861
|
+
var dxMid = $this.h1n(pSum, equivalentMass, currentSpeed, dtMid);
|
|
2861
2862
|
if (dxMid < dx)
|
|
2862
2863
|
dt1 = dtMid;
|
|
2863
2864
|
else
|
|
@@ -2867,18 +2868,18 @@
|
|
|
2867
2868
|
}
|
|
2868
2869
|
function PowerComputer() {
|
|
2869
2870
|
}
|
|
2870
|
-
protoOf(PowerComputer).
|
|
2871
|
+
protoOf(PowerComputer).f1n = function (course, path, pointIndex, withCyclist) {
|
|
2871
2872
|
var pSum = 0.0;
|
|
2872
|
-
pSum = pSum + WheelBearingsPowerProvider_instance.
|
|
2873
|
-
pSum = pSum + RollingResistancePowerProvider_instance.
|
|
2874
|
-
pSum = pSum + AeroPowerProvider_instance.
|
|
2875
|
-
pSum = pSum + GravPowerProvider_instance.
|
|
2873
|
+
pSum = pSum + WheelBearingsPowerProvider_instance.t1m(course, path, pointIndex);
|
|
2874
|
+
pSum = pSum + RollingResistancePowerProvider_instance.t1m(course, path, pointIndex);
|
|
2875
|
+
pSum = pSum + AeroPowerProvider_instance.t1m(course, path, pointIndex);
|
|
2876
|
+
pSum = pSum + GravPowerProvider_instance.t1m(course, path, pointIndex);
|
|
2876
2877
|
if (withCyclist) {
|
|
2877
|
-
pSum = pSum + MuscularPowerProvider_instance.
|
|
2878
|
+
pSum = pSum + MuscularPowerProvider_instance.t1m(course, path, pointIndex);
|
|
2878
2879
|
}
|
|
2879
2880
|
return pSum;
|
|
2880
2881
|
};
|
|
2881
|
-
protoOf(PowerComputer).
|
|
2882
|
+
protoOf(PowerComputer).h1n = function (pSum, equivalentMass, currentSpeed, dt) {
|
|
2882
2883
|
// Inline function 'kotlin.math.sqrt' call
|
|
2883
2884
|
var x = dt * pSum / (0.5 * equivalentMass) + currentSpeed * currentSpeed;
|
|
2884
2885
|
var tmp0 = Math.sqrt(x);
|
|
@@ -2887,40 +2888,40 @@
|
|
|
2887
2888
|
var newSpeed = Math.max(tmp0, b);
|
|
2888
2889
|
return (currentSpeed + newSpeed) * dt / 2.0;
|
|
2889
2890
|
};
|
|
2890
|
-
protoOf(PowerComputer).
|
|
2891
|
+
protoOf(PowerComputer).i1n = function (equivalentMass, s1, s2, dt) {
|
|
2891
2892
|
return 0.5 * equivalentMass * (s2 * s2 - s1 * s1) / dt;
|
|
2892
2893
|
};
|
|
2893
|
-
protoOf(PowerComputer).
|
|
2894
|
+
protoOf(PowerComputer).j1n = function (pSum, equivalentMass, currentSpeed, dx) {
|
|
2894
2895
|
var dt = 0.1;
|
|
2895
|
-
while (this.
|
|
2896
|
+
while (this.h1n(pSum, equivalentMass, currentSpeed, dt) <= dx) {
|
|
2896
2897
|
dt = dt + 0.1;
|
|
2897
2898
|
}
|
|
2898
2899
|
return getDtInner(this, pSum, equivalentMass, currentSpeed, dx, dt - 0.1, dt);
|
|
2899
2900
|
};
|
|
2900
|
-
protoOf(PowerComputer).
|
|
2901
|
+
protoOf(PowerComputer).k1n = function (course, path, equivalentMass, i) {
|
|
2901
2902
|
if (i === 0) {
|
|
2902
|
-
path.
|
|
2903
|
+
path.b1l(i, 0.0);
|
|
2903
2904
|
return Unit_instance;
|
|
2904
2905
|
}
|
|
2905
|
-
var resistive = this.
|
|
2906
|
-
var s1 = path.
|
|
2907
|
-
var s2 = path.
|
|
2908
|
-
var dtSeconds = path.
|
|
2909
|
-
var totPower = this.
|
|
2910
|
-
path.
|
|
2906
|
+
var resistive = this.f1n(course, path, i - 1 | 0, false);
|
|
2907
|
+
var s1 = path.c1l(i - 1 | 0);
|
|
2908
|
+
var s2 = path.c1l(i);
|
|
2909
|
+
var dtSeconds = path.f1k(i) / 1000.0;
|
|
2910
|
+
var totPower = this.i1n(equivalentMass, s1, s2, dtSeconds);
|
|
2911
|
+
path.y1k(i, totPower);
|
|
2911
2912
|
var powerWheel = totPower - resistive;
|
|
2912
|
-
path.
|
|
2913
|
+
path.z1k(i, powerWheel);
|
|
2913
2914
|
// Inline function 'kotlin.math.max' call
|
|
2914
|
-
var computed = Math.max(0.0, powerWheel) / course.
|
|
2915
|
-
path.
|
|
2915
|
+
var computed = Math.max(0.0, powerWheel) / course.l1f().w1e_1;
|
|
2916
|
+
path.b1l(i, computed);
|
|
2916
2917
|
};
|
|
2917
|
-
protoOf(PowerComputer).
|
|
2918
|
-
var m = course.
|
|
2919
|
-
var totalInertia = course.
|
|
2920
|
-
return m + totalInertia / (course.
|
|
2918
|
+
protoOf(PowerComputer).l1n = function (course) {
|
|
2919
|
+
var m = course.z1e_1.o1f_1;
|
|
2920
|
+
var totalInertia = course.a1f_1.t1e_1 + course.a1f_1.u1e_1;
|
|
2921
|
+
return m + totalInertia / (course.a1f_1.v1e_1 * course.a1f_1.v1e_1);
|
|
2921
2922
|
};
|
|
2922
|
-
protoOf(PowerComputer).
|
|
2923
|
-
return this.
|
|
2923
|
+
protoOf(PowerComputer).m1n = function (course) {
|
|
2924
|
+
return this.l1n(course.e1f_1);
|
|
2924
2925
|
};
|
|
2925
2926
|
var PowerComputer_instance;
|
|
2926
2927
|
function PowerComputer_getInstance() {
|
|
@@ -2930,14 +2931,14 @@
|
|
|
2930
2931
|
useHarmonics = useHarmonics === VOID ? false : useHarmonics;
|
|
2931
2932
|
random = random === VOID ? Default_getInstance() : random;
|
|
2932
2933
|
CyclistPowerProviderBase.call(this, useHarmonics, random);
|
|
2933
|
-
this.
|
|
2934
|
+
this.p1n_1 = power;
|
|
2934
2935
|
}
|
|
2935
|
-
protoOf(PowerProviderConstant).
|
|
2936
|
-
return this.
|
|
2936
|
+
protoOf(PowerProviderConstant).b1n = function (course, path, pointIndex) {
|
|
2937
|
+
return this.p1n_1;
|
|
2937
2938
|
};
|
|
2938
2939
|
function RhoProviderDefault() {
|
|
2939
2940
|
}
|
|
2940
|
-
protoOf(RhoProviderDefault).
|
|
2941
|
+
protoOf(RhoProviderDefault).w1m = function (course, path, pointIndex) {
|
|
2941
2942
|
return 1.225;
|
|
2942
2943
|
};
|
|
2943
2944
|
var RhoProviderDefault_instance;
|
|
@@ -2945,16 +2946,16 @@
|
|
|
2945
2946
|
return RhoProviderDefault_instance;
|
|
2946
2947
|
}
|
|
2947
2948
|
function RhoProviderEstimate() {
|
|
2948
|
-
this.
|
|
2949
|
-
this.
|
|
2950
|
-
this.
|
|
2951
|
-
this.
|
|
2952
|
-
this.
|
|
2953
|
-
}
|
|
2954
|
-
protoOf(RhoProviderEstimate).
|
|
2955
|
-
var providedTemp = path.
|
|
2949
|
+
this.q1n_1 = 101325.0;
|
|
2950
|
+
this.r1n_1 = 288.15;
|
|
2951
|
+
this.s1n_1 = 9.80665;
|
|
2952
|
+
this.t1n_1 = 0.0065;
|
|
2953
|
+
this.u1n_1 = 287.05;
|
|
2954
|
+
}
|
|
2955
|
+
protoOf(RhoProviderEstimate).w1m = function (course, path, pointIndex) {
|
|
2956
|
+
var providedTemp = path.m1j(pointIndex, PointField_TEMPERATURE_getInstance());
|
|
2956
2957
|
var temperatureC = isNaN_0(providedTemp) || providedTemp === 0.0 ? 15.0 : providedTemp;
|
|
2957
|
-
var providedElevation = path.
|
|
2958
|
+
var providedElevation = path.b1i(pointIndex);
|
|
2958
2959
|
var altitude = isNaN_0(providedElevation) ? 0.0 : providedElevation;
|
|
2959
2960
|
var tKelvin = temperatureC + 273.15;
|
|
2960
2961
|
var tmp0 = 1.0 - 0.0065 * altitude / 288.15;
|
|
@@ -2969,17 +2970,17 @@
|
|
|
2969
2970
|
}
|
|
2970
2971
|
function RollingResistancePowerProvider() {
|
|
2971
2972
|
}
|
|
2972
|
-
protoOf(RollingResistancePowerProvider).
|
|
2973
|
-
var m = course.
|
|
2974
|
-
var crr = course.
|
|
2975
|
-
var grade = path.
|
|
2976
|
-
var speed = path.
|
|
2973
|
+
protoOf(RollingResistancePowerProvider).t1m = function (course, path, pointIndex) {
|
|
2974
|
+
var m = course.k1f().o1f_1;
|
|
2975
|
+
var crr = course.l1f().s1e_1;
|
|
2976
|
+
var grade = path.j1k(pointIndex);
|
|
2977
|
+
var speed = path.c1l(pointIndex);
|
|
2977
2978
|
// Inline function 'kotlin.math.atan' call
|
|
2978
2979
|
// Inline function 'kotlin.math.cos' call
|
|
2979
2980
|
var x = Math.atan(grade);
|
|
2980
2981
|
var coef = Math.cos(x);
|
|
2981
2982
|
var p = -coef * m * 9.8 * speed * crr;
|
|
2982
|
-
path.
|
|
2983
|
+
path.r1k(pointIndex, p);
|
|
2983
2984
|
return p;
|
|
2984
2985
|
};
|
|
2985
2986
|
var RollingResistancePowerProvider_instance;
|
|
@@ -2990,15 +2991,15 @@
|
|
|
2990
2991
|
var _iterator__ex2g4s = get_entries().i();
|
|
2991
2992
|
while (_iterator__ex2g4s.j()) {
|
|
2992
2993
|
var field = _iterator__ex2g4s.k();
|
|
2993
|
-
dst.
|
|
2994
|
+
dst.n1j(j, field, src.m1j(i, field));
|
|
2994
2995
|
}
|
|
2995
2996
|
}
|
|
2996
2997
|
function VirtualizeService() {
|
|
2997
|
-
this.
|
|
2998
|
+
this.d1h_1 = 100000;
|
|
2998
2999
|
}
|
|
2999
|
-
protoOf(VirtualizeService).
|
|
3000
|
-
var input = course.
|
|
3001
|
-
var n = input.
|
|
3000
|
+
protoOf(VirtualizeService).e1h = function (course) {
|
|
3001
|
+
var input = course.j1f();
|
|
3002
|
+
var n = input.x1h_1;
|
|
3002
3003
|
if (n === 0)
|
|
3003
3004
|
return new Path(0);
|
|
3004
3005
|
if (n === 1) {
|
|
@@ -3006,54 +3007,54 @@
|
|
|
3006
3007
|
copyAllFields(this, input, 0, singleton, 0);
|
|
3007
3008
|
return singleton;
|
|
3008
3009
|
}
|
|
3009
|
-
var mEq = PowerComputer_instance.
|
|
3010
|
+
var mEq = PowerComputer_instance.m1n(course);
|
|
3010
3011
|
var out = new Path(n);
|
|
3011
3012
|
copyAllFields(this, input, 0, out, 0);
|
|
3012
3013
|
var speed = 0.5555555555555556;
|
|
3013
3014
|
var startTimeMs = 0.0;
|
|
3014
3015
|
var timeMs = startTimeMs;
|
|
3015
|
-
out.
|
|
3016
|
-
out.
|
|
3017
|
-
out.
|
|
3018
|
-
out.
|
|
3016
|
+
out.p1i(0, timeMs);
|
|
3017
|
+
out.e1k(0, 0.0);
|
|
3018
|
+
out.d1l(0, speed);
|
|
3019
|
+
out.h1l(0, speed);
|
|
3019
3020
|
var i = 1;
|
|
3020
3021
|
var iter = 0;
|
|
3021
3022
|
$l$loop: while (i < n) {
|
|
3022
|
-
var dx = input.
|
|
3023
|
-
var pSum = PowerComputer_instance.
|
|
3024
|
-
var dt = PowerComputer_instance.
|
|
3023
|
+
var dx = input.b1k(i) - input.b1k(i - 1 | 0);
|
|
3024
|
+
var pSum = PowerComputer_instance.f1n(course, out, i - 1 | 0, true);
|
|
3025
|
+
var dt = PowerComputer_instance.j1n(pSum, mEq, speed, dx);
|
|
3025
3026
|
var speedNew = 2.0 * dx / dt - speed;
|
|
3026
3027
|
copyAllFields(this, input, i, out, i);
|
|
3027
|
-
var speedMax = input.
|
|
3028
|
+
var speedMax = input.e1l(i);
|
|
3028
3029
|
if (speedNew > speedMax) {
|
|
3029
3030
|
speedNew = speedMax;
|
|
3030
3031
|
dt = 2.0 * dx / (speedNew + speed);
|
|
3031
3032
|
}
|
|
3032
3033
|
speed = speedNew;
|
|
3033
3034
|
timeMs = timeMs + dt * 1000.0;
|
|
3034
|
-
out.
|
|
3035
|
-
out.
|
|
3036
|
-
out.
|
|
3037
|
-
out.
|
|
3038
|
-
out.
|
|
3039
|
-
out.
|
|
3035
|
+
out.p1i(i, timeMs);
|
|
3036
|
+
out.e1k(i, timeMs - startTimeMs);
|
|
3037
|
+
out.d1k(i, dx);
|
|
3038
|
+
out.g1k(i, dt * 1000.0);
|
|
3039
|
+
out.d1l(i, speed);
|
|
3040
|
+
out.h1l(i, speed);
|
|
3040
3041
|
i = i + 1 | 0;
|
|
3041
3042
|
var _unary__edvuaz = iter;
|
|
3042
3043
|
iter = _unary__edvuaz + 1 | 0;
|
|
3043
3044
|
if (_unary__edvuaz > 100000)
|
|
3044
3045
|
break $l$loop;
|
|
3045
3046
|
}
|
|
3046
|
-
var progression = out.
|
|
3047
|
+
var progression = out.p1l();
|
|
3047
3048
|
var inductionVariable = progression.qa_1;
|
|
3048
3049
|
var last = progression.ra_1;
|
|
3049
3050
|
if (inductionVariable <= last)
|
|
3050
3051
|
do {
|
|
3051
3052
|
var j = inductionVariable;
|
|
3052
3053
|
inductionVariable = inductionVariable + 1 | 0;
|
|
3053
|
-
PowerComputer_instance.
|
|
3054
|
+
PowerComputer_instance.k1n(course, out, mEq, j);
|
|
3054
3055
|
}
|
|
3055
3056
|
while (!(j === last));
|
|
3056
|
-
out.
|
|
3057
|
+
out.d1j();
|
|
3057
3058
|
return out;
|
|
3058
3059
|
};
|
|
3059
3060
|
var VirtualizeService_instance;
|
|
@@ -3062,10 +3063,10 @@
|
|
|
3062
3063
|
}
|
|
3063
3064
|
function WheelBearingsPowerProvider() {
|
|
3064
3065
|
}
|
|
3065
|
-
protoOf(WheelBearingsPowerProvider).
|
|
3066
|
-
var speed = path.
|
|
3066
|
+
protoOf(WheelBearingsPowerProvider).t1m = function (course, path, pointIndex) {
|
|
3067
|
+
var speed = path.c1l(pointIndex);
|
|
3067
3068
|
var p = -speed * (91.0 + 8.7 * speed) / 1000.0;
|
|
3068
|
-
path.
|
|
3069
|
+
path.s1k(pointIndex, p);
|
|
3069
3070
|
return p;
|
|
3070
3071
|
};
|
|
3071
3072
|
var WheelBearingsPowerProvider_instance;
|
|
@@ -3074,7 +3075,7 @@
|
|
|
3074
3075
|
}
|
|
3075
3076
|
function Companion_7() {
|
|
3076
3077
|
Companion_instance_7 = this;
|
|
3077
|
-
this.
|
|
3078
|
+
this.v1n_1 = new Wind(0.0, 0.0);
|
|
3078
3079
|
}
|
|
3079
3080
|
var Companion_instance_7;
|
|
3080
3081
|
function Companion_getInstance_8() {
|
|
@@ -3084,15 +3085,15 @@
|
|
|
3084
3085
|
}
|
|
3085
3086
|
function Wind(speedMS, directionRad) {
|
|
3086
3087
|
Companion_getInstance_8();
|
|
3087
|
-
this.
|
|
3088
|
-
this.
|
|
3088
|
+
this.q1m_1 = speedMS;
|
|
3089
|
+
this.r1m_1 = directionRad;
|
|
3089
3090
|
}
|
|
3090
3091
|
protoOf(Wind).toString = function () {
|
|
3091
|
-
return 'Wind(speedMS=' + this.
|
|
3092
|
+
return 'Wind(speedMS=' + this.q1m_1 + ', directionRad=' + this.r1m_1 + ')';
|
|
3092
3093
|
};
|
|
3093
3094
|
protoOf(Wind).hashCode = function () {
|
|
3094
|
-
var result = getNumberHashCode(this.
|
|
3095
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3095
|
+
var result = getNumberHashCode(this.q1m_1);
|
|
3096
|
+
result = imul(result, 31) + getNumberHashCode(this.r1m_1) | 0;
|
|
3096
3097
|
return result;
|
|
3097
3098
|
};
|
|
3098
3099
|
protoOf(Wind).equals = function (other) {
|
|
@@ -3100,44 +3101,44 @@
|
|
|
3100
3101
|
return true;
|
|
3101
3102
|
if (!(other instanceof Wind))
|
|
3102
3103
|
return false;
|
|
3103
|
-
if (!equals(this.
|
|
3104
|
+
if (!equals(this.q1m_1, other.q1m_1))
|
|
3104
3105
|
return false;
|
|
3105
|
-
if (!equals(this.
|
|
3106
|
+
if (!equals(this.r1m_1, other.r1m_1))
|
|
3106
3107
|
return false;
|
|
3107
3108
|
return true;
|
|
3108
3109
|
};
|
|
3109
3110
|
function WindProviderNone() {
|
|
3110
3111
|
}
|
|
3111
|
-
protoOf(WindProviderNone).
|
|
3112
|
-
return Companion_getInstance_8().
|
|
3112
|
+
protoOf(WindProviderNone).v1m = function (course, path, pointIndex) {
|
|
3113
|
+
return Companion_getInstance_8().v1n_1;
|
|
3113
3114
|
};
|
|
3114
3115
|
var WindProviderNone_instance;
|
|
3115
3116
|
function WindProviderNone_getInstance() {
|
|
3116
3117
|
return WindProviderNone_instance;
|
|
3117
3118
|
}
|
|
3118
3119
|
function parseGpx(xml) {
|
|
3119
|
-
return firstTrackAsPath(GpxParser_instance.
|
|
3120
|
+
return firstTrackAsPath(GpxParser_instance.l1i(xml));
|
|
3120
3121
|
}
|
|
3121
3122
|
function pathSize(path) {
|
|
3122
|
-
return path.
|
|
3123
|
+
return path.x1h_1;
|
|
3123
3124
|
}
|
|
3124
3125
|
function pathTotalDistance(path) {
|
|
3125
|
-
return path.
|
|
3126
|
+
return path.w1i_1;
|
|
3126
3127
|
}
|
|
3127
3128
|
function pathDurationMs(path) {
|
|
3128
|
-
return path.
|
|
3129
|
+
return path.b1j_1;
|
|
3129
3130
|
}
|
|
3130
3131
|
function pathElevationGain(path) {
|
|
3131
|
-
return path.
|
|
3132
|
+
return path.z1i_1;
|
|
3132
3133
|
}
|
|
3133
3134
|
function pathElevationLoss(path) {
|
|
3134
|
-
return path.
|
|
3135
|
+
return path.a1j_1;
|
|
3135
3136
|
}
|
|
3136
3137
|
function pointAt(path, i) {
|
|
3137
|
-
return pointObj(path.
|
|
3138
|
+
return pointObj(path.q1l(i), path.r1l(i), path.b1i(i), path.c1i(i), path.c1l(i), path.a1l(i), path.b1k(i), path.j1k(i));
|
|
3138
3139
|
}
|
|
3139
3140
|
function writeGpx(path) {
|
|
3140
|
-
return GpxWriter_instance.
|
|
3141
|
+
return GpxWriter_instance.l1j(toGpxDocument(path, VOID, 'virtualized'));
|
|
3141
3142
|
}
|
|
3142
3143
|
function enhance(path, options) {
|
|
3143
3144
|
var tmp = GlobalScope_instance;
|
|
@@ -3178,18 +3179,18 @@
|
|
|
3178
3179
|
return new EnhanceOptions(false, true, true, false, new SimplifyPathOptions(false));
|
|
3179
3180
|
}
|
|
3180
3181
|
function enhance$slambda($options, $path, resultContinuation) {
|
|
3181
|
-
this.
|
|
3182
|
-
this.
|
|
3182
|
+
this.e1o_1 = $options;
|
|
3183
|
+
this.f1o_1 = $path;
|
|
3183
3184
|
CoroutineImpl.call(this, resultContinuation);
|
|
3184
3185
|
}
|
|
3185
|
-
protoOf(enhance$slambda).
|
|
3186
|
+
protoOf(enhance$slambda).h1o = function ($this$promise, $completion) {
|
|
3186
3187
|
var tmp = this.qz($this$promise, $completion);
|
|
3187
3188
|
tmp.w5_1 = Unit_instance;
|
|
3188
3189
|
tmp.x5_1 = null;
|
|
3189
3190
|
return tmp.c6();
|
|
3190
3191
|
};
|
|
3191
3192
|
protoOf(enhance$slambda).k6 = function (p1, $completion) {
|
|
3192
|
-
return this.
|
|
3193
|
+
return this.h1o((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
3193
3194
|
};
|
|
3194
3195
|
protoOf(enhance$slambda).c6 = function () {
|
|
3195
3196
|
var suspendResult = this.w5_1;
|
|
@@ -3199,9 +3200,10 @@
|
|
|
3199
3200
|
switch (tmp) {
|
|
3200
3201
|
case 0:
|
|
3201
3202
|
this.v5_1 = 2;
|
|
3202
|
-
var opts = toEnhanceOptions(this.
|
|
3203
|
+
var opts = toEnhanceOptions(this.e1o_1);
|
|
3204
|
+
var provider = opts.b1g_1 ? new ElevationProvider() : null;
|
|
3203
3205
|
this.u5_1 = 1;
|
|
3204
|
-
suspendResult = Enhancer_instance.
|
|
3206
|
+
suspendResult = Enhancer_instance.i1h(this.f1o_1, provider, opts, this);
|
|
3205
3207
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3206
3208
|
return suspendResult;
|
|
3207
3209
|
}
|
|
@@ -3224,14 +3226,14 @@
|
|
|
3224
3226
|
while (true);
|
|
3225
3227
|
};
|
|
3226
3228
|
protoOf(enhance$slambda).qz = function ($this$promise, completion) {
|
|
3227
|
-
var i = new enhance$slambda(this.
|
|
3228
|
-
i.
|
|
3229
|
+
var i = new enhance$slambda(this.e1o_1, this.f1o_1, completion);
|
|
3230
|
+
i.g1o_1 = $this$promise;
|
|
3229
3231
|
return i;
|
|
3230
3232
|
};
|
|
3231
3233
|
function enhance$slambda_0($options, $path, resultContinuation) {
|
|
3232
3234
|
var i = new enhance$slambda($options, $path, resultContinuation);
|
|
3233
3235
|
var l = function ($this$promise, $completion) {
|
|
3234
|
-
return i.
|
|
3236
|
+
return i.h1o($this$promise, $completion);
|
|
3235
3237
|
};
|
|
3236
3238
|
l.$arity = 1;
|
|
3237
3239
|
return l;
|