@glandais/vcyclist-engine 6.4.0 → 6.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kotlin-kotlin-stdlib.js +5 -5
- package/package.json +1 -1
- package/vcyclist-engine.js +1289 -1215
- package/vcyclist-engine.js.map +1 -1
- package/vcyclist-gpx.js +1 -0
- package/vcyclist-gpx.js.map +1 -1
package/vcyclist-engine.js
CHANGED
|
@@ -38,13 +38,6 @@
|
|
|
38
38
|
var initMetadataForClass = kotlin_kotlin.$_$.r7;
|
|
39
39
|
var toString = kotlin_kotlin.$_$.j8;
|
|
40
40
|
var hashCode = kotlin_kotlin.$_$.q7;
|
|
41
|
-
var ElevationGainPreset_DEM_getInstance = kotlin_io_github_glandais_gpx.$_$.i;
|
|
42
|
-
var initMetadataForObject = kotlin_kotlin.$_$.x7;
|
|
43
|
-
var getBooleanHashCode = kotlin_kotlin.$_$.m7;
|
|
44
|
-
var isFinite = kotlin_kotlin.$_$.xb;
|
|
45
|
-
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.e2;
|
|
46
|
-
var Unit_instance = kotlin_kotlin.$_$.k1;
|
|
47
|
-
var ElevationGainOptions = kotlin_io_github_glandais_gpx.$_$.l1;
|
|
48
41
|
var CoroutineImpl = kotlin_kotlin.$_$.z5;
|
|
49
42
|
var PointPerDistance_instance = kotlin_io_github_glandais_gpx.$_$.y;
|
|
50
43
|
var ElevationStep_instance = kotlin_io_github_glandais_gpx.$_$.v;
|
|
@@ -53,11 +46,18 @@
|
|
|
53
46
|
var Companion_getInstance_0 = kotlin_io_github_glandais_gpx.$_$.p;
|
|
54
47
|
var collectionSizeOrDefault = kotlin_kotlin.$_$.e3;
|
|
55
48
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.m1;
|
|
49
|
+
var Unit_instance = kotlin_kotlin.$_$.k1;
|
|
56
50
|
var emptyList = kotlin_kotlin.$_$.p3;
|
|
51
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.t7;
|
|
52
|
+
var initMetadataForObject = kotlin_kotlin.$_$.x7;
|
|
53
|
+
var ElevationGainPreset_DEM_getInstance = kotlin_io_github_glandais_gpx.$_$.i;
|
|
54
|
+
var getBooleanHashCode = kotlin_kotlin.$_$.m7;
|
|
55
|
+
var isFinite = kotlin_kotlin.$_$.xb;
|
|
56
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.e2;
|
|
57
|
+
var ElevationGainOptions = kotlin_io_github_glandais_gpx.$_$.l1;
|
|
57
58
|
var PointPerSecond_instance = kotlin_io_github_glandais_gpx.$_$.z;
|
|
58
59
|
var ElevationGain_instance = kotlin_io_github_glandais_gpx.$_$.u;
|
|
59
60
|
var PathSimplifier_instance = kotlin_io_github_glandais_gpx.$_$.w;
|
|
60
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.t7;
|
|
61
61
|
var Companion_instance = kotlin_kotlin.$_$.i1;
|
|
62
62
|
var enumEntries = kotlin_kotlin.$_$.b6;
|
|
63
63
|
var Enum = kotlin_kotlin.$_$.cb;
|
|
@@ -183,6 +183,8 @@
|
|
|
183
183
|
initMetadataForClass(CoursePhysics, 'CoursePhysics');
|
|
184
184
|
initMetadataForCompanion(Companion_1);
|
|
185
185
|
initMetadataForClass(Cyclist, 'Cyclist', Cyclist);
|
|
186
|
+
initMetadataForCoroutine($runCOROUTINE$, CoroutineImpl);
|
|
187
|
+
initMetadataForObject(ElevationCorrection, 'ElevationCorrection', VOID, VOID, VOID, [4, 5]);
|
|
186
188
|
initMetadataForObject(EngineConstants, 'EngineConstants');
|
|
187
189
|
initMetadataForClass(SimplifyPathOptions, 'SimplifyPathOptions', SimplifyPathOptions);
|
|
188
190
|
initMetadataForClass(WPrimeBalanceOptions, 'WPrimeBalanceOptions', WPrimeBalanceOptions);
|
|
@@ -527,37 +529,181 @@
|
|
|
527
529
|
return false;
|
|
528
530
|
return true;
|
|
529
531
|
};
|
|
532
|
+
function $runCOROUTINE$(_this__u8e3s4, source, provider, options, minSpacingM, maxSpacingM, resultContinuation) {
|
|
533
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
534
|
+
this.b50_1 = _this__u8e3s4;
|
|
535
|
+
this.c50_1 = source;
|
|
536
|
+
this.d50_1 = provider;
|
|
537
|
+
this.e50_1 = options;
|
|
538
|
+
this.f50_1 = minSpacingM;
|
|
539
|
+
this.g50_1 = maxSpacingM;
|
|
540
|
+
}
|
|
541
|
+
protoOf($runCOROUTINE$).o7 = function () {
|
|
542
|
+
var suspendResult = this.i7_1;
|
|
543
|
+
$sm: do
|
|
544
|
+
try {
|
|
545
|
+
var tmp = this.g7_1;
|
|
546
|
+
switch (tmp) {
|
|
547
|
+
case 0:
|
|
548
|
+
this.h7_1 = 7;
|
|
549
|
+
this.h50_1 = PointPerDistance_instance.l2f(this.c50_1, -1.0, 30.0);
|
|
550
|
+
if (!(this.d50_1 == null)) {
|
|
551
|
+
this.g7_1 = 1;
|
|
552
|
+
suspendResult = ElevationStep_instance.n2c(this.h50_1, this.d50_1, this);
|
|
553
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
554
|
+
return suspendResult;
|
|
555
|
+
}
|
|
556
|
+
continue $sm;
|
|
557
|
+
} else {
|
|
558
|
+
this.g7_1 = 2;
|
|
559
|
+
continue $sm;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
case 1:
|
|
563
|
+
this.h50_1 = suspendResult;
|
|
564
|
+
this.g7_1 = 2;
|
|
565
|
+
continue $sm;
|
|
566
|
+
case 2:
|
|
567
|
+
this.h50_1 = PointPerDistance_instance.l2f(this.h50_1, this.f50_1, this.g50_1);
|
|
568
|
+
var tmp_0 = this;
|
|
569
|
+
var tmp0_safe_receiver = this.d50_1;
|
|
570
|
+
tmp_0.j50_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e15_1;
|
|
571
|
+
this.k50_1 = (!(this.d50_1 == null) && this.e50_1.m50_1);
|
|
572
|
+
this.l50_1 = null;
|
|
573
|
+
if (this.k50_1 && !(this.d50_1 == null) && !(this.j50_1 == null)) {
|
|
574
|
+
this.g7_1 = 3;
|
|
575
|
+
suspendResult = BridgeDeckStep_instance.o50(this.h50_1, this.d50_1, this.j50_1, VOID, VOID, this);
|
|
576
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
577
|
+
return suspendResult;
|
|
578
|
+
}
|
|
579
|
+
continue $sm;
|
|
580
|
+
} else {
|
|
581
|
+
this.g7_1 = 4;
|
|
582
|
+
continue $sm;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
case 3:
|
|
586
|
+
this.l50_1 = suspendResult;
|
|
587
|
+
this.h50_1 = this.l50_1.p50_1;
|
|
588
|
+
this.g7_1 = 4;
|
|
589
|
+
continue $sm;
|
|
590
|
+
case 4:
|
|
591
|
+
this.i50_1 = null;
|
|
592
|
+
if (this.e50_1.n50_1 && !(this.d50_1 == null)) {
|
|
593
|
+
var tunnelOptions = Companion_getInstance().f2h_1;
|
|
594
|
+
var deckStep = Companion_getInstance_0().v29_1.q27_1;
|
|
595
|
+
var x = tunnelOptions.g2g_1 - deckStep;
|
|
596
|
+
var sameGrid = Math.abs(x) < 1.0E-9;
|
|
597
|
+
var tmp1_safe_receiver = this.l50_1;
|
|
598
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.s50_1;
|
|
599
|
+
var tmp_1;
|
|
600
|
+
if (tmp2_safe_receiver == null) {
|
|
601
|
+
tmp_1 = null;
|
|
602
|
+
} else {
|
|
603
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(tmp2_safe_receiver, 10));
|
|
604
|
+
var _iterator__ex2g4s = tmp2_safe_receiver.l();
|
|
605
|
+
while (_iterator__ex2g4s.m()) {
|
|
606
|
+
var item = _iterator__ex2g4s.n();
|
|
607
|
+
destination.k(writtenRange(item, deckStep));
|
|
608
|
+
}
|
|
609
|
+
tmp_1 = destination;
|
|
610
|
+
}
|
|
611
|
+
var tmp3_elvis_lhs = tmp_1;
|
|
612
|
+
var protected_0 = tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs;
|
|
613
|
+
this.g7_1 = 5;
|
|
614
|
+
var tmp_2 = TunnelStep_instance;
|
|
615
|
+
var tmp_3 = this.h50_1;
|
|
616
|
+
var tmp4_safe_receiver = this.l50_1;
|
|
617
|
+
var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.u50_1;
|
|
618
|
+
var tmp_4;
|
|
619
|
+
if (tmp5_safe_receiver == null) {
|
|
620
|
+
tmp_4 = null;
|
|
621
|
+
} else {
|
|
622
|
+
var tmp_5;
|
|
623
|
+
if (sameGrid) {
|
|
624
|
+
tmp_5 = tmp5_safe_receiver;
|
|
625
|
+
} else {
|
|
626
|
+
tmp_5 = null;
|
|
627
|
+
}
|
|
628
|
+
tmp_4 = tmp_5;
|
|
629
|
+
}
|
|
630
|
+
suspendResult = tmp_2.v50(tmp_3, this.d50_1, tunnelOptions, tmp_4, protected_0, 30.0, this);
|
|
631
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
632
|
+
return suspendResult;
|
|
633
|
+
}
|
|
634
|
+
continue $sm;
|
|
635
|
+
} else {
|
|
636
|
+
this.g7_1 = 6;
|
|
637
|
+
continue $sm;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
case 5:
|
|
641
|
+
this.i50_1 = suspendResult;
|
|
642
|
+
this.h50_1 = this.i50_1.w50_1;
|
|
643
|
+
this.g7_1 = 6;
|
|
644
|
+
continue $sm;
|
|
645
|
+
case 6:
|
|
646
|
+
if (this.h50_1 === this.c50_1)
|
|
647
|
+
this.h50_1 = this.h50_1.y2e();
|
|
648
|
+
this.h50_1.c25_1 = ElevationCorrectionReport_instance.d51(this.l50_1, this.k50_1 && this.j50_1 == null, this.i50_1);
|
|
649
|
+
return this.h50_1;
|
|
650
|
+
case 7:
|
|
651
|
+
throw this.j7_1;
|
|
652
|
+
}
|
|
653
|
+
} catch ($p) {
|
|
654
|
+
var e = $p;
|
|
655
|
+
if (this.h7_1 === 7) {
|
|
656
|
+
throw e;
|
|
657
|
+
} else {
|
|
658
|
+
this.g7_1 = this.h7_1;
|
|
659
|
+
this.j7_1 = e;
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
while (true);
|
|
663
|
+
};
|
|
664
|
+
function ElevationCorrection() {
|
|
665
|
+
}
|
|
666
|
+
protoOf(ElevationCorrection).e51 = function (source, provider, options, minSpacingM, maxSpacingM, $completion) {
|
|
667
|
+
var tmp = new $runCOROUTINE$(this, source, provider, options, minSpacingM, maxSpacingM, $completion);
|
|
668
|
+
tmp.i7_1 = Unit_instance;
|
|
669
|
+
tmp.j7_1 = null;
|
|
670
|
+
return tmp.o7();
|
|
671
|
+
};
|
|
672
|
+
var ElevationCorrection_instance;
|
|
673
|
+
function ElevationCorrection_getInstance() {
|
|
674
|
+
return ElevationCorrection_instance;
|
|
675
|
+
}
|
|
530
676
|
function EngineConstants() {
|
|
531
677
|
EngineConstants_instance = this;
|
|
532
|
-
this.
|
|
533
|
-
this.
|
|
534
|
-
this.
|
|
535
|
-
this.
|
|
536
|
-
this.
|
|
537
|
-
this.
|
|
538
|
-
this.
|
|
539
|
-
this.
|
|
540
|
-
this.
|
|
541
|
-
this.
|
|
542
|
-
this.
|
|
543
|
-
this.
|
|
544
|
-
this.
|
|
545
|
-
this.
|
|
546
|
-
this.
|
|
547
|
-
this.
|
|
678
|
+
this.f51_1 = 9.80665;
|
|
679
|
+
this.g51_1 = 0.5555555555555556;
|
|
680
|
+
this.h51_1 = 0.004;
|
|
681
|
+
this.i51_1 = 0.05;
|
|
682
|
+
this.j51_1 = 0.07;
|
|
683
|
+
this.k51_1 = 0.35;
|
|
684
|
+
this.l51_1 = 0.976;
|
|
685
|
+
this.m51_1 = 20.0;
|
|
686
|
+
this.n51_1 = 80.0;
|
|
687
|
+
this.o51_1 = 280.0;
|
|
688
|
+
this.p51_1 = 50.0;
|
|
689
|
+
this.q51_1 = 0.4;
|
|
690
|
+
this.r51_1 = 35.0;
|
|
691
|
+
this.s51_1 = 0.9;
|
|
692
|
+
this.t51_1 = 0.36;
|
|
693
|
+
this.u51_1 = 0.63;
|
|
548
694
|
var tmp = this;
|
|
549
695
|
// Inline function 'kotlin.math.tan' call
|
|
550
696
|
var x = 0.6108652381980153;
|
|
551
|
-
tmp.
|
|
552
|
-
this.
|
|
553
|
-
this.
|
|
554
|
-
this.
|
|
555
|
-
this.
|
|
556
|
-
this.
|
|
557
|
-
this.
|
|
558
|
-
this.
|
|
559
|
-
this.
|
|
560
|
-
this.
|
|
697
|
+
tmp.v51_1 = Math.tan(x) / 0.9;
|
|
698
|
+
this.w51_1 = 0.634920634920635;
|
|
699
|
+
this.x51_1 = 0.6108652381980153;
|
|
700
|
+
this.y51_1 = 100.0;
|
|
701
|
+
this.z51_1 = 250.0;
|
|
702
|
+
this.a52_1 = 20000.0;
|
|
703
|
+
this.b52_1 = 0.7;
|
|
704
|
+
this.c52_1 = 0.5;
|
|
705
|
+
this.d52_1 = 1.225;
|
|
706
|
+
this.e52_1 = ElevationGainPreset_DEM_getInstance();
|
|
561
707
|
}
|
|
562
708
|
var EngineConstants_instance;
|
|
563
709
|
function EngineConstants_getInstance() {
|
|
@@ -569,17 +715,17 @@
|
|
|
569
715
|
enabled = enabled === VOID ? true : enabled;
|
|
570
716
|
toleranceM = toleranceM === VOID ? 10.0 : toleranceM;
|
|
571
717
|
zExaggeration = zExaggeration === VOID ? 3.0 : zExaggeration;
|
|
572
|
-
this.
|
|
573
|
-
this.
|
|
574
|
-
this.
|
|
718
|
+
this.f52_1 = enabled;
|
|
719
|
+
this.g52_1 = toleranceM;
|
|
720
|
+
this.h52_1 = zExaggeration;
|
|
575
721
|
}
|
|
576
722
|
protoOf(SimplifyPathOptions).toString = function () {
|
|
577
|
-
return 'SimplifyPathOptions(enabled=' + this.
|
|
723
|
+
return 'SimplifyPathOptions(enabled=' + this.f52_1 + ', toleranceM=' + this.g52_1 + ', zExaggeration=' + this.h52_1 + ')';
|
|
578
724
|
};
|
|
579
725
|
protoOf(SimplifyPathOptions).hashCode = function () {
|
|
580
|
-
var result = getBooleanHashCode(this.
|
|
581
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
582
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
726
|
+
var result = getBooleanHashCode(this.f52_1);
|
|
727
|
+
result = imul(result, 31) + getNumberHashCode(this.g52_1) | 0;
|
|
728
|
+
result = imul(result, 31) + getNumberHashCode(this.h52_1) | 0;
|
|
583
729
|
return result;
|
|
584
730
|
};
|
|
585
731
|
protoOf(SimplifyPathOptions).equals = function (other) {
|
|
@@ -587,11 +733,11 @@
|
|
|
587
733
|
return true;
|
|
588
734
|
if (!(other instanceof SimplifyPathOptions))
|
|
589
735
|
return false;
|
|
590
|
-
if (!(this.
|
|
736
|
+
if (!(this.f52_1 === other.f52_1))
|
|
591
737
|
return false;
|
|
592
|
-
if (!equals(this.
|
|
738
|
+
if (!equals(this.g52_1, other.g52_1))
|
|
593
739
|
return false;
|
|
594
|
-
if (!equals(this.
|
|
740
|
+
if (!equals(this.h52_1, other.h52_1))
|
|
595
741
|
return false;
|
|
596
742
|
return true;
|
|
597
743
|
};
|
|
@@ -599,27 +745,27 @@
|
|
|
599
745
|
enabled = enabled === VOID ? true : enabled;
|
|
600
746
|
criticalPowerW = criticalPowerW === VOID ? 250.0 : criticalPowerW;
|
|
601
747
|
wPrimeJ = wPrimeJ === VOID ? 20000.0 : wPrimeJ;
|
|
602
|
-
this.
|
|
603
|
-
this.
|
|
604
|
-
this.
|
|
748
|
+
this.i52_1 = enabled;
|
|
749
|
+
this.j52_1 = criticalPowerW;
|
|
750
|
+
this.k52_1 = wPrimeJ;
|
|
605
751
|
// Inline function 'kotlin.require' call
|
|
606
|
-
if (!(this.
|
|
607
|
-
var message = 'criticalPowerW must be finite and > 0, got ' + this.
|
|
752
|
+
if (!(this.j52_1 > 0.0 && isFinite(this.j52_1))) {
|
|
753
|
+
var message = 'criticalPowerW must be finite and > 0, got ' + this.j52_1;
|
|
608
754
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
609
755
|
}
|
|
610
756
|
// Inline function 'kotlin.require' call
|
|
611
|
-
if (!(this.
|
|
612
|
-
var message_0 = 'wPrimeJ must be finite and > 0, got ' + this.
|
|
757
|
+
if (!(this.k52_1 > 0.0 && isFinite(this.k52_1))) {
|
|
758
|
+
var message_0 = 'wPrimeJ must be finite and > 0, got ' + this.k52_1;
|
|
613
759
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
614
760
|
}
|
|
615
761
|
}
|
|
616
762
|
protoOf(WPrimeBalanceOptions).toString = function () {
|
|
617
|
-
return 'WPrimeBalanceOptions(enabled=' + this.
|
|
763
|
+
return 'WPrimeBalanceOptions(enabled=' + this.i52_1 + ', criticalPowerW=' + this.j52_1 + ', wPrimeJ=' + this.k52_1 + ')';
|
|
618
764
|
};
|
|
619
765
|
protoOf(WPrimeBalanceOptions).hashCode = function () {
|
|
620
|
-
var result = getBooleanHashCode(this.
|
|
621
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
622
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
766
|
+
var result = getBooleanHashCode(this.i52_1);
|
|
767
|
+
result = imul(result, 31) + getNumberHashCode(this.j52_1) | 0;
|
|
768
|
+
result = imul(result, 31) + getNumberHashCode(this.k52_1) | 0;
|
|
623
769
|
return result;
|
|
624
770
|
};
|
|
625
771
|
protoOf(WPrimeBalanceOptions).equals = function (other) {
|
|
@@ -627,17 +773,17 @@
|
|
|
627
773
|
return true;
|
|
628
774
|
if (!(other instanceof WPrimeBalanceOptions))
|
|
629
775
|
return false;
|
|
630
|
-
if (!(this.
|
|
776
|
+
if (!(this.i52_1 === other.i52_1))
|
|
631
777
|
return false;
|
|
632
|
-
if (!equals(this.
|
|
778
|
+
if (!equals(this.j52_1, other.j52_1))
|
|
633
779
|
return false;
|
|
634
|
-
if (!equals(this.
|
|
780
|
+
if (!equals(this.k52_1, other.k52_1))
|
|
635
781
|
return false;
|
|
636
782
|
return true;
|
|
637
783
|
};
|
|
638
784
|
function Companion_2() {
|
|
639
785
|
Companion_instance_5 = this;
|
|
640
|
-
this.
|
|
786
|
+
this.l52_1 = new ElevationCorrectionOptions();
|
|
641
787
|
}
|
|
642
788
|
var Companion_instance_5;
|
|
643
789
|
function Companion_getInstance_9() {
|
|
@@ -649,15 +795,15 @@
|
|
|
649
795
|
Companion_getInstance_9();
|
|
650
796
|
bridgeDecks = bridgeDecks === VOID ? true : bridgeDecks;
|
|
651
797
|
tunnels = tunnels === VOID ? true : tunnels;
|
|
652
|
-
this.
|
|
653
|
-
this.
|
|
798
|
+
this.m50_1 = bridgeDecks;
|
|
799
|
+
this.n50_1 = tunnels;
|
|
654
800
|
}
|
|
655
801
|
protoOf(ElevationCorrectionOptions).toString = function () {
|
|
656
|
-
return 'ElevationCorrectionOptions(bridgeDecks=' + this.
|
|
802
|
+
return 'ElevationCorrectionOptions(bridgeDecks=' + this.m50_1 + ', tunnels=' + this.n50_1 + ')';
|
|
657
803
|
};
|
|
658
804
|
protoOf(ElevationCorrectionOptions).hashCode = function () {
|
|
659
|
-
var result = getBooleanHashCode(this.
|
|
660
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
805
|
+
var result = getBooleanHashCode(this.m50_1);
|
|
806
|
+
result = imul(result, 31) + getBooleanHashCode(this.n50_1) | 0;
|
|
661
807
|
return result;
|
|
662
808
|
};
|
|
663
809
|
protoOf(ElevationCorrectionOptions).equals = function (other) {
|
|
@@ -665,15 +811,15 @@
|
|
|
665
811
|
return true;
|
|
666
812
|
if (!(other instanceof ElevationCorrectionOptions))
|
|
667
813
|
return false;
|
|
668
|
-
if (!(this.
|
|
814
|
+
if (!(this.m50_1 === other.m50_1))
|
|
669
815
|
return false;
|
|
670
|
-
if (!(this.
|
|
816
|
+
if (!(this.n50_1 === other.n50_1))
|
|
671
817
|
return false;
|
|
672
818
|
return true;
|
|
673
819
|
};
|
|
674
820
|
function Companion_3() {
|
|
675
821
|
Companion_instance_6 = this;
|
|
676
|
-
this.
|
|
822
|
+
this.m52_1 = new EnhanceOptions();
|
|
677
823
|
}
|
|
678
824
|
var Companion_instance_6;
|
|
679
825
|
function Companion_getInstance_10() {
|
|
@@ -691,58 +837,58 @@
|
|
|
691
837
|
wPrimeBalance = wPrimeBalance === VOID ? new WPrimeBalanceOptions() : wPrimeBalance;
|
|
692
838
|
curvature = curvature === VOID ? new CurvatureOptions() : curvature;
|
|
693
839
|
racingLine = racingLine === VOID ? new RacingLineOptions() : racingLine;
|
|
694
|
-
elevationGain = elevationGain === VOID ? new ElevationGainOptions(VOID, EngineConstants_getInstance().
|
|
840
|
+
elevationGain = elevationGain === VOID ? new ElevationGainOptions(VOID, EngineConstants_getInstance().e52_1) : elevationGain;
|
|
695
841
|
elevationSmoothWindowM = elevationSmoothWindowM === VOID ? 150.0 : elevationSmoothWindowM;
|
|
696
|
-
elevationCorrections = elevationCorrections === VOID ? Companion_getInstance_9().
|
|
697
|
-
this.
|
|
698
|
-
this.
|
|
699
|
-
this.
|
|
700
|
-
this.
|
|
701
|
-
this.
|
|
702
|
-
this.
|
|
703
|
-
this.
|
|
704
|
-
this.
|
|
705
|
-
this.
|
|
706
|
-
this.
|
|
707
|
-
this.
|
|
842
|
+
elevationCorrections = elevationCorrections === VOID ? Companion_getInstance_9().l52_1 : elevationCorrections;
|
|
843
|
+
this.n52_1 = fixElevation;
|
|
844
|
+
this.o52_1 = computeMaxSpeeds;
|
|
845
|
+
this.p52_1 = virtualizeTrack;
|
|
846
|
+
this.q52_1 = computeOnePointPerSecond;
|
|
847
|
+
this.r52_1 = simplifyPath;
|
|
848
|
+
this.s52_1 = wPrimeBalance;
|
|
849
|
+
this.t52_1 = curvature;
|
|
850
|
+
this.u52_1 = racingLine;
|
|
851
|
+
this.v52_1 = elevationGain;
|
|
852
|
+
this.w52_1 = elevationSmoothWindowM;
|
|
853
|
+
this.x52_1 = elevationCorrections;
|
|
708
854
|
// Inline function 'kotlin.require' call
|
|
709
|
-
if (!(this.
|
|
710
|
-
var message = 'elevationSmoothWindowM must be finite and > 0, got ' + this.
|
|
855
|
+
if (!(this.w52_1 > 0.0 && isFinite(this.w52_1))) {
|
|
856
|
+
var message = 'elevationSmoothWindowM must be finite and > 0, got ' + this.w52_1;
|
|
711
857
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
712
858
|
}
|
|
713
859
|
}
|
|
714
|
-
protoOf(EnhanceOptions).
|
|
860
|
+
protoOf(EnhanceOptions).y52 = function (fixElevation, computeMaxSpeeds, virtualizeTrack, computeOnePointPerSecond, simplifyPath, wPrimeBalance, curvature, racingLine, elevationGain, elevationSmoothWindowM, elevationCorrections) {
|
|
715
861
|
return new EnhanceOptions(fixElevation, computeMaxSpeeds, virtualizeTrack, computeOnePointPerSecond, simplifyPath, wPrimeBalance, curvature, racingLine, elevationGain, elevationSmoothWindowM, elevationCorrections);
|
|
716
862
|
};
|
|
717
|
-
protoOf(EnhanceOptions).
|
|
718
|
-
fixElevation = fixElevation === VOID ? this.
|
|
719
|
-
computeMaxSpeeds = computeMaxSpeeds === VOID ? this.
|
|
720
|
-
virtualizeTrack = virtualizeTrack === VOID ? this.
|
|
721
|
-
computeOnePointPerSecond = computeOnePointPerSecond === VOID ? this.
|
|
722
|
-
simplifyPath = simplifyPath === VOID ? this.
|
|
723
|
-
wPrimeBalance = wPrimeBalance === VOID ? this.
|
|
724
|
-
curvature = curvature === VOID ? this.
|
|
725
|
-
racingLine = racingLine === VOID ? this.
|
|
726
|
-
elevationGain = elevationGain === VOID ? this.
|
|
727
|
-
elevationSmoothWindowM = elevationSmoothWindowM === VOID ? this.
|
|
728
|
-
elevationCorrections = elevationCorrections === VOID ? this.
|
|
729
|
-
return $super === VOID ? this.
|
|
863
|
+
protoOf(EnhanceOptions).z52 = function (fixElevation, computeMaxSpeeds, virtualizeTrack, computeOnePointPerSecond, simplifyPath, wPrimeBalance, curvature, racingLine, elevationGain, elevationSmoothWindowM, elevationCorrections, $super) {
|
|
864
|
+
fixElevation = fixElevation === VOID ? this.n52_1 : fixElevation;
|
|
865
|
+
computeMaxSpeeds = computeMaxSpeeds === VOID ? this.o52_1 : computeMaxSpeeds;
|
|
866
|
+
virtualizeTrack = virtualizeTrack === VOID ? this.p52_1 : virtualizeTrack;
|
|
867
|
+
computeOnePointPerSecond = computeOnePointPerSecond === VOID ? this.q52_1 : computeOnePointPerSecond;
|
|
868
|
+
simplifyPath = simplifyPath === VOID ? this.r52_1 : simplifyPath;
|
|
869
|
+
wPrimeBalance = wPrimeBalance === VOID ? this.s52_1 : wPrimeBalance;
|
|
870
|
+
curvature = curvature === VOID ? this.t52_1 : curvature;
|
|
871
|
+
racingLine = racingLine === VOID ? this.u52_1 : racingLine;
|
|
872
|
+
elevationGain = elevationGain === VOID ? this.v52_1 : elevationGain;
|
|
873
|
+
elevationSmoothWindowM = elevationSmoothWindowM === VOID ? this.w52_1 : elevationSmoothWindowM;
|
|
874
|
+
elevationCorrections = elevationCorrections === VOID ? this.x52_1 : elevationCorrections;
|
|
875
|
+
return $super === VOID ? this.y52(fixElevation, computeMaxSpeeds, virtualizeTrack, computeOnePointPerSecond, simplifyPath, wPrimeBalance, curvature, racingLine, elevationGain, elevationSmoothWindowM, elevationCorrections) : $super.y52.call(this, fixElevation, computeMaxSpeeds, virtualizeTrack, computeOnePointPerSecond, simplifyPath, wPrimeBalance, curvature, racingLine, elevationGain, elevationSmoothWindowM, elevationCorrections);
|
|
730
876
|
};
|
|
731
877
|
protoOf(EnhanceOptions).toString = function () {
|
|
732
|
-
return 'EnhanceOptions(fixElevation=' + this.
|
|
878
|
+
return 'EnhanceOptions(fixElevation=' + this.n52_1 + ', computeMaxSpeeds=' + this.o52_1 + ', virtualizeTrack=' + this.p52_1 + ', computeOnePointPerSecond=' + this.q52_1 + ', simplifyPath=' + this.r52_1.toString() + ', wPrimeBalance=' + this.s52_1.toString() + ', curvature=' + this.t52_1.toString() + ', racingLine=' + this.u52_1.toString() + ', elevationGain=' + this.v52_1.toString() + ', elevationSmoothWindowM=' + this.w52_1 + ', elevationCorrections=' + this.x52_1.toString() + ')';
|
|
733
879
|
};
|
|
734
880
|
protoOf(EnhanceOptions).hashCode = function () {
|
|
735
|
-
var result = getBooleanHashCode(this.
|
|
736
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
737
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
738
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
739
|
-
result = imul(result, 31) + this.
|
|
740
|
-
result = imul(result, 31) + this.
|
|
741
|
-
result = imul(result, 31) + this.
|
|
742
|
-
result = imul(result, 31) + this.
|
|
743
|
-
result = imul(result, 31) + this.
|
|
744
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
745
|
-
result = imul(result, 31) + this.
|
|
881
|
+
var result = getBooleanHashCode(this.n52_1);
|
|
882
|
+
result = imul(result, 31) + getBooleanHashCode(this.o52_1) | 0;
|
|
883
|
+
result = imul(result, 31) + getBooleanHashCode(this.p52_1) | 0;
|
|
884
|
+
result = imul(result, 31) + getBooleanHashCode(this.q52_1) | 0;
|
|
885
|
+
result = imul(result, 31) + this.r52_1.hashCode() | 0;
|
|
886
|
+
result = imul(result, 31) + this.s52_1.hashCode() | 0;
|
|
887
|
+
result = imul(result, 31) + this.t52_1.hashCode() | 0;
|
|
888
|
+
result = imul(result, 31) + this.u52_1.hashCode() | 0;
|
|
889
|
+
result = imul(result, 31) + this.v52_1.hashCode() | 0;
|
|
890
|
+
result = imul(result, 31) + getNumberHashCode(this.w52_1) | 0;
|
|
891
|
+
result = imul(result, 31) + this.x52_1.hashCode() | 0;
|
|
746
892
|
return result;
|
|
747
893
|
};
|
|
748
894
|
protoOf(EnhanceOptions).equals = function (other) {
|
|
@@ -750,36 +896,36 @@
|
|
|
750
896
|
return true;
|
|
751
897
|
if (!(other instanceof EnhanceOptions))
|
|
752
898
|
return false;
|
|
753
|
-
if (!(this.
|
|
899
|
+
if (!(this.n52_1 === other.n52_1))
|
|
754
900
|
return false;
|
|
755
|
-
if (!(this.
|
|
901
|
+
if (!(this.o52_1 === other.o52_1))
|
|
756
902
|
return false;
|
|
757
|
-
if (!(this.
|
|
903
|
+
if (!(this.p52_1 === other.p52_1))
|
|
758
904
|
return false;
|
|
759
|
-
if (!(this.
|
|
905
|
+
if (!(this.q52_1 === other.q52_1))
|
|
760
906
|
return false;
|
|
761
|
-
if (!this.
|
|
907
|
+
if (!this.r52_1.equals(other.r52_1))
|
|
762
908
|
return false;
|
|
763
|
-
if (!this.
|
|
909
|
+
if (!this.s52_1.equals(other.s52_1))
|
|
764
910
|
return false;
|
|
765
|
-
if (!this.
|
|
911
|
+
if (!this.t52_1.equals(other.t52_1))
|
|
766
912
|
return false;
|
|
767
|
-
if (!this.
|
|
913
|
+
if (!this.u52_1.equals(other.u52_1))
|
|
768
914
|
return false;
|
|
769
|
-
if (!this.
|
|
915
|
+
if (!this.v52_1.equals(other.v52_1))
|
|
770
916
|
return false;
|
|
771
|
-
if (!equals(this.
|
|
917
|
+
if (!equals(this.w52_1, other.w52_1))
|
|
772
918
|
return false;
|
|
773
|
-
if (!this.
|
|
919
|
+
if (!this.x52_1.equals(other.x52_1))
|
|
774
920
|
return false;
|
|
775
921
|
return true;
|
|
776
922
|
};
|
|
777
923
|
function $enhanceCourseCOROUTINE$(_this__u8e3s4, course, options, elevationProvider, resultContinuation) {
|
|
778
924
|
CoroutineImpl.call(this, resultContinuation);
|
|
779
|
-
this.
|
|
780
|
-
this.
|
|
781
|
-
this.
|
|
782
|
-
this.
|
|
925
|
+
this.i53_1 = _this__u8e3s4;
|
|
926
|
+
this.j53_1 = course;
|
|
927
|
+
this.k53_1 = options;
|
|
928
|
+
this.l53_1 = elevationProvider;
|
|
783
929
|
}
|
|
784
930
|
protoOf($enhanceCourseCOROUTINE$).o7 = function () {
|
|
785
931
|
var suspendResult = this.i7_1;
|
|
@@ -788,162 +934,89 @@
|
|
|
788
934
|
var tmp = this.g7_1;
|
|
789
935
|
switch (tmp) {
|
|
790
936
|
case 0:
|
|
791
|
-
this.h7_1 =
|
|
792
|
-
if (!(!this.
|
|
937
|
+
this.h7_1 = 2;
|
|
938
|
+
if (!(!this.k53_1.n52_1 || !(this.l53_1 == null))) {
|
|
793
939
|
var message = 'fixElevation = true but elevationProvider is null. Pass a provider, or set fixElevation = false (enhanceCourseDefault resolves this automatically).';
|
|
794
940
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
795
941
|
}
|
|
796
942
|
|
|
797
|
-
this.
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
}
|
|
805
|
-
continue $sm;
|
|
943
|
+
this.g7_1 = 1;
|
|
944
|
+
var tmp_0 = ElevationCorrection_instance;
|
|
945
|
+
var tmp_1 = this.j53_1.d4z();
|
|
946
|
+
var tmp0_safe_receiver = this.l53_1;
|
|
947
|
+
var tmp_2;
|
|
948
|
+
if (tmp0_safe_receiver == null) {
|
|
949
|
+
tmp_2 = null;
|
|
806
950
|
} else {
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
this.c52_1 = suspendResult;
|
|
813
|
-
this.g7_1 = 2;
|
|
814
|
-
continue $sm;
|
|
815
|
-
case 2:
|
|
816
|
-
this.c52_1 = PointPerDistance_instance.l2f(this.c52_1, 1.0, 2.0);
|
|
817
|
-
var tmp_0 = this;
|
|
818
|
-
var tmp0_safe_receiver = this.b52_1;
|
|
819
|
-
tmp_0.e52_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e15_1;
|
|
820
|
-
this.f52_1 = (this.a52_1.d51_1 && !(this.b52_1 == null) && this.a52_1.n51_1.a51_1);
|
|
821
|
-
this.g52_1 = null;
|
|
822
|
-
if (this.f52_1 && !(this.b52_1 == null) && !(this.e52_1 == null)) {
|
|
823
|
-
this.g7_1 = 3;
|
|
824
|
-
suspendResult = BridgeDeckStep_instance.h52(this.c52_1, this.b52_1, this.e52_1, VOID, VOID, this);
|
|
825
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
826
|
-
return suspendResult;
|
|
951
|
+
var tmp_3;
|
|
952
|
+
if (this.k53_1.n52_1) {
|
|
953
|
+
tmp_3 = tmp0_safe_receiver;
|
|
954
|
+
} else {
|
|
955
|
+
tmp_3 = null;
|
|
827
956
|
}
|
|
828
|
-
|
|
829
|
-
} else {
|
|
830
|
-
this.g7_1 = 4;
|
|
831
|
-
continue $sm;
|
|
957
|
+
tmp_2 = tmp_3;
|
|
832
958
|
}
|
|
833
959
|
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
this.g7_1 = 4;
|
|
838
|
-
continue $sm;
|
|
839
|
-
case 4:
|
|
840
|
-
this.d52_1 = null;
|
|
841
|
-
if (this.a52_1.n51_1.b51_1 && this.a52_1.d51_1 && !(this.b52_1 == null)) {
|
|
842
|
-
var tunnelOptions = Companion_getInstance().f2h_1;
|
|
843
|
-
var deckStep = Companion_getInstance_0().v29_1.q27_1;
|
|
844
|
-
var x = tunnelOptions.g2g_1 - deckStep;
|
|
845
|
-
var sameGrid = Math.abs(x) < 1.0E-9;
|
|
846
|
-
var tmp1_safe_receiver = this.g52_1;
|
|
847
|
-
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.l52_1;
|
|
848
|
-
var tmp_1;
|
|
849
|
-
if (tmp2_safe_receiver == null) {
|
|
850
|
-
tmp_1 = null;
|
|
851
|
-
} else {
|
|
852
|
-
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(tmp2_safe_receiver, 10));
|
|
853
|
-
var _iterator__ex2g4s = tmp2_safe_receiver.l();
|
|
854
|
-
while (_iterator__ex2g4s.m()) {
|
|
855
|
-
var item = _iterator__ex2g4s.n();
|
|
856
|
-
destination.k(writtenRange(item, deckStep));
|
|
857
|
-
}
|
|
858
|
-
tmp_1 = destination;
|
|
859
|
-
}
|
|
860
|
-
var tmp3_elvis_lhs = tmp_1;
|
|
861
|
-
var protected_0 = tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs;
|
|
862
|
-
this.g7_1 = 5;
|
|
863
|
-
var tmp_2 = TunnelStep_instance;
|
|
864
|
-
var tmp_3 = this.c52_1;
|
|
865
|
-
var tmp4_safe_receiver = this.g52_1;
|
|
866
|
-
var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.n52_1;
|
|
867
|
-
var tmp_4;
|
|
868
|
-
if (tmp5_safe_receiver == null) {
|
|
869
|
-
tmp_4 = null;
|
|
870
|
-
} else {
|
|
871
|
-
var tmp_5;
|
|
872
|
-
if (sameGrid) {
|
|
873
|
-
tmp_5 = tmp5_safe_receiver;
|
|
874
|
-
} else {
|
|
875
|
-
tmp_5 = null;
|
|
876
|
-
}
|
|
877
|
-
tmp_4 = tmp_5;
|
|
878
|
-
}
|
|
879
|
-
suspendResult = tmp_2.o52(tmp_3, this.b52_1, tunnelOptions, tmp_4, protected_0, 30.0, this);
|
|
880
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
881
|
-
return suspendResult;
|
|
882
|
-
}
|
|
883
|
-
continue $sm;
|
|
884
|
-
} else {
|
|
885
|
-
this.g7_1 = 6;
|
|
886
|
-
continue $sm;
|
|
960
|
+
suspendResult = tmp_0.e51(tmp_1, tmp_2, this.k53_1.x52_1, 1.0, 2.0, this);
|
|
961
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
962
|
+
return suspendResult;
|
|
887
963
|
}
|
|
888
964
|
|
|
889
|
-
case 5:
|
|
890
|
-
this.d52_1 = suspendResult;
|
|
891
|
-
this.c52_1 = this.d52_1.p52_1;
|
|
892
|
-
this.g7_1 = 6;
|
|
893
965
|
continue $sm;
|
|
894
|
-
case
|
|
895
|
-
var
|
|
896
|
-
|
|
897
|
-
|
|
966
|
+
case 1:
|
|
967
|
+
var path = suspendResult;
|
|
968
|
+
var corrections = path.c25_1;
|
|
969
|
+
path = ElevationStep_instance.o2c(path, this.k53_1.w52_1);
|
|
970
|
+
var racingLineApplied = this.k53_1.u52_1.m53_1;
|
|
898
971
|
if (racingLineApplied) {
|
|
899
|
-
|
|
900
|
-
} else if (this.
|
|
901
|
-
PathCurvature_instance.
|
|
972
|
+
path = RacingLine_instance.p54(path, this.k53_1.u52_1);
|
|
973
|
+
} else if (this.k53_1.t52_1.k54_1) {
|
|
974
|
+
PathCurvature_instance.j54(path, this.k53_1.t52_1);
|
|
902
975
|
}
|
|
903
976
|
|
|
904
|
-
var working = this.
|
|
905
|
-
if (this.
|
|
906
|
-
MaxSpeedComputer_instance.
|
|
977
|
+
var working = this.j53_1.h4z(this.j53_1.y4y_1.w4y(path));
|
|
978
|
+
if (this.k53_1.o52_1 || this.k53_1.p52_1) {
|
|
979
|
+
MaxSpeedComputer_instance.w54(working.y4y_1);
|
|
907
980
|
}
|
|
908
981
|
|
|
909
|
-
if (this.
|
|
910
|
-
|
|
911
|
-
working = working.h4z(working.y4y_1.w4y(
|
|
982
|
+
if (this.k53_1.p52_1) {
|
|
983
|
+
path = VirtualizeService_instance.x54(working);
|
|
984
|
+
working = working.h4z(working.y4y_1.w4y(path));
|
|
912
985
|
}
|
|
913
986
|
|
|
914
|
-
if (this.
|
|
915
|
-
|
|
987
|
+
if (this.k53_1.q52_1) {
|
|
988
|
+
path = PointPerSecond_instance.r2f(path);
|
|
916
989
|
}
|
|
917
990
|
|
|
918
|
-
if (this.
|
|
919
|
-
WPrimeBalanceComputer_instance.
|
|
991
|
+
if (this.k53_1.s52_1.i52_1) {
|
|
992
|
+
WPrimeBalanceComputer_instance.y54(path, this.k53_1.s52_1);
|
|
920
993
|
}
|
|
921
994
|
|
|
922
|
-
if (this.
|
|
923
|
-
ElevationGain_instance.s2b(
|
|
995
|
+
if (this.k53_1.v52_1.a2b_1) {
|
|
996
|
+
ElevationGain_instance.s2b(path, this.k53_1.v52_1);
|
|
924
997
|
}
|
|
925
998
|
|
|
926
|
-
if (this.
|
|
927
|
-
var
|
|
999
|
+
if (this.k53_1.r52_1.f52_1) {
|
|
1000
|
+
var tmp_4;
|
|
928
1001
|
if (racingLineApplied) {
|
|
929
|
-
var tmp0 = this.
|
|
930
|
-
var b = this.
|
|
931
|
-
|
|
1002
|
+
var tmp0 = this.k53_1.r52_1.g52_1;
|
|
1003
|
+
var b = this.k53_1.u52_1.i54_1;
|
|
1004
|
+
tmp_4 = Math.min(tmp0, b);
|
|
932
1005
|
} else {
|
|
933
|
-
|
|
1006
|
+
tmp_4 = this.k53_1.r52_1.g52_1;
|
|
934
1007
|
}
|
|
935
|
-
var tolerance =
|
|
936
|
-
|
|
1008
|
+
var tolerance = tmp_4;
|
|
1009
|
+
path = PathSimplifier_instance.z2e(path, tolerance, this.k53_1.r52_1.h52_1);
|
|
937
1010
|
}
|
|
938
1011
|
|
|
939
|
-
|
|
940
|
-
return
|
|
941
|
-
case
|
|
1012
|
+
path.c25_1 = corrections;
|
|
1013
|
+
return path;
|
|
1014
|
+
case 2:
|
|
942
1015
|
throw this.j7_1;
|
|
943
1016
|
}
|
|
944
1017
|
} catch ($p) {
|
|
945
1018
|
var e = $p;
|
|
946
|
-
if (this.h7_1 ===
|
|
1019
|
+
if (this.h7_1 === 2) {
|
|
947
1020
|
throw e;
|
|
948
1021
|
} else {
|
|
949
1022
|
this.g7_1 = this.h7_1;
|
|
@@ -953,17 +1026,17 @@
|
|
|
953
1026
|
while (true);
|
|
954
1027
|
};
|
|
955
1028
|
function Enhancer() {
|
|
956
|
-
this.
|
|
957
|
-
this.
|
|
958
|
-
this.
|
|
1029
|
+
this.z54_1 = 30.0;
|
|
1030
|
+
this.a55_1 = 1.0;
|
|
1031
|
+
this.b55_1 = 2.0;
|
|
959
1032
|
}
|
|
960
|
-
protoOf(Enhancer).
|
|
1033
|
+
protoOf(Enhancer).c55 = function (path) {
|
|
961
1034
|
return new CoursePhysics(new Course(path), RhoProviderEstimate_instance, AeroProviderConstant_instance, WindProviderNone_instance, new PowerProviderConstant(280.0));
|
|
962
1035
|
};
|
|
963
|
-
protoOf(Enhancer).
|
|
964
|
-
return this.
|
|
1036
|
+
protoOf(Enhancer).d55 = function (path, elevationProvider, options, $completion) {
|
|
1037
|
+
return this.e55(this.c55(path), options.z52(options.n52_1 && !(elevationProvider == null)), elevationProvider, $completion);
|
|
965
1038
|
};
|
|
966
|
-
protoOf(Enhancer).
|
|
1039
|
+
protoOf(Enhancer).e55 = function (course, options, elevationProvider, $completion) {
|
|
967
1040
|
var tmp = new $enhanceCourseCOROUTINE$(this, course, options, elevationProvider, $completion);
|
|
968
1041
|
tmp.i7_1 = Unit_instance;
|
|
969
1042
|
tmp.j7_1 = null;
|
|
@@ -982,7 +1055,7 @@
|
|
|
982
1055
|
var x = 0.6108652381980153;
|
|
983
1056
|
var tmp$ret$0 = Math.tan(x);
|
|
984
1057
|
RoadCondition_DRY_instance = new RoadCondition('DRY', 0, tmp$ret$0, 0.4);
|
|
985
|
-
RoadCondition_WET_instance = new RoadCondition('WET', 1, EngineConstants_getInstance().
|
|
1058
|
+
RoadCondition_WET_instance = new RoadCondition('WET', 1, EngineConstants_getInstance().v51_1 * 0.36, 0.634920634920635 * 0.36);
|
|
986
1059
|
if (Companion_instance_7 == null) {
|
|
987
1060
|
Companion_instance;
|
|
988
1061
|
new Companion_4();
|
|
@@ -992,7 +1065,7 @@
|
|
|
992
1065
|
var RoadCondition_WET_instance;
|
|
993
1066
|
function Companion_4() {
|
|
994
1067
|
Companion_instance_7 = this;
|
|
995
|
-
this.
|
|
1068
|
+
this.f55_1 = RoadCondition_DRY_getInstance();
|
|
996
1069
|
}
|
|
997
1070
|
protoOf(Companion_4).g23 = function (value) {
|
|
998
1071
|
var tmp0 = get_entries_0();
|
|
@@ -1045,12 +1118,12 @@
|
|
|
1045
1118
|
var $ENTRIES;
|
|
1046
1119
|
function RoadCondition(name, ordinal, mu, maxBrakeG) {
|
|
1047
1120
|
Enum.call(this, name, ordinal);
|
|
1048
|
-
this.
|
|
1049
|
-
this.
|
|
1121
|
+
this.i55_1 = mu;
|
|
1122
|
+
this.j55_1 = maxBrakeG;
|
|
1050
1123
|
}
|
|
1051
|
-
protoOf(RoadCondition).
|
|
1124
|
+
protoOf(RoadCondition).k55 = function () {
|
|
1052
1125
|
// Inline function 'kotlin.math.atan' call
|
|
1053
|
-
var x = this.
|
|
1126
|
+
var x = this.i55_1;
|
|
1054
1127
|
return Math.atan(x) * 180.0 / 3.141592653589793;
|
|
1055
1128
|
};
|
|
1056
1129
|
protoOf(RoadCondition).j23 = function () {
|
|
@@ -1073,8 +1146,8 @@
|
|
|
1073
1146
|
if (_this__u8e3s4 == null) {
|
|
1074
1147
|
tmp = cyclist;
|
|
1075
1148
|
} else {
|
|
1076
|
-
var tmp0_maxLeanAngleDeg = _this__u8e3s4.
|
|
1077
|
-
var tmp1_maxBrakeG = _this__u8e3s4.
|
|
1149
|
+
var tmp0_maxLeanAngleDeg = _this__u8e3s4.k55();
|
|
1150
|
+
var tmp1_maxBrakeG = _this__u8e3s4.j55_1;
|
|
1078
1151
|
tmp = cyclist.s4z(VOID, tmp1_maxBrakeG, VOID, VOID, tmp0_maxLeanAngleDeg);
|
|
1079
1152
|
}
|
|
1080
1153
|
return tmp;
|
|
@@ -1088,43 +1161,43 @@
|
|
|
1088
1161
|
return RoadCondition_WET_instance;
|
|
1089
1162
|
}
|
|
1090
1163
|
function Climb(startIndex, endIndex, startDistanceM, endDistanceM, startElevationM, endElevationM, positiveElevationM, negativeElevationM, climbingDistanceM, parts) {
|
|
1091
|
-
this.
|
|
1092
|
-
this.
|
|
1093
|
-
this.
|
|
1094
|
-
this.
|
|
1095
|
-
this.
|
|
1096
|
-
this.
|
|
1097
|
-
this.
|
|
1098
|
-
this.
|
|
1099
|
-
this.
|
|
1100
|
-
this.
|
|
1164
|
+
this.l55_1 = startIndex;
|
|
1165
|
+
this.m55_1 = endIndex;
|
|
1166
|
+
this.n55_1 = startDistanceM;
|
|
1167
|
+
this.o55_1 = endDistanceM;
|
|
1168
|
+
this.p55_1 = startElevationM;
|
|
1169
|
+
this.q55_1 = endElevationM;
|
|
1170
|
+
this.r55_1 = positiveElevationM;
|
|
1171
|
+
this.s55_1 = negativeElevationM;
|
|
1172
|
+
this.t55_1 = climbingDistanceM;
|
|
1173
|
+
this.u55_1 = parts;
|
|
1101
1174
|
}
|
|
1102
|
-
protoOf(Climb).
|
|
1103
|
-
return this.
|
|
1175
|
+
protoOf(Climb).v55 = function () {
|
|
1176
|
+
return this.o55_1 - this.n55_1;
|
|
1104
1177
|
};
|
|
1105
|
-
protoOf(Climb).
|
|
1106
|
-
return this.
|
|
1178
|
+
protoOf(Climb).w55 = function () {
|
|
1179
|
+
return this.q55_1 - this.p55_1;
|
|
1107
1180
|
};
|
|
1108
|
-
protoOf(Climb).
|
|
1109
|
-
return this.
|
|
1181
|
+
protoOf(Climb).x55 = function () {
|
|
1182
|
+
return this.v55() === 0.0 ? 0.0 : this.w55() / this.v55();
|
|
1110
1183
|
};
|
|
1111
|
-
protoOf(Climb).
|
|
1112
|
-
return this.
|
|
1184
|
+
protoOf(Climb).y55 = function () {
|
|
1185
|
+
return this.t55_1 === 0.0 ? 0.0 : this.r55_1 / this.t55_1;
|
|
1113
1186
|
};
|
|
1114
1187
|
protoOf(Climb).toString = function () {
|
|
1115
|
-
return 'Climb(startIndex=' + this.
|
|
1188
|
+
return 'Climb(startIndex=' + this.l55_1 + ', endIndex=' + this.m55_1 + ', startDistanceM=' + this.n55_1 + ', endDistanceM=' + this.o55_1 + ', startElevationM=' + this.p55_1 + ', endElevationM=' + this.q55_1 + ', positiveElevationM=' + this.r55_1 + ', negativeElevationM=' + this.s55_1 + ', climbingDistanceM=' + this.t55_1 + ', parts=' + toString(this.u55_1) + ')';
|
|
1116
1189
|
};
|
|
1117
1190
|
protoOf(Climb).hashCode = function () {
|
|
1118
|
-
var result = this.
|
|
1119
|
-
result = imul(result, 31) + this.
|
|
1120
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1121
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1122
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1123
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1124
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1125
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1126
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1127
|
-
result = imul(result, 31) + hashCode(this.
|
|
1191
|
+
var result = this.l55_1;
|
|
1192
|
+
result = imul(result, 31) + this.m55_1 | 0;
|
|
1193
|
+
result = imul(result, 31) + getNumberHashCode(this.n55_1) | 0;
|
|
1194
|
+
result = imul(result, 31) + getNumberHashCode(this.o55_1) | 0;
|
|
1195
|
+
result = imul(result, 31) + getNumberHashCode(this.p55_1) | 0;
|
|
1196
|
+
result = imul(result, 31) + getNumberHashCode(this.q55_1) | 0;
|
|
1197
|
+
result = imul(result, 31) + getNumberHashCode(this.r55_1) | 0;
|
|
1198
|
+
result = imul(result, 31) + getNumberHashCode(this.s55_1) | 0;
|
|
1199
|
+
result = imul(result, 31) + getNumberHashCode(this.t55_1) | 0;
|
|
1200
|
+
result = imul(result, 31) + hashCode(this.u55_1) | 0;
|
|
1128
1201
|
return result;
|
|
1129
1202
|
};
|
|
1130
1203
|
protoOf(Climb).equals = function (other) {
|
|
@@ -1132,51 +1205,51 @@
|
|
|
1132
1205
|
return true;
|
|
1133
1206
|
if (!(other instanceof Climb))
|
|
1134
1207
|
return false;
|
|
1135
|
-
if (!(this.
|
|
1208
|
+
if (!(this.l55_1 === other.l55_1))
|
|
1136
1209
|
return false;
|
|
1137
|
-
if (!(this.
|
|
1210
|
+
if (!(this.m55_1 === other.m55_1))
|
|
1138
1211
|
return false;
|
|
1139
|
-
if (!equals(this.
|
|
1212
|
+
if (!equals(this.n55_1, other.n55_1))
|
|
1140
1213
|
return false;
|
|
1141
|
-
if (!equals(this.
|
|
1214
|
+
if (!equals(this.o55_1, other.o55_1))
|
|
1142
1215
|
return false;
|
|
1143
|
-
if (!equals(this.
|
|
1216
|
+
if (!equals(this.p55_1, other.p55_1))
|
|
1144
1217
|
return false;
|
|
1145
|
-
if (!equals(this.
|
|
1218
|
+
if (!equals(this.q55_1, other.q55_1))
|
|
1146
1219
|
return false;
|
|
1147
|
-
if (!equals(this.
|
|
1220
|
+
if (!equals(this.r55_1, other.r55_1))
|
|
1148
1221
|
return false;
|
|
1149
|
-
if (!equals(this.
|
|
1222
|
+
if (!equals(this.s55_1, other.s55_1))
|
|
1150
1223
|
return false;
|
|
1151
|
-
if (!equals(this.
|
|
1224
|
+
if (!equals(this.t55_1, other.t55_1))
|
|
1152
1225
|
return false;
|
|
1153
|
-
if (!equals(this.
|
|
1226
|
+
if (!equals(this.u55_1, other.u55_1))
|
|
1154
1227
|
return false;
|
|
1155
1228
|
return true;
|
|
1156
1229
|
};
|
|
1157
1230
|
function ClimbPart(startDistanceM, endDistanceM, startElevationM, endElevationM) {
|
|
1158
|
-
this.
|
|
1159
|
-
this.
|
|
1160
|
-
this.
|
|
1161
|
-
this.
|
|
1231
|
+
this.z55_1 = startDistanceM;
|
|
1232
|
+
this.a56_1 = endDistanceM;
|
|
1233
|
+
this.b56_1 = startElevationM;
|
|
1234
|
+
this.c56_1 = endElevationM;
|
|
1162
1235
|
}
|
|
1163
|
-
protoOf(ClimbPart).
|
|
1164
|
-
return this.
|
|
1236
|
+
protoOf(ClimbPart).v55 = function () {
|
|
1237
|
+
return this.a56_1 - this.z55_1;
|
|
1165
1238
|
};
|
|
1166
|
-
protoOf(ClimbPart).
|
|
1167
|
-
return this.
|
|
1239
|
+
protoOf(ClimbPart).w55 = function () {
|
|
1240
|
+
return this.c56_1 - this.b56_1;
|
|
1168
1241
|
};
|
|
1169
|
-
protoOf(ClimbPart).
|
|
1170
|
-
return this.
|
|
1242
|
+
protoOf(ClimbPart).d56 = function () {
|
|
1243
|
+
return this.v55() === 0.0 ? 0.0 : this.w55() / this.v55();
|
|
1171
1244
|
};
|
|
1172
1245
|
protoOf(ClimbPart).toString = function () {
|
|
1173
|
-
return 'ClimbPart(startDistanceM=' + this.
|
|
1246
|
+
return 'ClimbPart(startDistanceM=' + this.z55_1 + ', endDistanceM=' + this.a56_1 + ', startElevationM=' + this.b56_1 + ', endElevationM=' + this.c56_1 + ')';
|
|
1174
1247
|
};
|
|
1175
1248
|
protoOf(ClimbPart).hashCode = function () {
|
|
1176
|
-
var result = getNumberHashCode(this.
|
|
1177
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1178
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1179
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1249
|
+
var result = getNumberHashCode(this.z55_1);
|
|
1250
|
+
result = imul(result, 31) + getNumberHashCode(this.a56_1) | 0;
|
|
1251
|
+
result = imul(result, 31) + getNumberHashCode(this.b56_1) | 0;
|
|
1252
|
+
result = imul(result, 31) + getNumberHashCode(this.c56_1) | 0;
|
|
1180
1253
|
return result;
|
|
1181
1254
|
};
|
|
1182
1255
|
protoOf(ClimbPart).equals = function (other) {
|
|
@@ -1184,19 +1257,19 @@
|
|
|
1184
1257
|
return true;
|
|
1185
1258
|
if (!(other instanceof ClimbPart))
|
|
1186
1259
|
return false;
|
|
1187
|
-
if (!equals(this.
|
|
1260
|
+
if (!equals(this.z55_1, other.z55_1))
|
|
1188
1261
|
return false;
|
|
1189
|
-
if (!equals(this.
|
|
1262
|
+
if (!equals(this.a56_1, other.a56_1))
|
|
1190
1263
|
return false;
|
|
1191
|
-
if (!equals(this.
|
|
1264
|
+
if (!equals(this.b56_1, other.b56_1))
|
|
1192
1265
|
return false;
|
|
1193
|
-
if (!equals(this.
|
|
1266
|
+
if (!equals(this.c56_1, other.c56_1))
|
|
1194
1267
|
return false;
|
|
1195
1268
|
return true;
|
|
1196
1269
|
};
|
|
1197
1270
|
function Companion_5() {
|
|
1198
1271
|
Companion_instance_8 = this;
|
|
1199
|
-
this.
|
|
1272
|
+
this.e56_1 = new ClimbOptions();
|
|
1200
1273
|
}
|
|
1201
1274
|
var Companion_instance_8;
|
|
1202
1275
|
function Companion_getInstance_12() {
|
|
@@ -1213,30 +1286,30 @@
|
|
|
1213
1286
|
maxDiffRealGradeRatio = maxDiffRealGradeRatio === VOID ? 1.3 : maxDiffRealGradeRatio;
|
|
1214
1287
|
booster = booster === VOID ? 1.3 : booster;
|
|
1215
1288
|
maxAnalysisPoints = maxAnalysisPoints === VOID ? 3000 : maxAnalysisPoints;
|
|
1216
|
-
this.
|
|
1217
|
-
this.
|
|
1218
|
-
this.
|
|
1219
|
-
this.
|
|
1220
|
-
this.
|
|
1221
|
-
this.
|
|
1222
|
-
this.
|
|
1289
|
+
this.f56_1 = minMinClimbElevationM;
|
|
1290
|
+
this.g56_1 = maxMinClimbElevationM;
|
|
1291
|
+
this.h56_1 = minClimbElevationRatio;
|
|
1292
|
+
this.i56_1 = minGradePercent;
|
|
1293
|
+
this.j56_1 = maxDiffRealGradeRatio;
|
|
1294
|
+
this.k56_1 = booster;
|
|
1295
|
+
this.l56_1 = maxAnalysisPoints;
|
|
1223
1296
|
// Inline function 'kotlin.require' call
|
|
1224
|
-
if (!(this.
|
|
1297
|
+
if (!(this.l56_1 >= 2)) {
|
|
1225
1298
|
var message = 'maxAnalysisPoints must be at least 2';
|
|
1226
1299
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1227
1300
|
}
|
|
1228
1301
|
}
|
|
1229
1302
|
protoOf(ClimbOptions).toString = function () {
|
|
1230
|
-
return 'ClimbOptions(minMinClimbElevationM=' + this.
|
|
1303
|
+
return 'ClimbOptions(minMinClimbElevationM=' + this.f56_1 + ', maxMinClimbElevationM=' + this.g56_1 + ', minClimbElevationRatio=' + this.h56_1 + ', minGradePercent=' + this.i56_1 + ', maxDiffRealGradeRatio=' + this.j56_1 + ', booster=' + this.k56_1 + ', maxAnalysisPoints=' + this.l56_1 + ')';
|
|
1231
1304
|
};
|
|
1232
1305
|
protoOf(ClimbOptions).hashCode = function () {
|
|
1233
|
-
var result = getNumberHashCode(this.
|
|
1234
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1235
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1236
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1237
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1238
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1239
|
-
result = imul(result, 31) + this.
|
|
1306
|
+
var result = getNumberHashCode(this.f56_1);
|
|
1307
|
+
result = imul(result, 31) + getNumberHashCode(this.g56_1) | 0;
|
|
1308
|
+
result = imul(result, 31) + getNumberHashCode(this.h56_1) | 0;
|
|
1309
|
+
result = imul(result, 31) + getNumberHashCode(this.i56_1) | 0;
|
|
1310
|
+
result = imul(result, 31) + getNumberHashCode(this.j56_1) | 0;
|
|
1311
|
+
result = imul(result, 31) + getNumberHashCode(this.k56_1) | 0;
|
|
1312
|
+
result = imul(result, 31) + this.l56_1 | 0;
|
|
1240
1313
|
return result;
|
|
1241
1314
|
};
|
|
1242
1315
|
protoOf(ClimbOptions).equals = function (other) {
|
|
@@ -1244,25 +1317,25 @@
|
|
|
1244
1317
|
return true;
|
|
1245
1318
|
if (!(other instanceof ClimbOptions))
|
|
1246
1319
|
return false;
|
|
1247
|
-
if (!equals(this.
|
|
1320
|
+
if (!equals(this.f56_1, other.f56_1))
|
|
1248
1321
|
return false;
|
|
1249
|
-
if (!equals(this.
|
|
1322
|
+
if (!equals(this.g56_1, other.g56_1))
|
|
1250
1323
|
return false;
|
|
1251
|
-
if (!equals(this.
|
|
1324
|
+
if (!equals(this.h56_1, other.h56_1))
|
|
1252
1325
|
return false;
|
|
1253
|
-
if (!equals(this.
|
|
1326
|
+
if (!equals(this.i56_1, other.i56_1))
|
|
1254
1327
|
return false;
|
|
1255
|
-
if (!equals(this.
|
|
1328
|
+
if (!equals(this.j56_1, other.j56_1))
|
|
1256
1329
|
return false;
|
|
1257
|
-
if (!equals(this.
|
|
1330
|
+
if (!equals(this.k56_1, other.k56_1))
|
|
1258
1331
|
return false;
|
|
1259
|
-
if (!(this.
|
|
1332
|
+
if (!(this.l56_1 === other.l56_1))
|
|
1260
1333
|
return false;
|
|
1261
1334
|
return true;
|
|
1262
1335
|
};
|
|
1263
1336
|
function Companion_6() {
|
|
1264
1337
|
}
|
|
1265
|
-
protoOf(Companion_6).
|
|
1338
|
+
protoOf(Companion_6).m56 = function (path, maxPoints) {
|
|
1266
1339
|
var tmp;
|
|
1267
1340
|
if (path.l23_1 <= maxPoints) {
|
|
1268
1341
|
var tmp_0 = 0;
|
|
@@ -1311,16 +1384,16 @@
|
|
|
1311
1384
|
return Companion_instance_9;
|
|
1312
1385
|
}
|
|
1313
1386
|
function Profile(distance, elevation, sourceIndex) {
|
|
1314
|
-
this.
|
|
1315
|
-
this.
|
|
1316
|
-
this.
|
|
1387
|
+
this.n56_1 = distance;
|
|
1388
|
+
this.o56_1 = elevation;
|
|
1389
|
+
this.p56_1 = sourceIndex;
|
|
1317
1390
|
}
|
|
1318
1391
|
protoOf(Profile).o = function () {
|
|
1319
|
-
return this.
|
|
1392
|
+
return this.n56_1.length;
|
|
1320
1393
|
};
|
|
1321
1394
|
function bestCandidateFrom($this, profile, i, minClimbElevation, options) {
|
|
1322
|
-
var startDist = profile.
|
|
1323
|
-
var startEle = profile.
|
|
1395
|
+
var startDist = profile.n56_1[i];
|
|
1396
|
+
var startEle = profile.o56_1[i];
|
|
1324
1397
|
var positiveElevation = 0.0;
|
|
1325
1398
|
var negativeElevation = 0.0;
|
|
1326
1399
|
var distClimbing = 0.0;
|
|
@@ -1332,12 +1405,12 @@
|
|
|
1332
1405
|
$l$loop: do {
|
|
1333
1406
|
var j = inductionVariable;
|
|
1334
1407
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1335
|
-
var endDist = profile.
|
|
1336
|
-
var endEle = profile.
|
|
1337
|
-
var dEle = endEle - profile.
|
|
1408
|
+
var endDist = profile.n56_1[j];
|
|
1409
|
+
var endEle = profile.o56_1[j];
|
|
1410
|
+
var dEle = endEle - profile.o56_1[j - 1 | 0];
|
|
1338
1411
|
if (dEle > 0) {
|
|
1339
1412
|
positiveElevation = positiveElevation + dEle;
|
|
1340
|
-
distClimbing = distClimbing + (endDist - profile.
|
|
1413
|
+
distClimbing = distClimbing + (endDist - profile.n56_1[j - 1 | 0]);
|
|
1341
1414
|
} else {
|
|
1342
1415
|
negativeElevation = negativeElevation + dEle;
|
|
1343
1416
|
}
|
|
@@ -1348,9 +1421,9 @@
|
|
|
1348
1421
|
var gradePercent = 100.0 * netElevation / length;
|
|
1349
1422
|
var climbingGradePercent = distClimbing > 0 ? 100.0 * positiveElevation / distClimbing : 0.0;
|
|
1350
1423
|
// Inline function 'kotlin.math.pow' call
|
|
1351
|
-
var x = options.
|
|
1424
|
+
var x = options.k56_1;
|
|
1352
1425
|
var score = length * Math.pow(gradePercent, x);
|
|
1353
|
-
var qualifies = gradePercent >= options.
|
|
1426
|
+
var qualifies = gradePercent >= options.i56_1 && netElevation >= minClimbElevation && score >= bestScore && climbingGradePercent / gradePercent <= options.j56_1;
|
|
1354
1427
|
if (qualifies) {
|
|
1355
1428
|
bestScore = score;
|
|
1356
1429
|
best = new Candidate(i, j, score, positiveElevation, negativeElevation, distClimbing);
|
|
@@ -1380,7 +1453,7 @@
|
|
|
1380
1453
|
return kept;
|
|
1381
1454
|
}
|
|
1382
1455
|
function toClimb($this, $receiver, path, profile) {
|
|
1383
|
-
return new Climb(profile.
|
|
1456
|
+
return new Climb(profile.p56_1[$receiver.q56_1], profile.p56_1[$receiver.r56_1], profile.n56_1[$receiver.q56_1], profile.n56_1[$receiver.r56_1], profile.o56_1[$receiver.q56_1], profile.o56_1[$receiver.r56_1], $receiver.t56_1, $receiver.u56_1, $receiver.v56_1, splitIntoParts($this, profile, $receiver.q56_1, $receiver.r56_1));
|
|
1384
1457
|
}
|
|
1385
1458
|
function splitIntoParts($this, profile, startIndex, endIndex) {
|
|
1386
1459
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -1394,14 +1467,14 @@
|
|
|
1394
1467
|
var item = inductionVariable;
|
|
1395
1468
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1396
1469
|
var i = item;
|
|
1397
|
-
var tmp$ret$2 = new Vector3D(profile.
|
|
1470
|
+
var tmp$ret$2 = new Vector3D(profile.n56_1[i], profile.o56_1[i], 0.0);
|
|
1398
1471
|
destination.k(tmp$ret$2);
|
|
1399
1472
|
}
|
|
1400
1473
|
while (!(item === last));
|
|
1401
1474
|
var points = destination;
|
|
1402
1475
|
if (points.o() < 2)
|
|
1403
1476
|
return emptyList();
|
|
1404
|
-
var elevationGain = profile.
|
|
1477
|
+
var elevationGain = profile.o56_1[endIndex] - profile.o56_1[startIndex];
|
|
1405
1478
|
var tolerance = coerceIn(elevationGain / 50.0, 10.0, 50.0);
|
|
1406
1479
|
var keptIndices = DouglasPeucker_instance.o11(points, tolerance);
|
|
1407
1480
|
var tmp$ret$3;
|
|
@@ -1431,26 +1504,26 @@
|
|
|
1431
1504
|
return tmp$ret$3;
|
|
1432
1505
|
}
|
|
1433
1506
|
function Candidate(startIndex, endIndex, score, positiveElevationM, negativeElevationM, climbingDistanceM) {
|
|
1434
|
-
this.
|
|
1435
|
-
this.
|
|
1436
|
-
this.
|
|
1437
|
-
this.
|
|
1438
|
-
this.
|
|
1439
|
-
this.
|
|
1507
|
+
this.q56_1 = startIndex;
|
|
1508
|
+
this.r56_1 = endIndex;
|
|
1509
|
+
this.s56_1 = score;
|
|
1510
|
+
this.t56_1 = positiveElevationM;
|
|
1511
|
+
this.u56_1 = negativeElevationM;
|
|
1512
|
+
this.v56_1 = climbingDistanceM;
|
|
1440
1513
|
}
|
|
1441
|
-
protoOf(Candidate).
|
|
1442
|
-
return other.
|
|
1514
|
+
protoOf(Candidate).w56 = function (other) {
|
|
1515
|
+
return other.q56_1 <= this.q56_1 && this.q56_1 <= other.r56_1 || (other.q56_1 <= this.r56_1 && this.r56_1 <= other.r56_1) || (this.q56_1 <= other.q56_1 && other.r56_1 <= this.r56_1);
|
|
1443
1516
|
};
|
|
1444
1517
|
protoOf(Candidate).toString = function () {
|
|
1445
|
-
return 'Candidate(startIndex=' + this.
|
|
1518
|
+
return 'Candidate(startIndex=' + this.q56_1 + ', endIndex=' + this.r56_1 + ', score=' + this.s56_1 + ', positiveElevationM=' + this.t56_1 + ', negativeElevationM=' + this.u56_1 + ', climbingDistanceM=' + this.v56_1 + ')';
|
|
1446
1519
|
};
|
|
1447
1520
|
protoOf(Candidate).hashCode = function () {
|
|
1448
|
-
var result = this.
|
|
1449
|
-
result = imul(result, 31) + this.
|
|
1450
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1451
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1452
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1453
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1521
|
+
var result = this.q56_1;
|
|
1522
|
+
result = imul(result, 31) + this.r56_1 | 0;
|
|
1523
|
+
result = imul(result, 31) + getNumberHashCode(this.s56_1) | 0;
|
|
1524
|
+
result = imul(result, 31) + getNumberHashCode(this.t56_1) | 0;
|
|
1525
|
+
result = imul(result, 31) + getNumberHashCode(this.u56_1) | 0;
|
|
1526
|
+
result = imul(result, 31) + getNumberHashCode(this.v56_1) | 0;
|
|
1454
1527
|
return result;
|
|
1455
1528
|
};
|
|
1456
1529
|
protoOf(Candidate).equals = function (other) {
|
|
@@ -1458,31 +1531,31 @@
|
|
|
1458
1531
|
return true;
|
|
1459
1532
|
if (!(other instanceof Candidate))
|
|
1460
1533
|
return false;
|
|
1461
|
-
if (!(this.
|
|
1534
|
+
if (!(this.q56_1 === other.q56_1))
|
|
1462
1535
|
return false;
|
|
1463
|
-
if (!(this.
|
|
1536
|
+
if (!(this.r56_1 === other.r56_1))
|
|
1464
1537
|
return false;
|
|
1465
|
-
if (!equals(this.
|
|
1538
|
+
if (!equals(this.s56_1, other.s56_1))
|
|
1466
1539
|
return false;
|
|
1467
|
-
if (!equals(this.
|
|
1540
|
+
if (!equals(this.t56_1, other.t56_1))
|
|
1468
1541
|
return false;
|
|
1469
|
-
if (!equals(this.
|
|
1542
|
+
if (!equals(this.u56_1, other.u56_1))
|
|
1470
1543
|
return false;
|
|
1471
|
-
if (!equals(this.
|
|
1544
|
+
if (!equals(this.v56_1, other.v56_1))
|
|
1472
1545
|
return false;
|
|
1473
1546
|
return true;
|
|
1474
1547
|
};
|
|
1475
1548
|
function sam$kotlin_Comparator$0(function_0) {
|
|
1476
|
-
this.
|
|
1549
|
+
this.x56_1 = function_0;
|
|
1477
1550
|
}
|
|
1478
1551
|
protoOf(sam$kotlin_Comparator$0).la = function (a, b) {
|
|
1479
|
-
return this.
|
|
1552
|
+
return this.x56_1(a, b);
|
|
1480
1553
|
};
|
|
1481
1554
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
1482
1555
|
return this.la(a, b);
|
|
1483
1556
|
};
|
|
1484
1557
|
protoOf(sam$kotlin_Comparator$0).e2 = function () {
|
|
1485
|
-
return this.
|
|
1558
|
+
return this.x56_1;
|
|
1486
1559
|
};
|
|
1487
1560
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
1488
1561
|
var tmp;
|
|
@@ -1503,16 +1576,16 @@
|
|
|
1503
1576
|
return hashCode(this.e2());
|
|
1504
1577
|
};
|
|
1505
1578
|
function sam$kotlin_Comparator$0_0(function_0) {
|
|
1506
|
-
this.
|
|
1579
|
+
this.y56_1 = function_0;
|
|
1507
1580
|
}
|
|
1508
1581
|
protoOf(sam$kotlin_Comparator$0_0).la = function (a, b) {
|
|
1509
|
-
return this.
|
|
1582
|
+
return this.y56_1(a, b);
|
|
1510
1583
|
};
|
|
1511
1584
|
protoOf(sam$kotlin_Comparator$0_0).compare = function (a, b) {
|
|
1512
1585
|
return this.la(a, b);
|
|
1513
1586
|
};
|
|
1514
1587
|
protoOf(sam$kotlin_Comparator$0_0).e2 = function () {
|
|
1515
|
-
return this.
|
|
1588
|
+
return this.y56_1;
|
|
1516
1589
|
};
|
|
1517
1590
|
protoOf(sam$kotlin_Comparator$0_0).equals = function (other) {
|
|
1518
1591
|
var tmp;
|
|
@@ -1534,38 +1607,38 @@
|
|
|
1534
1607
|
};
|
|
1535
1608
|
function ClimbDetector$detect$lambda(a, b) {
|
|
1536
1609
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
1537
|
-
var tmp = a.
|
|
1538
|
-
var tmp$ret$2 = b.
|
|
1610
|
+
var tmp = a.q56_1;
|
|
1611
|
+
var tmp$ret$2 = b.q56_1;
|
|
1539
1612
|
return compareValues(tmp, tmp$ret$2);
|
|
1540
1613
|
}
|
|
1541
1614
|
function ClimbDetector$dedupeByScore$lambda(a, b) {
|
|
1542
1615
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
1543
|
-
var tmp = b.
|
|
1544
|
-
var tmp$ret$2 = a.
|
|
1616
|
+
var tmp = b.s56_1;
|
|
1617
|
+
var tmp$ret$2 = a.s56_1;
|
|
1545
1618
|
return compareValues(tmp, tmp$ret$2);
|
|
1546
1619
|
}
|
|
1547
1620
|
function ClimbDetector$dedupeByScore$lambda_0($best) {
|
|
1548
1621
|
return function (it) {
|
|
1549
|
-
return it.
|
|
1622
|
+
return it.w56($best);
|
|
1550
1623
|
};
|
|
1551
1624
|
}
|
|
1552
1625
|
function ClimbDetector() {
|
|
1553
|
-
this.
|
|
1554
|
-
this.
|
|
1555
|
-
this.
|
|
1556
|
-
this.
|
|
1626
|
+
this.z56_1 = 10.0;
|
|
1627
|
+
this.a57_1 = 10.0;
|
|
1628
|
+
this.b57_1 = 50.0;
|
|
1629
|
+
this.c57_1 = 50.0;
|
|
1557
1630
|
}
|
|
1558
|
-
protoOf(ClimbDetector).
|
|
1631
|
+
protoOf(ClimbDetector).d57 = function (path, options) {
|
|
1559
1632
|
if (path.l23_1 < 2)
|
|
1560
1633
|
return emptyList();
|
|
1561
|
-
var tmp0 = options.
|
|
1562
|
-
var tmp0_0 = options.
|
|
1634
|
+
var tmp0 = options.f56_1;
|
|
1635
|
+
var tmp0_0 = options.g56_1;
|
|
1563
1636
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1564
|
-
var b = path.y24_1 / options.
|
|
1637
|
+
var b = path.y24_1 / options.h56_1;
|
|
1565
1638
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
1566
1639
|
var b_0 = Math.min(tmp0_0, b);
|
|
1567
1640
|
var minClimbElevation = Math.max(tmp0, b_0);
|
|
1568
|
-
var profile = Companion_instance_9.
|
|
1641
|
+
var profile = Companion_instance_9.m56(path, options.l56_1);
|
|
1569
1642
|
// Inline function 'kotlin.collections.mapNotNull' call
|
|
1570
1643
|
var tmp0_1 = until(0, profile.o());
|
|
1571
1644
|
// Inline function 'kotlin.collections.mapNotNullTo' call
|
|
@@ -1605,9 +1678,9 @@
|
|
|
1605
1678
|
}
|
|
1606
1679
|
return destination_0;
|
|
1607
1680
|
};
|
|
1608
|
-
protoOf(ClimbDetector).
|
|
1609
|
-
options = options === VOID ? Companion_getInstance_12().
|
|
1610
|
-
return $super === VOID ? this.
|
|
1681
|
+
protoOf(ClimbDetector).e57 = function (path, options, $super) {
|
|
1682
|
+
options = options === VOID ? Companion_getInstance_12().e56_1 : options;
|
|
1683
|
+
return $super === VOID ? this.d57(path, options) : $super.d57.call(this, path, options);
|
|
1611
1684
|
};
|
|
1612
1685
|
var ClimbDetector_instance;
|
|
1613
1686
|
function ClimbDetector_getInstance() {
|
|
@@ -1633,12 +1706,12 @@
|
|
|
1633
1706
|
function BridgeDeckResult(path, status, detection, replacements, dropped, terrain) {
|
|
1634
1707
|
dropped = dropped === VOID ? emptyList() : dropped;
|
|
1635
1708
|
terrain = terrain === VOID ? null : terrain;
|
|
1636
|
-
this.
|
|
1637
|
-
this.
|
|
1638
|
-
this.
|
|
1639
|
-
this.
|
|
1640
|
-
this.
|
|
1641
|
-
this.
|
|
1709
|
+
this.p50_1 = path;
|
|
1710
|
+
this.q50_1 = status;
|
|
1711
|
+
this.r50_1 = detection;
|
|
1712
|
+
this.s50_1 = replacements;
|
|
1713
|
+
this.t50_1 = dropped;
|
|
1714
|
+
this.u50_1 = terrain;
|
|
1642
1715
|
}
|
|
1643
1716
|
function alongTrackStations(path, stepM) {
|
|
1644
1717
|
if (path.l23_1 === 0)
|
|
@@ -1692,17 +1765,17 @@
|
|
|
1692
1765
|
}
|
|
1693
1766
|
function BridgeDeckStep$replaceDecks$ref(p0) {
|
|
1694
1767
|
return constructCallableReference(function (p0_0, p1, p2, p3) {
|
|
1695
|
-
return p0.
|
|
1768
|
+
return p0.f57(p0_0, p1, p2, p3);
|
|
1696
1769
|
}, 4, 0, 12, 'replaceDecks', [p0]);
|
|
1697
1770
|
}
|
|
1698
1771
|
function $applyCOROUTINE$(_this__u8e3s4, path, terrain, surface, options, replace, resultContinuation) {
|
|
1699
1772
|
CoroutineImpl.call(this, resultContinuation);
|
|
1700
|
-
this.
|
|
1701
|
-
this.
|
|
1702
|
-
this.
|
|
1703
|
-
this.
|
|
1704
|
-
this.
|
|
1705
|
-
this.
|
|
1773
|
+
this.o57_1 = _this__u8e3s4;
|
|
1774
|
+
this.p57_1 = path;
|
|
1775
|
+
this.q57_1 = terrain;
|
|
1776
|
+
this.r57_1 = surface;
|
|
1777
|
+
this.s57_1 = options;
|
|
1778
|
+
this.t57_1 = replace;
|
|
1706
1779
|
}
|
|
1707
1780
|
protoOf($applyCOROUTINE$).o7 = function () {
|
|
1708
1781
|
var suspendResult = this.i7_1;
|
|
@@ -1712,12 +1785,12 @@
|
|
|
1712
1785
|
switch (tmp) {
|
|
1713
1786
|
case 0:
|
|
1714
1787
|
this.h7_1 = 5;
|
|
1715
|
-
if (this.
|
|
1716
|
-
return new BridgeDeckResult(this.
|
|
1717
|
-
this.
|
|
1788
|
+
if (this.p57_1.l23_1 < 2)
|
|
1789
|
+
return new BridgeDeckResult(this.p57_1, BridgeDeckStatus_NO_DECK_getInstance(), null, emptyList());
|
|
1790
|
+
this.w57_1 = alongTrackStations(this.p57_1, this.s57_1.q27_1);
|
|
1718
1791
|
this.h7_1 = 3;
|
|
1719
1792
|
this.g7_1 = 1;
|
|
1720
|
-
suspendResult = this.
|
|
1793
|
+
suspendResult = this.q57_1.e16(asReversed(this.w57_1), VOID, this);
|
|
1721
1794
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1722
1795
|
return suspendResult;
|
|
1723
1796
|
}
|
|
@@ -1733,9 +1806,9 @@
|
|
|
1733
1806
|
}
|
|
1734
1807
|
|
|
1735
1808
|
var ARGUMENT = asReversed(destination);
|
|
1736
|
-
this.
|
|
1809
|
+
this.v57_1 = toDoubleArray(ARGUMENT);
|
|
1737
1810
|
this.g7_1 = 2;
|
|
1738
|
-
suspendResult = this.
|
|
1811
|
+
suspendResult = this.r57_1.e16(this.w57_1, VOID, this);
|
|
1739
1812
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1740
1813
|
return suspendResult;
|
|
1741
1814
|
}
|
|
@@ -1751,7 +1824,7 @@
|
|
|
1751
1824
|
}
|
|
1752
1825
|
|
|
1753
1826
|
var ARGUMENT_0 = toDoubleArray(destination_0);
|
|
1754
|
-
this.
|
|
1827
|
+
this.u57_1 = to(this.v57_1, ARGUMENT_0);
|
|
1755
1828
|
this.h7_1 = 5;
|
|
1756
1829
|
this.g7_1 = 4;
|
|
1757
1830
|
continue $sm;
|
|
@@ -1768,7 +1841,7 @@
|
|
|
1768
1841
|
var e_0 = this.j7_1;
|
|
1769
1842
|
var tmp_3 = this;
|
|
1770
1843
|
ensureActive(this.m7());
|
|
1771
|
-
return new BridgeDeckResult(this.
|
|
1844
|
+
return new BridgeDeckResult(this.p57_1, BridgeDeckStatus_FETCH_FAILED_getInstance(), null, emptyList());
|
|
1772
1845
|
} else {
|
|
1773
1846
|
throw this.j7_1;
|
|
1774
1847
|
}
|
|
@@ -1776,9 +1849,9 @@
|
|
|
1776
1849
|
|
|
1777
1850
|
case 4:
|
|
1778
1851
|
this.h7_1 = 5;
|
|
1779
|
-
var samples = this.
|
|
1780
|
-
var r = this.
|
|
1781
|
-
return new BridgeDeckResult(r.
|
|
1852
|
+
var samples = this.u57_1;
|
|
1853
|
+
var r = this.t57_1(this.p57_1, samples.ic_1, samples.jc_1, this.s57_1);
|
|
1854
|
+
return new BridgeDeckResult(r.p50_1, r.q50_1, r.r50_1, r.s50_1, r.t50_1, samples.ic_1);
|
|
1782
1855
|
case 5:
|
|
1783
1856
|
throw this.j7_1;
|
|
1784
1857
|
}
|
|
@@ -1795,13 +1868,13 @@
|
|
|
1795
1868
|
};
|
|
1796
1869
|
function BridgeDeckStep() {
|
|
1797
1870
|
}
|
|
1798
|
-
protoOf(BridgeDeckStep).
|
|
1871
|
+
protoOf(BridgeDeckStep).x57 = function (path, terrain, surface, options, replace, $completion) {
|
|
1799
1872
|
var tmp = new $applyCOROUTINE$(this, path, terrain, surface, options, replace, $completion);
|
|
1800
1873
|
tmp.i7_1 = Unit_instance;
|
|
1801
1874
|
tmp.j7_1 = null;
|
|
1802
1875
|
return tmp.o7();
|
|
1803
1876
|
};
|
|
1804
|
-
protoOf(BridgeDeckStep).
|
|
1877
|
+
protoOf(BridgeDeckStep).o50 = function (path, terrain, surface, options, replace, $completion, $super) {
|
|
1805
1878
|
options = options === VOID ? Companion_getInstance_0().v29_1 : options;
|
|
1806
1879
|
var tmp;
|
|
1807
1880
|
if (replace === VOID) {
|
|
@@ -1810,9 +1883,9 @@
|
|
|
1810
1883
|
tmp = replace;
|
|
1811
1884
|
}
|
|
1812
1885
|
replace = tmp;
|
|
1813
|
-
return $super === VOID ? this.
|
|
1886
|
+
return $super === VOID ? this.x57(path, terrain, surface, options, replace, $completion) : $super.x57.call(this, path, terrain, surface, options, replace, $completion);
|
|
1814
1887
|
};
|
|
1815
|
-
protoOf(BridgeDeckStep).
|
|
1888
|
+
protoOf(BridgeDeckStep).f57 = function (path, mnt, mns, options) {
|
|
1816
1889
|
var tmp$ret$0;
|
|
1817
1890
|
$l$block: {
|
|
1818
1891
|
// Inline function 'kotlin.collections.all' call
|
|
@@ -1836,9 +1909,9 @@
|
|
|
1836
1909
|
if (built.j2a_1.q()) {
|
|
1837
1910
|
return new BridgeDeckResult(path, BridgeDeckStatus_NO_DECK_getInstance(), detection, emptyList(), built.k2a_1);
|
|
1838
1911
|
}
|
|
1839
|
-
return new BridgeDeckResult(this.
|
|
1912
|
+
return new BridgeDeckResult(this.y57(path, built.j2a_1, options.q27_1), BridgeDeckStatus_APPLIED_getInstance(), detection, built.j2a_1, built.k2a_1);
|
|
1840
1913
|
};
|
|
1841
|
-
protoOf(BridgeDeckStep).
|
|
1914
|
+
protoOf(BridgeDeckStep).y57 = function (path, replacements, stepM) {
|
|
1842
1915
|
var out = path.y2e();
|
|
1843
1916
|
var _iterator__ex2g4s = replacements.l();
|
|
1844
1917
|
while (_iterator__ex2g4s.m()) {
|
|
@@ -1940,18 +2013,18 @@
|
|
|
1940
2013
|
return 'km ' + km(ElevationCorrectionReport_instance, first(it).a27_1) + '\u2013' + km(ElevationCorrectionReport_instance, last(it).b27_1);
|
|
1941
2014
|
}
|
|
1942
2015
|
function ElevationCorrectionReport() {
|
|
1943
|
-
this.
|
|
1944
|
-
this.
|
|
2016
|
+
this.b51_1 = "bridge decks: a terrain- or surface-model tile could not be read; every bridge on this path keeps the terrain model's valley floor, and the same input may give a different profile once the tiles are reachable";
|
|
2017
|
+
this.c51_1 = 'tunnels: a terrain tile could not be read; no tunnel on this path was flattened';
|
|
1945
2018
|
}
|
|
1946
|
-
protoOf(ElevationCorrectionReport).
|
|
2019
|
+
protoOf(ElevationCorrectionReport).d51 = function (decks, decksUnavailable, tunnels) {
|
|
1947
2020
|
var warnings = ArrayList_init_$Create$_0();
|
|
1948
|
-
var deckStatus = decks == null ? decksUnavailable ? ElevationCorrectionStatus_UNAVAILABLE_getInstance() : ElevationCorrectionStatus_NOT_RUN_getInstance() : toReport(this, decks.
|
|
1949
|
-
if (equals(decks == null ? null : decks.
|
|
2021
|
+
var deckStatus = decks == null ? decksUnavailable ? ElevationCorrectionStatus_UNAVAILABLE_getInstance() : ElevationCorrectionStatus_NOT_RUN_getInstance() : toReport(this, decks.q50_1);
|
|
2022
|
+
if (equals(decks == null ? null : decks.q50_1, BridgeDeckStatus_FETCH_FAILED_getInstance())) {
|
|
1950
2023
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
1951
2024
|
var element = "bridge decks: a terrain- or surface-model tile could not be read; every bridge on this path keeps the terrain model's valley floor, and the same input may give a different profile once the tiles are reachable";
|
|
1952
2025
|
warnings.k(element);
|
|
1953
2026
|
}
|
|
1954
|
-
var tmp2_safe_receiver = decks == null ? null : decks.
|
|
2027
|
+
var tmp2_safe_receiver = decks == null ? null : decks.t50_1;
|
|
1955
2028
|
var tmp;
|
|
1956
2029
|
if (tmp2_safe_receiver == null) {
|
|
1957
2030
|
tmp = null;
|
|
@@ -1974,29 +2047,29 @@
|
|
|
1974
2047
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1975
2048
|
if (!droppedDecks.q()) {
|
|
1976
2049
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
1977
|
-
var element_1 = this.
|
|
2050
|
+
var element_1 = this.z57(droppedDecks);
|
|
1978
2051
|
warnings.k(element_1);
|
|
1979
2052
|
}
|
|
1980
|
-
if (equals(tunnels == null ? null : tunnels.
|
|
2053
|
+
if (equals(tunnels == null ? null : tunnels.x50_1, TunnelStatus_FETCH_FAILED_getInstance())) {
|
|
1981
2054
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
1982
2055
|
var element_2 = 'tunnels: a terrain tile could not be read; no tunnel on this path was flattened';
|
|
1983
2056
|
warnings.k(element_2);
|
|
1984
2057
|
}
|
|
1985
|
-
var tmp6_safe_receiver = decks == null ? null : decks.
|
|
2058
|
+
var tmp6_safe_receiver = decks == null ? null : decks.s50_1;
|
|
1986
2059
|
var tmp7_elvis_lhs = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.o();
|
|
1987
2060
|
var tmp_0 = tmp7_elvis_lhs == null ? 0 : tmp7_elvis_lhs;
|
|
1988
2061
|
var tmp_1 = droppedDecks.o();
|
|
1989
|
-
var tmp9_safe_receiver = tunnels == null ? null : tunnels.
|
|
2062
|
+
var tmp9_safe_receiver = tunnels == null ? null : tunnels.x50_1;
|
|
1990
2063
|
var tmp10_elvis_lhs = tmp9_safe_receiver == null ? null : toReport_0(this, tmp9_safe_receiver);
|
|
1991
2064
|
var tmp_2 = tmp10_elvis_lhs == null ? ElevationCorrectionStatus_NOT_RUN_getInstance() : tmp10_elvis_lhs;
|
|
1992
|
-
var tmp12_safe_receiver = tunnels == null ? null : tunnels.
|
|
2065
|
+
var tmp12_safe_receiver = tunnels == null ? null : tunnels.y50_1;
|
|
1993
2066
|
var tmp13_elvis_lhs = tmp12_safe_receiver == null ? null : tmp12_safe_receiver.o();
|
|
1994
2067
|
var tmp_3 = tmp13_elvis_lhs == null ? 0 : tmp13_elvis_lhs;
|
|
1995
|
-
var tmp15_safe_receiver = tunnels == null ? null : tunnels.
|
|
2068
|
+
var tmp15_safe_receiver = tunnels == null ? null : tunnels.a51_1;
|
|
1996
2069
|
var tmp16_elvis_lhs = tmp15_safe_receiver == null ? null : tmp15_safe_receiver.o();
|
|
1997
2070
|
return new ElevationCorrections(deckStatus, tmp_0, tmp_1, tmp_2, tmp_3, tmp16_elvis_lhs == null ? 0 : tmp16_elvis_lhs, warnings);
|
|
1998
2071
|
};
|
|
1999
|
-
protoOf(ElevationCorrectionReport).
|
|
2072
|
+
protoOf(ElevationCorrectionReport).z57 = function (dropped) {
|
|
2000
2073
|
var where = joinToString(dropped, ', ', VOID, VOID, VOID, VOID, ElevationCorrectionReport$droppedDecksWarning$lambda);
|
|
2001
2074
|
return 'bridge decks: ' + dropped.o() + ' detected deck(s) kept the valley floor (fewer than two surface anchors) at ' + where;
|
|
2002
2075
|
};
|
|
@@ -2048,7 +2121,7 @@
|
|
|
2048
2121
|
$l$loop: do {
|
|
2049
2122
|
var i = inductionVariable;
|
|
2050
2123
|
inductionVariable = inductionVariable + 1 | 0;
|
|
2051
|
-
var dx = LocalFrame_instance.
|
|
2124
|
+
var dx = LocalFrame_instance.c58(_this__u8e3s4.p23(i) - lon0) * cosLat0;
|
|
2052
2125
|
var dy = _this__u8e3s4.o23(i) - lat0;
|
|
2053
2126
|
// Inline function 'kotlin.math.hypot' call
|
|
2054
2127
|
var length = hypot(dx, dy);
|
|
@@ -2113,11 +2186,11 @@
|
|
|
2113
2186
|
function TunnelResult(path, status, spans, written, dropped) {
|
|
2114
2187
|
written = written === VOID ? emptyList() : written;
|
|
2115
2188
|
dropped = dropped === VOID ? emptyList() : dropped;
|
|
2116
|
-
this.
|
|
2117
|
-
this.
|
|
2118
|
-
this.
|
|
2119
|
-
this.
|
|
2120
|
-
this.
|
|
2189
|
+
this.w50_1 = path;
|
|
2190
|
+
this.x50_1 = status;
|
|
2191
|
+
this.y50_1 = spans;
|
|
2192
|
+
this.z50_1 = written;
|
|
2193
|
+
this.a51_1 = dropped;
|
|
2121
2194
|
}
|
|
2122
2195
|
function write$isProtected($protected, d) {
|
|
2123
2196
|
var tmp$ret$0;
|
|
@@ -2185,13 +2258,13 @@
|
|
|
2185
2258
|
}
|
|
2186
2259
|
function $applyCOROUTINE$_0(_this__u8e3s4, path, terrain, options, samples, protected_0, refreshM, resultContinuation) {
|
|
2187
2260
|
CoroutineImpl.call(this, resultContinuation);
|
|
2188
|
-
this.
|
|
2189
|
-
this.
|
|
2190
|
-
this.
|
|
2191
|
-
this.
|
|
2192
|
-
this.
|
|
2193
|
-
this.
|
|
2194
|
-
this.
|
|
2261
|
+
this.l58_1 = _this__u8e3s4;
|
|
2262
|
+
this.m58_1 = path;
|
|
2263
|
+
this.n58_1 = terrain;
|
|
2264
|
+
this.o58_1 = options;
|
|
2265
|
+
this.p58_1 = samples;
|
|
2266
|
+
this.q58_1 = protected_0;
|
|
2267
|
+
this.r58_1 = refreshM;
|
|
2195
2268
|
}
|
|
2196
2269
|
protoOf($applyCOROUTINE$_0).o7 = function () {
|
|
2197
2270
|
var suspendResult = this.i7_1;
|
|
@@ -2201,22 +2274,22 @@
|
|
|
2201
2274
|
switch (tmp) {
|
|
2202
2275
|
case 0:
|
|
2203
2276
|
this.h7_1 = 5;
|
|
2204
|
-
if (this.
|
|
2205
|
-
return new TunnelResult(this.
|
|
2206
|
-
this.
|
|
2207
|
-
if (!(this.
|
|
2277
|
+
if (this.m58_1.l23_1 < 2)
|
|
2278
|
+
return new TunnelResult(this.m58_1, TunnelStatus_NO_TUNNEL_getInstance(), emptyList());
|
|
2279
|
+
this.s58_1 = alongTrackStations(this.m58_1, this.o58_1.g2g_1);
|
|
2280
|
+
if (!(this.p58_1 == null)) {
|
|
2208
2281
|
var tmp_0 = this;
|
|
2209
|
-
if (!(this.
|
|
2210
|
-
var message = 'terrain samples: ' + this.
|
|
2282
|
+
if (!(this.p58_1.length === this.s58_1.o())) {
|
|
2283
|
+
var message = 'terrain samples: ' + this.p58_1.length + ' for ' + this.s58_1.o() + ' stations at ' + this.o58_1.g2g_1 + ' m';
|
|
2211
2284
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2212
2285
|
}
|
|
2213
|
-
tmp_0.
|
|
2286
|
+
tmp_0.t58_1 = this.p58_1;
|
|
2214
2287
|
this.g7_1 = 4;
|
|
2215
2288
|
continue $sm;
|
|
2216
2289
|
} else {
|
|
2217
2290
|
this.h7_1 = 2;
|
|
2218
2291
|
this.g7_1 = 1;
|
|
2219
|
-
suspendResult = this.
|
|
2292
|
+
suspendResult = this.n58_1.e16(asReversed(this.s58_1), VOID, this);
|
|
2220
2293
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2221
2294
|
return suspendResult;
|
|
2222
2295
|
}
|
|
@@ -2233,7 +2306,7 @@
|
|
|
2233
2306
|
}
|
|
2234
2307
|
|
|
2235
2308
|
var ARGUMENT = asReversed(destination);
|
|
2236
|
-
this.
|
|
2309
|
+
this.u58_1 = toDoubleArray(ARGUMENT);
|
|
2237
2310
|
this.h7_1 = 5;
|
|
2238
2311
|
this.g7_1 = 3;
|
|
2239
2312
|
continue $sm;
|
|
@@ -2250,7 +2323,7 @@
|
|
|
2250
2323
|
var e_0 = this.j7_1;
|
|
2251
2324
|
var tmp_4 = this;
|
|
2252
2325
|
ensureActive(this.m7());
|
|
2253
|
-
return new TunnelResult(this.
|
|
2326
|
+
return new TunnelResult(this.m58_1, TunnelStatus_FETCH_FAILED_getInstance(), emptyList());
|
|
2254
2327
|
} else {
|
|
2255
2328
|
throw this.j7_1;
|
|
2256
2329
|
}
|
|
@@ -2258,12 +2331,12 @@
|
|
|
2258
2331
|
|
|
2259
2332
|
case 3:
|
|
2260
2333
|
this.h7_1 = 5;
|
|
2261
|
-
this.
|
|
2334
|
+
this.t58_1 = this.u58_1;
|
|
2262
2335
|
this.g7_1 = 4;
|
|
2263
2336
|
continue $sm;
|
|
2264
2337
|
case 4:
|
|
2265
|
-
var mnt = this.
|
|
2266
|
-
var this_1 = this.
|
|
2338
|
+
var mnt = this.t58_1;
|
|
2339
|
+
var this_1 = this.s58_1;
|
|
2267
2340
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
2268
2341
|
var _iterator__ex2g4s_0 = this_1.l();
|
|
2269
2342
|
while (_iterator__ex2g4s_0.m()) {
|
|
@@ -2271,7 +2344,7 @@
|
|
|
2271
2344
|
destination_0.k(item_0.b11_1);
|
|
2272
2345
|
}
|
|
2273
2346
|
|
|
2274
|
-
var this_2 = this.
|
|
2347
|
+
var this_2 = this.s58_1;
|
|
2275
2348
|
var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
|
|
2276
2349
|
var _iterator__ex2g4s_1 = this_2.l();
|
|
2277
2350
|
while (_iterator__ex2g4s_1.m()) {
|
|
@@ -2279,7 +2352,7 @@
|
|
|
2279
2352
|
destination_1.k(item_1.c11_1);
|
|
2280
2353
|
}
|
|
2281
2354
|
|
|
2282
|
-
return this.
|
|
2355
|
+
return this.l58_1.v58(this.m58_1, mnt, destination_0, destination_1, this.o58_1, this.q58_1, this.r58_1);
|
|
2283
2356
|
case 5:
|
|
2284
2357
|
throw this.j7_1;
|
|
2285
2358
|
}
|
|
@@ -2296,13 +2369,13 @@
|
|
|
2296
2369
|
};
|
|
2297
2370
|
function TunnelStep() {
|
|
2298
2371
|
}
|
|
2299
|
-
protoOf(TunnelStep).
|
|
2372
|
+
protoOf(TunnelStep).v50 = function (path, terrain, options, samples, protected_0, refreshM, $completion) {
|
|
2300
2373
|
var tmp = new $applyCOROUTINE$_0(this, path, terrain, options, samples, protected_0, refreshM, $completion);
|
|
2301
2374
|
tmp.i7_1 = Unit_instance;
|
|
2302
2375
|
tmp.j7_1 = null;
|
|
2303
2376
|
return tmp.o7();
|
|
2304
2377
|
};
|
|
2305
|
-
protoOf(TunnelStep).
|
|
2378
|
+
protoOf(TunnelStep).v58 = function (path, mnt, lat, lon, options, protected_0, refreshM) {
|
|
2306
2379
|
var found = TunnelDetector_instance.d2h(new TunnelProfile(mnt, toDoubleArray(lat), toDoubleArray(lon)), options);
|
|
2307
2380
|
// Inline function 'kotlin.collections.partition' call
|
|
2308
2381
|
var first = ArrayList_init_$Create$_0();
|
|
@@ -2354,9 +2427,9 @@
|
|
|
2354
2427
|
destination.k(tmp$ret$6);
|
|
2355
2428
|
}
|
|
2356
2429
|
var written = destination;
|
|
2357
|
-
return new TunnelResult(this.
|
|
2430
|
+
return new TunnelResult(this.w58(path, spans, mnt, options.g2g_1, protected_0, refreshM), TunnelStatus_APPLIED_getInstance(), spans, written, dropped);
|
|
2358
2431
|
};
|
|
2359
|
-
protoOf(TunnelStep).
|
|
2432
|
+
protoOf(TunnelStep).w58 = function (path, spans, mnt, stepM, protected_0, refreshM) {
|
|
2360
2433
|
var out = path.y2e();
|
|
2361
2434
|
var _iterator__ex2g4s = spans.l();
|
|
2362
2435
|
while (_iterator__ex2g4s.m()) {
|
|
@@ -2404,13 +2477,13 @@
|
|
|
2404
2477
|
function computeWithWind($this, path, i, aeroCoef, wind) {
|
|
2405
2478
|
var speed = path.x2d(i);
|
|
2406
2479
|
var bearing = path.b2d(i);
|
|
2407
|
-
path.e2e(i, wind.
|
|
2408
|
-
path.f2e(i, wind.
|
|
2409
|
-
var windDirectionAsBearing = 3.141592653589793 / 2.0 - wind.
|
|
2480
|
+
path.e2e(i, wind.x58_1);
|
|
2481
|
+
path.f2e(i, wind.y58_1);
|
|
2482
|
+
var windDirectionAsBearing = 3.141592653589793 / 2.0 - wind.y58_1;
|
|
2410
2483
|
path.i2d(i, windDirectionAsBearing);
|
|
2411
2484
|
var alpha = windDirectionAsBearing - bearing;
|
|
2412
2485
|
path.k2d(i, alpha);
|
|
2413
|
-
var v = wind.
|
|
2486
|
+
var v = wind.x58_1;
|
|
2414
2487
|
// Inline function 'kotlin.math.cos' call
|
|
2415
2488
|
var l1 = speed + v * Math.cos(alpha);
|
|
2416
2489
|
var l2 = l1 * l1;
|
|
@@ -2425,14 +2498,14 @@
|
|
|
2425
2498
|
return tmp_1 * Math.sqrt(l3) * l1 * speed;
|
|
2426
2499
|
}
|
|
2427
2500
|
function AeroPowerProvider() {
|
|
2428
|
-
this.
|
|
2501
|
+
this.z58_1 = 1.2;
|
|
2429
2502
|
}
|
|
2430
|
-
protoOf(AeroPowerProvider).
|
|
2431
|
-
var aeroCoef = course.a4z_1.
|
|
2503
|
+
protoOf(AeroPowerProvider).a59 = function (course, path, pointIndex) {
|
|
2504
|
+
var aeroCoef = course.a4z_1.b59(course, path, pointIndex);
|
|
2432
2505
|
path.h2d(pointIndex, aeroCoef);
|
|
2433
|
-
var wind = course.b4z_1.
|
|
2506
|
+
var wind = course.b4z_1.c59(course.y4y_1, path, pointIndex);
|
|
2434
2507
|
var tmp;
|
|
2435
|
-
if (wind.
|
|
2508
|
+
if (wind.x58_1 === 0.0) {
|
|
2436
2509
|
var v = path.x2d(pointIndex);
|
|
2437
2510
|
tmp = -aeroCoef * v * v * v;
|
|
2438
2511
|
} else {
|
|
@@ -2448,8 +2521,8 @@
|
|
|
2448
2521
|
}
|
|
2449
2522
|
function AeroProviderConstant() {
|
|
2450
2523
|
}
|
|
2451
|
-
protoOf(AeroProviderConstant).
|
|
2452
|
-
var rho = course.z4y_1.
|
|
2524
|
+
protoOf(AeroProviderConstant).b59 = function (course, path, pointIndex) {
|
|
2525
|
+
var rho = course.z4y_1.d59(course.y4y_1, path, pointIndex);
|
|
2453
2526
|
return course.e4z().k4z_1 * course.e4z().l4z_1 * rho / 2.0;
|
|
2454
2527
|
};
|
|
2455
2528
|
var AeroProviderConstant_instance;
|
|
@@ -2459,8 +2532,8 @@
|
|
|
2459
2532
|
function CyclistPowerProvider() {
|
|
2460
2533
|
}
|
|
2461
2534
|
function Companion_7() {
|
|
2462
|
-
this.
|
|
2463
|
-
this.
|
|
2535
|
+
this.f59_1 = 0.05;
|
|
2536
|
+
this.g59_1 = 3.0;
|
|
2464
2537
|
}
|
|
2465
2538
|
var Companion_instance_10;
|
|
2466
2539
|
function Companion_getInstance_14() {
|
|
@@ -2468,10 +2541,10 @@
|
|
|
2468
2541
|
}
|
|
2469
2542
|
function CyclistPowerProviderBase(useHarmonics, random) {
|
|
2470
2543
|
random = random === VOID ? Default_getInstance() : random;
|
|
2471
|
-
this.
|
|
2544
|
+
this.h59_1 = useHarmonics;
|
|
2472
2545
|
var tmp = this;
|
|
2473
2546
|
var tmp_0;
|
|
2474
|
-
if (this.
|
|
2547
|
+
if (this.h59_1) {
|
|
2475
2548
|
// Inline function 'kotlin.collections.List' call
|
|
2476
2549
|
// Inline function 'kotlin.collections.MutableList' call
|
|
2477
2550
|
var list = ArrayList_init_$Create$(20);
|
|
@@ -2489,25 +2562,25 @@
|
|
|
2489
2562
|
} else {
|
|
2490
2563
|
tmp_0 = emptyList();
|
|
2491
2564
|
}
|
|
2492
|
-
tmp.
|
|
2565
|
+
tmp.i59_1 = tmp_0;
|
|
2493
2566
|
}
|
|
2494
|
-
protoOf(CyclistPowerProviderBase).
|
|
2495
|
-
var power = this.
|
|
2567
|
+
protoOf(CyclistPowerProviderBase).a59 = function (course, path, pointIndex) {
|
|
2568
|
+
var power = this.j59(course, path, pointIndex);
|
|
2496
2569
|
path.p2d(pointIndex, power);
|
|
2497
|
-
if (this.
|
|
2570
|
+
if (this.h59_1) {
|
|
2498
2571
|
var x = path.n23(pointIndex) / 10000.0;
|
|
2499
|
-
var _iterator__ex2g4s = this.
|
|
2572
|
+
var _iterator__ex2g4s = this.i59_1.l();
|
|
2500
2573
|
while (_iterator__ex2g4s.m()) {
|
|
2501
2574
|
var h = _iterator__ex2g4s.n();
|
|
2502
2575
|
var tmp = power;
|
|
2503
|
-
var tmp_0 = h.
|
|
2576
|
+
var tmp_0 = h.m59_1 * power;
|
|
2504
2577
|
// Inline function 'kotlin.math.cos' call
|
|
2505
|
-
var x_0 = h.
|
|
2578
|
+
var x_0 = h.k59_1 * x - h.l59_1;
|
|
2506
2579
|
power = tmp + tmp_0 * Math.cos(x_0);
|
|
2507
2580
|
}
|
|
2508
2581
|
}
|
|
2509
2582
|
path.q2d(pointIndex, power);
|
|
2510
|
-
var powerNeeded = -PowerComputer_instance.
|
|
2583
|
+
var powerNeeded = -PowerComputer_instance.o59(course, path, pointIndex, false);
|
|
2511
2584
|
path.r2d(pointIndex, powerNeeded);
|
|
2512
2585
|
return power;
|
|
2513
2586
|
};
|
|
@@ -2539,12 +2612,12 @@
|
|
|
2539
2612
|
var _iterator__ex2g4s = this_0.l();
|
|
2540
2613
|
while (_iterator__ex2g4s.m()) {
|
|
2541
2614
|
var item = _iterator__ex2g4s.n();
|
|
2542
|
-
var tmp$ret$2 = item.
|
|
2615
|
+
var tmp$ret$2 = item.r59_1;
|
|
2543
2616
|
destination.k(tmp$ret$2);
|
|
2544
2617
|
}
|
|
2545
2618
|
return destination;
|
|
2546
2619
|
};
|
|
2547
|
-
protoOf(Companion_8).
|
|
2620
|
+
protoOf(Companion_8).s59 = function (id) {
|
|
2548
2621
|
var tmp0 = get_entries_1();
|
|
2549
2622
|
var tmp$ret$0;
|
|
2550
2623
|
$l$block: {
|
|
@@ -2552,7 +2625,7 @@
|
|
|
2552
2625
|
var _iterator__ex2g4s = tmp0.l();
|
|
2553
2626
|
while (_iterator__ex2g4s.m()) {
|
|
2554
2627
|
var element = _iterator__ex2g4s.n();
|
|
2555
|
-
if (equals_0(element.
|
|
2628
|
+
if (equals_0(element.r59_1, id, true)) {
|
|
2556
2629
|
tmp$ret$0 = element;
|
|
2557
2630
|
break $l$block;
|
|
2558
2631
|
}
|
|
@@ -2578,22 +2651,22 @@
|
|
|
2578
2651
|
var $ENTRIES_0;
|
|
2579
2652
|
function PowerModel(name, ordinal, id) {
|
|
2580
2653
|
Enum.call(this, name, ordinal);
|
|
2581
|
-
this.
|
|
2654
|
+
this.r59_1 = id;
|
|
2582
2655
|
}
|
|
2583
2656
|
protoOf(PowerModel).toString = function () {
|
|
2584
|
-
return this.
|
|
2657
|
+
return this.r59_1;
|
|
2585
2658
|
};
|
|
2586
2659
|
function baseProvider($this) {
|
|
2587
2660
|
var tmp;
|
|
2588
|
-
switch ($this.
|
|
2661
|
+
switch ($this.t59_1.v1_1) {
|
|
2589
2662
|
case 0:
|
|
2590
|
-
tmp = new PowerProviderConstant($this.
|
|
2663
|
+
tmp = new PowerProviderConstant($this.u59_1, $this.x59_1);
|
|
2591
2664
|
break;
|
|
2592
2665
|
case 1:
|
|
2593
|
-
tmp = new PowerProviderDurability($this.
|
|
2666
|
+
tmp = new PowerProviderDurability($this.u59_1, $this.v59_1, VOID, VOID, $this.x59_1);
|
|
2594
2667
|
break;
|
|
2595
2668
|
case 2:
|
|
2596
|
-
tmp = new PowerProviderCriticalPower($this.
|
|
2669
|
+
tmp = new PowerProviderCriticalPower($this.u59_1, $this.v59_1, $this.w59_1, VOID, $this.x59_1);
|
|
2597
2670
|
break;
|
|
2598
2671
|
case 3:
|
|
2599
2672
|
tmp = PowerProviderFromData_instance;
|
|
@@ -2612,33 +2685,33 @@
|
|
|
2612
2685
|
useHarmonics = useHarmonics === VOID ? false : useHarmonics;
|
|
2613
2686
|
pacing = pacing === VOID ? false : pacing;
|
|
2614
2687
|
maxSlewWPerS = maxSlewWPerS === VOID ? 0.0 : maxSlewWPerS;
|
|
2615
|
-
this.
|
|
2616
|
-
this.
|
|
2617
|
-
this.
|
|
2618
|
-
this.
|
|
2619
|
-
this.
|
|
2620
|
-
this.
|
|
2621
|
-
this.
|
|
2622
|
-
}
|
|
2623
|
-
protoOf(CyclistPowerSpec).
|
|
2688
|
+
this.t59_1 = model;
|
|
2689
|
+
this.u59_1 = powerW;
|
|
2690
|
+
this.v59_1 = criticalPowerW;
|
|
2691
|
+
this.w59_1 = wPrimeJ;
|
|
2692
|
+
this.x59_1 = useHarmonics;
|
|
2693
|
+
this.y59_1 = pacing;
|
|
2694
|
+
this.z59_1 = maxSlewWPerS;
|
|
2695
|
+
}
|
|
2696
|
+
protoOf(CyclistPowerSpec).a5a = function () {
|
|
2624
2697
|
var provider = baseProvider(this);
|
|
2625
|
-
if (this.
|
|
2698
|
+
if (this.y59_1)
|
|
2626
2699
|
provider = new PowerProviderTerrainPacing(provider);
|
|
2627
|
-
if (this.
|
|
2628
|
-
provider = new PowerProviderSlewLimited(provider, this.
|
|
2700
|
+
if (this.z59_1 > 0.0)
|
|
2701
|
+
provider = new PowerProviderSlewLimited(provider, this.z59_1);
|
|
2629
2702
|
return provider;
|
|
2630
2703
|
};
|
|
2631
2704
|
protoOf(CyclistPowerSpec).toString = function () {
|
|
2632
|
-
return 'CyclistPowerSpec(model=' + this.
|
|
2705
|
+
return 'CyclistPowerSpec(model=' + this.t59_1.toString() + ', powerW=' + this.u59_1 + ', criticalPowerW=' + this.v59_1 + ', wPrimeJ=' + this.w59_1 + ', useHarmonics=' + this.x59_1 + ', pacing=' + this.y59_1 + ', maxSlewWPerS=' + this.z59_1 + ')';
|
|
2633
2706
|
};
|
|
2634
2707
|
protoOf(CyclistPowerSpec).hashCode = function () {
|
|
2635
|
-
var result = this.
|
|
2636
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2637
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2638
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2639
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
2640
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
2641
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2708
|
+
var result = this.t59_1.hashCode();
|
|
2709
|
+
result = imul(result, 31) + getNumberHashCode(this.u59_1) | 0;
|
|
2710
|
+
result = imul(result, 31) + getNumberHashCode(this.v59_1) | 0;
|
|
2711
|
+
result = imul(result, 31) + getNumberHashCode(this.w59_1) | 0;
|
|
2712
|
+
result = imul(result, 31) + getBooleanHashCode(this.x59_1) | 0;
|
|
2713
|
+
result = imul(result, 31) + getBooleanHashCode(this.y59_1) | 0;
|
|
2714
|
+
result = imul(result, 31) + getNumberHashCode(this.z59_1) | 0;
|
|
2642
2715
|
return result;
|
|
2643
2716
|
};
|
|
2644
2717
|
protoOf(CyclistPowerSpec).equals = function (other) {
|
|
@@ -2646,19 +2719,19 @@
|
|
|
2646
2719
|
return true;
|
|
2647
2720
|
if (!(other instanceof CyclistPowerSpec))
|
|
2648
2721
|
return false;
|
|
2649
|
-
if (!this.
|
|
2722
|
+
if (!this.t59_1.equals(other.t59_1))
|
|
2650
2723
|
return false;
|
|
2651
|
-
if (!equals(this.
|
|
2724
|
+
if (!equals(this.u59_1, other.u59_1))
|
|
2652
2725
|
return false;
|
|
2653
|
-
if (!equals(this.
|
|
2726
|
+
if (!equals(this.v59_1, other.v59_1))
|
|
2654
2727
|
return false;
|
|
2655
|
-
if (!equals(this.
|
|
2728
|
+
if (!equals(this.w59_1, other.w59_1))
|
|
2656
2729
|
return false;
|
|
2657
|
-
if (!(this.
|
|
2730
|
+
if (!(this.x59_1 === other.x59_1))
|
|
2658
2731
|
return false;
|
|
2659
|
-
if (!(this.
|
|
2732
|
+
if (!(this.y59_1 === other.y59_1))
|
|
2660
2733
|
return false;
|
|
2661
|
-
if (!equals(this.
|
|
2734
|
+
if (!equals(this.z59_1, other.z59_1))
|
|
2662
2735
|
return false;
|
|
2663
2736
|
return true;
|
|
2664
2737
|
};
|
|
@@ -2680,7 +2753,7 @@
|
|
|
2680
2753
|
}
|
|
2681
2754
|
function GravPowerProvider() {
|
|
2682
2755
|
}
|
|
2683
|
-
protoOf(GravPowerProvider).
|
|
2756
|
+
protoOf(GravPowerProvider).a59 = function (course, path, pointIndex) {
|
|
2684
2757
|
var m = course.e4z().i4z_1;
|
|
2685
2758
|
var grade = path.d2d(pointIndex);
|
|
2686
2759
|
var speed = path.x2d(pointIndex);
|
|
@@ -2697,17 +2770,17 @@
|
|
|
2697
2770
|
return GravPowerProvider_instance;
|
|
2698
2771
|
}
|
|
2699
2772
|
function Harmonic(freqRadS, phaseRad, amp) {
|
|
2700
|
-
this.
|
|
2701
|
-
this.
|
|
2702
|
-
this.
|
|
2773
|
+
this.k59_1 = freqRadS;
|
|
2774
|
+
this.l59_1 = phaseRad;
|
|
2775
|
+
this.m59_1 = amp;
|
|
2703
2776
|
}
|
|
2704
2777
|
protoOf(Harmonic).toString = function () {
|
|
2705
|
-
return 'Harmonic(freqRadS=' + this.
|
|
2778
|
+
return 'Harmonic(freqRadS=' + this.k59_1 + ', phaseRad=' + this.l59_1 + ', amp=' + this.m59_1 + ')';
|
|
2706
2779
|
};
|
|
2707
2780
|
protoOf(Harmonic).hashCode = function () {
|
|
2708
|
-
var result = getNumberHashCode(this.
|
|
2709
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2710
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2781
|
+
var result = getNumberHashCode(this.k59_1);
|
|
2782
|
+
result = imul(result, 31) + getNumberHashCode(this.l59_1) | 0;
|
|
2783
|
+
result = imul(result, 31) + getNumberHashCode(this.m59_1) | 0;
|
|
2711
2784
|
return result;
|
|
2712
2785
|
};
|
|
2713
2786
|
protoOf(Harmonic).equals = function (other) {
|
|
@@ -2715,11 +2788,11 @@
|
|
|
2715
2788
|
return true;
|
|
2716
2789
|
if (!(other instanceof Harmonic))
|
|
2717
2790
|
return false;
|
|
2718
|
-
if (!equals(this.
|
|
2791
|
+
if (!equals(this.k59_1, other.k59_1))
|
|
2719
2792
|
return false;
|
|
2720
|
-
if (!equals(this.
|
|
2793
|
+
if (!equals(this.l59_1, other.l59_1))
|
|
2721
2794
|
return false;
|
|
2722
|
-
if (!equals(this.
|
|
2795
|
+
if (!equals(this.m59_1, other.m59_1))
|
|
2723
2796
|
return false;
|
|
2724
2797
|
return true;
|
|
2725
2798
|
};
|
|
@@ -2769,7 +2842,7 @@
|
|
|
2769
2842
|
do {
|
|
2770
2843
|
var j = inductionVariable;
|
|
2771
2844
|
inductionVariable = inductionVariable + 1 | 0;
|
|
2772
|
-
totalBearingChange = totalBearingChange + $this.
|
|
2845
|
+
totalBearingChange = totalBearingChange + $this.b5a(path.b2d(j + 1 | 0) - path.b2d(j));
|
|
2773
2846
|
}
|
|
2774
2847
|
while (inductionVariable < maxi);
|
|
2775
2848
|
var totalDistance = path.p2b(maxi) - path.p2b(mini);
|
|
@@ -2831,14 +2904,14 @@
|
|
|
2831
2904
|
return vf * vf + 2.0 * aX * d - v * v;
|
|
2832
2905
|
}
|
|
2833
2906
|
function MaxSpeedComputer() {
|
|
2834
|
-
this.
|
|
2835
|
-
this.
|
|
2836
|
-
this.
|
|
2837
|
-
this.
|
|
2838
|
-
this.
|
|
2839
|
-
this.
|
|
2840
|
-
}
|
|
2841
|
-
protoOf(MaxSpeedComputer).
|
|
2907
|
+
this.q54_1 = 200.0;
|
|
2908
|
+
this.r54_1 = 5.0;
|
|
2909
|
+
this.s54_1 = 2.0;
|
|
2910
|
+
this.t54_1 = 0.001;
|
|
2911
|
+
this.u54_1 = 10;
|
|
2912
|
+
this.v54_1 = 24;
|
|
2913
|
+
}
|
|
2914
|
+
protoOf(MaxSpeedComputer).w54 = function (course) {
|
|
2842
2915
|
var path = course.s4y_1;
|
|
2843
2916
|
var n = path.l23_1;
|
|
2844
2917
|
var inductionVariable = n - 1 | 0;
|
|
@@ -2856,7 +2929,7 @@
|
|
|
2856
2929
|
while (0 <= inductionVariable);
|
|
2857
2930
|
path.f25();
|
|
2858
2931
|
};
|
|
2859
|
-
protoOf(MaxSpeedComputer).
|
|
2932
|
+
protoOf(MaxSpeedComputer).b5a = function (angleIn) {
|
|
2860
2933
|
var a = angleIn;
|
|
2861
2934
|
while (a > 3.141592653589793)
|
|
2862
2935
|
a = a - 2.0 * 3.141592653589793;
|
|
@@ -2870,16 +2943,16 @@
|
|
|
2870
2943
|
}
|
|
2871
2944
|
function MuscularPowerProvider() {
|
|
2872
2945
|
}
|
|
2873
|
-
protoOf(MuscularPowerProvider).
|
|
2874
|
-
var intent = course.c4z_1.
|
|
2875
|
-
var muscular = this.
|
|
2946
|
+
protoOf(MuscularPowerProvider).a59 = function (course, path, pointIndex) {
|
|
2947
|
+
var intent = course.c4z_1.a59(course, path, pointIndex);
|
|
2948
|
+
var muscular = this.c5a(course, path, pointIndex) ? intent : 0.0;
|
|
2876
2949
|
path.s2d(pointIndex, muscular);
|
|
2877
|
-
course.c4z_1.
|
|
2950
|
+
course.c4z_1.e59(pointIndex, muscular);
|
|
2878
2951
|
var wheel = muscular * course.f4z().o4y_1;
|
|
2879
2952
|
path.t2d(pointIndex, wheel);
|
|
2880
2953
|
return wheel;
|
|
2881
2954
|
};
|
|
2882
|
-
protoOf(MuscularPowerProvider).
|
|
2955
|
+
protoOf(MuscularPowerProvider).c5a = function (course, path, pointIndex) {
|
|
2883
2956
|
var radius = path.f2d(pointIndex);
|
|
2884
2957
|
if (!isFinite(radius) || radius <= 0.0)
|
|
2885
2958
|
return true;
|
|
@@ -2901,7 +2974,7 @@
|
|
|
2901
2974
|
var tol = Math.max(a, 1.0E-12);
|
|
2902
2975
|
while (dt2 - dt1 >= tol) {
|
|
2903
2976
|
var dtMid = (dt1 + dt2) / 2.0;
|
|
2904
|
-
var dxMid = $this.
|
|
2977
|
+
var dxMid = $this.d5a(pSum, equivalentMass, currentSpeed, dtMid);
|
|
2905
2978
|
if (dxMid < dx)
|
|
2906
2979
|
dt1 = dtMid;
|
|
2907
2980
|
else
|
|
@@ -2910,20 +2983,20 @@
|
|
|
2910
2983
|
return (dt1 + dt2) / 2.0;
|
|
2911
2984
|
}
|
|
2912
2985
|
function PowerComputer() {
|
|
2913
|
-
this.
|
|
2986
|
+
this.n59_1 = 1.0E-12;
|
|
2914
2987
|
}
|
|
2915
|
-
protoOf(PowerComputer).
|
|
2988
|
+
protoOf(PowerComputer).o59 = function (course, path, pointIndex, withCyclist) {
|
|
2916
2989
|
var pSum = 0.0;
|
|
2917
|
-
pSum = pSum + WheelBearingsPowerProvider_instance.
|
|
2918
|
-
pSum = pSum + RollingResistancePowerProvider_instance.
|
|
2919
|
-
pSum = pSum + AeroPowerProvider_instance.
|
|
2920
|
-
pSum = pSum + GravPowerProvider_instance.
|
|
2990
|
+
pSum = pSum + WheelBearingsPowerProvider_instance.a59(course, path, pointIndex);
|
|
2991
|
+
pSum = pSum + RollingResistancePowerProvider_instance.a59(course, path, pointIndex);
|
|
2992
|
+
pSum = pSum + AeroPowerProvider_instance.a59(course, path, pointIndex);
|
|
2993
|
+
pSum = pSum + GravPowerProvider_instance.a59(course, path, pointIndex);
|
|
2921
2994
|
if (withCyclist) {
|
|
2922
|
-
pSum = pSum + MuscularPowerProvider_instance.
|
|
2995
|
+
pSum = pSum + MuscularPowerProvider_instance.a59(course, path, pointIndex);
|
|
2923
2996
|
}
|
|
2924
2997
|
return pSum;
|
|
2925
2998
|
};
|
|
2926
|
-
protoOf(PowerComputer).
|
|
2999
|
+
protoOf(PowerComputer).d5a = function (pSum, equivalentMass, currentSpeed, dt) {
|
|
2927
3000
|
// Inline function 'kotlin.math.max' call
|
|
2928
3001
|
var b = dt * pSum / (0.5 * equivalentMass) + currentSpeed * currentSpeed;
|
|
2929
3002
|
// Inline function 'kotlin.math.sqrt' call
|
|
@@ -2934,17 +3007,17 @@
|
|
|
2934
3007
|
var newSpeed = Math.max(tmp0, b_0);
|
|
2935
3008
|
return (currentSpeed + newSpeed) * dt / 2.0;
|
|
2936
3009
|
};
|
|
2937
|
-
protoOf(PowerComputer).
|
|
3010
|
+
protoOf(PowerComputer).e5a = function (equivalentMass, s1, s2, dt) {
|
|
2938
3011
|
return 0.5 * equivalentMass * (s2 * s2 - s1 * s1) / dt;
|
|
2939
3012
|
};
|
|
2940
|
-
protoOf(PowerComputer).
|
|
3013
|
+
protoOf(PowerComputer).f5a = function (pSum, equivalentMass, currentSpeed, dx) {
|
|
2941
3014
|
var dt = 0.1;
|
|
2942
|
-
while (this.
|
|
3015
|
+
while (this.d5a(pSum, equivalentMass, currentSpeed, dt) <= dx) {
|
|
2943
3016
|
dt = dt + 0.1;
|
|
2944
3017
|
}
|
|
2945
3018
|
return getDtInner(this, pSum, equivalentMass, currentSpeed, dx, dt - 0.1, dt);
|
|
2946
3019
|
};
|
|
2947
|
-
protoOf(PowerComputer).
|
|
3020
|
+
protoOf(PowerComputer).g5a = function (course, path, equivalentMass, i) {
|
|
2948
3021
|
if (i === 0) {
|
|
2949
3022
|
path.w2d(i, 0.0);
|
|
2950
3023
|
path.h2e(i, 0.0);
|
|
@@ -2958,10 +3031,10 @@
|
|
|
2958
3031
|
path.w2d(i, 0.0);
|
|
2959
3032
|
return Unit_instance;
|
|
2960
3033
|
}
|
|
2961
|
-
var resistive = this.
|
|
3034
|
+
var resistive = this.o59(course, path, i - 1 | 0, false);
|
|
2962
3035
|
var s1 = path.x2d(i - 1 | 0);
|
|
2963
3036
|
var s2 = path.x2d(i);
|
|
2964
|
-
var totPower = this.
|
|
3037
|
+
var totPower = this.e5a(equivalentMass, s1, s2, dtSeconds);
|
|
2965
3038
|
path.u2d(i, totPower);
|
|
2966
3039
|
var powerWheel = totPower - resistive;
|
|
2967
3040
|
path.v2d(i, powerWheel);
|
|
@@ -2972,13 +3045,13 @@
|
|
|
2972
3045
|
var computed = Math.max(0.0, powerWheel) / course.f4z().o4y_1;
|
|
2973
3046
|
path.w2d(i, computed);
|
|
2974
3047
|
};
|
|
2975
|
-
protoOf(PowerComputer).
|
|
3048
|
+
protoOf(PowerComputer).h5a = function (course) {
|
|
2976
3049
|
var m = course.t4y_1.i4z_1;
|
|
2977
3050
|
var totalInertia = course.u4y_1.l4y_1 + course.u4y_1.m4y_1;
|
|
2978
3051
|
return m + totalInertia / (course.u4y_1.n4y_1 * course.u4y_1.n4y_1);
|
|
2979
3052
|
};
|
|
2980
|
-
protoOf(PowerComputer).
|
|
2981
|
-
return this.
|
|
3053
|
+
protoOf(PowerComputer).i5a = function (course) {
|
|
3054
|
+
return this.h5a(course.y4y_1);
|
|
2982
3055
|
};
|
|
2983
3056
|
var PowerComputer_instance;
|
|
2984
3057
|
function PowerComputer_getInstance() {
|
|
@@ -2988,13 +3061,13 @@
|
|
|
2988
3061
|
useHarmonics = useHarmonics === VOID ? false : useHarmonics;
|
|
2989
3062
|
random = random === VOID ? Default_getInstance() : random;
|
|
2990
3063
|
CyclistPowerProviderBase.call(this, useHarmonics, random);
|
|
2991
|
-
this.
|
|
3064
|
+
this.l5a_1 = power;
|
|
2992
3065
|
}
|
|
2993
|
-
protoOf(PowerProviderConstant).
|
|
2994
|
-
return this.
|
|
3066
|
+
protoOf(PowerProviderConstant).j59 = function (course, path, pointIndex) {
|
|
3067
|
+
return this.l5a_1;
|
|
2995
3068
|
};
|
|
2996
3069
|
function Companion_9() {
|
|
2997
|
-
this.
|
|
3070
|
+
this.m5a_1 = 0.5;
|
|
2998
3071
|
}
|
|
2999
3072
|
var Companion_instance_12;
|
|
3000
3073
|
function Companion_getInstance_16() {
|
|
@@ -3007,82 +3080,82 @@
|
|
|
3007
3080
|
useHarmonics = useHarmonics === VOID ? false : useHarmonics;
|
|
3008
3081
|
random = random === VOID ? Default_getInstance() : random;
|
|
3009
3082
|
CyclistPowerProviderBase.call(this, useHarmonics, random);
|
|
3010
|
-
this.
|
|
3011
|
-
this.
|
|
3012
|
-
this.
|
|
3013
|
-
this.
|
|
3083
|
+
this.p5a_1 = powerW;
|
|
3084
|
+
this.q5a_1 = criticalPowerW;
|
|
3085
|
+
this.r5a_1 = wPrimeJ;
|
|
3086
|
+
this.s5a_1 = taperStartFraction;
|
|
3014
3087
|
// Inline function 'kotlin.require' call
|
|
3015
|
-
if (!(this.
|
|
3016
|
-
var message = 'powerW must be > 0, got ' + this.
|
|
3088
|
+
if (!(this.p5a_1 > 0.0)) {
|
|
3089
|
+
var message = 'powerW must be > 0, got ' + this.p5a_1;
|
|
3017
3090
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
3018
3091
|
}
|
|
3019
3092
|
// Inline function 'kotlin.require' call
|
|
3020
|
-
if (!(this.
|
|
3021
|
-
var message_0 = 'criticalPowerW must be > 0, got ' + this.
|
|
3093
|
+
if (!(this.q5a_1 > 0.0)) {
|
|
3094
|
+
var message_0 = 'criticalPowerW must be > 0, got ' + this.q5a_1;
|
|
3022
3095
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
3023
3096
|
}
|
|
3024
3097
|
// Inline function 'kotlin.require' call
|
|
3025
|
-
if (!(this.
|
|
3026
|
-
var message_1 = 'wPrimeJ must be > 0, got ' + this.
|
|
3098
|
+
if (!(this.r5a_1 > 0.0)) {
|
|
3099
|
+
var message_1 = 'wPrimeJ must be > 0, got ' + this.r5a_1;
|
|
3027
3100
|
throw IllegalArgumentException_init_$Create$(toString(message_1));
|
|
3028
3101
|
}
|
|
3029
|
-
var containsArg = this.
|
|
3102
|
+
var containsArg = this.s5a_1;
|
|
3030
3103
|
// Inline function 'kotlin.require' call
|
|
3031
3104
|
if (!(0.0 <= containsArg ? containsArg <= 1.0 : false)) {
|
|
3032
|
-
var message_2 = 'taperStartFraction must be in [0, 1], got ' + this.
|
|
3105
|
+
var message_2 = 'taperStartFraction must be in [0, 1], got ' + this.s5a_1;
|
|
3033
3106
|
throw IllegalArgumentException_init_$Create$(toString(message_2));
|
|
3034
3107
|
}
|
|
3035
|
-
this.
|
|
3036
|
-
this.
|
|
3037
|
-
this.
|
|
3038
|
-
this.
|
|
3108
|
+
this.t5a_1 = -1;
|
|
3109
|
+
this.u5a_1 = 0.0;
|
|
3110
|
+
this.v5a_1 = 0.0;
|
|
3111
|
+
this.w5a_1 = this.r5a_1;
|
|
3039
3112
|
}
|
|
3040
|
-
protoOf(PowerProviderCriticalPower).
|
|
3041
|
-
return this.
|
|
3113
|
+
protoOf(PowerProviderCriticalPower).x5a = function () {
|
|
3114
|
+
return this.w5a_1 / this.r5a_1;
|
|
3042
3115
|
};
|
|
3043
|
-
protoOf(PowerProviderCriticalPower).
|
|
3044
|
-
if (pointIndex < this.
|
|
3045
|
-
this.
|
|
3116
|
+
protoOf(PowerProviderCriticalPower).j59 = function (course, path, pointIndex) {
|
|
3117
|
+
if (pointIndex < this.t5a_1) {
|
|
3118
|
+
this.y5a();
|
|
3046
3119
|
}
|
|
3047
|
-
if (pointIndex > this.
|
|
3120
|
+
if (pointIndex > this.t5a_1) {
|
|
3048
3121
|
var elapsedS = path.x2c(pointIndex);
|
|
3049
|
-
var dtS = elapsedS - this.
|
|
3122
|
+
var dtS = elapsedS - this.u5a_1;
|
|
3050
3123
|
if (dtS > 0.0 && isFinite(dtS)) {
|
|
3051
|
-
this.
|
|
3124
|
+
this.w5a_1 = WPrimeBalanceComputer_instance.z5a(this.w5a_1, this.v5a_1, this.q5a_1, this.r5a_1, dtS);
|
|
3052
3125
|
}
|
|
3053
3126
|
if (isFinite(elapsedS))
|
|
3054
|
-
this.
|
|
3055
|
-
this.
|
|
3127
|
+
this.u5a_1 = elapsedS;
|
|
3128
|
+
this.t5a_1 = pointIndex;
|
|
3056
3129
|
}
|
|
3057
|
-
var rationed = this.
|
|
3058
|
-
this.
|
|
3130
|
+
var rationed = this.a5b(this.p5a_1);
|
|
3131
|
+
this.v5a_1 = rationed;
|
|
3059
3132
|
return rationed;
|
|
3060
3133
|
};
|
|
3061
|
-
protoOf(PowerProviderCriticalPower).
|
|
3062
|
-
if (pointIndex === this.
|
|
3063
|
-
this.
|
|
3134
|
+
protoOf(PowerProviderCriticalPower).e59 = function (pointIndex, powerW) {
|
|
3135
|
+
if (pointIndex === this.t5a_1 && isFinite(powerW))
|
|
3136
|
+
this.v5a_1 = powerW;
|
|
3064
3137
|
};
|
|
3065
|
-
protoOf(PowerProviderCriticalPower).
|
|
3066
|
-
if (target <= this.
|
|
3138
|
+
protoOf(PowerProviderCriticalPower).a5b = function (target) {
|
|
3139
|
+
if (target <= this.q5a_1)
|
|
3067
3140
|
return target;
|
|
3068
3141
|
var tmp;
|
|
3069
|
-
if (this.
|
|
3142
|
+
if (this.s5a_1 <= 0.0) {
|
|
3070
3143
|
tmp = 1.0;
|
|
3071
3144
|
} else {
|
|
3072
|
-
tmp = coerceIn(this.
|
|
3145
|
+
tmp = coerceIn(this.x5a() / this.s5a_1, 0.0, 1.0);
|
|
3073
3146
|
}
|
|
3074
3147
|
var shape = tmp;
|
|
3075
|
-
return this.
|
|
3148
|
+
return this.q5a_1 + (target - this.q5a_1) * shape;
|
|
3076
3149
|
};
|
|
3077
|
-
protoOf(PowerProviderCriticalPower).
|
|
3078
|
-
this.
|
|
3079
|
-
this.
|
|
3080
|
-
this.
|
|
3081
|
-
this.
|
|
3150
|
+
protoOf(PowerProviderCriticalPower).y5a = function () {
|
|
3151
|
+
this.t5a_1 = -1;
|
|
3152
|
+
this.u5a_1 = 0.0;
|
|
3153
|
+
this.v5a_1 = 0.0;
|
|
3154
|
+
this.w5a_1 = this.r5a_1;
|
|
3082
3155
|
};
|
|
3083
3156
|
function Companion_10() {
|
|
3084
|
-
this.
|
|
3085
|
-
this.
|
|
3157
|
+
this.b5b_1 = 0.006666666666666667;
|
|
3158
|
+
this.c5b_1 = 0.2;
|
|
3086
3159
|
}
|
|
3087
3160
|
var Companion_instance_13;
|
|
3088
3161
|
function Companion_getInstance_17() {
|
|
@@ -3095,75 +3168,75 @@
|
|
|
3095
3168
|
useHarmonics = useHarmonics === VOID ? false : useHarmonics;
|
|
3096
3169
|
random = random === VOID ? Default_getInstance() : random;
|
|
3097
3170
|
CyclistPowerProviderBase.call(this, useHarmonics, random);
|
|
3098
|
-
this.
|
|
3099
|
-
this.
|
|
3100
|
-
this.
|
|
3101
|
-
this.
|
|
3171
|
+
this.f5b_1 = powerW;
|
|
3172
|
+
this.g5b_1 = criticalPowerW;
|
|
3173
|
+
this.h5b_1 = declinePerKjPerKg;
|
|
3174
|
+
this.i5b_1 = maxDecline;
|
|
3102
3175
|
// Inline function 'kotlin.require' call
|
|
3103
|
-
if (!(this.
|
|
3104
|
-
var message = 'powerW must be > 0, got ' + this.
|
|
3176
|
+
if (!(this.f5b_1 > 0.0)) {
|
|
3177
|
+
var message = 'powerW must be > 0, got ' + this.f5b_1;
|
|
3105
3178
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
3106
3179
|
}
|
|
3107
3180
|
// Inline function 'kotlin.require' call
|
|
3108
|
-
if (!(this.
|
|
3109
|
-
var message_0 = 'criticalPowerW must be > 0, got ' + this.
|
|
3181
|
+
if (!(this.g5b_1 > 0.0)) {
|
|
3182
|
+
var message_0 = 'criticalPowerW must be > 0, got ' + this.g5b_1;
|
|
3110
3183
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
3111
3184
|
}
|
|
3112
3185
|
// Inline function 'kotlin.require' call
|
|
3113
|
-
if (!(this.
|
|
3114
|
-
var message_1 = 'declinePerKjPerKg must be >= 0, got ' + this.
|
|
3186
|
+
if (!(this.h5b_1 >= 0.0)) {
|
|
3187
|
+
var message_1 = 'declinePerKjPerKg must be >= 0, got ' + this.h5b_1;
|
|
3115
3188
|
throw IllegalArgumentException_init_$Create$(toString(message_1));
|
|
3116
3189
|
}
|
|
3117
|
-
var containsArg = this.
|
|
3190
|
+
var containsArg = this.i5b_1;
|
|
3118
3191
|
// Inline function 'kotlin.require' call
|
|
3119
3192
|
if (!(0.0 <= containsArg ? containsArg <= 1.0 : false)) {
|
|
3120
|
-
var message_2 = 'maxDecline must be in [0, 1], got ' + this.
|
|
3193
|
+
var message_2 = 'maxDecline must be in [0, 1], got ' + this.i5b_1;
|
|
3121
3194
|
throw IllegalArgumentException_init_$Create$(toString(message_2));
|
|
3122
3195
|
}
|
|
3123
|
-
this.
|
|
3124
|
-
this.
|
|
3125
|
-
this.
|
|
3126
|
-
this.
|
|
3127
|
-
this.
|
|
3196
|
+
this.j5b_1 = -1;
|
|
3197
|
+
this.k5b_1 = 0.0;
|
|
3198
|
+
this.l5b_1 = 0.0;
|
|
3199
|
+
this.m5b_1 = 0.0;
|
|
3200
|
+
this.n5b_1 = 80.0;
|
|
3128
3201
|
}
|
|
3129
|
-
protoOf(PowerProviderDurability).
|
|
3130
|
-
var tmp0 = this.
|
|
3202
|
+
protoOf(PowerProviderDurability).o5b = function () {
|
|
3203
|
+
var tmp0 = this.i5b_1;
|
|
3131
3204
|
// Inline function 'kotlin.math.min' call
|
|
3132
|
-
var b = this.
|
|
3205
|
+
var b = this.h5b_1 * this.m5b_1 / 1000.0 / this.n5b_1;
|
|
3133
3206
|
return Math.min(tmp0, b);
|
|
3134
3207
|
};
|
|
3135
|
-
protoOf(PowerProviderDurability).
|
|
3136
|
-
this.
|
|
3137
|
-
if (pointIndex < this.
|
|
3138
|
-
this.
|
|
3208
|
+
protoOf(PowerProviderDurability).j59 = function (course, path, pointIndex) {
|
|
3209
|
+
this.n5b_1 = course.e4z().i4z_1;
|
|
3210
|
+
if (pointIndex < this.j5b_1) {
|
|
3211
|
+
this.y5a();
|
|
3139
3212
|
}
|
|
3140
|
-
if (pointIndex > this.
|
|
3213
|
+
if (pointIndex > this.j5b_1) {
|
|
3141
3214
|
var elapsedS = path.x2c(pointIndex);
|
|
3142
|
-
var dtS = elapsedS - this.
|
|
3215
|
+
var dtS = elapsedS - this.k5b_1;
|
|
3143
3216
|
if (dtS > 0.0 && isFinite(dtS)) {
|
|
3144
3217
|
var tmp = this;
|
|
3145
|
-
var tmp_0 = this.
|
|
3218
|
+
var tmp_0 = this.m5b_1;
|
|
3146
3219
|
// Inline function 'kotlin.math.max' call
|
|
3147
|
-
var b = this.
|
|
3148
|
-
tmp.
|
|
3220
|
+
var b = this.l5b_1 - this.g5b_1;
|
|
3221
|
+
tmp.m5b_1 = tmp_0 + Math.max(0.0, b) * dtS;
|
|
3149
3222
|
}
|
|
3150
3223
|
if (isFinite(elapsedS))
|
|
3151
|
-
this.
|
|
3152
|
-
this.
|
|
3224
|
+
this.k5b_1 = elapsedS;
|
|
3225
|
+
this.j5b_1 = pointIndex;
|
|
3153
3226
|
}
|
|
3154
|
-
var faded = this.
|
|
3155
|
-
this.
|
|
3227
|
+
var faded = this.f5b_1 * (1.0 - this.o5b());
|
|
3228
|
+
this.l5b_1 = faded;
|
|
3156
3229
|
return faded;
|
|
3157
3230
|
};
|
|
3158
|
-
protoOf(PowerProviderDurability).
|
|
3159
|
-
this.
|
|
3160
|
-
this.
|
|
3161
|
-
this.
|
|
3162
|
-
this.
|
|
3231
|
+
protoOf(PowerProviderDurability).y5a = function () {
|
|
3232
|
+
this.j5b_1 = -1;
|
|
3233
|
+
this.k5b_1 = 0.0;
|
|
3234
|
+
this.l5b_1 = 0.0;
|
|
3235
|
+
this.m5b_1 = 0.0;
|
|
3163
3236
|
};
|
|
3164
3237
|
function PowerProviderFromData() {
|
|
3165
3238
|
}
|
|
3166
|
-
protoOf(PowerProviderFromData).
|
|
3239
|
+
protoOf(PowerProviderFromData).a59 = function (course, path, pointIndex) {
|
|
3167
3240
|
return path.u23(pointIndex);
|
|
3168
3241
|
};
|
|
3169
3242
|
var PowerProviderFromData_instance;
|
|
@@ -3172,71 +3245,71 @@
|
|
|
3172
3245
|
}
|
|
3173
3246
|
function PowerProviderSlewLimited(delegate, maxSlewWPerS) {
|
|
3174
3247
|
maxSlewWPerS = maxSlewWPerS === VOID ? 50.0 : maxSlewWPerS;
|
|
3175
|
-
this.
|
|
3176
|
-
this.
|
|
3248
|
+
this.p5b_1 = delegate;
|
|
3249
|
+
this.q5b_1 = maxSlewWPerS;
|
|
3177
3250
|
// Inline function 'kotlin.require' call
|
|
3178
|
-
if (!(this.
|
|
3179
|
-
var message = 'maxSlewWPerS must be > 0, got ' + this.
|
|
3251
|
+
if (!(this.q5b_1 > 0.0)) {
|
|
3252
|
+
var message = 'maxSlewWPerS must be > 0, got ' + this.q5b_1;
|
|
3180
3253
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
3181
3254
|
}
|
|
3182
|
-
this.
|
|
3183
|
-
this.
|
|
3184
|
-
this.
|
|
3185
|
-
this.
|
|
3255
|
+
this.r5b_1 = -1;
|
|
3256
|
+
this.s5b_1 = 0.0;
|
|
3257
|
+
this.t5b_1 = 0.0;
|
|
3258
|
+
this.u5b_1 = 0.0;
|
|
3186
3259
|
}
|
|
3187
|
-
protoOf(PowerProviderSlewLimited).
|
|
3188
|
-
var target = this.
|
|
3189
|
-
if (pointIndex < this.
|
|
3190
|
-
this.
|
|
3260
|
+
protoOf(PowerProviderSlewLimited).a59 = function (course, path, pointIndex) {
|
|
3261
|
+
var target = this.p5b_1.a59(course, path, pointIndex);
|
|
3262
|
+
if (pointIndex < this.r5b_1) {
|
|
3263
|
+
this.y5a();
|
|
3191
3264
|
}
|
|
3192
|
-
if (pointIndex === this.
|
|
3193
|
-
this.
|
|
3194
|
-
return this.
|
|
3265
|
+
if (pointIndex === this.r5b_1) {
|
|
3266
|
+
this.p5b_1.e59(pointIndex, this.u5b_1);
|
|
3267
|
+
return this.u5b_1;
|
|
3195
3268
|
}
|
|
3196
3269
|
var elapsedS = path.x2c(pointIndex);
|
|
3197
|
-
var dtS = elapsedS - this.
|
|
3270
|
+
var dtS = elapsedS - this.s5b_1;
|
|
3198
3271
|
var tmp;
|
|
3199
3272
|
if (dtS > 0.0 && isFinite(dtS)) {
|
|
3200
|
-
var budget = this.
|
|
3201
|
-
var delta = target - this.
|
|
3273
|
+
var budget = this.q5b_1 * dtS;
|
|
3274
|
+
var delta = target - this.t5b_1;
|
|
3202
3275
|
var tmp_0;
|
|
3203
3276
|
// Inline function 'kotlin.math.abs' call
|
|
3204
3277
|
if (Math.abs(delta) <= budget) {
|
|
3205
3278
|
tmp_0 = target;
|
|
3206
3279
|
} else {
|
|
3207
|
-
tmp_0 = this.
|
|
3280
|
+
tmp_0 = this.t5b_1 + (delta > 0 ? budget : -budget);
|
|
3208
3281
|
}
|
|
3209
3282
|
tmp = tmp_0;
|
|
3210
3283
|
} else {
|
|
3211
|
-
tmp = this.
|
|
3284
|
+
tmp = this.t5b_1;
|
|
3212
3285
|
}
|
|
3213
3286
|
var limited = tmp;
|
|
3214
3287
|
if (isFinite(elapsedS))
|
|
3215
|
-
this.
|
|
3216
|
-
this.
|
|
3217
|
-
this.
|
|
3218
|
-
this.
|
|
3219
|
-
this.
|
|
3288
|
+
this.s5b_1 = elapsedS;
|
|
3289
|
+
this.r5b_1 = pointIndex;
|
|
3290
|
+
this.t5b_1 = limited;
|
|
3291
|
+
this.u5b_1 = limited;
|
|
3292
|
+
this.p5b_1.e59(pointIndex, limited);
|
|
3220
3293
|
return limited;
|
|
3221
3294
|
};
|
|
3222
|
-
protoOf(PowerProviderSlewLimited).
|
|
3223
|
-
if (pointIndex === this.
|
|
3224
|
-
this.
|
|
3225
|
-
this.
|
|
3295
|
+
protoOf(PowerProviderSlewLimited).e59 = function (pointIndex, powerW) {
|
|
3296
|
+
if (pointIndex === this.r5b_1 && isFinite(powerW))
|
|
3297
|
+
this.t5b_1 = powerW;
|
|
3298
|
+
this.p5b_1.e59(pointIndex, powerW);
|
|
3226
3299
|
};
|
|
3227
|
-
protoOf(PowerProviderSlewLimited).
|
|
3228
|
-
this.
|
|
3229
|
-
this.
|
|
3230
|
-
this.
|
|
3231
|
-
this.
|
|
3300
|
+
protoOf(PowerProviderSlewLimited).y5a = function () {
|
|
3301
|
+
this.r5b_1 = -1;
|
|
3302
|
+
this.s5b_1 = 0.0;
|
|
3303
|
+
this.t5b_1 = 0.0;
|
|
3304
|
+
this.u5b_1 = 0.0;
|
|
3232
3305
|
};
|
|
3233
3306
|
function Companion_11() {
|
|
3234
|
-
this.
|
|
3235
|
-
this.
|
|
3236
|
-
this.
|
|
3237
|
-
this.
|
|
3238
|
-
this.
|
|
3239
|
-
this.
|
|
3307
|
+
this.v5b_1 = 3.0;
|
|
3308
|
+
this.w5b_1 = 0.02;
|
|
3309
|
+
this.x5b_1 = 0.5;
|
|
3310
|
+
this.y5b_1 = 1.3;
|
|
3311
|
+
this.z5b_1 = 300.0;
|
|
3312
|
+
this.a5c_1 = 600.0;
|
|
3240
3313
|
}
|
|
3241
3314
|
var Companion_instance_14;
|
|
3242
3315
|
function Companion_getInstance_18() {
|
|
@@ -3249,88 +3322,88 @@
|
|
|
3249
3322
|
maxMultiplier = maxMultiplier === VOID ? 1.3 : maxMultiplier;
|
|
3250
3323
|
rampDistanceM = rampDistanceM === VOID ? 300.0 : rampDistanceM;
|
|
3251
3324
|
energyBudgetSeconds = energyBudgetSeconds === VOID ? 600.0 : energyBudgetSeconds;
|
|
3252
|
-
this.
|
|
3253
|
-
this.
|
|
3254
|
-
this.
|
|
3255
|
-
this.
|
|
3256
|
-
this.
|
|
3257
|
-
this.
|
|
3258
|
-
this.
|
|
3325
|
+
this.b5c_1 = delegate;
|
|
3326
|
+
this.c5c_1 = gradientGain;
|
|
3327
|
+
this.d5c_1 = headwindGainPerMS;
|
|
3328
|
+
this.e5c_1 = minMultiplier;
|
|
3329
|
+
this.f5c_1 = maxMultiplier;
|
|
3330
|
+
this.g5c_1 = rampDistanceM;
|
|
3331
|
+
this.h5c_1 = energyBudgetSeconds;
|
|
3259
3332
|
// Inline function 'kotlin.require' call
|
|
3260
|
-
if (!(this.
|
|
3261
|
-
var message = 'gradientGain must be >= 0, got ' + this.
|
|
3333
|
+
if (!(this.c5c_1 >= 0.0)) {
|
|
3334
|
+
var message = 'gradientGain must be >= 0, got ' + this.c5c_1;
|
|
3262
3335
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
3263
3336
|
}
|
|
3264
3337
|
// Inline function 'kotlin.require' call
|
|
3265
|
-
if (!(this.
|
|
3266
|
-
var message_0 = 'headwindGainPerMS must be >= 0, got ' + this.
|
|
3338
|
+
if (!(this.d5c_1 >= 0.0)) {
|
|
3339
|
+
var message_0 = 'headwindGainPerMS must be >= 0, got ' + this.d5c_1;
|
|
3267
3340
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
3268
3341
|
}
|
|
3269
3342
|
// Inline function 'kotlin.require' call
|
|
3270
|
-
if (!(this.
|
|
3271
|
-
var message_1 = 'minMultiplier must be > 0, got ' + this.
|
|
3343
|
+
if (!(this.e5c_1 > 0.0)) {
|
|
3344
|
+
var message_1 = 'minMultiplier must be > 0, got ' + this.e5c_1;
|
|
3272
3345
|
throw IllegalArgumentException_init_$Create$(toString(message_1));
|
|
3273
3346
|
}
|
|
3274
3347
|
// Inline function 'kotlin.require' call
|
|
3275
|
-
if (!(this.
|
|
3276
|
-
var message_2 = 'maxMultiplier (' + this.
|
|
3348
|
+
if (!(this.f5c_1 >= this.e5c_1)) {
|
|
3349
|
+
var message_2 = 'maxMultiplier (' + this.f5c_1 + ') must be >= minMultiplier (' + this.e5c_1 + ')';
|
|
3277
3350
|
throw IllegalArgumentException_init_$Create$(toString(message_2));
|
|
3278
3351
|
}
|
|
3279
3352
|
// Inline function 'kotlin.require' call
|
|
3280
|
-
if (!(this.
|
|
3281
|
-
var message_3 = 'rampDistanceM must be > 0, got ' + this.
|
|
3353
|
+
if (!(this.g5c_1 > 0.0)) {
|
|
3354
|
+
var message_3 = 'rampDistanceM must be > 0, got ' + this.g5c_1;
|
|
3282
3355
|
throw IllegalArgumentException_init_$Create$(toString(message_3));
|
|
3283
3356
|
}
|
|
3284
3357
|
// Inline function 'kotlin.require' call
|
|
3285
|
-
if (!(this.
|
|
3286
|
-
var message_4 = 'energyBudgetSeconds must be > 0, got ' + this.
|
|
3358
|
+
if (!(this.h5c_1 > 0.0)) {
|
|
3359
|
+
var message_4 = 'energyBudgetSeconds must be > 0, got ' + this.h5c_1;
|
|
3287
3360
|
throw IllegalArgumentException_init_$Create$(toString(message_4));
|
|
3288
3361
|
}
|
|
3289
|
-
this.
|
|
3290
|
-
this.
|
|
3291
|
-
this.
|
|
3292
|
-
this.
|
|
3293
|
-
this.
|
|
3294
|
-
this.
|
|
3295
|
-
this.
|
|
3296
|
-
}
|
|
3297
|
-
protoOf(PowerProviderTerrainPacing).
|
|
3298
|
-
var target = this.
|
|
3299
|
-
if (pointIndex < this.
|
|
3300
|
-
this.
|
|
3301
|
-
}
|
|
3302
|
-
if (pointIndex > this.
|
|
3362
|
+
this.i5c_1 = -1;
|
|
3363
|
+
this.j5c_1 = 0.0;
|
|
3364
|
+
this.k5c_1 = 0.0;
|
|
3365
|
+
this.l5c_1 = 0.0;
|
|
3366
|
+
this.m5c_1 = 0.0;
|
|
3367
|
+
this.n5c_1 = 1.0;
|
|
3368
|
+
this.o5c_1 = 0.0;
|
|
3369
|
+
}
|
|
3370
|
+
protoOf(PowerProviderTerrainPacing).a59 = function (course, path, pointIndex) {
|
|
3371
|
+
var target = this.b5c_1.a59(course, path, pointIndex);
|
|
3372
|
+
if (pointIndex < this.i5c_1) {
|
|
3373
|
+
this.y5a();
|
|
3374
|
+
}
|
|
3375
|
+
if (pointIndex > this.i5c_1) {
|
|
3303
3376
|
var distanceM = path.p2b(pointIndex);
|
|
3304
|
-
var dx = distanceM - this.
|
|
3305
|
-
this.
|
|
3377
|
+
var dx = distanceM - this.j5c_1;
|
|
3378
|
+
this.n5c_1 = this.q5c(this.n5c_1, this.p5c(path, pointIndex), dx);
|
|
3306
3379
|
if (isFinite(distanceM))
|
|
3307
|
-
this.
|
|
3380
|
+
this.j5c_1 = distanceM;
|
|
3308
3381
|
var elapsedS = path.x2c(pointIndex);
|
|
3309
|
-
var dtS = elapsedS - this.
|
|
3382
|
+
var dtS = elapsedS - this.k5c_1;
|
|
3310
3383
|
if (dtS > 0.0 && isFinite(dtS)) {
|
|
3311
|
-
this.
|
|
3384
|
+
this.o5c_1 = this.o5c_1 + (this.l5c_1 - this.m5c_1) * dtS;
|
|
3312
3385
|
}
|
|
3313
3386
|
if (isFinite(elapsedS))
|
|
3314
|
-
this.
|
|
3315
|
-
this.
|
|
3387
|
+
this.k5c_1 = elapsedS;
|
|
3388
|
+
this.i5c_1 = pointIndex;
|
|
3316
3389
|
}
|
|
3317
|
-
var ratio = coerceIn(this.
|
|
3390
|
+
var ratio = coerceIn(this.n5c_1 * this.r5c(target), this.e5c_1, this.f5c_1);
|
|
3318
3391
|
var delivered = target * ratio;
|
|
3319
|
-
this.
|
|
3320
|
-
this.
|
|
3321
|
-
this.
|
|
3392
|
+
this.m5c_1 = target;
|
|
3393
|
+
this.l5c_1 = delivered;
|
|
3394
|
+
this.b5c_1.e59(pointIndex, delivered);
|
|
3322
3395
|
return delivered;
|
|
3323
3396
|
};
|
|
3324
|
-
protoOf(PowerProviderTerrainPacing).
|
|
3325
|
-
return this.
|
|
3397
|
+
protoOf(PowerProviderTerrainPacing).e59 = function (pointIndex, powerW) {
|
|
3398
|
+
return this.b5c_1.e59(pointIndex, powerW);
|
|
3326
3399
|
};
|
|
3327
|
-
protoOf(PowerProviderTerrainPacing).
|
|
3400
|
+
protoOf(PowerProviderTerrainPacing).r5c = function (target) {
|
|
3328
3401
|
if (target <= 0.0)
|
|
3329
3402
|
return 1.0;
|
|
3330
|
-
var budgetJ = target * this.
|
|
3331
|
-
return coerceIn(1.0 - this.
|
|
3403
|
+
var budgetJ = target * this.h5c_1;
|
|
3404
|
+
return coerceIn(1.0 - this.o5c_1 / budgetJ, this.e5c_1, this.f5c_1);
|
|
3332
3405
|
};
|
|
3333
|
-
protoOf(PowerProviderTerrainPacing).
|
|
3406
|
+
protoOf(PowerProviderTerrainPacing).p5c = function (path, pointIndex) {
|
|
3334
3407
|
// Inline function 'kotlin.let' call
|
|
3335
3408
|
var it = path.d2d(pointIndex);
|
|
3336
3409
|
var grade = isFinite(it) ? it : 0.0;
|
|
@@ -3342,31 +3415,31 @@
|
|
|
3342
3415
|
var alpha = isFinite(it_1) ? it_1 : 0.0;
|
|
3343
3416
|
// Inline function 'kotlin.math.cos' call
|
|
3344
3417
|
var headwind = windSpeed * Math.cos(alpha);
|
|
3345
|
-
var raw = 1.0 + this.
|
|
3346
|
-
return coerceIn(raw, this.
|
|
3418
|
+
var raw = 1.0 + this.c5c_1 * grade + this.d5c_1 * headwind;
|
|
3419
|
+
return coerceIn(raw, this.e5c_1, this.f5c_1);
|
|
3347
3420
|
};
|
|
3348
|
-
protoOf(PowerProviderTerrainPacing).
|
|
3421
|
+
protoOf(PowerProviderTerrainPacing).q5c = function (current, raw, dx) {
|
|
3349
3422
|
if (raw <= current)
|
|
3350
3423
|
return raw;
|
|
3351
3424
|
if (!isFinite(dx) || dx <= 0.0)
|
|
3352
3425
|
return current;
|
|
3353
3426
|
// Inline function 'kotlin.math.exp' call
|
|
3354
|
-
var x = -dx / this.
|
|
3427
|
+
var x = -dx / this.g5c_1;
|
|
3355
3428
|
var blend = 1.0 - Math.exp(x);
|
|
3356
3429
|
return current + (raw - current) * blend;
|
|
3357
3430
|
};
|
|
3358
|
-
protoOf(PowerProviderTerrainPacing).
|
|
3359
|
-
this.
|
|
3360
|
-
this.
|
|
3361
|
-
this.
|
|
3362
|
-
this.
|
|
3363
|
-
this.
|
|
3364
|
-
this.
|
|
3365
|
-
this.
|
|
3431
|
+
protoOf(PowerProviderTerrainPacing).y5a = function () {
|
|
3432
|
+
this.i5c_1 = -1;
|
|
3433
|
+
this.j5c_1 = 0.0;
|
|
3434
|
+
this.k5c_1 = 0.0;
|
|
3435
|
+
this.l5c_1 = 0.0;
|
|
3436
|
+
this.m5c_1 = 0.0;
|
|
3437
|
+
this.n5c_1 = 1.0;
|
|
3438
|
+
this.o5c_1 = 0.0;
|
|
3366
3439
|
};
|
|
3367
3440
|
function RhoProviderDefault() {
|
|
3368
3441
|
}
|
|
3369
|
-
protoOf(RhoProviderDefault).
|
|
3442
|
+
protoOf(RhoProviderDefault).d59 = function (course, path, pointIndex) {
|
|
3370
3443
|
return 1.225;
|
|
3371
3444
|
};
|
|
3372
3445
|
var RhoProviderDefault_instance;
|
|
@@ -3374,13 +3447,13 @@
|
|
|
3374
3447
|
return RhoProviderDefault_instance;
|
|
3375
3448
|
}
|
|
3376
3449
|
function RhoProviderEstimate() {
|
|
3377
|
-
this.
|
|
3378
|
-
this.
|
|
3379
|
-
this.
|
|
3380
|
-
this.
|
|
3381
|
-
this.
|
|
3450
|
+
this.s5c_1 = 101325.0;
|
|
3451
|
+
this.t5c_1 = 288.15;
|
|
3452
|
+
this.u5c_1 = 9.80665;
|
|
3453
|
+
this.v5c_1 = 0.0065;
|
|
3454
|
+
this.w5c_1 = 287.05;
|
|
3382
3455
|
}
|
|
3383
|
-
protoOf(RhoProviderEstimate).
|
|
3456
|
+
protoOf(RhoProviderEstimate).d59 = function (course, path, pointIndex) {
|
|
3384
3457
|
var providedTemp = path.o26(pointIndex, PointField_TEMPERATURE_getInstance());
|
|
3385
3458
|
var temperatureC = isNaN_0(providedTemp) ? 15.0 : providedTemp;
|
|
3386
3459
|
var providedElevation = path.q23(pointIndex);
|
|
@@ -3398,7 +3471,7 @@
|
|
|
3398
3471
|
}
|
|
3399
3472
|
function RollingResistancePowerProvider() {
|
|
3400
3473
|
}
|
|
3401
|
-
protoOf(RollingResistancePowerProvider).
|
|
3474
|
+
protoOf(RollingResistancePowerProvider).a59 = function (course, path, pointIndex) {
|
|
3402
3475
|
var m = course.e4z().i4z_1;
|
|
3403
3476
|
var crr = course.f4z().k4y_1;
|
|
3404
3477
|
var grade = path.d2d(pointIndex);
|
|
@@ -3424,7 +3497,7 @@
|
|
|
3424
3497
|
}
|
|
3425
3498
|
function VirtualizeService() {
|
|
3426
3499
|
}
|
|
3427
|
-
protoOf(VirtualizeService).
|
|
3500
|
+
protoOf(VirtualizeService).x54 = function (course) {
|
|
3428
3501
|
var input = course.d4z();
|
|
3429
3502
|
var n = input.l23_1;
|
|
3430
3503
|
if (n === 0)
|
|
@@ -3435,7 +3508,7 @@
|
|
|
3435
3508
|
singleton.f25();
|
|
3436
3509
|
return singleton;
|
|
3437
3510
|
}
|
|
3438
|
-
var mEq = PowerComputer_instance.
|
|
3511
|
+
var mEq = PowerComputer_instance.i5a(course);
|
|
3439
3512
|
var out = new Path(n);
|
|
3440
3513
|
copyAllFields(this, input, 0, out, 0);
|
|
3441
3514
|
var speed = 0.5555555555555556;
|
|
@@ -3459,8 +3532,8 @@
|
|
|
3459
3532
|
i = i + 1 | 0;
|
|
3460
3533
|
continue $l$loop;
|
|
3461
3534
|
}
|
|
3462
|
-
var pSum = PowerComputer_instance.
|
|
3463
|
-
var dt = PowerComputer_instance.
|
|
3535
|
+
var pSum = PowerComputer_instance.o59(course, out, i - 1 | 0, true);
|
|
3536
|
+
var dt = PowerComputer_instance.f5a(pSum, mEq, speed, dx);
|
|
3464
3537
|
var speedNew = 2.0 * dx / dt - speed;
|
|
3465
3538
|
copyAllFields(this, input, i, out, i);
|
|
3466
3539
|
var speedMax = input.z2d(i);
|
|
@@ -3485,7 +3558,7 @@
|
|
|
3485
3558
|
do {
|
|
3486
3559
|
var j = inductionVariable;
|
|
3487
3560
|
inductionVariable = inductionVariable + 1 | 0;
|
|
3488
|
-
PowerComputer_instance.
|
|
3561
|
+
PowerComputer_instance.g5a(course, out, mEq, j);
|
|
3489
3562
|
}
|
|
3490
3563
|
while (!(j === last));
|
|
3491
3564
|
out.f25();
|
|
@@ -3497,7 +3570,7 @@
|
|
|
3497
3570
|
}
|
|
3498
3571
|
function WheelBearingsPowerProvider() {
|
|
3499
3572
|
}
|
|
3500
|
-
protoOf(WheelBearingsPowerProvider).
|
|
3573
|
+
protoOf(WheelBearingsPowerProvider).a59 = function (course, path, pointIndex) {
|
|
3501
3574
|
var speed = path.x2d(pointIndex);
|
|
3502
3575
|
var p = -speed * (91.0 + 8.7 * speed) / 1000.0;
|
|
3503
3576
|
path.o2d(pointIndex, p);
|
|
@@ -3509,7 +3582,7 @@
|
|
|
3509
3582
|
}
|
|
3510
3583
|
function Companion_12() {
|
|
3511
3584
|
Companion_instance_15 = this;
|
|
3512
|
-
this.
|
|
3585
|
+
this.x5c_1 = new Wind(0.0, 0.0);
|
|
3513
3586
|
}
|
|
3514
3587
|
var Companion_instance_15;
|
|
3515
3588
|
function Companion_getInstance_19() {
|
|
@@ -3519,15 +3592,15 @@
|
|
|
3519
3592
|
}
|
|
3520
3593
|
function Wind(speedMS, directionRad) {
|
|
3521
3594
|
Companion_getInstance_19();
|
|
3522
|
-
this.
|
|
3523
|
-
this.
|
|
3595
|
+
this.x58_1 = speedMS;
|
|
3596
|
+
this.y58_1 = directionRad;
|
|
3524
3597
|
}
|
|
3525
3598
|
protoOf(Wind).toString = function () {
|
|
3526
|
-
return 'Wind(speedMS=' + this.
|
|
3599
|
+
return 'Wind(speedMS=' + this.x58_1 + ', directionRad=' + this.y58_1 + ')';
|
|
3527
3600
|
};
|
|
3528
3601
|
protoOf(Wind).hashCode = function () {
|
|
3529
|
-
var result = getNumberHashCode(this.
|
|
3530
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3602
|
+
var result = getNumberHashCode(this.x58_1);
|
|
3603
|
+
result = imul(result, 31) + getNumberHashCode(this.y58_1) | 0;
|
|
3531
3604
|
return result;
|
|
3532
3605
|
};
|
|
3533
3606
|
protoOf(Wind).equals = function (other) {
|
|
@@ -3535,34 +3608,34 @@
|
|
|
3535
3608
|
return true;
|
|
3536
3609
|
if (!(other instanceof Wind))
|
|
3537
3610
|
return false;
|
|
3538
|
-
if (!equals(this.
|
|
3611
|
+
if (!equals(this.x58_1, other.x58_1))
|
|
3539
3612
|
return false;
|
|
3540
|
-
if (!equals(this.
|
|
3613
|
+
if (!equals(this.y58_1, other.y58_1))
|
|
3541
3614
|
return false;
|
|
3542
3615
|
return true;
|
|
3543
3616
|
};
|
|
3544
3617
|
function WindProviderNone() {
|
|
3545
3618
|
}
|
|
3546
|
-
protoOf(WindProviderNone).
|
|
3547
|
-
return Companion_getInstance_19().
|
|
3619
|
+
protoOf(WindProviderNone).c59 = function (course, path, pointIndex) {
|
|
3620
|
+
return Companion_getInstance_19().x5c_1;
|
|
3548
3621
|
};
|
|
3549
3622
|
var WindProviderNone_instance;
|
|
3550
3623
|
function WindProviderNone_getInstance() {
|
|
3551
3624
|
return WindProviderNone_instance;
|
|
3552
3625
|
}
|
|
3553
3626
|
function WindProviderConstant(wind) {
|
|
3554
|
-
this.
|
|
3627
|
+
this.y5c_1 = wind;
|
|
3555
3628
|
}
|
|
3556
|
-
protoOf(WindProviderConstant).
|
|
3557
|
-
return this.
|
|
3629
|
+
protoOf(WindProviderConstant).c59 = function (course, path, pointIndex) {
|
|
3630
|
+
return this.y5c_1;
|
|
3558
3631
|
};
|
|
3559
3632
|
function WPrimeBalanceComputer() {
|
|
3560
3633
|
}
|
|
3561
|
-
protoOf(WPrimeBalanceComputer).
|
|
3634
|
+
protoOf(WPrimeBalanceComputer).y54 = function (path, options) {
|
|
3562
3635
|
if (path.l23_1 === 0)
|
|
3563
3636
|
return Unit_instance;
|
|
3564
|
-
var cp = options.
|
|
3565
|
-
var wPrime = options.
|
|
3637
|
+
var cp = options.j52_1;
|
|
3638
|
+
var wPrime = options.k52_1;
|
|
3566
3639
|
var balance = wPrime;
|
|
3567
3640
|
path.g2e(0, balance);
|
|
3568
3641
|
var inductionVariable = 1;
|
|
@@ -3574,13 +3647,13 @@
|
|
|
3574
3647
|
var dtSeconds = (path.n23(i) - path.n23(i - 1 | 0)) / 1000.0;
|
|
3575
3648
|
var power = path.v23(i);
|
|
3576
3649
|
if (isFinite(dtSeconds) && dtSeconds > 0.0 && isFinite(power)) {
|
|
3577
|
-
balance = this.
|
|
3650
|
+
balance = this.z5a(balance, power, cp, wPrime, dtSeconds);
|
|
3578
3651
|
}
|
|
3579
3652
|
path.g2e(i, balance);
|
|
3580
3653
|
}
|
|
3581
3654
|
while (inductionVariable < last);
|
|
3582
3655
|
};
|
|
3583
|
-
protoOf(WPrimeBalanceComputer).
|
|
3656
|
+
protoOf(WPrimeBalanceComputer).z5a = function (balance, power, cp, wPrime, dtSeconds) {
|
|
3584
3657
|
var tmp;
|
|
3585
3658
|
if (power >= cp) {
|
|
3586
3659
|
tmp = balance - (power - cp) * dtSeconds;
|
|
@@ -3602,7 +3675,7 @@
|
|
|
3602
3675
|
}
|
|
3603
3676
|
function BandedLdl() {
|
|
3604
3677
|
}
|
|
3605
|
-
protoOf(BandedLdl).
|
|
3678
|
+
protoOf(BandedLdl).z5c = function (a0, a1, a2) {
|
|
3606
3679
|
var n = a0.length;
|
|
3607
3680
|
if (n === 0)
|
|
3608
3681
|
return true;
|
|
@@ -3658,7 +3731,7 @@
|
|
|
3658
3731
|
while (inductionVariable_0 < n);
|
|
3659
3732
|
return true;
|
|
3660
3733
|
};
|
|
3661
|
-
protoOf(BandedLdl).
|
|
3734
|
+
protoOf(BandedLdl).a5d = function (d, l1, l2, b) {
|
|
3662
3735
|
var n = d.length;
|
|
3663
3736
|
if (n === 0)
|
|
3664
3737
|
return Unit_instance;
|
|
@@ -3697,7 +3770,7 @@
|
|
|
3697
3770
|
}
|
|
3698
3771
|
while (0 <= inductionVariable_1);
|
|
3699
3772
|
};
|
|
3700
|
-
protoOf(BandedLdl).
|
|
3773
|
+
protoOf(BandedLdl).b5d = function (a0, a1, a2, x, y) {
|
|
3701
3774
|
var n = a0.length;
|
|
3702
3775
|
var inductionVariable = 0;
|
|
3703
3776
|
if (inductionVariable < n)
|
|
@@ -3722,29 +3795,29 @@
|
|
|
3722
3795
|
return BandedLdl_instance;
|
|
3723
3796
|
}
|
|
3724
3797
|
function CornerSpan(fromIndex, untilIndex, apexIndex, kind, turnRad, direction, radiusQ20M, radiusMinM, lengthM) {
|
|
3725
|
-
this.
|
|
3726
|
-
this.
|
|
3727
|
-
this.
|
|
3728
|
-
this.
|
|
3729
|
-
this.
|
|
3730
|
-
this.
|
|
3731
|
-
this.
|
|
3732
|
-
this.
|
|
3733
|
-
this.
|
|
3798
|
+
this.c5d_1 = fromIndex;
|
|
3799
|
+
this.d5d_1 = untilIndex;
|
|
3800
|
+
this.e5d_1 = apexIndex;
|
|
3801
|
+
this.f5d_1 = kind;
|
|
3802
|
+
this.g5d_1 = turnRad;
|
|
3803
|
+
this.h5d_1 = direction;
|
|
3804
|
+
this.i5d_1 = radiusQ20M;
|
|
3805
|
+
this.j5d_1 = radiusMinM;
|
|
3806
|
+
this.k5d_1 = lengthM;
|
|
3734
3807
|
}
|
|
3735
3808
|
protoOf(CornerSpan).toString = function () {
|
|
3736
|
-
return 'CornerSpan(fromIndex=' + this.
|
|
3809
|
+
return 'CornerSpan(fromIndex=' + this.c5d_1 + ', untilIndex=' + this.d5d_1 + ', apexIndex=' + this.e5d_1 + ', kind=' + this.f5d_1.toString() + ', turnRad=' + this.g5d_1 + ', direction=' + this.h5d_1 + ', radiusQ20M=' + this.i5d_1 + ', radiusMinM=' + this.j5d_1 + ', lengthM=' + this.k5d_1 + ')';
|
|
3737
3810
|
};
|
|
3738
3811
|
protoOf(CornerSpan).hashCode = function () {
|
|
3739
|
-
var result = this.
|
|
3740
|
-
result = imul(result, 31) + this.
|
|
3741
|
-
result = imul(result, 31) + this.
|
|
3742
|
-
result = imul(result, 31) + this.
|
|
3743
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3744
|
-
result = imul(result, 31) + this.
|
|
3745
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3746
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3747
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3812
|
+
var result = this.c5d_1;
|
|
3813
|
+
result = imul(result, 31) + this.d5d_1 | 0;
|
|
3814
|
+
result = imul(result, 31) + this.e5d_1 | 0;
|
|
3815
|
+
result = imul(result, 31) + this.f5d_1.hashCode() | 0;
|
|
3816
|
+
result = imul(result, 31) + getNumberHashCode(this.g5d_1) | 0;
|
|
3817
|
+
result = imul(result, 31) + this.h5d_1 | 0;
|
|
3818
|
+
result = imul(result, 31) + getNumberHashCode(this.i5d_1) | 0;
|
|
3819
|
+
result = imul(result, 31) + getNumberHashCode(this.j5d_1) | 0;
|
|
3820
|
+
result = imul(result, 31) + getNumberHashCode(this.k5d_1) | 0;
|
|
3748
3821
|
return result;
|
|
3749
3822
|
};
|
|
3750
3823
|
protoOf(CornerSpan).equals = function (other) {
|
|
@@ -3752,23 +3825,23 @@
|
|
|
3752
3825
|
return true;
|
|
3753
3826
|
if (!(other instanceof CornerSpan))
|
|
3754
3827
|
return false;
|
|
3755
|
-
if (!(this.
|
|
3828
|
+
if (!(this.c5d_1 === other.c5d_1))
|
|
3756
3829
|
return false;
|
|
3757
|
-
if (!(this.
|
|
3830
|
+
if (!(this.d5d_1 === other.d5d_1))
|
|
3758
3831
|
return false;
|
|
3759
|
-
if (!(this.
|
|
3832
|
+
if (!(this.e5d_1 === other.e5d_1))
|
|
3760
3833
|
return false;
|
|
3761
|
-
if (!this.
|
|
3834
|
+
if (!this.f5d_1.equals(other.f5d_1))
|
|
3762
3835
|
return false;
|
|
3763
|
-
if (!equals(this.
|
|
3836
|
+
if (!equals(this.g5d_1, other.g5d_1))
|
|
3764
3837
|
return false;
|
|
3765
|
-
if (!(this.
|
|
3838
|
+
if (!(this.h5d_1 === other.h5d_1))
|
|
3766
3839
|
return false;
|
|
3767
|
-
if (!equals(this.
|
|
3840
|
+
if (!equals(this.i5d_1, other.i5d_1))
|
|
3768
3841
|
return false;
|
|
3769
|
-
if (!equals(this.
|
|
3842
|
+
if (!equals(this.j5d_1, other.j5d_1))
|
|
3770
3843
|
return false;
|
|
3771
|
-
if (!equals(this.
|
|
3844
|
+
if (!equals(this.k5d_1, other.k5d_1))
|
|
3772
3845
|
return false;
|
|
3773
3846
|
return true;
|
|
3774
3847
|
};
|
|
@@ -3780,7 +3853,7 @@
|
|
|
3780
3853
|
var tmp_0 = new Float64Array(count);
|
|
3781
3854
|
while (tmp < count) {
|
|
3782
3855
|
var tmp_1 = tmp;
|
|
3783
|
-
tmp_0[tmp_1] = CurvatureEstimator_instance.
|
|
3856
|
+
tmp_0[tmp_1] = CurvatureEstimator_instance.o5d(kappa[from + tmp_1 | 0]);
|
|
3784
3857
|
tmp = tmp + 1 | 0;
|
|
3785
3858
|
}
|
|
3786
3859
|
var radii = tmp_0;
|
|
@@ -3790,13 +3863,13 @@
|
|
|
3790
3863
|
}
|
|
3791
3864
|
function CornerDetector() {
|
|
3792
3865
|
}
|
|
3793
|
-
protoOf(CornerDetector).
|
|
3866
|
+
protoOf(CornerDetector).p5d = function (frame, options, widthM) {
|
|
3794
3867
|
var n = frame.o();
|
|
3795
3868
|
if (n < 3)
|
|
3796
3869
|
return emptyList();
|
|
3797
|
-
var enter = 1.0 / options.
|
|
3798
|
-
var exit = 1.0 / options.
|
|
3799
|
-
var kappa = frame.
|
|
3870
|
+
var enter = 1.0 / options.q53_1;
|
|
3871
|
+
var exit = 1.0 / options.r53_1;
|
|
3872
|
+
var kappa = frame.u5d_1;
|
|
3800
3873
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
3801
3874
|
var raw = ArrayList_init_$Create$_0();
|
|
3802
3875
|
var start = -1;
|
|
@@ -3852,12 +3925,12 @@
|
|
|
3852
3925
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
3853
3926
|
var b = n - 1 | 0;
|
|
3854
3927
|
var tmp$ret$5 = Math.min(tmp0, b);
|
|
3855
|
-
var tmp_0 = frame.
|
|
3928
|
+
var tmp_0 = frame.s5d_1[tmp$ret$5];
|
|
3856
3929
|
var tmp0_0 = last[1];
|
|
3857
3930
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
3858
3931
|
var b_0 = n - 1 | 0;
|
|
3859
3932
|
var tmp$ret$6 = Math.min(tmp0_0, b_0);
|
|
3860
|
-
var gap = tmp_0 - frame.
|
|
3933
|
+
var gap = tmp_0 - frame.s5d_1[tmp$ret$6];
|
|
3861
3934
|
var tmp0_1 = span[0];
|
|
3862
3935
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
3863
3936
|
var b_1 = widthM.length - 1 | 0;
|
|
@@ -3871,8 +3944,8 @@
|
|
|
3871
3944
|
}
|
|
3872
3945
|
merged.k(span);
|
|
3873
3946
|
}
|
|
3874
|
-
var minTurn = options.
|
|
3875
|
-
var hairpinTurn = options.
|
|
3947
|
+
var minTurn = options.t53_1 * 3.141592653589793 / 180.0;
|
|
3948
|
+
var hairpinTurn = options.u53_1 * 3.141592653589793 / 180.0;
|
|
3876
3949
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
3877
3950
|
var out = ArrayList_init_$Create$_0();
|
|
3878
3951
|
var _iterator__ex2g4s_0 = merged.l();
|
|
@@ -3884,10 +3957,10 @@
|
|
|
3884
3957
|
var until = Math.min(a_0, n);
|
|
3885
3958
|
if ((until - from | 0) < 2)
|
|
3886
3959
|
continue $l$loop_2;
|
|
3887
|
-
var lengthM = frame.
|
|
3888
|
-
if (lengthM < options.
|
|
3960
|
+
var lengthM = frame.s5d_1[until - 1 | 0] - frame.s5d_1[from];
|
|
3961
|
+
if (lengthM < options.s53_1)
|
|
3889
3962
|
continue $l$loop_2;
|
|
3890
|
-
var turn = frame.
|
|
3963
|
+
var turn = frame.t5d_1[until - 1 | 0] - frame.t5d_1[from];
|
|
3891
3964
|
// Inline function 'kotlin.math.abs' call
|
|
3892
3965
|
if (Math.abs(turn) < minTurn)
|
|
3893
3966
|
continue $l$loop_2;
|
|
@@ -3906,7 +3979,7 @@
|
|
|
3906
3979
|
peak = a_1;
|
|
3907
3980
|
apex = i_0;
|
|
3908
3981
|
}
|
|
3909
|
-
var r = CurvatureEstimator_instance.
|
|
3982
|
+
var r = CurvatureEstimator_instance.o5d(kappa[i_0]);
|
|
3910
3983
|
if (r < minRadius)
|
|
3911
3984
|
minRadius = r;
|
|
3912
3985
|
}
|
|
@@ -3917,7 +3990,7 @@
|
|
|
3917
3990
|
if (Math.abs(turn) >= hairpinTurn) {
|
|
3918
3991
|
tmp_1 = CornerKind_HAIRPIN_getInstance();
|
|
3919
3992
|
} else {
|
|
3920
|
-
if (q20 >= options.
|
|
3993
|
+
if (q20 >= options.v53_1) {
|
|
3921
3994
|
tmp_1 = CornerKind_GENTLE_getInstance();
|
|
3922
3995
|
} else {
|
|
3923
3996
|
tmp_1 = CornerKind_CORNER_getInstance();
|
|
@@ -3933,9 +4006,9 @@
|
|
|
3933
4006
|
return CornerDetector_instance;
|
|
3934
4007
|
}
|
|
3935
4008
|
function CorridorBounds(lo, hi, halfWidthM) {
|
|
3936
|
-
this.
|
|
3937
|
-
this.
|
|
3938
|
-
this.
|
|
4009
|
+
this.y5d_1 = lo;
|
|
4010
|
+
this.z5d_1 = hi;
|
|
4011
|
+
this.a5e_1 = halfWidthM;
|
|
3939
4012
|
}
|
|
3940
4013
|
function applyRegularityClamp($this, frame, options, lo, hi) {
|
|
3941
4014
|
var inductionVariable = 0;
|
|
@@ -3945,11 +4018,11 @@
|
|
|
3945
4018
|
var i = inductionVariable;
|
|
3946
4019
|
inductionVariable = inductionVariable + 1 | 0;
|
|
3947
4020
|
// Inline function 'kotlin.math.abs' call
|
|
3948
|
-
var x = frame.
|
|
4021
|
+
var x = frame.u5d_1[i];
|
|
3949
4022
|
// Inline function 'kotlin.math.max' call
|
|
3950
4023
|
var a = Math.abs(x);
|
|
3951
4024
|
var tmp$ret$1 = Math.max(a, 1.0E-9);
|
|
3952
|
-
var limit = options.
|
|
4025
|
+
var limit = options.w53_1 / tmp$ret$1;
|
|
3953
4026
|
var tmp0 = lo[i];
|
|
3954
4027
|
// Inline function 'kotlin.math.max' call
|
|
3955
4028
|
var b = -limit;
|
|
@@ -3969,7 +4042,7 @@
|
|
|
3969
4042
|
var i = inductionVariable;
|
|
3970
4043
|
inductionVariable = inductionVariable + 1 | 0;
|
|
3971
4044
|
// Inline function 'kotlin.collections.getOrPut' call
|
|
3972
|
-
var key = cellKey($this, bucketOf($this, frame.
|
|
4045
|
+
var key = cellKey($this, bucketOf($this, frame.q5d_1[i]), bucketOf($this, frame.r5d_1[i]));
|
|
3973
4046
|
var value = buckets.q1(key);
|
|
3974
4047
|
var tmp;
|
|
3975
4048
|
if (value == null) {
|
|
@@ -3988,8 +4061,8 @@
|
|
|
3988
4061
|
$l$loop_1: do {
|
|
3989
4062
|
var i_0 = inductionVariable_0;
|
|
3990
4063
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
3991
|
-
var bx = bucketOf($this, frame.
|
|
3992
|
-
var by = bucketOf($this, frame.
|
|
4064
|
+
var bx = bucketOf($this, frame.q5d_1[i_0]);
|
|
4065
|
+
var by = bucketOf($this, frame.r5d_1[i_0]);
|
|
3993
4066
|
var nearest = 1.7976931348623157E308;
|
|
3994
4067
|
var inductionVariable_1 = -1;
|
|
3995
4068
|
if (inductionVariable_1 <= 1)
|
|
@@ -4017,17 +4090,17 @@
|
|
|
4017
4090
|
$l$loop_0: while (_iterator__ex2g4s.m()) {
|
|
4018
4091
|
var j = _iterator__ex2g4s.n();
|
|
4019
4092
|
// Inline function 'kotlin.math.abs' call
|
|
4020
|
-
var x = frame.
|
|
4093
|
+
var x = frame.s5d_1[j] - frame.s5d_1[i_0];
|
|
4021
4094
|
var alongPath = Math.abs(x);
|
|
4022
|
-
var ddx = frame.
|
|
4023
|
-
var ddy = frame.
|
|
4095
|
+
var ddx = frame.q5d_1[j] - frame.q5d_1[i_0];
|
|
4096
|
+
var ddy = frame.r5d_1[j] - frame.r5d_1[i_0];
|
|
4024
4097
|
// Inline function 'kotlin.math.sqrt' call
|
|
4025
4098
|
var x_0 = ddx * ddx + ddy * ddy;
|
|
4026
4099
|
var d = Math.sqrt(x_0);
|
|
4027
4100
|
// Inline function 'kotlin.math.abs' call
|
|
4028
|
-
var x_1 = LocalFrame_instance.
|
|
4101
|
+
var x_1 = LocalFrame_instance.c58(frame.t5d_1[j] - frame.t5d_1[i_0]);
|
|
4029
4102
|
var headingGap = Math.abs(x_1);
|
|
4030
|
-
var sameRoad = alongPath <= options.
|
|
4103
|
+
var sameRoad = alongPath <= options.x53_1 && headingGap < 1.5707963267948966;
|
|
4031
4104
|
if (sameRoad)
|
|
4032
4105
|
continue $l$loop_0;
|
|
4033
4106
|
if (d < nearest)
|
|
@@ -4075,7 +4148,7 @@
|
|
|
4075
4148
|
hi[i] = 0.0;
|
|
4076
4149
|
}
|
|
4077
4150
|
}
|
|
4078
|
-
var straightKappa = 1.0 / options.
|
|
4151
|
+
var straightKappa = 1.0 / options.z53_1;
|
|
4079
4152
|
var runStart = -1;
|
|
4080
4153
|
var inductionVariable_0 = 0;
|
|
4081
4154
|
if (inductionVariable_0 < n)
|
|
@@ -4083,7 +4156,7 @@
|
|
|
4083
4156
|
var i_0 = inductionVariable_0;
|
|
4084
4157
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
4085
4158
|
// Inline function 'kotlin.math.abs' call
|
|
4086
|
-
var x = frame.
|
|
4159
|
+
var x = frame.u5d_1[i_0];
|
|
4087
4160
|
var straight = Math.abs(x) < straightKappa;
|
|
4088
4161
|
if (straight) {
|
|
4089
4162
|
if (runStart < 0)
|
|
@@ -4099,7 +4172,7 @@
|
|
|
4099
4172
|
function pinRunMidpoint($this, frame, options, from, until, lo, hi) {
|
|
4100
4173
|
if (from < 0 || (until - from | 0) < 2)
|
|
4101
4174
|
return Unit_instance;
|
|
4102
|
-
if (frame.
|
|
4175
|
+
if (frame.s5d_1[until - 1 | 0] - frame.s5d_1[from] < options.y53_1)
|
|
4103
4176
|
return Unit_instance;
|
|
4104
4177
|
var mid = (from + until | 0) / 2 | 0;
|
|
4105
4178
|
// Inline function 'kotlin.intArrayOf' call
|
|
@@ -4116,12 +4189,12 @@
|
|
|
4116
4189
|
}
|
|
4117
4190
|
}
|
|
4118
4191
|
function Corridor() {
|
|
4119
|
-
this.
|
|
4120
|
-
this.
|
|
4121
|
-
this.
|
|
4122
|
-
this.
|
|
4192
|
+
this.b5e_1 = 6.0;
|
|
4193
|
+
this.c5e_1 = 12.0;
|
|
4194
|
+
this.d5e_1 = 0.5;
|
|
4195
|
+
this.e5e_1 = 1.5707963267948966;
|
|
4123
4196
|
}
|
|
4124
|
-
protoOf(Corridor).
|
|
4197
|
+
protoOf(Corridor).f5e = function (path, frame, options) {
|
|
4125
4198
|
var raw = new Float64Array(frame.o());
|
|
4126
4199
|
var inductionVariable = 0;
|
|
4127
4200
|
var last = raw.length - 1 | 0;
|
|
@@ -4130,12 +4203,12 @@
|
|
|
4130
4203
|
var i = inductionVariable;
|
|
4131
4204
|
inductionVariable = inductionVariable + 1 | 0;
|
|
4132
4205
|
var w = path.k2e(i);
|
|
4133
|
-
raw[i] = isNaN_0(w) || w <= 0.0 ? options.
|
|
4206
|
+
raw[i] = isNaN_0(w) || w <= 0.0 ? options.n53_1 : w;
|
|
4134
4207
|
}
|
|
4135
4208
|
while (inductionVariable <= last);
|
|
4136
|
-
return LocalFrame_instance.
|
|
4209
|
+
return LocalFrame_instance.g5e(raw, frame.s5d_1, options.a54_1);
|
|
4137
4210
|
};
|
|
4138
|
-
protoOf(Corridor).
|
|
4211
|
+
protoOf(Corridor).h5e = function (frame, widthM, options) {
|
|
4139
4212
|
var n = frame.o();
|
|
4140
4213
|
var lo = new Float64Array(n);
|
|
4141
4214
|
var hi = new Float64Array(n);
|
|
@@ -4145,9 +4218,9 @@
|
|
|
4145
4218
|
do {
|
|
4146
4219
|
var i = inductionVariable;
|
|
4147
4220
|
inductionVariable = inductionVariable + 1 | 0;
|
|
4148
|
-
var h = coerceIn(widthM[i] / 2.0 - options.
|
|
4221
|
+
var h = coerceIn(widthM[i] / 2.0 - options.o53_1, 0.0, 6.0);
|
|
4149
4222
|
half[i] = h;
|
|
4150
|
-
switch (options.
|
|
4223
|
+
switch (options.p53_1.v1_1) {
|
|
4151
4224
|
case 0:
|
|
4152
4225
|
lo[i] = -h;
|
|
4153
4226
|
hi[i] = 0.0;
|
|
@@ -4208,7 +4281,7 @@
|
|
|
4208
4281
|
var fit = tmp;
|
|
4209
4282
|
var _unary__edvuaz = count;
|
|
4210
4283
|
count = _unary__edvuaz + 1 | 0;
|
|
4211
|
-
values[_unary__edvuaz] = fit.
|
|
4284
|
+
values[_unary__edvuaz] = fit.j5e_1;
|
|
4212
4285
|
}
|
|
4213
4286
|
while (inductionVariable < n);
|
|
4214
4287
|
if (count === 0)
|
|
@@ -4218,13 +4291,13 @@
|
|
|
4218
4291
|
return trimmed[count / 2 | 0];
|
|
4219
4292
|
}
|
|
4220
4293
|
function Fit(slope, residualSigma) {
|
|
4221
|
-
this.
|
|
4222
|
-
this.
|
|
4294
|
+
this.i5e_1 = slope;
|
|
4295
|
+
this.j5e_1 = residualSigma;
|
|
4223
4296
|
}
|
|
4224
4297
|
function fitSlope($this, frame, i, halfWidthM) {
|
|
4225
4298
|
var n = frame.o();
|
|
4226
|
-
var s = frame.
|
|
4227
|
-
var theta = frame.
|
|
4299
|
+
var s = frame.s5d_1;
|
|
4300
|
+
var theta = frame.t5d_1;
|
|
4228
4301
|
var si = s[i];
|
|
4229
4302
|
var ti = theta[i];
|
|
4230
4303
|
var lo = i;
|
|
@@ -4280,13 +4353,13 @@
|
|
|
4280
4353
|
return !isFinite(slope) || !isFinite(sigma) ? null : new Fit(slope, sigma);
|
|
4281
4354
|
}
|
|
4282
4355
|
function CurvatureEstimator() {
|
|
4283
|
-
this.
|
|
4284
|
-
this.
|
|
4285
|
-
this.
|
|
4356
|
+
this.l5d_1 = 2.0;
|
|
4357
|
+
this.m5d_1 = 400;
|
|
4358
|
+
this.n5d_1 = 1.0E-6;
|
|
4286
4359
|
}
|
|
4287
|
-
protoOf(CurvatureEstimator).
|
|
4360
|
+
protoOf(CurvatureEstimator).k5e = function (frame) {
|
|
4288
4361
|
var n = frame.o();
|
|
4289
|
-
var theta = frame.
|
|
4362
|
+
var theta = frame.t5d_1;
|
|
4290
4363
|
if (n === 0)
|
|
4291
4364
|
return Unit_instance;
|
|
4292
4365
|
var previous = NaN;
|
|
@@ -4297,8 +4370,8 @@
|
|
|
4297
4370
|
inductionVariable = inductionVariable + 1 | 0;
|
|
4298
4371
|
var a = i > 0 ? i - 1 | 0 : 0;
|
|
4299
4372
|
var b = i < (n - 1 | 0) ? i + 1 | 0 : n - 1 | 0;
|
|
4300
|
-
var dx = frame.
|
|
4301
|
-
var dy = frame.
|
|
4373
|
+
var dx = frame.q5d_1[b] - frame.q5d_1[a];
|
|
4374
|
+
var dy = frame.r5d_1[b] - frame.r5d_1[a];
|
|
4302
4375
|
if (dx === 0.0 && dy === 0.0) {
|
|
4303
4376
|
theta[i] = previous;
|
|
4304
4377
|
continue $l$loop;
|
|
@@ -4316,7 +4389,7 @@
|
|
|
4316
4389
|
}
|
|
4317
4390
|
while (inductionVariable_0 < i);
|
|
4318
4391
|
} else {
|
|
4319
|
-
theta[i] = previous + LocalFrame_instance.
|
|
4392
|
+
theta[i] = previous + LocalFrame_instance.c58(raw - previous);
|
|
4320
4393
|
}
|
|
4321
4394
|
previous = theta[i];
|
|
4322
4395
|
}
|
|
@@ -4325,9 +4398,9 @@
|
|
|
4325
4398
|
fill(theta, 0.0);
|
|
4326
4399
|
}
|
|
4327
4400
|
};
|
|
4328
|
-
protoOf(CurvatureEstimator).
|
|
4401
|
+
protoOf(CurvatureEstimator).l5e = function (frame, windowsM, sigmaThetaRad, curvatureSmoothM) {
|
|
4329
4402
|
var n = frame.o();
|
|
4330
|
-
var kappa = frame.
|
|
4403
|
+
var kappa = frame.u5d_1;
|
|
4331
4404
|
if (n === 0)
|
|
4332
4405
|
return Unit_instance;
|
|
4333
4406
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
@@ -4355,9 +4428,9 @@
|
|
|
4355
4428
|
var w = inductionVariable_0;
|
|
4356
4429
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
4357
4430
|
var fit = fitSlope(this, frame, i, windowsM[w]);
|
|
4358
|
-
var tmp1_elvis_lhs = fit == null ? null : fit.
|
|
4431
|
+
var tmp1_elvis_lhs = fit == null ? null : fit.i5e_1;
|
|
4359
4432
|
slopes[w] = tmp1_elvis_lhs == null ? NaN : tmp1_elvis_lhs;
|
|
4360
|
-
var tmp3_elvis_lhs = fit == null ? null : fit.
|
|
4433
|
+
var tmp3_elvis_lhs = fit == null ? null : fit.j5e_1;
|
|
4361
4434
|
sigmas[w] = tmp3_elvis_lhs == null ? NaN : tmp3_elvis_lhs;
|
|
4362
4435
|
}
|
|
4363
4436
|
while (inductionVariable_0 < scales);
|
|
@@ -4381,7 +4454,7 @@
|
|
|
4381
4454
|
raw[i] = !isNaN_0(chosen) ? chosen : widest;
|
|
4382
4455
|
}
|
|
4383
4456
|
while (inductionVariable < n);
|
|
4384
|
-
var smoothed = LocalFrame_instance.
|
|
4457
|
+
var smoothed = LocalFrame_instance.g5e(raw, frame.s5d_1, curvatureSmoothM);
|
|
4385
4458
|
// Inline function 'kotlin.collections.copyInto' call
|
|
4386
4459
|
var endIndex = smoothed.length;
|
|
4387
4460
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
@@ -4391,7 +4464,7 @@
|
|
|
4391
4464
|
// Inline function 'kotlin.js.asDynamic' call
|
|
4392
4465
|
arrayCopy(tmp, kappa, 0, 0, endIndex);
|
|
4393
4466
|
};
|
|
4394
|
-
protoOf(CurvatureEstimator).
|
|
4467
|
+
protoOf(CurvatureEstimator).o5d = function (kappa) {
|
|
4395
4468
|
var tmp;
|
|
4396
4469
|
// Inline function 'kotlin.math.abs' call
|
|
4397
4470
|
if (Math.abs(kappa) < 1.0E-12) {
|
|
@@ -4407,10 +4480,10 @@
|
|
|
4407
4480
|
return CurvatureEstimator_instance;
|
|
4408
4481
|
}
|
|
4409
4482
|
function LocalFrame() {
|
|
4410
|
-
this.
|
|
4411
|
-
this.
|
|
4483
|
+
this.a58_1 = 1.4835298641951802;
|
|
4484
|
+
this.b58_1 = 8;
|
|
4412
4485
|
}
|
|
4413
|
-
protoOf(LocalFrame).
|
|
4486
|
+
protoOf(LocalFrame).m5e = function (path, smoothWindowM) {
|
|
4414
4487
|
var n = path.l23_1;
|
|
4415
4488
|
if (n < 8)
|
|
4416
4489
|
return null;
|
|
@@ -4439,24 +4512,24 @@
|
|
|
4439
4512
|
var dist = path.p2b(i);
|
|
4440
4513
|
if (!isFinite(lat) || !isFinite(lon) || !isFinite(dist))
|
|
4441
4514
|
return null;
|
|
4442
|
-
var dLon = this.
|
|
4515
|
+
var dLon = this.c58(lon - lon0);
|
|
4443
4516
|
rawX[i] = 6371000.0 * k * dLon;
|
|
4444
4517
|
rawY[i] = 6371000.0 * (lat - lat0);
|
|
4445
4518
|
s[i] = dist;
|
|
4446
4519
|
}
|
|
4447
4520
|
while (inductionVariable < n);
|
|
4448
|
-
var x = this.
|
|
4449
|
-
var y = this.
|
|
4450
|
-
this.
|
|
4521
|
+
var x = this.g5e(rawX, s, smoothWindowM);
|
|
4522
|
+
var y = this.g5e(rawY, s, smoothWindowM);
|
|
4523
|
+
this.n5e(x, y, s);
|
|
4451
4524
|
return new PlanarFrame(x, y, s, new Float64Array(n), new Float64Array(n), lat0, lon0, k);
|
|
4452
4525
|
};
|
|
4453
|
-
protoOf(LocalFrame).
|
|
4454
|
-
var lat = frame.
|
|
4455
|
-
var lon = this.
|
|
4526
|
+
protoOf(LocalFrame).o5e = function (frame, x, y) {
|
|
4527
|
+
var lat = frame.v5d_1 + y / 6371000.0;
|
|
4528
|
+
var lon = this.c58(frame.w5d_1 + x / (6371000.0 * frame.x5d_1));
|
|
4456
4529
|
// Inline function 'kotlin.doubleArrayOf' call
|
|
4457
4530
|
return new Float64Array([lat, lon]);
|
|
4458
4531
|
};
|
|
4459
|
-
protoOf(LocalFrame).
|
|
4532
|
+
protoOf(LocalFrame).n5e = function (x, y, s) {
|
|
4460
4533
|
s[0] = 0.0;
|
|
4461
4534
|
var inductionVariable = 1;
|
|
4462
4535
|
var last = x.length;
|
|
@@ -4473,11 +4546,11 @@
|
|
|
4473
4546
|
}
|
|
4474
4547
|
while (inductionVariable < last);
|
|
4475
4548
|
};
|
|
4476
|
-
protoOf(LocalFrame).
|
|
4549
|
+
protoOf(LocalFrame).c58 = function (a) {
|
|
4477
4550
|
var r = a - 2.0 * 3.141592653589793 * round(a / (2.0 * 3.141592653589793));
|
|
4478
4551
|
return r <= -3.141592653589793 ? r + 2.0 * 3.141592653589793 : r;
|
|
4479
4552
|
};
|
|
4480
|
-
protoOf(LocalFrame).
|
|
4553
|
+
protoOf(LocalFrame).g5e = function (v, s, windowM) {
|
|
4481
4554
|
var n = v.length;
|
|
4482
4555
|
if (windowM <= 0.0 || n < 3) {
|
|
4483
4556
|
// Inline function 'kotlin.collections.copyOf' call
|
|
@@ -4529,7 +4602,7 @@
|
|
|
4529
4602
|
}
|
|
4530
4603
|
function Companion_13() {
|
|
4531
4604
|
}
|
|
4532
|
-
protoOf(Companion_13).
|
|
4605
|
+
protoOf(Companion_13).p5e = function (frame, center, rho, steeringLengthM, centeringLengthM, fixed) {
|
|
4533
4606
|
var n = frame.o();
|
|
4534
4607
|
var h0 = new Float64Array(n);
|
|
4535
4608
|
var h1 = new Float64Array(n);
|
|
@@ -4537,7 +4610,7 @@
|
|
|
4537
4610
|
var linear = new Float64Array(n);
|
|
4538
4611
|
var lambdaR = 1.0 / (steeringLengthM * steeringLengthM);
|
|
4539
4612
|
var lambdaC = 1.0 / (centeringLengthM * centeringLengthM * centeringLengthM * centeringLengthM);
|
|
4540
|
-
var meanSpacing = n > 1 ? (frame.
|
|
4613
|
+
var meanSpacing = n > 1 ? (frame.s5d_1[n - 1 | 0] - frame.s5d_1[0]) / (n - 1 | 0) : 0.0;
|
|
4541
4614
|
var tie = meanSpacing > 0.0 ? lambdaR / meanSpacing : lambdaR;
|
|
4542
4615
|
var a = new Float64Array(3);
|
|
4543
4616
|
var b = new Float64Array(3);
|
|
@@ -4546,8 +4619,8 @@
|
|
|
4546
4619
|
$l$loop_0: do {
|
|
4547
4620
|
var i = inductionVariable;
|
|
4548
4621
|
inductionVariable = inductionVariable + 1 | 0;
|
|
4549
|
-
var hMinus = i >= 1 ? frame.
|
|
4550
|
-
var hPlus = (i + 1 | 0) < n ? frame.
|
|
4622
|
+
var hMinus = i >= 1 ? frame.s5d_1[i] - frame.s5d_1[i - 1 | 0] : 0.0;
|
|
4623
|
+
var hPlus = (i + 1 | 0) < n ? frame.s5d_1[i + 1 | 0] - frame.s5d_1[i] : 0.0;
|
|
4551
4624
|
var weight = 0.5 * (hMinus + hPlus);
|
|
4552
4625
|
h0[i] = h0[i] + 2.0 * weight * lambdaC;
|
|
4553
4626
|
linear[i] = linear[i] - 2.0 * weight * lambdaC * center[i];
|
|
@@ -4564,14 +4637,14 @@
|
|
|
4564
4637
|
if (denom <= 0.0)
|
|
4565
4638
|
continue $l$loop_0;
|
|
4566
4639
|
a[0] = 2.0 * hPlus / denom;
|
|
4567
|
-
a[1] = -2.0 * (hPlus + hMinus) / denom + frame.
|
|
4640
|
+
a[1] = -2.0 * (hPlus + hMinus) / denom + frame.u5d_1[i] * frame.u5d_1[i];
|
|
4568
4641
|
a[2] = 2.0 * hMinus / denom;
|
|
4569
4642
|
b[0] = -hPlus * hPlus / denom;
|
|
4570
4643
|
b[1] = (hPlus * hPlus - hMinus * hMinus) / denom;
|
|
4571
4644
|
b[2] = hMinus * hMinus / denom;
|
|
4572
4645
|
var wRho = weight * rho[i];
|
|
4573
4646
|
var wR = weight * lambdaR;
|
|
4574
|
-
var kappaI = frame.
|
|
4647
|
+
var kappaI = frame.u5d_1[i];
|
|
4575
4648
|
var inductionVariable_0 = 0;
|
|
4576
4649
|
if (inductionVariable_0 <= 2)
|
|
4577
4650
|
do {
|
|
@@ -4610,15 +4683,15 @@
|
|
|
4610
4683
|
return Companion_instance_16;
|
|
4611
4684
|
}
|
|
4612
4685
|
function OffsetEnergy(h0, h1, h2, linear) {
|
|
4613
|
-
this.
|
|
4614
|
-
this.
|
|
4615
|
-
this.
|
|
4616
|
-
this.
|
|
4686
|
+
this.q5e_1 = h0;
|
|
4687
|
+
this.r5e_1 = h1;
|
|
4688
|
+
this.s5e_1 = h2;
|
|
4689
|
+
this.t5e_1 = linear;
|
|
4617
4690
|
}
|
|
4618
4691
|
protoOf(OffsetEnergy).o = function () {
|
|
4619
|
-
return this.
|
|
4692
|
+
return this.q5e_1.length;
|
|
4620
4693
|
};
|
|
4621
|
-
protoOf(OffsetEnergy).
|
|
4694
|
+
protoOf(OffsetEnergy).u5e = function (from, to, gradient, delta, scratch) {
|
|
4622
4695
|
var inductionVariable = 0;
|
|
4623
4696
|
var last = delta.length - 1 | 0;
|
|
4624
4697
|
if (inductionVariable <= last)
|
|
@@ -4628,7 +4701,7 @@
|
|
|
4628
4701
|
delta[i] = to[i] - from[i];
|
|
4629
4702
|
}
|
|
4630
4703
|
while (inductionVariable <= last);
|
|
4631
|
-
BandedLdl_instance.
|
|
4704
|
+
BandedLdl_instance.b5d(this.q5e_1, this.r5e_1, this.s5e_1, delta, scratch);
|
|
4632
4705
|
var acc = 0.0;
|
|
4633
4706
|
var inductionVariable_0 = 0;
|
|
4634
4707
|
var last_0 = delta.length - 1 | 0;
|
|
@@ -4641,27 +4714,27 @@
|
|
|
4641
4714
|
while (inductionVariable_0 <= last_0);
|
|
4642
4715
|
return acc;
|
|
4643
4716
|
};
|
|
4644
|
-
protoOf(OffsetEnergy).
|
|
4645
|
-
BandedLdl_instance.
|
|
4717
|
+
protoOf(OffsetEnergy).v5e = function (n, out) {
|
|
4718
|
+
BandedLdl_instance.b5d(this.q5e_1, this.r5e_1, this.s5e_1, n, out);
|
|
4646
4719
|
var inductionVariable = 0;
|
|
4647
4720
|
var last = out.length - 1 | 0;
|
|
4648
4721
|
if (inductionVariable <= last)
|
|
4649
4722
|
do {
|
|
4650
4723
|
var i = inductionVariable;
|
|
4651
4724
|
inductionVariable = inductionVariable + 1 | 0;
|
|
4652
|
-
out[i] = out[i] + this.
|
|
4725
|
+
out[i] = out[i] + this.t5e_1[i];
|
|
4653
4726
|
}
|
|
4654
4727
|
while (inductionVariable <= last);
|
|
4655
4728
|
};
|
|
4656
4729
|
function QpResult(offset, iterations, gradientInfNorm, converged, activeConstraints) {
|
|
4657
|
-
this.
|
|
4658
|
-
this.
|
|
4659
|
-
this.
|
|
4660
|
-
this.
|
|
4661
|
-
this.
|
|
4730
|
+
this.w5e_1 = offset;
|
|
4731
|
+
this.x5e_1 = iterations;
|
|
4732
|
+
this.y5e_1 = gradientInfNorm;
|
|
4733
|
+
this.z5e_1 = converged;
|
|
4734
|
+
this.a5f_1 = activeConstraints;
|
|
4662
4735
|
}
|
|
4663
4736
|
function isFree($this, x, lo, hi, g, epsilon) {
|
|
4664
|
-
if ($this.
|
|
4737
|
+
if ($this.d5f(lo, hi, epsilon))
|
|
4665
4738
|
return false;
|
|
4666
4739
|
if (x <= lo + epsilon && g > 0.0)
|
|
4667
4740
|
return false;
|
|
@@ -4676,28 +4749,28 @@
|
|
|
4676
4749
|
var p = inductionVariable;
|
|
4677
4750
|
inductionVariable = inductionVariable + 1 | 0;
|
|
4678
4751
|
var i = freeIndex[p];
|
|
4679
|
-
f0[p] = energy.
|
|
4752
|
+
f0[p] = energy.q5e_1[i];
|
|
4680
4753
|
f1[p] = 0.0;
|
|
4681
4754
|
f2[p] = 0.0;
|
|
4682
4755
|
if ((p + 1 | 0) < freeCount) {
|
|
4683
4756
|
var tmp0_subject = freeIndex[p + 1 | 0] - i | 0;
|
|
4684
4757
|
if (tmp0_subject === 1) {
|
|
4685
|
-
f1[p] = energy.
|
|
4758
|
+
f1[p] = energy.r5e_1[i];
|
|
4686
4759
|
} else if (tmp0_subject === 2) {
|
|
4687
|
-
f1[p] = energy.
|
|
4760
|
+
f1[p] = energy.s5e_1[i];
|
|
4688
4761
|
}
|
|
4689
4762
|
}
|
|
4690
4763
|
if ((p + 2 | 0) < freeCount && (freeIndex[p + 2 | 0] - i | 0) === 2) {
|
|
4691
|
-
f2[p] = energy.
|
|
4764
|
+
f2[p] = energy.s5e_1[i];
|
|
4692
4765
|
}
|
|
4693
4766
|
}
|
|
4694
4767
|
while (inductionVariable < freeCount);
|
|
4695
4768
|
}
|
|
4696
4769
|
function OffsetQp() {
|
|
4697
|
-
this.
|
|
4698
|
-
this.
|
|
4770
|
+
this.b5f_1 = 1.0E-4;
|
|
4771
|
+
this.c5f_1 = 20;
|
|
4699
4772
|
}
|
|
4700
|
-
protoOf(OffsetQp).
|
|
4773
|
+
protoOf(OffsetQp).e5f = function (energy, lo, hi, seed, maxIterations, gradientTolerance, boundEpsilonM) {
|
|
4701
4774
|
var n = energy.o();
|
|
4702
4775
|
var tmp = 0;
|
|
4703
4776
|
var tmp_0 = new Float64Array(n);
|
|
@@ -4711,7 +4784,7 @@
|
|
|
4711
4784
|
var scratch = new Float64Array(n);
|
|
4712
4785
|
var direction = new Float64Array(n);
|
|
4713
4786
|
var candidate = new Float64Array(n);
|
|
4714
|
-
energy.
|
|
4787
|
+
energy.v5e(x, g);
|
|
4715
4788
|
var referenceGradient = 0.0;
|
|
4716
4789
|
var inductionVariable = 0;
|
|
4717
4790
|
if (inductionVariable < n)
|
|
@@ -4747,7 +4820,7 @@
|
|
|
4747
4820
|
var held = booleanArray(n);
|
|
4748
4821
|
var delta = new Float64Array(n);
|
|
4749
4822
|
$l$loop_5: while (iterations < maxIterations) {
|
|
4750
|
-
energy.
|
|
4823
|
+
energy.v5e(x, g);
|
|
4751
4824
|
var freeCount = 0;
|
|
4752
4825
|
var residual = 0.0;
|
|
4753
4826
|
var inductionVariable_0 = 0;
|
|
@@ -4802,7 +4875,7 @@
|
|
|
4802
4875
|
var fa0 = copyOf(f0, solveCount);
|
|
4803
4876
|
var fa1 = copyOf(f1, solveCount);
|
|
4804
4877
|
var fa2 = copyOf(f2, solveCount);
|
|
4805
|
-
if (!BandedLdl_instance.
|
|
4878
|
+
if (!BandedLdl_instance.z5c(fa0, fa1, fa2)) {
|
|
4806
4879
|
break $l$loop_4;
|
|
4807
4880
|
}
|
|
4808
4881
|
var inductionVariable_3 = 0;
|
|
@@ -4814,7 +4887,7 @@
|
|
|
4814
4887
|
rhs[p_0] = -g[solveIndex[p_0]];
|
|
4815
4888
|
}
|
|
4816
4889
|
while (inductionVariable_3 < last_0);
|
|
4817
|
-
BandedLdl_instance.
|
|
4890
|
+
BandedLdl_instance.a5d(fa0, fa1, fa2, rhs);
|
|
4818
4891
|
var inductionVariable_4 = 0;
|
|
4819
4892
|
if (inductionVariable_4 < n)
|
|
4820
4893
|
do {
|
|
@@ -4860,7 +4933,7 @@
|
|
|
4860
4933
|
candidate[i_4] = coerceIn(x[i_4] + step * direction[i_4], lo[i_4], hi[i_4]);
|
|
4861
4934
|
}
|
|
4862
4935
|
while (inductionVariable_8 < n);
|
|
4863
|
-
if (energy.
|
|
4936
|
+
if (energy.u5e(x, candidate, g, delta, scratch) <= 1.0E-4 * step * directionalDerivative) {
|
|
4864
4937
|
accepted = true;
|
|
4865
4938
|
break $l$loop_2;
|
|
4866
4939
|
}
|
|
@@ -4913,7 +4986,7 @@
|
|
|
4913
4986
|
while (inductionVariable_10 < n);
|
|
4914
4987
|
return new QpResult(x, iterations, relativeResidual, converged, active);
|
|
4915
4988
|
};
|
|
4916
|
-
protoOf(OffsetQp).
|
|
4989
|
+
protoOf(OffsetQp).d5f = function (lo, hi, epsilon) {
|
|
4917
4990
|
return hi - lo <= 2.0 * epsilon;
|
|
4918
4991
|
};
|
|
4919
4992
|
var OffsetQp_instance;
|
|
@@ -4922,7 +4995,7 @@
|
|
|
4922
4995
|
}
|
|
4923
4996
|
function Companion_14() {
|
|
4924
4997
|
Companion_instance_17 = this;
|
|
4925
|
-
this.
|
|
4998
|
+
this.f5f_1 = new CurvatureOptions();
|
|
4926
4999
|
}
|
|
4927
5000
|
var Companion_instance_17;
|
|
4928
5001
|
function Companion_getInstance_21() {
|
|
@@ -4937,23 +5010,23 @@
|
|
|
4937
5010
|
curvatureWindowsM = curvatureWindowsM === VOID ? listOf_0([3.0, 6.0, 12.0, 25.0]) : curvatureWindowsM;
|
|
4938
5011
|
headingNoiseRad = headingNoiseRad === VOID ? 0.05 : headingNoiseRad;
|
|
4939
5012
|
curvatureSmoothWindowM = curvatureSmoothWindowM === VOID ? 3.0 : curvatureSmoothWindowM;
|
|
4940
|
-
this.
|
|
4941
|
-
this.
|
|
4942
|
-
this.
|
|
4943
|
-
this.
|
|
4944
|
-
this.
|
|
5013
|
+
this.k54_1 = enabled;
|
|
5014
|
+
this.l54_1 = geometrySmoothWindowM;
|
|
5015
|
+
this.m54_1 = curvatureWindowsM;
|
|
5016
|
+
this.n54_1 = headingNoiseRad;
|
|
5017
|
+
this.o54_1 = curvatureSmoothWindowM;
|
|
4945
5018
|
// Inline function 'kotlin.require' call
|
|
4946
|
-
if (!(this.
|
|
5019
|
+
if (!(this.l54_1 >= 0.0)) {
|
|
4947
5020
|
var message = 'geometrySmoothWindowM must be >= 0';
|
|
4948
5021
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
4949
5022
|
}
|
|
4950
5023
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
4951
5024
|
// Inline function 'kotlin.require' call
|
|
4952
|
-
if (!!this.
|
|
5025
|
+
if (!!this.m54_1.q()) {
|
|
4953
5026
|
var message_0 = 'at least one curvature window is required';
|
|
4954
5027
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
4955
5028
|
}
|
|
4956
|
-
var tmp0 = this.
|
|
5029
|
+
var tmp0 = this.m54_1;
|
|
4957
5030
|
var tmp$ret$5;
|
|
4958
5031
|
$l$block_0: {
|
|
4959
5032
|
// Inline function 'kotlin.collections.all' call
|
|
@@ -4982,7 +5055,7 @@
|
|
|
4982
5055
|
var message_1 = 'curvature windows must be positive';
|
|
4983
5056
|
throw IllegalArgumentException_init_$Create$(toString(message_1));
|
|
4984
5057
|
}
|
|
4985
|
-
var tmp0_0 = zipWithNext(this.
|
|
5058
|
+
var tmp0_0 = zipWithNext(this.m54_1);
|
|
4986
5059
|
var tmp$ret$9;
|
|
4987
5060
|
$l$block_2: {
|
|
4988
5061
|
// Inline function 'kotlin.collections.all' call
|
|
@@ -5010,40 +5083,40 @@
|
|
|
5010
5083
|
}
|
|
5011
5084
|
// Inline function 'kotlin.require' call
|
|
5012
5085
|
if (!tmp$ret$9) {
|
|
5013
|
-
var message_2 = 'curvature windows must be strictly ascending: ' + toString(this.
|
|
5086
|
+
var message_2 = 'curvature windows must be strictly ascending: ' + toString(this.m54_1);
|
|
5014
5087
|
throw IllegalArgumentException_init_$Create$(toString(message_2));
|
|
5015
5088
|
}
|
|
5016
5089
|
// Inline function 'kotlin.require' call
|
|
5017
|
-
if (!(this.
|
|
5090
|
+
if (!(this.n54_1 > 0.0)) {
|
|
5018
5091
|
var message_3 = 'headingNoiseRad must be positive';
|
|
5019
5092
|
throw IllegalArgumentException_init_$Create$(toString(message_3));
|
|
5020
5093
|
}
|
|
5021
5094
|
// Inline function 'kotlin.require' call
|
|
5022
|
-
if (!(this.
|
|
5095
|
+
if (!(this.o54_1 >= 0.0)) {
|
|
5023
5096
|
var message_4 = 'curvatureSmoothWindowM must be >= 0';
|
|
5024
5097
|
throw IllegalArgumentException_init_$Create$(toString(message_4));
|
|
5025
5098
|
}
|
|
5026
5099
|
}
|
|
5027
|
-
protoOf(CurvatureOptions).
|
|
5100
|
+
protoOf(CurvatureOptions).g5f = function (enabled, geometrySmoothWindowM, curvatureWindowsM, headingNoiseRad, curvatureSmoothWindowM) {
|
|
5028
5101
|
return new CurvatureOptions(enabled, geometrySmoothWindowM, curvatureWindowsM, headingNoiseRad, curvatureSmoothWindowM);
|
|
5029
5102
|
};
|
|
5030
|
-
protoOf(CurvatureOptions).
|
|
5031
|
-
enabled = enabled === VOID ? this.
|
|
5032
|
-
geometrySmoothWindowM = geometrySmoothWindowM === VOID ? this.
|
|
5033
|
-
curvatureWindowsM = curvatureWindowsM === VOID ? this.
|
|
5034
|
-
headingNoiseRad = headingNoiseRad === VOID ? this.
|
|
5035
|
-
curvatureSmoothWindowM = curvatureSmoothWindowM === VOID ? this.
|
|
5036
|
-
return $super === VOID ? this.
|
|
5103
|
+
protoOf(CurvatureOptions).h5f = function (enabled, geometrySmoothWindowM, curvatureWindowsM, headingNoiseRad, curvatureSmoothWindowM, $super) {
|
|
5104
|
+
enabled = enabled === VOID ? this.k54_1 : enabled;
|
|
5105
|
+
geometrySmoothWindowM = geometrySmoothWindowM === VOID ? this.l54_1 : geometrySmoothWindowM;
|
|
5106
|
+
curvatureWindowsM = curvatureWindowsM === VOID ? this.m54_1 : curvatureWindowsM;
|
|
5107
|
+
headingNoiseRad = headingNoiseRad === VOID ? this.n54_1 : headingNoiseRad;
|
|
5108
|
+
curvatureSmoothWindowM = curvatureSmoothWindowM === VOID ? this.o54_1 : curvatureSmoothWindowM;
|
|
5109
|
+
return $super === VOID ? this.g5f(enabled, geometrySmoothWindowM, curvatureWindowsM, headingNoiseRad, curvatureSmoothWindowM) : $super.g5f.call(this, enabled, geometrySmoothWindowM, curvatureWindowsM, headingNoiseRad, curvatureSmoothWindowM);
|
|
5037
5110
|
};
|
|
5038
5111
|
protoOf(CurvatureOptions).toString = function () {
|
|
5039
|
-
return 'CurvatureOptions(enabled=' + this.
|
|
5112
|
+
return 'CurvatureOptions(enabled=' + this.k54_1 + ', geometrySmoothWindowM=' + this.l54_1 + ', curvatureWindowsM=' + toString(this.m54_1) + ', headingNoiseRad=' + this.n54_1 + ', curvatureSmoothWindowM=' + this.o54_1 + ')';
|
|
5040
5113
|
};
|
|
5041
5114
|
protoOf(CurvatureOptions).hashCode = function () {
|
|
5042
|
-
var result = getBooleanHashCode(this.
|
|
5043
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
5044
|
-
result = imul(result, 31) + hashCode(this.
|
|
5045
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
5046
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
5115
|
+
var result = getBooleanHashCode(this.k54_1);
|
|
5116
|
+
result = imul(result, 31) + getNumberHashCode(this.l54_1) | 0;
|
|
5117
|
+
result = imul(result, 31) + hashCode(this.m54_1) | 0;
|
|
5118
|
+
result = imul(result, 31) + getNumberHashCode(this.n54_1) | 0;
|
|
5119
|
+
result = imul(result, 31) + getNumberHashCode(this.o54_1) | 0;
|
|
5047
5120
|
return result;
|
|
5048
5121
|
};
|
|
5049
5122
|
protoOf(CurvatureOptions).equals = function (other) {
|
|
@@ -5051,24 +5124,24 @@
|
|
|
5051
5124
|
return true;
|
|
5052
5125
|
if (!(other instanceof CurvatureOptions))
|
|
5053
5126
|
return false;
|
|
5054
|
-
if (!(this.
|
|
5127
|
+
if (!(this.k54_1 === other.k54_1))
|
|
5055
5128
|
return false;
|
|
5056
|
-
if (!equals(this.
|
|
5129
|
+
if (!equals(this.l54_1, other.l54_1))
|
|
5057
5130
|
return false;
|
|
5058
|
-
if (!equals(this.
|
|
5131
|
+
if (!equals(this.m54_1, other.m54_1))
|
|
5059
5132
|
return false;
|
|
5060
|
-
if (!equals(this.
|
|
5133
|
+
if (!equals(this.n54_1, other.n54_1))
|
|
5061
5134
|
return false;
|
|
5062
|
-
if (!equals(this.
|
|
5135
|
+
if (!equals(this.o54_1, other.o54_1))
|
|
5063
5136
|
return false;
|
|
5064
5137
|
return true;
|
|
5065
5138
|
};
|
|
5066
5139
|
function PathCurvature() {
|
|
5067
5140
|
}
|
|
5068
|
-
protoOf(PathCurvature).
|
|
5069
|
-
if (!options.
|
|
5141
|
+
protoOf(PathCurvature).j54 = function (path, options) {
|
|
5142
|
+
if (!options.k54_1)
|
|
5070
5143
|
return false;
|
|
5071
|
-
var tmp0_elvis_lhs = LocalFrame_instance.
|
|
5144
|
+
var tmp0_elvis_lhs = LocalFrame_instance.m5e(path, options.l54_1);
|
|
5072
5145
|
var tmp;
|
|
5073
5146
|
if (tmp0_elvis_lhs == null) {
|
|
5074
5147
|
return false;
|
|
@@ -5076,15 +5149,15 @@
|
|
|
5076
5149
|
tmp = tmp0_elvis_lhs;
|
|
5077
5150
|
}
|
|
5078
5151
|
var frame = tmp;
|
|
5079
|
-
CurvatureEstimator_instance.
|
|
5080
|
-
CurvatureEstimator_instance.
|
|
5152
|
+
CurvatureEstimator_instance.k5e(frame);
|
|
5153
|
+
CurvatureEstimator_instance.l5e(frame, toDoubleArray(options.m54_1), options.n54_1, options.o54_1);
|
|
5081
5154
|
var inductionVariable = 0;
|
|
5082
5155
|
var last = path.l23_1;
|
|
5083
5156
|
if (inductionVariable < last)
|
|
5084
5157
|
do {
|
|
5085
5158
|
var i = inductionVariable;
|
|
5086
5159
|
inductionVariable = inductionVariable + 1 | 0;
|
|
5087
|
-
path.j2e(i, frame.
|
|
5160
|
+
path.j2e(i, frame.u5d_1[i]);
|
|
5088
5161
|
}
|
|
5089
5162
|
while (inductionVariable < last);
|
|
5090
5163
|
return true;
|
|
@@ -5094,41 +5167,41 @@
|
|
|
5094
5167
|
return PathCurvature_instance;
|
|
5095
5168
|
}
|
|
5096
5169
|
function PlanarFrame(x, y, s, theta, kappa, lat0, lon0, k) {
|
|
5097
|
-
this.
|
|
5098
|
-
this.
|
|
5099
|
-
this.
|
|
5100
|
-
this.
|
|
5101
|
-
this.
|
|
5102
|
-
this.
|
|
5103
|
-
this.
|
|
5104
|
-
this.
|
|
5170
|
+
this.q5d_1 = x;
|
|
5171
|
+
this.r5d_1 = y;
|
|
5172
|
+
this.s5d_1 = s;
|
|
5173
|
+
this.t5d_1 = theta;
|
|
5174
|
+
this.u5d_1 = kappa;
|
|
5175
|
+
this.v5d_1 = lat0;
|
|
5176
|
+
this.w5d_1 = lon0;
|
|
5177
|
+
this.x5d_1 = k;
|
|
5105
5178
|
}
|
|
5106
5179
|
protoOf(PlanarFrame).o = function () {
|
|
5107
|
-
return this.
|
|
5180
|
+
return this.q5d_1.length;
|
|
5108
5181
|
};
|
|
5109
5182
|
function RacingLineReport(size, corners, centerlineCurvature, corridorLo, corridorHi, roadHalfWidthM, lateralOffsetM, trajectoryCurvature, newtonIterations, relativeGradient, converged, activeConstraints) {
|
|
5110
|
-
this.
|
|
5111
|
-
this.
|
|
5112
|
-
this.
|
|
5113
|
-
this.
|
|
5114
|
-
this.
|
|
5115
|
-
this.
|
|
5116
|
-
this.
|
|
5117
|
-
this.
|
|
5118
|
-
this.
|
|
5119
|
-
this.
|
|
5120
|
-
this.
|
|
5121
|
-
this.
|
|
5122
|
-
}
|
|
5123
|
-
protoOf(RacingLineReport).
|
|
5183
|
+
this.i5f_1 = size;
|
|
5184
|
+
this.j5f_1 = corners;
|
|
5185
|
+
this.k5f_1 = centerlineCurvature;
|
|
5186
|
+
this.l5f_1 = corridorLo;
|
|
5187
|
+
this.m5f_1 = corridorHi;
|
|
5188
|
+
this.n5f_1 = roadHalfWidthM;
|
|
5189
|
+
this.o5f_1 = lateralOffsetM;
|
|
5190
|
+
this.p5f_1 = trajectoryCurvature;
|
|
5191
|
+
this.q5f_1 = newtonIterations;
|
|
5192
|
+
this.r5f_1 = relativeGradient;
|
|
5193
|
+
this.s5f_1 = converged;
|
|
5194
|
+
this.t5f_1 = activeConstraints;
|
|
5195
|
+
}
|
|
5196
|
+
protoOf(RacingLineReport).u5f = function () {
|
|
5124
5197
|
var m = 0.0;
|
|
5125
5198
|
var inductionVariable = 0;
|
|
5126
|
-
var last = this.
|
|
5199
|
+
var last = this.i5f_1;
|
|
5127
5200
|
if (inductionVariable < last)
|
|
5128
5201
|
do {
|
|
5129
5202
|
var i = inductionVariable;
|
|
5130
5203
|
inductionVariable = inductionVariable + 1 | 0;
|
|
5131
|
-
var w = this.
|
|
5204
|
+
var w = this.m5f_1[i] - this.l5f_1[i];
|
|
5132
5205
|
if (w > m)
|
|
5133
5206
|
m = w;
|
|
5134
5207
|
}
|
|
@@ -5136,7 +5209,7 @@
|
|
|
5136
5209
|
return m;
|
|
5137
5210
|
};
|
|
5138
5211
|
function project($this, path, options) {
|
|
5139
|
-
var tmp0_elvis_lhs = LocalFrame_instance.
|
|
5212
|
+
var tmp0_elvis_lhs = LocalFrame_instance.m5e(path, options.h54_1.l54_1);
|
|
5140
5213
|
var tmp;
|
|
5141
5214
|
if (tmp0_elvis_lhs == null) {
|
|
5142
5215
|
return null;
|
|
@@ -5144,35 +5217,35 @@
|
|
|
5144
5217
|
tmp = tmp0_elvis_lhs;
|
|
5145
5218
|
}
|
|
5146
5219
|
var frame = tmp;
|
|
5147
|
-
CurvatureEstimator_instance.
|
|
5148
|
-
CurvatureEstimator_instance.
|
|
5220
|
+
CurvatureEstimator_instance.k5e(frame);
|
|
5221
|
+
CurvatureEstimator_instance.l5e(frame, toDoubleArray(options.h54_1.m54_1), options.h54_1.n54_1, options.h54_1.o54_1);
|
|
5149
5222
|
var inductionVariable = 0;
|
|
5150
5223
|
var last = frame.o();
|
|
5151
5224
|
if (inductionVariable < last)
|
|
5152
5225
|
do {
|
|
5153
5226
|
var i = inductionVariable;
|
|
5154
5227
|
inductionVariable = inductionVariable + 1 | 0;
|
|
5155
|
-
if (isNaN_0(frame.
|
|
5156
|
-
frame.
|
|
5228
|
+
if (isNaN_0(frame.u5d_1[i])) {
|
|
5229
|
+
frame.u5d_1[i] = 0.0;
|
|
5157
5230
|
}
|
|
5158
5231
|
}
|
|
5159
5232
|
while (inductionVariable < last);
|
|
5160
5233
|
return frame;
|
|
5161
5234
|
}
|
|
5162
5235
|
function analyzeFrame($this, path, frame, options) {
|
|
5163
|
-
var width = Corridor_instance.
|
|
5164
|
-
var corners = CornerDetector_instance.
|
|
5165
|
-
var bounds = Corridor_instance.
|
|
5236
|
+
var width = Corridor_instance.f5e(path, frame, options);
|
|
5237
|
+
var corners = CornerDetector_instance.p5d(frame, options, width);
|
|
5238
|
+
var bounds = Corridor_instance.h5e(frame, width, options);
|
|
5166
5239
|
var tmp = 0;
|
|
5167
5240
|
var tmp_0 = frame.o();
|
|
5168
5241
|
var tmp_1 = new Float64Array(tmp_0);
|
|
5169
5242
|
while (tmp < tmp_0) {
|
|
5170
5243
|
var tmp_2 = tmp;
|
|
5171
|
-
tmp_1[tmp_2] = coerceIn(0.0, bounds.
|
|
5244
|
+
tmp_1[tmp_2] = coerceIn(0.0, bounds.y5d_1[tmp_2], bounds.z5d_1[tmp_2]);
|
|
5172
5245
|
tmp = tmp + 1 | 0;
|
|
5173
5246
|
}
|
|
5174
5247
|
var center = tmp_1;
|
|
5175
|
-
var objectiveKappa = 1.0 / options.
|
|
5248
|
+
var objectiveKappa = 1.0 / options.b54_1;
|
|
5176
5249
|
var tmp_3 = 0;
|
|
5177
5250
|
var tmp_4 = frame.o();
|
|
5178
5251
|
var tmp_5 = new Float64Array(tmp_4);
|
|
@@ -5180,7 +5253,7 @@
|
|
|
5180
5253
|
var tmp_6 = tmp_3;
|
|
5181
5254
|
var tmp_7;
|
|
5182
5255
|
// Inline function 'kotlin.math.abs' call
|
|
5183
|
-
var x = frame.
|
|
5256
|
+
var x = frame.u5d_1[tmp_6];
|
|
5184
5257
|
if (Math.abs(x) > objectiveKappa) {
|
|
5185
5258
|
tmp_7 = 1.0;
|
|
5186
5259
|
} else {
|
|
@@ -5196,18 +5269,18 @@
|
|
|
5196
5269
|
var tmp_11 = booleanArray(tmp_10);
|
|
5197
5270
|
while (tmp_9 < tmp_10) {
|
|
5198
5271
|
var tmp_12 = tmp_9;
|
|
5199
|
-
tmp_11[tmp_12] = OffsetQp_instance.
|
|
5272
|
+
tmp_11[tmp_12] = OffsetQp_instance.d5f(bounds.y5d_1[tmp_12], bounds.z5d_1[tmp_12], options.g54_1);
|
|
5200
5273
|
tmp_9 = tmp_9 + 1 | 0;
|
|
5201
5274
|
}
|
|
5202
|
-
var energy = tmp_8.
|
|
5275
|
+
var energy = tmp_8.p5e(frame, center, rho, options.c54_1, options.d54_1, tmp_11);
|
|
5203
5276
|
var seed = center;
|
|
5204
|
-
var solved = OffsetQp_instance.
|
|
5205
|
-
var trajectoryCurvature = measureOffsetCurvature($this, frame, solved.
|
|
5277
|
+
var solved = OffsetQp_instance.e5f(energy, bounds.y5d_1, bounds.z5d_1, seed, options.e54_1, options.f54_1, options.g54_1);
|
|
5278
|
+
var trajectoryCurvature = measureOffsetCurvature($this, frame, solved.w5e_1, options);
|
|
5206
5279
|
var tmp_13 = frame.o();
|
|
5207
5280
|
// Inline function 'kotlin.collections.copyOf' call
|
|
5208
5281
|
// Inline function 'kotlin.js.asDynamic' call
|
|
5209
|
-
var tmp$ret$4 = frame.
|
|
5210
|
-
return new RacingLineReport(tmp_13, corners, tmp$ret$4, bounds.
|
|
5282
|
+
var tmp$ret$4 = frame.u5d_1.slice();
|
|
5283
|
+
return new RacingLineReport(tmp_13, corners, tmp$ret$4, bounds.y5d_1, bounds.z5d_1, bounds.a5e_1, solved.w5e_1, trajectoryCurvature, solved.x5e_1, solved.y5e_1, solved.z5e_1, solved.a5f_1);
|
|
5211
5284
|
}
|
|
5212
5285
|
function measureOffsetCurvature($this, frame, offset, options) {
|
|
5213
5286
|
var size = frame.o();
|
|
@@ -5218,28 +5291,28 @@
|
|
|
5218
5291
|
do {
|
|
5219
5292
|
var i = inductionVariable;
|
|
5220
5293
|
inductionVariable = inductionVariable + 1 | 0;
|
|
5221
|
-
var tmp = frame.
|
|
5294
|
+
var tmp = frame.q5d_1[i];
|
|
5222
5295
|
var tmp_0 = offset[i];
|
|
5223
5296
|
// Inline function 'kotlin.math.sin' call
|
|
5224
|
-
var x_0 = frame.
|
|
5297
|
+
var x_0 = frame.t5d_1[i];
|
|
5225
5298
|
x[i] = tmp - tmp_0 * Math.sin(x_0);
|
|
5226
|
-
var tmp_1 = frame.
|
|
5299
|
+
var tmp_1 = frame.r5d_1[i];
|
|
5227
5300
|
var tmp_2 = offset[i];
|
|
5228
5301
|
// Inline function 'kotlin.math.cos' call
|
|
5229
|
-
var x_1 = frame.
|
|
5302
|
+
var x_1 = frame.t5d_1[i];
|
|
5230
5303
|
y[i] = tmp_1 + tmp_2 * Math.cos(x_1);
|
|
5231
5304
|
}
|
|
5232
5305
|
while (inductionVariable < size);
|
|
5233
5306
|
var s = new Float64Array(size);
|
|
5234
|
-
LocalFrame_instance.
|
|
5235
|
-
var line = new PlanarFrame(x, y, s, new Float64Array(size), new Float64Array(size), frame.
|
|
5236
|
-
CurvatureEstimator_instance.
|
|
5237
|
-
CurvatureEstimator_instance.
|
|
5238
|
-
return line.
|
|
5307
|
+
LocalFrame_instance.n5e(x, y, s);
|
|
5308
|
+
var line = new PlanarFrame(x, y, s, new Float64Array(size), new Float64Array(size), frame.v5d_1, frame.w5d_1, frame.x5d_1);
|
|
5309
|
+
CurvatureEstimator_instance.k5e(line);
|
|
5310
|
+
CurvatureEstimator_instance.l5e(line, toDoubleArray(options.h54_1.m54_1), options.h54_1.n54_1, options.h54_1.o54_1);
|
|
5311
|
+
return line.u5d_1;
|
|
5239
5312
|
}
|
|
5240
5313
|
function RacingLine() {
|
|
5241
5314
|
}
|
|
5242
|
-
protoOf(RacingLine).
|
|
5315
|
+
protoOf(RacingLine).v5f = function (path, options) {
|
|
5243
5316
|
var tmp0_elvis_lhs = project(this, path, options);
|
|
5244
5317
|
var tmp;
|
|
5245
5318
|
if (tmp0_elvis_lhs == null) {
|
|
@@ -5250,7 +5323,7 @@
|
|
|
5250
5323
|
var frame = tmp;
|
|
5251
5324
|
return analyzeFrame(this, path, frame, options);
|
|
5252
5325
|
};
|
|
5253
|
-
protoOf(RacingLine).
|
|
5326
|
+
protoOf(RacingLine).p54 = function (source, options) {
|
|
5254
5327
|
var tmp0_elvis_lhs = project(this, source, options);
|
|
5255
5328
|
var tmp;
|
|
5256
5329
|
if (tmp0_elvis_lhs == null) {
|
|
@@ -5280,27 +5353,27 @@
|
|
|
5280
5353
|
do {
|
|
5281
5354
|
var i_0 = inductionVariable_0;
|
|
5282
5355
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
5283
|
-
var n = report.
|
|
5356
|
+
var n = report.o5f_1[i_0];
|
|
5284
5357
|
// Inline function 'kotlin.math.sin' call
|
|
5285
|
-
var x = frame.
|
|
5358
|
+
var x = frame.t5d_1[i_0];
|
|
5286
5359
|
var nx = -Math.sin(x);
|
|
5287
5360
|
// Inline function 'kotlin.math.cos' call
|
|
5288
|
-
var x_0 = frame.
|
|
5361
|
+
var x_0 = frame.t5d_1[i_0];
|
|
5289
5362
|
var ny = Math.cos(x_0);
|
|
5290
|
-
var x_1 = frame.
|
|
5291
|
-
var y = frame.
|
|
5363
|
+
var x_1 = frame.q5d_1[i_0] + n * nx;
|
|
5364
|
+
var y = frame.r5d_1[i_0] + n * ny;
|
|
5292
5365
|
out.m2e(i_0, source.o23(i_0));
|
|
5293
5366
|
out.n2e(i_0, source.p23(i_0));
|
|
5294
|
-
var latLon = LocalFrame_instance.
|
|
5367
|
+
var latLon = LocalFrame_instance.o5e(frame, x_1, y);
|
|
5295
5368
|
out.i24(i_0, latLon[0]);
|
|
5296
5369
|
out.j24(i_0, latLon[1]);
|
|
5297
5370
|
out.l2e(i_0, n);
|
|
5298
|
-
out.j2e(i_0, report.
|
|
5371
|
+
out.j2e(i_0, report.p5f_1[i_0]);
|
|
5299
5372
|
out.s24(i_0, source.k2e(i_0));
|
|
5300
5373
|
}
|
|
5301
5374
|
while (inductionVariable_0 < last_0);
|
|
5302
5375
|
out.f25();
|
|
5303
|
-
PathCurvature_instance.
|
|
5376
|
+
PathCurvature_instance.j54(out, options.h54_1.h5f(true));
|
|
5304
5377
|
return out;
|
|
5305
5378
|
};
|
|
5306
5379
|
var RacingLine_instance;
|
|
@@ -5406,7 +5479,7 @@
|
|
|
5406
5479
|
}
|
|
5407
5480
|
function Companion_16() {
|
|
5408
5481
|
Companion_instance_19 = this;
|
|
5409
|
-
this.
|
|
5482
|
+
this.y5f_1 = new RacingLineOptions();
|
|
5410
5483
|
}
|
|
5411
5484
|
var Companion_instance_19;
|
|
5412
5485
|
function Companion_getInstance_23() {
|
|
@@ -5437,124 +5510,124 @@
|
|
|
5437
5510
|
maxNewtonIterations = maxNewtonIterations === VOID ? 200 : maxNewtonIterations;
|
|
5438
5511
|
gradientTolerance = gradientTolerance === VOID ? 1.0E-8 : gradientTolerance;
|
|
5439
5512
|
boundEpsilonM = boundEpsilonM === VOID ? 1.0E-6 : boundEpsilonM;
|
|
5440
|
-
curvature = curvature === VOID ? Companion_getInstance_21().
|
|
5513
|
+
curvature = curvature === VOID ? Companion_getInstance_21().f5f_1 : curvature;
|
|
5441
5514
|
simplifyToleranceCapM = simplifyToleranceCapM === VOID ? 2.0 : simplifyToleranceCapM;
|
|
5442
|
-
this.
|
|
5443
|
-
this.
|
|
5444
|
-
this.
|
|
5445
|
-
this.
|
|
5446
|
-
this.
|
|
5447
|
-
this.
|
|
5448
|
-
this.
|
|
5449
|
-
this.
|
|
5450
|
-
this.
|
|
5451
|
-
this.
|
|
5452
|
-
this.
|
|
5453
|
-
this.
|
|
5454
|
-
this.
|
|
5455
|
-
this.
|
|
5456
|
-
this.
|
|
5457
|
-
this.
|
|
5458
|
-
this.
|
|
5459
|
-
this.
|
|
5460
|
-
this.
|
|
5461
|
-
this.
|
|
5462
|
-
this.
|
|
5463
|
-
this.
|
|
5464
|
-
this.
|
|
5515
|
+
this.m53_1 = enabled;
|
|
5516
|
+
this.n53_1 = defaultRoadWidthM;
|
|
5517
|
+
this.o53_1 = edgeMarginM;
|
|
5518
|
+
this.p53_1 = corridor;
|
|
5519
|
+
this.q53_1 = cornerEnterRadiusM;
|
|
5520
|
+
this.r53_1 = cornerExitRadiusM;
|
|
5521
|
+
this.s53_1 = minCornerLengthM;
|
|
5522
|
+
this.t53_1 = minCornerTurnDeg;
|
|
5523
|
+
this.u53_1 = hairpinTurnDeg;
|
|
5524
|
+
this.v53_1 = gentleRadiusM;
|
|
5525
|
+
this.w53_1 = regularityFactor;
|
|
5526
|
+
this.x53_1 = selfProximityGapM;
|
|
5527
|
+
this.y53_1 = straightRunM;
|
|
5528
|
+
this.z53_1 = straightRadiusM;
|
|
5529
|
+
this.a54_1 = widthSmoothWindowM;
|
|
5530
|
+
this.b54_1 = objectiveRadiusM;
|
|
5531
|
+
this.c54_1 = steeringLengthM;
|
|
5532
|
+
this.d54_1 = centeringLengthM;
|
|
5533
|
+
this.e54_1 = maxNewtonIterations;
|
|
5534
|
+
this.f54_1 = gradientTolerance;
|
|
5535
|
+
this.g54_1 = boundEpsilonM;
|
|
5536
|
+
this.h54_1 = curvature;
|
|
5537
|
+
this.i54_1 = simplifyToleranceCapM;
|
|
5465
5538
|
// Inline function 'kotlin.require' call
|
|
5466
|
-
if (!(this.
|
|
5539
|
+
if (!(this.n53_1 > 0.0)) {
|
|
5467
5540
|
var message = 'defaultRoadWidthM must be > 0';
|
|
5468
5541
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
5469
5542
|
}
|
|
5470
5543
|
// Inline function 'kotlin.require' call
|
|
5471
|
-
if (!(this.
|
|
5544
|
+
if (!(this.o53_1 >= 0.0)) {
|
|
5472
5545
|
var message_0 = 'edgeMarginM must be >= 0';
|
|
5473
5546
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
5474
5547
|
}
|
|
5475
5548
|
// Inline function 'kotlin.require' call
|
|
5476
|
-
if (!(this.
|
|
5549
|
+
if (!(this.q53_1 > 0.0 && this.r53_1 > 0.0)) {
|
|
5477
5550
|
var message_1 = 'corner radii must be > 0';
|
|
5478
5551
|
throw IllegalArgumentException_init_$Create$(toString(message_1));
|
|
5479
5552
|
}
|
|
5480
5553
|
// Inline function 'kotlin.require' call
|
|
5481
|
-
if (!(this.
|
|
5482
|
-
var message_2 = 'cornerExitRadiusM (' + this.
|
|
5554
|
+
if (!(this.r53_1 >= this.q53_1)) {
|
|
5555
|
+
var message_2 = 'cornerExitRadiusM (' + this.r53_1 + ') must be >= cornerEnterRadiusM ' + ('(' + this.q53_1 + '): a corner has to be harder to open than to keep open, or ') + 'the hysteresis runs backwards and corners flicker';
|
|
5483
5556
|
throw IllegalArgumentException_init_$Create$(toString(message_2));
|
|
5484
5557
|
}
|
|
5485
5558
|
// Inline function 'kotlin.require' call
|
|
5486
|
-
if (!(this.
|
|
5559
|
+
if (!(this.w53_1 > 0.0 && this.w53_1 < 1.0)) {
|
|
5487
5560
|
var message_3 = 'regularityFactor must be in (0, 1) \u2014 at 1.0 the offset map folds';
|
|
5488
5561
|
throw IllegalArgumentException_init_$Create$(toString(message_3));
|
|
5489
5562
|
}
|
|
5490
5563
|
// Inline function 'kotlin.require' call
|
|
5491
|
-
if (!(this.
|
|
5564
|
+
if (!(this.x53_1 > 0.0)) {
|
|
5492
5565
|
var message_4 = 'selfProximityGapM must be > 0';
|
|
5493
5566
|
throw IllegalArgumentException_init_$Create$(toString(message_4));
|
|
5494
5567
|
}
|
|
5495
5568
|
// Inline function 'kotlin.require' call
|
|
5496
|
-
if (!(this.
|
|
5569
|
+
if (!(this.a54_1 >= 0.0)) {
|
|
5497
5570
|
var message_5 = 'widthSmoothWindowM must be >= 0';
|
|
5498
5571
|
throw IllegalArgumentException_init_$Create$(toString(message_5));
|
|
5499
5572
|
}
|
|
5500
5573
|
// Inline function 'kotlin.require' call
|
|
5501
|
-
if (!(this.
|
|
5574
|
+
if (!(this.b54_1 > 0.0)) {
|
|
5502
5575
|
var message_6 = 'objectiveRadiusM must be > 0';
|
|
5503
5576
|
throw IllegalArgumentException_init_$Create$(toString(message_6));
|
|
5504
5577
|
}
|
|
5505
5578
|
// Inline function 'kotlin.require' call
|
|
5506
|
-
if (!(this.
|
|
5579
|
+
if (!(this.c54_1 > 0.0)) {
|
|
5507
5580
|
var message_7 = 'steeringLengthM must be > 0';
|
|
5508
5581
|
throw IllegalArgumentException_init_$Create$(toString(message_7));
|
|
5509
5582
|
}
|
|
5510
5583
|
// Inline function 'kotlin.require' call
|
|
5511
|
-
if (!(this.
|
|
5584
|
+
if (!(this.d54_1 > 0.0)) {
|
|
5512
5585
|
var message_8 = 'centeringLengthM must be > 0';
|
|
5513
5586
|
throw IllegalArgumentException_init_$Create$(toString(message_8));
|
|
5514
5587
|
}
|
|
5515
5588
|
// Inline function 'kotlin.require' call
|
|
5516
|
-
if (!(this.
|
|
5589
|
+
if (!(this.e54_1 > 0)) {
|
|
5517
5590
|
var message_9 = 'maxNewtonIterations must be > 0';
|
|
5518
5591
|
throw IllegalArgumentException_init_$Create$(toString(message_9));
|
|
5519
5592
|
}
|
|
5520
5593
|
// Inline function 'kotlin.require' call
|
|
5521
|
-
if (!(this.
|
|
5594
|
+
if (!(this.f54_1 > 0.0)) {
|
|
5522
5595
|
var message_10 = 'gradientTolerance must be > 0';
|
|
5523
5596
|
throw IllegalArgumentException_init_$Create$(toString(message_10));
|
|
5524
5597
|
}
|
|
5525
5598
|
// Inline function 'kotlin.require' call
|
|
5526
|
-
if (!(this.
|
|
5599
|
+
if (!(this.g54_1 > 0.0)) {
|
|
5527
5600
|
var message_11 = 'boundEpsilonM must be > 0';
|
|
5528
5601
|
throw IllegalArgumentException_init_$Create$(toString(message_11));
|
|
5529
5602
|
}
|
|
5530
5603
|
}
|
|
5531
5604
|
protoOf(RacingLineOptions).toString = function () {
|
|
5532
|
-
return 'RacingLineOptions(enabled=' + this.
|
|
5605
|
+
return 'RacingLineOptions(enabled=' + this.m53_1 + ', defaultRoadWidthM=' + this.n53_1 + ', edgeMarginM=' + this.o53_1 + ', corridor=' + this.p53_1.toString() + ', cornerEnterRadiusM=' + this.q53_1 + ', cornerExitRadiusM=' + this.r53_1 + ', minCornerLengthM=' + this.s53_1 + ', minCornerTurnDeg=' + this.t53_1 + ', hairpinTurnDeg=' + this.u53_1 + ', gentleRadiusM=' + this.v53_1 + ', regularityFactor=' + this.w53_1 + ', selfProximityGapM=' + this.x53_1 + ', straightRunM=' + this.y53_1 + ', straightRadiusM=' + this.z53_1 + ', widthSmoothWindowM=' + this.a54_1 + ', objectiveRadiusM=' + this.b54_1 + ', steeringLengthM=' + this.c54_1 + ', centeringLengthM=' + this.d54_1 + ', maxNewtonIterations=' + this.e54_1 + ', gradientTolerance=' + this.f54_1 + ', boundEpsilonM=' + this.g54_1 + ', curvature=' + this.h54_1.toString() + ', simplifyToleranceCapM=' + this.i54_1 + ')';
|
|
5533
5606
|
};
|
|
5534
5607
|
protoOf(RacingLineOptions).hashCode = function () {
|
|
5535
|
-
var result = getBooleanHashCode(this.
|
|
5536
|
-
result = imul(result, 31) + getNumberHashCode(this.y52_1) | 0;
|
|
5537
|
-
result = imul(result, 31) + getNumberHashCode(this.z52_1) | 0;
|
|
5538
|
-
result = imul(result, 31) + this.a53_1.hashCode() | 0;
|
|
5539
|
-
result = imul(result, 31) + getNumberHashCode(this.b53_1) | 0;
|
|
5540
|
-
result = imul(result, 31) + getNumberHashCode(this.c53_1) | 0;
|
|
5541
|
-
result = imul(result, 31) + getNumberHashCode(this.d53_1) | 0;
|
|
5542
|
-
result = imul(result, 31) + getNumberHashCode(this.e53_1) | 0;
|
|
5543
|
-
result = imul(result, 31) + getNumberHashCode(this.f53_1) | 0;
|
|
5544
|
-
result = imul(result, 31) + getNumberHashCode(this.g53_1) | 0;
|
|
5545
|
-
result = imul(result, 31) + getNumberHashCode(this.h53_1) | 0;
|
|
5546
|
-
result = imul(result, 31) + getNumberHashCode(this.i53_1) | 0;
|
|
5547
|
-
result = imul(result, 31) + getNumberHashCode(this.j53_1) | 0;
|
|
5548
|
-
result = imul(result, 31) + getNumberHashCode(this.k53_1) | 0;
|
|
5549
|
-
result = imul(result, 31) + getNumberHashCode(this.l53_1) | 0;
|
|
5550
|
-
result = imul(result, 31) + getNumberHashCode(this.m53_1) | 0;
|
|
5608
|
+
var result = getBooleanHashCode(this.m53_1);
|
|
5551
5609
|
result = imul(result, 31) + getNumberHashCode(this.n53_1) | 0;
|
|
5552
5610
|
result = imul(result, 31) + getNumberHashCode(this.o53_1) | 0;
|
|
5553
|
-
result = imul(result, 31) + this.p53_1 | 0;
|
|
5611
|
+
result = imul(result, 31) + this.p53_1.hashCode() | 0;
|
|
5554
5612
|
result = imul(result, 31) + getNumberHashCode(this.q53_1) | 0;
|
|
5555
5613
|
result = imul(result, 31) + getNumberHashCode(this.r53_1) | 0;
|
|
5556
|
-
result = imul(result, 31) + this.s53_1
|
|
5614
|
+
result = imul(result, 31) + getNumberHashCode(this.s53_1) | 0;
|
|
5557
5615
|
result = imul(result, 31) + getNumberHashCode(this.t53_1) | 0;
|
|
5616
|
+
result = imul(result, 31) + getNumberHashCode(this.u53_1) | 0;
|
|
5617
|
+
result = imul(result, 31) + getNumberHashCode(this.v53_1) | 0;
|
|
5618
|
+
result = imul(result, 31) + getNumberHashCode(this.w53_1) | 0;
|
|
5619
|
+
result = imul(result, 31) + getNumberHashCode(this.x53_1) | 0;
|
|
5620
|
+
result = imul(result, 31) + getNumberHashCode(this.y53_1) | 0;
|
|
5621
|
+
result = imul(result, 31) + getNumberHashCode(this.z53_1) | 0;
|
|
5622
|
+
result = imul(result, 31) + getNumberHashCode(this.a54_1) | 0;
|
|
5623
|
+
result = imul(result, 31) + getNumberHashCode(this.b54_1) | 0;
|
|
5624
|
+
result = imul(result, 31) + getNumberHashCode(this.c54_1) | 0;
|
|
5625
|
+
result = imul(result, 31) + getNumberHashCode(this.d54_1) | 0;
|
|
5626
|
+
result = imul(result, 31) + this.e54_1 | 0;
|
|
5627
|
+
result = imul(result, 31) + getNumberHashCode(this.f54_1) | 0;
|
|
5628
|
+
result = imul(result, 31) + getNumberHashCode(this.g54_1) | 0;
|
|
5629
|
+
result = imul(result, 31) + this.h54_1.hashCode() | 0;
|
|
5630
|
+
result = imul(result, 31) + getNumberHashCode(this.i54_1) | 0;
|
|
5558
5631
|
return result;
|
|
5559
5632
|
};
|
|
5560
5633
|
protoOf(RacingLineOptions).equals = function (other) {
|
|
@@ -5562,51 +5635,51 @@
|
|
|
5562
5635
|
return true;
|
|
5563
5636
|
if (!(other instanceof RacingLineOptions))
|
|
5564
5637
|
return false;
|
|
5565
|
-
if (!(this.
|
|
5638
|
+
if (!(this.m53_1 === other.m53_1))
|
|
5566
5639
|
return false;
|
|
5567
|
-
if (!equals(this.
|
|
5640
|
+
if (!equals(this.n53_1, other.n53_1))
|
|
5568
5641
|
return false;
|
|
5569
|
-
if (!equals(this.
|
|
5642
|
+
if (!equals(this.o53_1, other.o53_1))
|
|
5570
5643
|
return false;
|
|
5571
|
-
if (!this.
|
|
5644
|
+
if (!this.p53_1.equals(other.p53_1))
|
|
5572
5645
|
return false;
|
|
5573
|
-
if (!equals(this.
|
|
5646
|
+
if (!equals(this.q53_1, other.q53_1))
|
|
5574
5647
|
return false;
|
|
5575
|
-
if (!equals(this.
|
|
5648
|
+
if (!equals(this.r53_1, other.r53_1))
|
|
5576
5649
|
return false;
|
|
5577
|
-
if (!equals(this.
|
|
5650
|
+
if (!equals(this.s53_1, other.s53_1))
|
|
5578
5651
|
return false;
|
|
5579
|
-
if (!equals(this.
|
|
5652
|
+
if (!equals(this.t53_1, other.t53_1))
|
|
5580
5653
|
return false;
|
|
5581
|
-
if (!equals(this.
|
|
5654
|
+
if (!equals(this.u53_1, other.u53_1))
|
|
5582
5655
|
return false;
|
|
5583
|
-
if (!equals(this.
|
|
5656
|
+
if (!equals(this.v53_1, other.v53_1))
|
|
5584
5657
|
return false;
|
|
5585
|
-
if (!equals(this.
|
|
5658
|
+
if (!equals(this.w53_1, other.w53_1))
|
|
5586
5659
|
return false;
|
|
5587
|
-
if (!equals(this.
|
|
5660
|
+
if (!equals(this.x53_1, other.x53_1))
|
|
5588
5661
|
return false;
|
|
5589
|
-
if (!equals(this.
|
|
5662
|
+
if (!equals(this.y53_1, other.y53_1))
|
|
5590
5663
|
return false;
|
|
5591
|
-
if (!equals(this.
|
|
5664
|
+
if (!equals(this.z53_1, other.z53_1))
|
|
5592
5665
|
return false;
|
|
5593
|
-
if (!equals(this.
|
|
5666
|
+
if (!equals(this.a54_1, other.a54_1))
|
|
5594
5667
|
return false;
|
|
5595
|
-
if (!equals(this.
|
|
5668
|
+
if (!equals(this.b54_1, other.b54_1))
|
|
5596
5669
|
return false;
|
|
5597
|
-
if (!equals(this.
|
|
5670
|
+
if (!equals(this.c54_1, other.c54_1))
|
|
5598
5671
|
return false;
|
|
5599
|
-
if (!equals(this.
|
|
5672
|
+
if (!equals(this.d54_1, other.d54_1))
|
|
5600
5673
|
return false;
|
|
5601
|
-
if (!(this.
|
|
5674
|
+
if (!(this.e54_1 === other.e54_1))
|
|
5602
5675
|
return false;
|
|
5603
|
-
if (!equals(this.
|
|
5676
|
+
if (!equals(this.f54_1, other.f54_1))
|
|
5604
5677
|
return false;
|
|
5605
|
-
if (!equals(this.
|
|
5678
|
+
if (!equals(this.g54_1, other.g54_1))
|
|
5606
5679
|
return false;
|
|
5607
|
-
if (!this.
|
|
5680
|
+
if (!this.h54_1.equals(other.h54_1))
|
|
5608
5681
|
return false;
|
|
5609
|
-
if (!equals(this.
|
|
5682
|
+
if (!equals(this.i54_1, other.i54_1))
|
|
5610
5683
|
return false;
|
|
5611
5684
|
return true;
|
|
5612
5685
|
};
|
|
@@ -5816,7 +5889,7 @@
|
|
|
5816
5889
|
function enhance(path, options) {
|
|
5817
5890
|
_init_properties_EngineJsApi_kt__9bputf();
|
|
5818
5891
|
var opts = toEnhanceOptions(options);
|
|
5819
|
-
var provider = opts.
|
|
5892
|
+
var provider = opts.n52_1 ? elevationProviderFor(options) : null;
|
|
5820
5893
|
var tmp = GlobalScope_instance;
|
|
5821
5894
|
return promise(tmp, VOID, VOID, enhance$slambda_0(path, provider, opts, null));
|
|
5822
5895
|
}
|
|
@@ -5824,7 +5897,7 @@
|
|
|
5824
5897
|
_init_properties_EngineJsApi_kt__9bputf();
|
|
5825
5898
|
var opts = toEnhanceOptions(options);
|
|
5826
5899
|
var course = new CoursePhysics(new Course(path, toCyclist(cyclist), toBike(bike)), RhoProviderEstimate_instance, AeroProviderConstant_instance, toWindProvider(wind), toCyclistPowerProvider(power));
|
|
5827
|
-
var provider = opts.
|
|
5900
|
+
var provider = opts.n52_1 ? elevationProviderFor(options) : null;
|
|
5828
5901
|
var tmp = GlobalScope_instance;
|
|
5829
5902
|
return promise(tmp, VOID, VOID, enhanceWithCourse$slambda_0(course, opts, provider, null));
|
|
5830
5903
|
}
|
|
@@ -5939,7 +6012,7 @@
|
|
|
5939
6012
|
function detectClimbs(path) {
|
|
5940
6013
|
_init_properties_EngineJsApi_kt__9bputf();
|
|
5941
6014
|
// Inline function 'kotlin.collections.map' call
|
|
5942
|
-
var this_0 = ClimbDetector_instance.
|
|
6015
|
+
var this_0 = ClimbDetector_instance.e57(path);
|
|
5943
6016
|
// Inline function 'kotlin.collections.mapTo' call
|
|
5944
6017
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
5945
6018
|
var _iterator__ex2g4s = this_0.l();
|
|
@@ -5956,7 +6029,7 @@
|
|
|
5956
6029
|
_init_properties_EngineJsApi_kt__9bputf();
|
|
5957
6030
|
var tmp = ClimbDetector_instance;
|
|
5958
6031
|
// Inline function 'kotlin.collections.map' call
|
|
5959
|
-
var this_0 = tmp.
|
|
6032
|
+
var this_0 = tmp.d57(path, new ClimbOptions(minMinClimbElevationM, maxMinClimbElevationM, minClimbElevationRatio, minGradePercent, maxDiffRealGrade, booster, maxAnalysisPoints == null ? (new ClimbOptions()).l56_1 : maxAnalysisPoints));
|
|
5960
6033
|
// Inline function 'kotlin.collections.mapTo' call
|
|
5961
6034
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
5962
6035
|
var _iterator__ex2g4s = this_0.l();
|
|
@@ -5971,8 +6044,8 @@
|
|
|
5971
6044
|
function analyzeRacingLine(path, options) {
|
|
5972
6045
|
options = options === VOID ? null : options;
|
|
5973
6046
|
_init_properties_EngineJsApi_kt__9bputf();
|
|
5974
|
-
var racingLine = toEnhanceOptions(options).
|
|
5975
|
-
var tmp0_elvis_lhs = RacingLine_instance.
|
|
6047
|
+
var racingLine = toEnhanceOptions(options).u52_1;
|
|
6048
|
+
var tmp0_elvis_lhs = RacingLine_instance.v5f(path, racingLine);
|
|
5976
6049
|
var tmp;
|
|
5977
6050
|
if (tmp0_elvis_lhs == null) {
|
|
5978
6051
|
return null;
|
|
@@ -5981,9 +6054,9 @@
|
|
|
5981
6054
|
}
|
|
5982
6055
|
var report = tmp;
|
|
5983
6056
|
var o = {};
|
|
5984
|
-
o.size = report.
|
|
6057
|
+
o.size = report.i5f_1;
|
|
5985
6058
|
// Inline function 'kotlin.collections.map' call
|
|
5986
|
-
var this_0 = report.
|
|
6059
|
+
var this_0 = report.j5f_1;
|
|
5987
6060
|
// Inline function 'kotlin.collections.mapTo' call
|
|
5988
6061
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
5989
6062
|
var _iterator__ex2g4s = this_0.l();
|
|
@@ -5994,17 +6067,17 @@
|
|
|
5994
6067
|
}
|
|
5995
6068
|
// Inline function 'kotlin.collections.toTypedArray' call
|
|
5996
6069
|
o.corners = copyToArray(destination);
|
|
5997
|
-
o.centerlineCurvature = report.
|
|
5998
|
-
o.trajectoryCurvature = report.
|
|
5999
|
-
o.corridorLo = report.
|
|
6000
|
-
o.corridorHi = report.
|
|
6001
|
-
o.roadHalfWidthM = report.
|
|
6002
|
-
o.lateralOffsetM = report.
|
|
6003
|
-
o.maxCorridorWidthM = report.
|
|
6004
|
-
o.newtonIterations = report.
|
|
6005
|
-
o.relativeGradient = report.
|
|
6006
|
-
o.converged = report.
|
|
6007
|
-
o.activeConstraints = report.
|
|
6070
|
+
o.centerlineCurvature = report.k5f_1;
|
|
6071
|
+
o.trajectoryCurvature = report.p5f_1;
|
|
6072
|
+
o.corridorLo = report.l5f_1;
|
|
6073
|
+
o.corridorHi = report.m5f_1;
|
|
6074
|
+
o.roadHalfWidthM = report.n5f_1;
|
|
6075
|
+
o.lateralOffsetM = report.o5f_1;
|
|
6076
|
+
o.maxCorridorWidthM = report.u5f();
|
|
6077
|
+
o.newtonIterations = report.q5f_1;
|
|
6078
|
+
o.relativeGradient = report.r5f_1;
|
|
6079
|
+
o.converged = report.s5f_1;
|
|
6080
|
+
o.activeConstraints = report.t5f_1;
|
|
6008
6081
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
6009
6082
|
return o;
|
|
6010
6083
|
}
|
|
@@ -6085,32 +6158,32 @@
|
|
|
6085
6158
|
return d;
|
|
6086
6159
|
requireOnlyKeys(_this__u8e3s4, 'EnhanceOptionsDto', get_ENHANCE_OPTIONS_KEYS());
|
|
6087
6160
|
var tmp0_elvis_lhs = _this__u8e3s4.fixElevation;
|
|
6088
|
-
var tmp = tmp0_elvis_lhs == null ? d.
|
|
6161
|
+
var tmp = tmp0_elvis_lhs == null ? d.n52_1 : tmp0_elvis_lhs;
|
|
6089
6162
|
var tmp1_elvis_lhs = _this__u8e3s4.computeMaxSpeeds;
|
|
6090
|
-
var tmp_0 = tmp1_elvis_lhs == null ? d.
|
|
6163
|
+
var tmp_0 = tmp1_elvis_lhs == null ? d.o52_1 : tmp1_elvis_lhs;
|
|
6091
6164
|
var tmp2_elvis_lhs = _this__u8e3s4.virtualizeTrack;
|
|
6092
|
-
var tmp_1 = tmp2_elvis_lhs == null ? d.
|
|
6165
|
+
var tmp_1 = tmp2_elvis_lhs == null ? d.p52_1 : tmp2_elvis_lhs;
|
|
6093
6166
|
var tmp3_elvis_lhs = _this__u8e3s4.computeOnePointPerSecond;
|
|
6094
|
-
var tmp_2 = tmp3_elvis_lhs == null ? d.
|
|
6167
|
+
var tmp_2 = tmp3_elvis_lhs == null ? d.q52_1 : tmp3_elvis_lhs;
|
|
6095
6168
|
var tmp4_elvis_lhs = _this__u8e3s4.simplifyEnabled;
|
|
6096
|
-
var tmp_3 = tmp4_elvis_lhs == null ? d.
|
|
6169
|
+
var tmp_3 = tmp4_elvis_lhs == null ? d.r52_1.f52_1 : tmp4_elvis_lhs;
|
|
6097
6170
|
var tmp5_elvis_lhs = _this__u8e3s4.simplifyToleranceM;
|
|
6098
|
-
var tmp_4 = tmp5_elvis_lhs == null ? d.
|
|
6171
|
+
var tmp_4 = tmp5_elvis_lhs == null ? d.r52_1.g52_1 : tmp5_elvis_lhs;
|
|
6099
6172
|
var tmp6_elvis_lhs = _this__u8e3s4.simplifyZExaggeration;
|
|
6100
|
-
var tmp_5 = new SimplifyPathOptions(tmp_3, tmp_4, tmp6_elvis_lhs == null ? d.
|
|
6173
|
+
var tmp_5 = new SimplifyPathOptions(tmp_3, tmp_4, tmp6_elvis_lhs == null ? d.r52_1.h52_1 : tmp6_elvis_lhs);
|
|
6101
6174
|
var tmp7_elvis_lhs = _this__u8e3s4.wPrimeBalanceEnabled;
|
|
6102
|
-
var tmp_6 = tmp7_elvis_lhs == null ? d.
|
|
6175
|
+
var tmp_6 = tmp7_elvis_lhs == null ? d.s52_1.i52_1 : tmp7_elvis_lhs;
|
|
6103
6176
|
var tmp8_elvis_lhs = _this__u8e3s4.wPrimeBalanceCriticalPower;
|
|
6104
|
-
var tmp_7 = tmp8_elvis_lhs == null ? d.
|
|
6177
|
+
var tmp_7 = tmp8_elvis_lhs == null ? d.s52_1.j52_1 : tmp8_elvis_lhs;
|
|
6105
6178
|
var tmp9_elvis_lhs = _this__u8e3s4.wPrimeBalanceWPrime;
|
|
6106
|
-
var tmp_8 = new WPrimeBalanceOptions(tmp_6, tmp_7, tmp9_elvis_lhs == null ? d.
|
|
6179
|
+
var tmp_8 = new WPrimeBalanceOptions(tmp_6, tmp_7, tmp9_elvis_lhs == null ? d.s52_1.k52_1 : tmp9_elvis_lhs);
|
|
6107
6180
|
var tmp10_elvis_lhs = _this__u8e3s4.curvatureEnabled;
|
|
6108
|
-
var tmp_9 = new CurvatureOptions(tmp10_elvis_lhs == null ? d.
|
|
6181
|
+
var tmp_9 = new CurvatureOptions(tmp10_elvis_lhs == null ? d.t52_1.k54_1 : tmp10_elvis_lhs);
|
|
6109
6182
|
var tmp11_elvis_lhs = _this__u8e3s4.racingLineEnabled;
|
|
6110
|
-
var tmp13_enabled = tmp11_elvis_lhs == null ? d.
|
|
6183
|
+
var tmp13_enabled = tmp11_elvis_lhs == null ? d.u52_1.m53_1 : tmp11_elvis_lhs;
|
|
6111
6184
|
var tmp14_corridor = parseCorridor(_this__u8e3s4.racingLineCorridor);
|
|
6112
6185
|
var tmp12_elvis_lhs = _this__u8e3s4.racingLineRoadWidthM;
|
|
6113
|
-
var tmp15_defaultRoadWidthM = tmp12_elvis_lhs == null ? d.
|
|
6186
|
+
var tmp15_defaultRoadWidthM = tmp12_elvis_lhs == null ? d.u52_1.n53_1 : tmp12_elvis_lhs;
|
|
6114
6187
|
var tmp_10 = new RacingLineOptions(tmp13_enabled, tmp15_defaultRoadWidthM, VOID, tmp14_corridor);
|
|
6115
6188
|
// Inline function 'kotlin.run' call
|
|
6116
6189
|
var tmp0_safe_receiver = _this__u8e3s4.elevationGainPreset;
|
|
@@ -6123,8 +6196,8 @@
|
|
|
6123
6196
|
}
|
|
6124
6197
|
var named = tmp_11;
|
|
6125
6198
|
var tmp1_elvis_lhs_0 = _this__u8e3s4.elevationGainEnabled;
|
|
6126
|
-
var tmp_12 = tmp1_elvis_lhs_0 == null ? d.
|
|
6127
|
-
var tmp_13 = named == null ? d.
|
|
6199
|
+
var tmp_12 = tmp1_elvis_lhs_0 == null ? d.v52_1.a2b_1 : tmp1_elvis_lhs_0;
|
|
6200
|
+
var tmp_13 = named == null ? d.v52_1.b2b_1 : named;
|
|
6128
6201
|
var tmp3_elvis_lhs_0 = _this__u8e3s4.elevationGainThresholdM;
|
|
6129
6202
|
var tmp_14;
|
|
6130
6203
|
if (tmp3_elvis_lhs_0 == null) {
|
|
@@ -6133,13 +6206,13 @@
|
|
|
6133
6206
|
tmp_14 = tmp3_elvis_lhs_0;
|
|
6134
6207
|
}
|
|
6135
6208
|
var tmp5_elvis_lhs_0 = tmp_14;
|
|
6136
|
-
var tmp_15 = new ElevationGainOptions(tmp_12, tmp_13, tmp5_elvis_lhs_0 == null ? d.
|
|
6209
|
+
var tmp_15 = new ElevationGainOptions(tmp_12, tmp_13, tmp5_elvis_lhs_0 == null ? d.v52_1.c2b_1 : tmp5_elvis_lhs_0);
|
|
6137
6210
|
var tmp16_elvis_lhs = _this__u8e3s4.elevationSmoothWindowM;
|
|
6138
|
-
var tmp_16 = tmp16_elvis_lhs == null ? d.
|
|
6211
|
+
var tmp_16 = tmp16_elvis_lhs == null ? d.w52_1 : tmp16_elvis_lhs;
|
|
6139
6212
|
var tmp17_elvis_lhs = _this__u8e3s4.bridgeDecksEnabled;
|
|
6140
|
-
var tmp_17 = tmp17_elvis_lhs == null ? d.
|
|
6213
|
+
var tmp_17 = tmp17_elvis_lhs == null ? d.x52_1.m50_1 : tmp17_elvis_lhs;
|
|
6141
6214
|
var tmp18_elvis_lhs = _this__u8e3s4.tunnelsEnabled;
|
|
6142
|
-
return new EnhanceOptions(tmp, tmp_0, tmp_1, tmp_2, tmp_5, tmp_8, tmp_9, tmp_10, tmp_15, tmp_16, new ElevationCorrectionOptions(tmp_17, tmp18_elvis_lhs == null ? d.
|
|
6215
|
+
return new EnhanceOptions(tmp, tmp_0, tmp_1, tmp_2, tmp_5, tmp_8, tmp_9, tmp_10, tmp_15, tmp_16, new ElevationCorrectionOptions(tmp_17, tmp18_elvis_lhs == null ? d.x52_1.n50_1 : tmp18_elvis_lhs));
|
|
6143
6216
|
}
|
|
6144
6217
|
function elevationProviderFor(options) {
|
|
6145
6218
|
_init_properties_EngineJsApi_kt__9bputf();
|
|
@@ -6150,7 +6223,7 @@
|
|
|
6150
6223
|
}
|
|
6151
6224
|
function parseCorridor(name) {
|
|
6152
6225
|
_init_properties_EngineJsApi_kt__9bputf();
|
|
6153
|
-
return name == null ? Companion_getInstance_23().
|
|
6226
|
+
return name == null ? Companion_getInstance_23().y5f_1.p53_1 : Companion_instance_18.q17(name);
|
|
6154
6227
|
}
|
|
6155
6228
|
function defaultJsOptions() {
|
|
6156
6229
|
_init_properties_EngineJsApi_kt__9bputf();
|
|
@@ -6199,7 +6272,7 @@
|
|
|
6199
6272
|
}
|
|
6200
6273
|
function toCyclistPowerProvider(_this__u8e3s4) {
|
|
6201
6274
|
_init_properties_EngineJsApi_kt__9bputf();
|
|
6202
|
-
return toPowerSpec(_this__u8e3s4).
|
|
6275
|
+
return toPowerSpec(_this__u8e3s4).a5a();
|
|
6203
6276
|
}
|
|
6204
6277
|
function toPowerSpec(_this__u8e3s4) {
|
|
6205
6278
|
_init_properties_EngineJsApi_kt__9bputf();
|
|
@@ -6207,7 +6280,7 @@
|
|
|
6207
6280
|
return new CyclistPowerSpec();
|
|
6208
6281
|
requireOnlyKeys(_this__u8e3s4, 'PowerProviderDto', get_POWER_PROVIDER_KEYS());
|
|
6209
6282
|
var defaults = new CyclistPowerSpec();
|
|
6210
|
-
var tmp0_elvis_lhs = Companion_instance_11.
|
|
6283
|
+
var tmp0_elvis_lhs = Companion_instance_11.s59(_this__u8e3s4.type);
|
|
6211
6284
|
var tmp;
|
|
6212
6285
|
if (tmp0_elvis_lhs == null) {
|
|
6213
6286
|
// Inline function 'kotlin.error' call
|
|
@@ -6218,17 +6291,17 @@
|
|
|
6218
6291
|
}
|
|
6219
6292
|
var tmp_0 = tmp;
|
|
6220
6293
|
var tmp1_elvis_lhs = _this__u8e3s4.power;
|
|
6221
|
-
var tmp_1 = tmp1_elvis_lhs == null ? defaults.
|
|
6294
|
+
var tmp_1 = tmp1_elvis_lhs == null ? defaults.u59_1 : tmp1_elvis_lhs;
|
|
6222
6295
|
var tmp2_elvis_lhs = _this__u8e3s4.criticalPower;
|
|
6223
|
-
var tmp_2 = tmp2_elvis_lhs == null ? defaults.
|
|
6296
|
+
var tmp_2 = tmp2_elvis_lhs == null ? defaults.v59_1 : tmp2_elvis_lhs;
|
|
6224
6297
|
var tmp3_elvis_lhs = _this__u8e3s4.wPrime;
|
|
6225
|
-
var tmp_3 = tmp3_elvis_lhs == null ? defaults.
|
|
6298
|
+
var tmp_3 = tmp3_elvis_lhs == null ? defaults.w59_1 : tmp3_elvis_lhs;
|
|
6226
6299
|
var tmp4_elvis_lhs = _this__u8e3s4.useHarmonics;
|
|
6227
|
-
var tmp_4 = tmp4_elvis_lhs == null ? defaults.
|
|
6300
|
+
var tmp_4 = tmp4_elvis_lhs == null ? defaults.x59_1 : tmp4_elvis_lhs;
|
|
6228
6301
|
var tmp5_elvis_lhs = _this__u8e3s4.pacing;
|
|
6229
|
-
var tmp_5 = tmp5_elvis_lhs == null ? defaults.
|
|
6302
|
+
var tmp_5 = tmp5_elvis_lhs == null ? defaults.y59_1 : tmp5_elvis_lhs;
|
|
6230
6303
|
var tmp6_elvis_lhs = _this__u8e3s4.maxSlewWPerS;
|
|
6231
|
-
return new CyclistPowerSpec(tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, tmp_5, tmp6_elvis_lhs == null ? defaults.
|
|
6304
|
+
return new CyclistPowerSpec(tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, tmp_5, tmp6_elvis_lhs == null ? defaults.z59_1 : tmp6_elvis_lhs);
|
|
6232
6305
|
}
|
|
6233
6306
|
function requireOnlyKeys(_this__u8e3s4, dtoName, allowed) {
|
|
6234
6307
|
_init_properties_EngineJsApi_kt__9bputf();
|
|
@@ -6257,33 +6330,33 @@
|
|
|
6257
6330
|
function toDto(_this__u8e3s4) {
|
|
6258
6331
|
_init_properties_EngineJsApi_kt__9bputf();
|
|
6259
6332
|
var o = {};
|
|
6260
|
-
o.startDistanceM = _this__u8e3s4.
|
|
6261
|
-
o.endDistanceM = _this__u8e3s4.
|
|
6262
|
-
o.startElevationM = _this__u8e3s4.
|
|
6263
|
-
o.endElevationM = _this__u8e3s4.
|
|
6264
|
-
o.lengthM = _this__u8e3s4.
|
|
6265
|
-
o.elevationGainM = _this__u8e3s4.
|
|
6266
|
-
o.grade = _this__u8e3s4.
|
|
6333
|
+
o.startDistanceM = _this__u8e3s4.z55_1;
|
|
6334
|
+
o.endDistanceM = _this__u8e3s4.a56_1;
|
|
6335
|
+
o.startElevationM = _this__u8e3s4.b56_1;
|
|
6336
|
+
o.endElevationM = _this__u8e3s4.c56_1;
|
|
6337
|
+
o.lengthM = _this__u8e3s4.v55();
|
|
6338
|
+
o.elevationGainM = _this__u8e3s4.w55();
|
|
6339
|
+
o.grade = _this__u8e3s4.d56();
|
|
6267
6340
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
6268
6341
|
return o;
|
|
6269
6342
|
}
|
|
6270
6343
|
function toDto_0(_this__u8e3s4) {
|
|
6271
6344
|
_init_properties_EngineJsApi_kt__9bputf();
|
|
6272
6345
|
var o = {};
|
|
6273
|
-
o.startIndex = _this__u8e3s4.
|
|
6274
|
-
o.endIndex = _this__u8e3s4.
|
|
6275
|
-
o.startDistanceM = _this__u8e3s4.
|
|
6276
|
-
o.endDistanceM = _this__u8e3s4.
|
|
6277
|
-
o.startElevationM = _this__u8e3s4.
|
|
6278
|
-
o.endElevationM = _this__u8e3s4.
|
|
6279
|
-
o.lengthM = _this__u8e3s4.
|
|
6280
|
-
o.elevationGainM = _this__u8e3s4.
|
|
6281
|
-
o.averageGrade = _this__u8e3s4.
|
|
6282
|
-
o.climbingGrade = _this__u8e3s4.
|
|
6283
|
-
o.positiveElevationM = _this__u8e3s4.
|
|
6284
|
-
o.negativeElevationM = _this__u8e3s4.
|
|
6346
|
+
o.startIndex = _this__u8e3s4.l55_1;
|
|
6347
|
+
o.endIndex = _this__u8e3s4.m55_1;
|
|
6348
|
+
o.startDistanceM = _this__u8e3s4.n55_1;
|
|
6349
|
+
o.endDistanceM = _this__u8e3s4.o55_1;
|
|
6350
|
+
o.startElevationM = _this__u8e3s4.p55_1;
|
|
6351
|
+
o.endElevationM = _this__u8e3s4.q55_1;
|
|
6352
|
+
o.lengthM = _this__u8e3s4.v55();
|
|
6353
|
+
o.elevationGainM = _this__u8e3s4.w55();
|
|
6354
|
+
o.averageGrade = _this__u8e3s4.x55();
|
|
6355
|
+
o.climbingGrade = _this__u8e3s4.y55();
|
|
6356
|
+
o.positiveElevationM = _this__u8e3s4.r55_1;
|
|
6357
|
+
o.negativeElevationM = _this__u8e3s4.s55_1;
|
|
6285
6358
|
// Inline function 'kotlin.collections.map' call
|
|
6286
|
-
var this_0 = _this__u8e3s4.
|
|
6359
|
+
var this_0 = _this__u8e3s4.u55_1;
|
|
6287
6360
|
// Inline function 'kotlin.collections.mapTo' call
|
|
6288
6361
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
6289
6362
|
var _iterator__ex2g4s = this_0.l();
|
|
@@ -6300,32 +6373,32 @@
|
|
|
6300
6373
|
function cornerObj(c) {
|
|
6301
6374
|
_init_properties_EngineJsApi_kt__9bputf();
|
|
6302
6375
|
var o = {};
|
|
6303
|
-
o.fromIndex = c.
|
|
6304
|
-
o.untilIndex = c.
|
|
6305
|
-
o.apexIndex = c.
|
|
6306
|
-
o.kind = c.
|
|
6307
|
-
o.turnRad = c.
|
|
6308
|
-
o.direction = c.
|
|
6309
|
-
o.radiusQ20M = c.
|
|
6310
|
-
o.radiusMinM = c.
|
|
6311
|
-
o.lengthM = c.
|
|
6376
|
+
o.fromIndex = c.c5d_1;
|
|
6377
|
+
o.untilIndex = c.d5d_1;
|
|
6378
|
+
o.apexIndex = c.e5d_1;
|
|
6379
|
+
o.kind = c.f5d_1.u1_1;
|
|
6380
|
+
o.turnRad = c.g5d_1;
|
|
6381
|
+
o.direction = c.h5d_1;
|
|
6382
|
+
o.radiusQ20M = c.i5d_1;
|
|
6383
|
+
o.radiusMinM = c.j5d_1;
|
|
6384
|
+
o.lengthM = c.k5d_1;
|
|
6312
6385
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
6313
6386
|
return o;
|
|
6314
6387
|
}
|
|
6315
6388
|
function enhance$slambda($path, $provider, $opts, resultContinuation) {
|
|
6316
|
-
this.
|
|
6317
|
-
this.
|
|
6318
|
-
this.
|
|
6389
|
+
this.h5g_1 = $path;
|
|
6390
|
+
this.i5g_1 = $provider;
|
|
6391
|
+
this.j5g_1 = $opts;
|
|
6319
6392
|
CoroutineImpl.call(this, resultContinuation);
|
|
6320
6393
|
}
|
|
6321
|
-
protoOf(enhance$slambda).
|
|
6394
|
+
protoOf(enhance$slambda).l5g = function ($this$promise, $completion) {
|
|
6322
6395
|
var tmp = this.m18($this$promise, $completion);
|
|
6323
6396
|
tmp.i7_1 = Unit_instance;
|
|
6324
6397
|
tmp.j7_1 = null;
|
|
6325
6398
|
return tmp.o7();
|
|
6326
6399
|
};
|
|
6327
6400
|
protoOf(enhance$slambda).w7 = function (p1, $completion) {
|
|
6328
|
-
return this.
|
|
6401
|
+
return this.l5g((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
6329
6402
|
};
|
|
6330
6403
|
protoOf(enhance$slambda).o7 = function () {
|
|
6331
6404
|
var suspendResult = this.i7_1;
|
|
@@ -6336,7 +6409,7 @@
|
|
|
6336
6409
|
case 0:
|
|
6337
6410
|
this.h7_1 = 2;
|
|
6338
6411
|
this.g7_1 = 1;
|
|
6339
|
-
suspendResult = Enhancer_instance.
|
|
6412
|
+
suspendResult = Enhancer_instance.d55(this.h5g_1, this.i5g_1, this.j5g_1, this);
|
|
6340
6413
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
6341
6414
|
return suspendResult;
|
|
6342
6415
|
}
|
|
@@ -6359,30 +6432,30 @@
|
|
|
6359
6432
|
while (true);
|
|
6360
6433
|
};
|
|
6361
6434
|
protoOf(enhance$slambda).m18 = function ($this$promise, completion) {
|
|
6362
|
-
var i = new enhance$slambda(this.
|
|
6363
|
-
i.
|
|
6435
|
+
var i = new enhance$slambda(this.h5g_1, this.i5g_1, this.j5g_1, completion);
|
|
6436
|
+
i.k5g_1 = $this$promise;
|
|
6364
6437
|
return i;
|
|
6365
6438
|
};
|
|
6366
6439
|
function enhance$slambda_0($path, $provider, $opts, resultContinuation) {
|
|
6367
6440
|
var i = new enhance$slambda($path, $provider, $opts, resultContinuation);
|
|
6368
6441
|
return constructCallableReference(function ($this$promise, $completion) {
|
|
6369
|
-
return i.
|
|
6442
|
+
return i.l5g($this$promise, $completion);
|
|
6370
6443
|
}, 1);
|
|
6371
6444
|
}
|
|
6372
6445
|
function enhanceWithCourse$slambda($course, $opts, $provider, resultContinuation) {
|
|
6373
|
-
this.
|
|
6374
|
-
this.
|
|
6375
|
-
this.
|
|
6446
|
+
this.u5g_1 = $course;
|
|
6447
|
+
this.v5g_1 = $opts;
|
|
6448
|
+
this.w5g_1 = $provider;
|
|
6376
6449
|
CoroutineImpl.call(this, resultContinuation);
|
|
6377
6450
|
}
|
|
6378
|
-
protoOf(enhanceWithCourse$slambda).
|
|
6451
|
+
protoOf(enhanceWithCourse$slambda).l5g = function ($this$promise, $completion) {
|
|
6379
6452
|
var tmp = this.m18($this$promise, $completion);
|
|
6380
6453
|
tmp.i7_1 = Unit_instance;
|
|
6381
6454
|
tmp.j7_1 = null;
|
|
6382
6455
|
return tmp.o7();
|
|
6383
6456
|
};
|
|
6384
6457
|
protoOf(enhanceWithCourse$slambda).w7 = function (p1, $completion) {
|
|
6385
|
-
return this.
|
|
6458
|
+
return this.l5g((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
6386
6459
|
};
|
|
6387
6460
|
protoOf(enhanceWithCourse$slambda).o7 = function () {
|
|
6388
6461
|
var suspendResult = this.i7_1;
|
|
@@ -6393,7 +6466,7 @@
|
|
|
6393
6466
|
case 0:
|
|
6394
6467
|
this.h7_1 = 2;
|
|
6395
6468
|
this.g7_1 = 1;
|
|
6396
|
-
suspendResult = Enhancer_instance.
|
|
6469
|
+
suspendResult = Enhancer_instance.e55(this.u5g_1, this.v5g_1, this.w5g_1, this);
|
|
6397
6470
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
6398
6471
|
return suspendResult;
|
|
6399
6472
|
}
|
|
@@ -6416,14 +6489,14 @@
|
|
|
6416
6489
|
while (true);
|
|
6417
6490
|
};
|
|
6418
6491
|
protoOf(enhanceWithCourse$slambda).m18 = function ($this$promise, completion) {
|
|
6419
|
-
var i = new enhanceWithCourse$slambda(this.
|
|
6420
|
-
i.
|
|
6492
|
+
var i = new enhanceWithCourse$slambda(this.u5g_1, this.v5g_1, this.w5g_1, completion);
|
|
6493
|
+
i.x5g_1 = $this$promise;
|
|
6421
6494
|
return i;
|
|
6422
6495
|
};
|
|
6423
6496
|
function enhanceWithCourse$slambda_0($course, $opts, $provider, resultContinuation) {
|
|
6424
6497
|
var i = new enhanceWithCourse$slambda($course, $opts, $provider, resultContinuation);
|
|
6425
6498
|
return constructCallableReference(function ($this$promise, $completion) {
|
|
6426
|
-
return i.
|
|
6499
|
+
return i.l5g($this$promise, $completion);
|
|
6427
6500
|
}, 1);
|
|
6428
6501
|
}
|
|
6429
6502
|
var properties_initialized_EngineJsApi_kt_2x4hj5;
|
|
@@ -6439,10 +6512,11 @@
|
|
|
6439
6512
|
}
|
|
6440
6513
|
}
|
|
6441
6514
|
//region block: post-declaration
|
|
6442
|
-
protoOf(CyclistPowerProviderBase).
|
|
6443
|
-
protoOf(PowerProviderFromData).
|
|
6515
|
+
protoOf(CyclistPowerProviderBase).e59 = onDelivered;
|
|
6516
|
+
protoOf(PowerProviderFromData).e59 = onDelivered;
|
|
6444
6517
|
//endregion
|
|
6445
6518
|
//region block: init
|
|
6519
|
+
ElevationCorrection_instance = new ElevationCorrection();
|
|
6446
6520
|
Enhancer_instance = new Enhancer();
|
|
6447
6521
|
Companion_instance_9 = new Companion_6();
|
|
6448
6522
|
ClimbDetector_instance = new ClimbDetector();
|