@glandais/vcyclist-engine 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/kotlin-kotlin-stdlib.js +74 -74
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/package.json +1 -2
- package/vcyclist-engine.d.ts +5 -0
- package/vcyclist-engine.js +441 -235
- package/vcyclist-engine.js.map +1 -1
- package/xmlutil-core.js +5 -5
- package/Kotlin-DateTime-library-kotlinx-datetime.js +0 -15
- package/Kotlin-DateTime-library-kotlinx-datetime.js.map +0 -1
package/vcyclist-engine.js
CHANGED
|
@@ -92,6 +92,7 @@
|
|
|
92
92
|
var emptyList = kotlin_kotlin.$_$.j2;
|
|
93
93
|
var GlobalScope_instance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a;
|
|
94
94
|
var promise = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j;
|
|
95
|
+
var copyToArray = kotlin_kotlin.$_$.i2;
|
|
95
96
|
var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h;
|
|
96
97
|
var isInterface = kotlin_kotlin.$_$.a5;
|
|
97
98
|
var ElevationProvider = kotlin_io_github_glandais_elevation.$_$.e;
|
|
@@ -143,6 +144,8 @@
|
|
|
143
144
|
initMetadataForObject(MuscularPowerProvider, 'MuscularPowerProvider');
|
|
144
145
|
initMetadataForObject(PowerComputer, 'PowerComputer');
|
|
145
146
|
initMetadataForClass(PowerProviderConstant, 'PowerProviderConstant', VOID, CyclistPowerProviderBase);
|
|
147
|
+
initMetadataForClass(PowerProviderConstantWithTiring, 'PowerProviderConstantWithTiring', VOID, CyclistPowerProviderBase);
|
|
148
|
+
initMetadataForObject(PowerProviderFromData, 'PowerProviderFromData');
|
|
146
149
|
initMetadataForObject(RhoProviderDefault, 'RhoProviderDefault');
|
|
147
150
|
initMetadataForObject(RhoProviderEstimate, 'RhoProviderEstimate');
|
|
148
151
|
initMetadataForObject(RollingResistancePowerProvider, 'RollingResistancePowerProvider');
|
|
@@ -151,7 +154,9 @@
|
|
|
151
154
|
initMetadataForCompanion(Companion_7);
|
|
152
155
|
initMetadataForClass(Wind, 'Wind');
|
|
153
156
|
initMetadataForObject(WindProviderNone, 'WindProviderNone');
|
|
157
|
+
initMetadataForClass(WindProviderConstant, 'WindProviderConstant');
|
|
154
158
|
initMetadataForLambda(enhance$slambda, CoroutineImpl, VOID, [1]);
|
|
159
|
+
initMetadataForLambda(enhanceWithCourse$slambda, CoroutineImpl, VOID, [1]);
|
|
155
160
|
//endregion
|
|
156
161
|
function Companion() {
|
|
157
162
|
Companion_instance = this;
|
|
@@ -1522,19 +1527,22 @@
|
|
|
1522
1527
|
protoOf(GeneratedPath).p1i = function (i, v) {
|
|
1523
1528
|
this.y1h_1[imul(i, 36) + 4 | 0] = v;
|
|
1524
1529
|
};
|
|
1525
|
-
protoOf(GeneratedPath).e1k = function (i
|
|
1530
|
+
protoOf(GeneratedPath).e1k = function (i) {
|
|
1531
|
+
return this.y1h_1[imul(i, 36) + 5 | 0];
|
|
1532
|
+
};
|
|
1533
|
+
protoOf(GeneratedPath).f1k = function (i, v) {
|
|
1526
1534
|
this.y1h_1[imul(i, 36) + 5 | 0] = v;
|
|
1527
1535
|
};
|
|
1528
|
-
protoOf(GeneratedPath).
|
|
1536
|
+
protoOf(GeneratedPath).g1k = function (i) {
|
|
1529
1537
|
return this.y1h_1[imul(i, 36) + 6 | 0];
|
|
1530
1538
|
};
|
|
1531
|
-
protoOf(GeneratedPath).
|
|
1539
|
+
protoOf(GeneratedPath).h1k = function (i, v) {
|
|
1532
1540
|
this.y1h_1[imul(i, 36) + 6 | 0] = v;
|
|
1533
1541
|
};
|
|
1534
|
-
protoOf(GeneratedPath).
|
|
1542
|
+
protoOf(GeneratedPath).i1k = function (i) {
|
|
1535
1543
|
return this.y1h_1[imul(i, 36) + 7 | 0];
|
|
1536
1544
|
};
|
|
1537
|
-
protoOf(GeneratedPath).
|
|
1545
|
+
protoOf(GeneratedPath).j1k = function (i, v) {
|
|
1538
1546
|
this.y1h_1[imul(i, 36) + 7 | 0] = v;
|
|
1539
1547
|
};
|
|
1540
1548
|
protoOf(GeneratedPath).b1i = function (i) {
|
|
@@ -1543,34 +1551,34 @@
|
|
|
1543
1551
|
protoOf(GeneratedPath).o1i = function (i, v) {
|
|
1544
1552
|
this.y1h_1[imul(i, 36) + 8 | 0] = v;
|
|
1545
1553
|
};
|
|
1546
|
-
protoOf(GeneratedPath).
|
|
1554
|
+
protoOf(GeneratedPath).k1k = function (i) {
|
|
1547
1555
|
return this.y1h_1[imul(i, 36) + 9 | 0];
|
|
1548
1556
|
};
|
|
1549
|
-
protoOf(GeneratedPath).
|
|
1557
|
+
protoOf(GeneratedPath).l1k = function (i, v) {
|
|
1550
1558
|
this.y1h_1[imul(i, 36) + 9 | 0] = v;
|
|
1551
1559
|
};
|
|
1552
|
-
protoOf(GeneratedPath).
|
|
1560
|
+
protoOf(GeneratedPath).m1k = function (i, v) {
|
|
1553
1561
|
this.y1h_1[imul(i, 36) + 10 | 0] = v;
|
|
1554
1562
|
};
|
|
1555
|
-
protoOf(GeneratedPath).
|
|
1563
|
+
protoOf(GeneratedPath).n1k = function (i, v) {
|
|
1556
1564
|
this.y1h_1[imul(i, 36) + 11 | 0] = v;
|
|
1557
1565
|
};
|
|
1558
|
-
protoOf(GeneratedPath).
|
|
1566
|
+
protoOf(GeneratedPath).o1k = function (i, v) {
|
|
1559
1567
|
this.y1h_1[imul(i, 36) + 12 | 0] = v;
|
|
1560
1568
|
};
|
|
1561
|
-
protoOf(GeneratedPath).
|
|
1569
|
+
protoOf(GeneratedPath).p1k = function (i, v) {
|
|
1562
1570
|
this.y1h_1[imul(i, 36) + 13 | 0] = v;
|
|
1563
1571
|
};
|
|
1564
|
-
protoOf(GeneratedPath).
|
|
1572
|
+
protoOf(GeneratedPath).q1k = function (i, v) {
|
|
1565
1573
|
this.y1h_1[imul(i, 36) + 14 | 0] = v;
|
|
1566
1574
|
};
|
|
1567
|
-
protoOf(GeneratedPath).
|
|
1575
|
+
protoOf(GeneratedPath).r1k = function (i, v) {
|
|
1568
1576
|
this.y1h_1[imul(i, 36) + 15 | 0] = v;
|
|
1569
1577
|
};
|
|
1570
|
-
protoOf(GeneratedPath).
|
|
1578
|
+
protoOf(GeneratedPath).s1k = function (i, v) {
|
|
1571
1579
|
this.y1h_1[imul(i, 36) + 16 | 0] = v;
|
|
1572
1580
|
};
|
|
1573
|
-
protoOf(GeneratedPath).
|
|
1581
|
+
protoOf(GeneratedPath).t1k = function (i, v) {
|
|
1574
1582
|
this.y1h_1[imul(i, 36) + 17 | 0] = v;
|
|
1575
1583
|
};
|
|
1576
1584
|
protoOf(GeneratedPath).g1i = function (i) {
|
|
@@ -1579,49 +1587,49 @@
|
|
|
1579
1587
|
protoOf(GeneratedPath).q1i = function (i, v) {
|
|
1580
1588
|
this.y1h_1[imul(i, 36) + 18 | 0] = v;
|
|
1581
1589
|
};
|
|
1582
|
-
protoOf(GeneratedPath).
|
|
1590
|
+
protoOf(GeneratedPath).u1k = function (i, v) {
|
|
1583
1591
|
this.y1h_1[imul(i, 36) + 19 | 0] = v;
|
|
1584
1592
|
};
|
|
1585
|
-
protoOf(GeneratedPath).
|
|
1593
|
+
protoOf(GeneratedPath).v1k = function (i, v) {
|
|
1586
1594
|
this.y1h_1[imul(i, 36) + 20 | 0] = v;
|
|
1587
1595
|
};
|
|
1588
|
-
protoOf(GeneratedPath).
|
|
1596
|
+
protoOf(GeneratedPath).w1k = function (i, v) {
|
|
1589
1597
|
this.y1h_1[imul(i, 36) + 21 | 0] = v;
|
|
1590
1598
|
};
|
|
1591
|
-
protoOf(GeneratedPath).
|
|
1599
|
+
protoOf(GeneratedPath).x1k = function (i, v) {
|
|
1592
1600
|
this.y1h_1[imul(i, 36) + 22 | 0] = v;
|
|
1593
1601
|
};
|
|
1594
|
-
protoOf(GeneratedPath).
|
|
1602
|
+
protoOf(GeneratedPath).y1k = function (i, v) {
|
|
1595
1603
|
this.y1h_1[imul(i, 36) + 23 | 0] = v;
|
|
1596
1604
|
};
|
|
1597
|
-
protoOf(GeneratedPath).
|
|
1605
|
+
protoOf(GeneratedPath).z1k = function (i, v) {
|
|
1598
1606
|
this.y1h_1[imul(i, 36) + 24 | 0] = v;
|
|
1599
1607
|
};
|
|
1600
|
-
protoOf(GeneratedPath).
|
|
1608
|
+
protoOf(GeneratedPath).a1l = function (i, v) {
|
|
1601
1609
|
this.y1h_1[imul(i, 36) + 25 | 0] = v;
|
|
1602
1610
|
};
|
|
1603
|
-
protoOf(GeneratedPath).
|
|
1611
|
+
protoOf(GeneratedPath).b1l = function (i) {
|
|
1604
1612
|
return this.y1h_1[imul(i, 36) + 26 | 0];
|
|
1605
1613
|
};
|
|
1606
|
-
protoOf(GeneratedPath).
|
|
1614
|
+
protoOf(GeneratedPath).c1l = function (i, v) {
|
|
1607
1615
|
this.y1h_1[imul(i, 36) + 26 | 0] = v;
|
|
1608
1616
|
};
|
|
1609
|
-
protoOf(GeneratedPath).
|
|
1617
|
+
protoOf(GeneratedPath).d1l = function (i) {
|
|
1610
1618
|
return this.y1h_1[imul(i, 36) + 27 | 0];
|
|
1611
1619
|
};
|
|
1612
|
-
protoOf(GeneratedPath).
|
|
1620
|
+
protoOf(GeneratedPath).e1l = function (i, v) {
|
|
1613
1621
|
this.y1h_1[imul(i, 36) + 27 | 0] = v;
|
|
1614
1622
|
};
|
|
1615
|
-
protoOf(GeneratedPath).
|
|
1623
|
+
protoOf(GeneratedPath).f1l = function (i) {
|
|
1616
1624
|
return this.y1h_1[imul(i, 36) + 28 | 0];
|
|
1617
1625
|
};
|
|
1618
|
-
protoOf(GeneratedPath).
|
|
1626
|
+
protoOf(GeneratedPath).g1l = function (i, v) {
|
|
1619
1627
|
this.y1h_1[imul(i, 36) + 28 | 0] = v;
|
|
1620
1628
|
};
|
|
1621
|
-
protoOf(GeneratedPath).
|
|
1629
|
+
protoOf(GeneratedPath).h1l = function (i, v) {
|
|
1622
1630
|
this.y1h_1[imul(i, 36) + 29 | 0] = v;
|
|
1623
1631
|
};
|
|
1624
|
-
protoOf(GeneratedPath).
|
|
1632
|
+
protoOf(GeneratedPath).i1l = function (i, v) {
|
|
1625
1633
|
this.y1h_1[imul(i, 36) + 30 | 0] = v;
|
|
1626
1634
|
};
|
|
1627
1635
|
protoOf(GeneratedPath).f1i = function (i) {
|
|
@@ -1630,10 +1638,10 @@
|
|
|
1630
1638
|
protoOf(GeneratedPath).t1i = function (i, v) {
|
|
1631
1639
|
this.y1h_1[imul(i, 36) + 31 | 0] = v;
|
|
1632
1640
|
};
|
|
1633
|
-
protoOf(GeneratedPath).
|
|
1641
|
+
protoOf(GeneratedPath).j1l = function (i, v) {
|
|
1634
1642
|
this.y1h_1[imul(i, 36) + 32 | 0] = v;
|
|
1635
1643
|
};
|
|
1636
|
-
protoOf(GeneratedPath).
|
|
1644
|
+
protoOf(GeneratedPath).k1l = function (i, v) {
|
|
1637
1645
|
this.y1h_1[imul(i, 36) + 33 | 0] = v;
|
|
1638
1646
|
};
|
|
1639
1647
|
protoOf(GeneratedPath).d1i = function (i) {
|
|
@@ -1650,7 +1658,7 @@
|
|
|
1650
1658
|
};
|
|
1651
1659
|
function Companion_3() {
|
|
1652
1660
|
Companion_instance_3 = this;
|
|
1653
|
-
this.
|
|
1661
|
+
this.l1l_1 = new BoundsRad(0.0, 0.0, 0.0, 0.0);
|
|
1654
1662
|
}
|
|
1655
1663
|
var Companion_instance_3;
|
|
1656
1664
|
function Companion_getInstance_4() {
|
|
@@ -1660,19 +1668,19 @@
|
|
|
1660
1668
|
}
|
|
1661
1669
|
function BoundsRad(minLat, maxLat, minLon, maxLon) {
|
|
1662
1670
|
Companion_getInstance_4();
|
|
1663
|
-
this.
|
|
1664
|
-
this.
|
|
1665
|
-
this.
|
|
1666
|
-
this.
|
|
1671
|
+
this.m1l_1 = minLat;
|
|
1672
|
+
this.n1l_1 = maxLat;
|
|
1673
|
+
this.o1l_1 = minLon;
|
|
1674
|
+
this.p1l_1 = maxLon;
|
|
1667
1675
|
}
|
|
1668
1676
|
protoOf(BoundsRad).toString = function () {
|
|
1669
|
-
return 'BoundsRad(minLat=' + this.
|
|
1677
|
+
return 'BoundsRad(minLat=' + this.m1l_1 + ', maxLat=' + this.n1l_1 + ', minLon=' + this.o1l_1 + ', maxLon=' + this.p1l_1 + ')';
|
|
1670
1678
|
};
|
|
1671
1679
|
protoOf(BoundsRad).hashCode = function () {
|
|
1672
|
-
var result = getNumberHashCode(this.
|
|
1673
|
-
result = imul(result, 31) + getNumberHashCode(this.m1l_1) | 0;
|
|
1680
|
+
var result = getNumberHashCode(this.m1l_1);
|
|
1674
1681
|
result = imul(result, 31) + getNumberHashCode(this.n1l_1) | 0;
|
|
1675
1682
|
result = imul(result, 31) + getNumberHashCode(this.o1l_1) | 0;
|
|
1683
|
+
result = imul(result, 31) + getNumberHashCode(this.p1l_1) | 0;
|
|
1676
1684
|
return result;
|
|
1677
1685
|
};
|
|
1678
1686
|
protoOf(BoundsRad).equals = function (other) {
|
|
@@ -1680,14 +1688,14 @@
|
|
|
1680
1688
|
return true;
|
|
1681
1689
|
if (!(other instanceof BoundsRad))
|
|
1682
1690
|
return false;
|
|
1683
|
-
if (!equals(this.l1l_1, other.l1l_1))
|
|
1684
|
-
return false;
|
|
1685
1691
|
if (!equals(this.m1l_1, other.m1l_1))
|
|
1686
1692
|
return false;
|
|
1687
1693
|
if (!equals(this.n1l_1, other.n1l_1))
|
|
1688
1694
|
return false;
|
|
1689
1695
|
if (!equals(this.o1l_1, other.o1l_1))
|
|
1690
1696
|
return false;
|
|
1697
|
+
if (!equals(this.p1l_1, other.p1l_1))
|
|
1698
|
+
return false;
|
|
1691
1699
|
return true;
|
|
1692
1700
|
};
|
|
1693
1701
|
function copyStatsFrom($this, other) {
|
|
@@ -1706,7 +1714,7 @@
|
|
|
1706
1714
|
$this.z1i_1 = 0.0;
|
|
1707
1715
|
$this.a1j_1 = 0.0;
|
|
1708
1716
|
$this.b1j_1 = 0.0;
|
|
1709
|
-
$this.c1j_1 = Companion_getInstance_4().
|
|
1717
|
+
$this.c1j_1 = Companion_getInstance_4().l1l_1;
|
|
1710
1718
|
}
|
|
1711
1719
|
function computeBearing($this, from, to) {
|
|
1712
1720
|
var lat1 = $this.z1h(from);
|
|
@@ -1739,21 +1747,21 @@
|
|
|
1739
1747
|
this.z1i_1 = 0.0;
|
|
1740
1748
|
this.a1j_1 = 0.0;
|
|
1741
1749
|
this.b1j_1 = 0.0;
|
|
1742
|
-
this.c1j_1 = Companion_getInstance_4().
|
|
1750
|
+
this.c1j_1 = Companion_getInstance_4().l1l_1;
|
|
1743
1751
|
}
|
|
1744
|
-
protoOf(Path).
|
|
1752
|
+
protoOf(Path).q1l = function () {
|
|
1745
1753
|
return until(0, this.x1h_1);
|
|
1746
1754
|
};
|
|
1747
|
-
protoOf(Path).
|
|
1755
|
+
protoOf(Path).r1l = function (i) {
|
|
1748
1756
|
return this.z1h(i) * MathConstants_getInstance().bv_1;
|
|
1749
1757
|
};
|
|
1750
|
-
protoOf(Path).
|
|
1758
|
+
protoOf(Path).s1l = function (i) {
|
|
1751
1759
|
return this.a1i(i) * MathConstants_getInstance().bv_1;
|
|
1752
1760
|
};
|
|
1753
1761
|
protoOf(Path).a1k = function (i) {
|
|
1754
|
-
return new LatLonElevation(this.
|
|
1762
|
+
return new LatLonElevation(this.r1l(i), this.s1l(i), this.b1i(i));
|
|
1755
1763
|
};
|
|
1756
|
-
protoOf(Path).
|
|
1764
|
+
protoOf(Path).t1l = function () {
|
|
1757
1765
|
var out = new Path(this.x1h_1);
|
|
1758
1766
|
var tmp0 = this.y1h_1;
|
|
1759
1767
|
var tmp2 = out.y1h_1;
|
|
@@ -1810,8 +1818,8 @@
|
|
|
1810
1818
|
var a_4 = maxEle;
|
|
1811
1819
|
maxEle = Math.max(a_4, ele);
|
|
1812
1820
|
if (i > 0) {
|
|
1813
|
-
var prevCoord = new LatLon(this.
|
|
1814
|
-
var curCoord = new LatLon(this.
|
|
1821
|
+
var prevCoord = new LatLon(this.r1l(i - 1 | 0), this.s1l(i - 1 | 0));
|
|
1822
|
+
var curCoord = new LatLon(this.r1l(i), this.s1l(i));
|
|
1815
1823
|
cumDist = cumDist + Distance_instance.yu(prevCoord, curCoord);
|
|
1816
1824
|
var dEle = ele - this.b1i(i - 1 | 0);
|
|
1817
1825
|
if (dEle > 0)
|
|
@@ -1835,7 +1843,7 @@
|
|
|
1835
1843
|
$l$loop: do {
|
|
1836
1844
|
var i_0 = inductionVariable_0;
|
|
1837
1845
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
1838
|
-
this.
|
|
1846
|
+
this.f1k(i_0, (this.c1i(i_0) - timeStart) / 1000.0);
|
|
1839
1847
|
if (this.x1h_1 <= 1)
|
|
1840
1848
|
continue $l$loop;
|
|
1841
1849
|
// Inline function 'kotlin.math.max' call
|
|
@@ -1845,15 +1853,15 @@
|
|
|
1845
1853
|
// Inline function 'kotlin.math.min' call
|
|
1846
1854
|
var b_0 = i_0 + 1 | 0;
|
|
1847
1855
|
var ip1 = Math.min(tmp0, b_0);
|
|
1848
|
-
this.
|
|
1856
|
+
this.j1k(i_0, computeBearing(this, im1, ip1));
|
|
1849
1857
|
var dDist = (this.b1k(ip1) - this.b1k(im1)) / 2.0;
|
|
1850
1858
|
var dEle_0 = (this.b1i(ip1) - this.b1i(im1)) / 2.0;
|
|
1851
1859
|
var grade = dDist === 0.0 ? 0.0 : dEle_0 / dDist;
|
|
1852
|
-
this.
|
|
1860
|
+
this.l1k(i_0, grade);
|
|
1853
1861
|
var dTime = (this.c1i(ip1) - this.c1i(im1)) / 2000.0;
|
|
1854
1862
|
this.d1k(i_0, dDist);
|
|
1855
|
-
this.
|
|
1856
|
-
this.
|
|
1863
|
+
this.h1k(i_0, dTime);
|
|
1864
|
+
this.e1l(i_0, dTime === 0.0 ? 0.0 : dDist / dTime);
|
|
1857
1865
|
}
|
|
1858
1866
|
while (inductionVariable_0 < last_0);
|
|
1859
1867
|
};
|
|
@@ -1861,7 +1869,7 @@
|
|
|
1861
1869
|
}
|
|
1862
1870
|
protoOf(PathSimplifier).g1h = function (path, toleranceM, zExaggeration) {
|
|
1863
1871
|
if (path.x1h_1 <= 2)
|
|
1864
|
-
return path.
|
|
1872
|
+
return path.t1l();
|
|
1865
1873
|
var coords = ArrayList_init_$Create$(path.x1h_1);
|
|
1866
1874
|
var inductionVariable = 0;
|
|
1867
1875
|
var last = path.x1h_1;
|
|
@@ -1951,7 +1959,7 @@
|
|
|
1951
1959
|
var PointField_CADENCE_instance;
|
|
1952
1960
|
function Companion_5() {
|
|
1953
1961
|
Companion_instance_5 = this;
|
|
1954
|
-
this.
|
|
1962
|
+
this.u1l_1 = 36;
|
|
1955
1963
|
var tmp = this;
|
|
1956
1964
|
// Inline function 'kotlin.collections.associateBy' call
|
|
1957
1965
|
var this_0 = get_entries();
|
|
@@ -1961,11 +1969,14 @@
|
|
|
1961
1969
|
var _iterator__ex2g4s = this_0.i();
|
|
1962
1970
|
while (_iterator__ex2g4s.j()) {
|
|
1963
1971
|
var element = _iterator__ex2g4s.k();
|
|
1964
|
-
var tmp$ret$2 = element.
|
|
1972
|
+
var tmp$ret$2 = element.y1l_1;
|
|
1965
1973
|
destination.p2(tmp$ret$2, element);
|
|
1966
1974
|
}
|
|
1967
|
-
tmp.
|
|
1975
|
+
tmp.v1l_1 = destination;
|
|
1968
1976
|
}
|
|
1977
|
+
protoOf(Companion_5).e1m = function (prop) {
|
|
1978
|
+
return this.v1l_1.h1(prop);
|
|
1979
|
+
};
|
|
1969
1980
|
var Companion_instance_5;
|
|
1970
1981
|
function Companion_getInstance_6() {
|
|
1971
1982
|
PointField_initEntries();
|
|
@@ -2029,12 +2040,12 @@
|
|
|
2029
2040
|
notSelectable = notSelectable === VOID ? false : notSelectable;
|
|
2030
2041
|
anglesInRadians = anglesInRadians === VOID ? false : anglesInRadians;
|
|
2031
2042
|
Enum.call(this, name, ordinal);
|
|
2032
|
-
this.
|
|
2033
|
-
this.
|
|
2034
|
-
this.
|
|
2035
|
-
this.
|
|
2036
|
-
this.
|
|
2037
|
-
this.
|
|
2043
|
+
this.y1l_1 = prop;
|
|
2044
|
+
this.z1l_1 = unit;
|
|
2045
|
+
this.a1m_1 = shortDescription;
|
|
2046
|
+
this.b1m_1 = category;
|
|
2047
|
+
this.c1m_1 = notSelectable;
|
|
2048
|
+
this.d1m_1 = anglesInRadians;
|
|
2038
2049
|
}
|
|
2039
2050
|
function PointField_LATITUDE_getInstance() {
|
|
2040
2051
|
PointField_initEntries();
|
|
@@ -2216,8 +2227,8 @@
|
|
|
2216
2227
|
}
|
|
2217
2228
|
function PointFieldCategory(name, ordinal, id, displayName) {
|
|
2218
2229
|
Enum.call(this, name, ordinal);
|
|
2219
|
-
this.
|
|
2220
|
-
this.
|
|
2230
|
+
this.h1m_1 = id;
|
|
2231
|
+
this.i1m_1 = displayName;
|
|
2221
2232
|
}
|
|
2222
2233
|
function PointFieldCategory_COORDINATES_getInstance() {
|
|
2223
2234
|
PointFieldCategory_initEntries();
|
|
@@ -2276,35 +2287,35 @@
|
|
|
2276
2287
|
return PointFieldCategory_PHYSIOLOGICAL_instance;
|
|
2277
2288
|
}
|
|
2278
2289
|
function Copy(sourceIndex) {
|
|
2279
|
-
this.
|
|
2290
|
+
this.j1m_1 = sourceIndex;
|
|
2280
2291
|
}
|
|
2281
2292
|
protoOf(Copy).toString = function () {
|
|
2282
|
-
return 'Copy(sourceIndex=' + this.
|
|
2293
|
+
return 'Copy(sourceIndex=' + this.j1m_1 + ')';
|
|
2283
2294
|
};
|
|
2284
2295
|
protoOf(Copy).hashCode = function () {
|
|
2285
|
-
return this.
|
|
2296
|
+
return this.j1m_1;
|
|
2286
2297
|
};
|
|
2287
2298
|
protoOf(Copy).equals = function (other) {
|
|
2288
2299
|
if (this === other)
|
|
2289
2300
|
return true;
|
|
2290
2301
|
if (!(other instanceof Copy))
|
|
2291
2302
|
return false;
|
|
2292
|
-
if (!(this.
|
|
2303
|
+
if (!(this.j1m_1 === other.j1m_1))
|
|
2293
2304
|
return false;
|
|
2294
2305
|
return true;
|
|
2295
2306
|
};
|
|
2296
2307
|
function Interpolate(from, to, coef) {
|
|
2297
|
-
this.
|
|
2298
|
-
this.
|
|
2299
|
-
this.
|
|
2308
|
+
this.k1m_1 = from;
|
|
2309
|
+
this.l1m_1 = to;
|
|
2310
|
+
this.m1m_1 = coef;
|
|
2300
2311
|
}
|
|
2301
2312
|
protoOf(Interpolate).toString = function () {
|
|
2302
|
-
return 'Interpolate(from=' + this.
|
|
2313
|
+
return 'Interpolate(from=' + this.k1m_1 + ', to=' + this.l1m_1 + ', coef=' + this.m1m_1 + ')';
|
|
2303
2314
|
};
|
|
2304
2315
|
protoOf(Interpolate).hashCode = function () {
|
|
2305
|
-
var result = this.
|
|
2306
|
-
result = imul(result, 31) + this.
|
|
2307
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2316
|
+
var result = this.k1m_1;
|
|
2317
|
+
result = imul(result, 31) + this.l1m_1 | 0;
|
|
2318
|
+
result = imul(result, 31) + getNumberHashCode(this.m1m_1) | 0;
|
|
2308
2319
|
return result;
|
|
2309
2320
|
};
|
|
2310
2321
|
protoOf(Interpolate).equals = function (other) {
|
|
@@ -2312,11 +2323,11 @@
|
|
|
2312
2323
|
return true;
|
|
2313
2324
|
if (!(other instanceof Interpolate))
|
|
2314
2325
|
return false;
|
|
2315
|
-
if (!(this.
|
|
2326
|
+
if (!(this.k1m_1 === other.k1m_1))
|
|
2316
2327
|
return false;
|
|
2317
|
-
if (!(this.
|
|
2328
|
+
if (!(this.l1m_1 === other.l1m_1))
|
|
2318
2329
|
return false;
|
|
2319
|
-
if (!equals(this.
|
|
2330
|
+
if (!equals(this.m1m_1, other.m1m_1))
|
|
2320
2331
|
return false;
|
|
2321
2332
|
return true;
|
|
2322
2333
|
};
|
|
@@ -2386,10 +2397,10 @@
|
|
|
2386
2397
|
index = index + 1 | 0;
|
|
2387
2398
|
var op = iterator.k();
|
|
2388
2399
|
if (op instanceof Copy) {
|
|
2389
|
-
copyFields($this, source, op.
|
|
2400
|
+
copyFields($this, source, op.j1m_1, out, dstIdx);
|
|
2390
2401
|
} else {
|
|
2391
2402
|
if (op instanceof Interpolate) {
|
|
2392
|
-
interpolateFields($this, source, op.
|
|
2403
|
+
interpolateFields($this, source, op.k1m_1, op.l1m_1, op.m1m_1, out, dstIdx);
|
|
2393
2404
|
} else {
|
|
2394
2405
|
noWhenBranchMatchedException();
|
|
2395
2406
|
}
|
|
@@ -2418,9 +2429,9 @@
|
|
|
2418
2429
|
function PointPerDistance() {
|
|
2419
2430
|
}
|
|
2420
2431
|
protoOf(PointPerDistance).t1g = function (source, minDistanceM, maxDistanceM) {
|
|
2421
|
-
return this.
|
|
2432
|
+
return this.n1m(source, minDistanceM, maxDistanceM);
|
|
2422
2433
|
};
|
|
2423
|
-
protoOf(PointPerDistance).
|
|
2434
|
+
protoOf(PointPerDistance).n1m = function (source, minDistanceM, maxDistanceM) {
|
|
2424
2435
|
// Inline function 'kotlin.require' call
|
|
2425
2436
|
if (!(maxDistanceM > 0.0)) {
|
|
2426
2437
|
var message = 'maxDistanceM must be > 0, got ' + maxDistanceM;
|
|
@@ -2442,35 +2453,35 @@
|
|
|
2442
2453
|
return PointPerDistance_instance;
|
|
2443
2454
|
}
|
|
2444
2455
|
function Copy_0(sourceIndex) {
|
|
2445
|
-
this.
|
|
2456
|
+
this.o1m_1 = sourceIndex;
|
|
2446
2457
|
}
|
|
2447
2458
|
protoOf(Copy_0).toString = function () {
|
|
2448
|
-
return 'Copy(sourceIndex=' + this.
|
|
2459
|
+
return 'Copy(sourceIndex=' + this.o1m_1 + ')';
|
|
2449
2460
|
};
|
|
2450
2461
|
protoOf(Copy_0).hashCode = function () {
|
|
2451
|
-
return this.
|
|
2462
|
+
return this.o1m_1;
|
|
2452
2463
|
};
|
|
2453
2464
|
protoOf(Copy_0).equals = function (other) {
|
|
2454
2465
|
if (this === other)
|
|
2455
2466
|
return true;
|
|
2456
2467
|
if (!(other instanceof Copy_0))
|
|
2457
2468
|
return false;
|
|
2458
|
-
if (!(this.
|
|
2469
|
+
if (!(this.o1m_1 === other.o1m_1))
|
|
2459
2470
|
return false;
|
|
2460
2471
|
return true;
|
|
2461
2472
|
};
|
|
2462
2473
|
function Interpolate_0(from, to, coef) {
|
|
2463
|
-
this.
|
|
2464
|
-
this.
|
|
2465
|
-
this.
|
|
2474
|
+
this.p1m_1 = from;
|
|
2475
|
+
this.q1m_1 = to;
|
|
2476
|
+
this.r1m_1 = coef;
|
|
2466
2477
|
}
|
|
2467
2478
|
protoOf(Interpolate_0).toString = function () {
|
|
2468
|
-
return 'Interpolate(from=' + this.
|
|
2479
|
+
return 'Interpolate(from=' + this.p1m_1 + ', to=' + this.q1m_1 + ', coef=' + this.r1m_1 + ')';
|
|
2469
2480
|
};
|
|
2470
2481
|
protoOf(Interpolate_0).hashCode = function () {
|
|
2471
|
-
var result = this.
|
|
2472
|
-
result = imul(result, 31) + this.
|
|
2473
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2482
|
+
var result = this.p1m_1;
|
|
2483
|
+
result = imul(result, 31) + this.q1m_1 | 0;
|
|
2484
|
+
result = imul(result, 31) + getNumberHashCode(this.r1m_1) | 0;
|
|
2474
2485
|
return result;
|
|
2475
2486
|
};
|
|
2476
2487
|
protoOf(Interpolate_0).equals = function (other) {
|
|
@@ -2478,11 +2489,11 @@
|
|
|
2478
2489
|
return true;
|
|
2479
2490
|
if (!(other instanceof Interpolate_0))
|
|
2480
2491
|
return false;
|
|
2481
|
-
if (!(this.
|
|
2492
|
+
if (!(this.p1m_1 === other.p1m_1))
|
|
2482
2493
|
return false;
|
|
2483
|
-
if (!(this.
|
|
2494
|
+
if (!(this.q1m_1 === other.q1m_1))
|
|
2484
2495
|
return false;
|
|
2485
|
-
if (!equals(this.
|
|
2496
|
+
if (!equals(this.r1m_1, other.r1m_1))
|
|
2486
2497
|
return false;
|
|
2487
2498
|
return true;
|
|
2488
2499
|
};
|
|
@@ -2559,10 +2570,10 @@
|
|
|
2559
2570
|
}
|
|
2560
2571
|
var data = tmp;
|
|
2561
2572
|
if (data instanceof Copy_0) {
|
|
2562
|
-
copyFields_0($this, source, data.
|
|
2573
|
+
copyFields_0($this, source, data.o1m_1, out, idx);
|
|
2563
2574
|
} else {
|
|
2564
2575
|
if (data instanceof Interpolate_0) {
|
|
2565
|
-
interpolateFields_0($this, source, data.
|
|
2576
|
+
interpolateFields_0($this, source, data.p1m_1, data.q1m_1, data.r1m_1, out, idx);
|
|
2566
2577
|
} else {
|
|
2567
2578
|
noWhenBranchMatchedException();
|
|
2568
2579
|
}
|
|
@@ -2602,15 +2613,15 @@
|
|
|
2602
2613
|
return PointPerSecond_instance;
|
|
2603
2614
|
}
|
|
2604
2615
|
function computeWithWind($this, path, i, aeroCoef, wind) {
|
|
2605
|
-
var speed = path.
|
|
2606
|
-
var bearing = path.
|
|
2607
|
-
path.
|
|
2608
|
-
path.
|
|
2609
|
-
var windDirectionAsBearing = 3.141592653589793 / 2.0 - wind.
|
|
2610
|
-
path.
|
|
2616
|
+
var speed = path.d1l(i);
|
|
2617
|
+
var bearing = path.i1k(i);
|
|
2618
|
+
path.j1l(i, wind.s1m_1);
|
|
2619
|
+
path.k1l(i, wind.t1m_1);
|
|
2620
|
+
var windDirectionAsBearing = 3.141592653589793 / 2.0 - wind.t1m_1;
|
|
2621
|
+
path.o1k(i, windDirectionAsBearing);
|
|
2611
2622
|
var alpha = windDirectionAsBearing - bearing;
|
|
2612
|
-
path.
|
|
2613
|
-
var v = wind.
|
|
2623
|
+
path.p1k(i, alpha);
|
|
2624
|
+
var v = wind.s1m_1;
|
|
2614
2625
|
// Inline function 'kotlin.math.cos' call
|
|
2615
2626
|
var l1 = speed + v * Math.cos(alpha);
|
|
2616
2627
|
var l2 = l1 * l1;
|
|
@@ -2625,21 +2636,21 @@
|
|
|
2625
2636
|
return tmp_1 * Math.sqrt(l3) * l1 * speed;
|
|
2626
2637
|
}
|
|
2627
2638
|
function AeroPowerProvider() {
|
|
2628
|
-
this.
|
|
2639
|
+
this.u1m_1 = 1.2;
|
|
2629
2640
|
}
|
|
2630
|
-
protoOf(AeroPowerProvider).
|
|
2631
|
-
var aeroCoef = course.g1f_1.
|
|
2632
|
-
path.
|
|
2633
|
-
var wind = course.h1f_1.
|
|
2641
|
+
protoOf(AeroPowerProvider).v1m = function (course, path, pointIndex) {
|
|
2642
|
+
var aeroCoef = course.g1f_1.w1m(course, path, pointIndex);
|
|
2643
|
+
path.n1k(pointIndex, aeroCoef);
|
|
2644
|
+
var wind = course.h1f_1.x1m(course.e1f_1, path, pointIndex);
|
|
2634
2645
|
var tmp;
|
|
2635
|
-
if (wind.
|
|
2636
|
-
var v = path.
|
|
2646
|
+
if (wind.s1m_1 === 0.0) {
|
|
2647
|
+
var v = path.d1l(pointIndex);
|
|
2637
2648
|
tmp = -aeroCoef * v * v * v;
|
|
2638
2649
|
} else {
|
|
2639
2650
|
tmp = computeWithWind(this, path, pointIndex, aeroCoef, wind);
|
|
2640
2651
|
}
|
|
2641
2652
|
var pAir = tmp;
|
|
2642
|
-
path.
|
|
2653
|
+
path.q1k(pointIndex, pAir);
|
|
2643
2654
|
return pAir;
|
|
2644
2655
|
};
|
|
2645
2656
|
var AeroPowerProvider_instance;
|
|
@@ -2648,8 +2659,8 @@
|
|
|
2648
2659
|
}
|
|
2649
2660
|
function AeroProviderConstant() {
|
|
2650
2661
|
}
|
|
2651
|
-
protoOf(AeroProviderConstant).
|
|
2652
|
-
var rho = course.f1f_1.
|
|
2662
|
+
protoOf(AeroProviderConstant).w1m = function (course, path, pointIndex) {
|
|
2663
|
+
var rho = course.f1f_1.y1m(course.e1f_1, path, pointIndex);
|
|
2653
2664
|
return course.k1f().q1f_1 * course.k1f().r1f_1 * rho / 2.0;
|
|
2654
2665
|
};
|
|
2655
2666
|
var AeroProviderConstant_instance;
|
|
@@ -2657,8 +2668,8 @@
|
|
|
2657
2668
|
return AeroProviderConstant_instance;
|
|
2658
2669
|
}
|
|
2659
2670
|
function Companion_6() {
|
|
2660
|
-
this.
|
|
2661
|
-
this.
|
|
2671
|
+
this.z1m_1 = 0.05;
|
|
2672
|
+
this.a1n_1 = 3.0;
|
|
2662
2673
|
}
|
|
2663
2674
|
var Companion_instance_6;
|
|
2664
2675
|
function Companion_getInstance_7() {
|
|
@@ -2666,10 +2677,10 @@
|
|
|
2666
2677
|
}
|
|
2667
2678
|
function CyclistPowerProviderBase(useHarmonics, random) {
|
|
2668
2679
|
random = random === VOID ? Default_getInstance() : random;
|
|
2669
|
-
this.
|
|
2680
|
+
this.b1n_1 = useHarmonics;
|
|
2670
2681
|
var tmp = this;
|
|
2671
2682
|
var tmp_0;
|
|
2672
|
-
if (this.
|
|
2683
|
+
if (this.b1n_1) {
|
|
2673
2684
|
// Inline function 'kotlin.collections.List' call
|
|
2674
2685
|
// Inline function 'kotlin.collections.MutableList' call
|
|
2675
2686
|
var list = ArrayList_init_$Create$(20);
|
|
@@ -2687,40 +2698,40 @@
|
|
|
2687
2698
|
} else {
|
|
2688
2699
|
tmp_0 = emptyList();
|
|
2689
2700
|
}
|
|
2690
|
-
tmp.
|
|
2701
|
+
tmp.c1n_1 = tmp_0;
|
|
2691
2702
|
}
|
|
2692
|
-
protoOf(CyclistPowerProviderBase).
|
|
2693
|
-
var power = this.
|
|
2694
|
-
path.
|
|
2695
|
-
if (this.
|
|
2703
|
+
protoOf(CyclistPowerProviderBase).v1m = function (course, path, pointIndex) {
|
|
2704
|
+
var power = this.d1n(course, path, pointIndex);
|
|
2705
|
+
path.u1k(pointIndex, power);
|
|
2706
|
+
if (this.b1n_1) {
|
|
2696
2707
|
var x = path.c1i(pointIndex) / 10000.0;
|
|
2697
|
-
var _iterator__ex2g4s = this.
|
|
2708
|
+
var _iterator__ex2g4s = this.c1n_1.i();
|
|
2698
2709
|
while (_iterator__ex2g4s.j()) {
|
|
2699
2710
|
var h = _iterator__ex2g4s.k();
|
|
2700
2711
|
var tmp = power;
|
|
2701
|
-
var tmp_0 = h.
|
|
2712
|
+
var tmp_0 = h.g1n_1 * power;
|
|
2702
2713
|
// Inline function 'kotlin.math.cos' call
|
|
2703
|
-
var x_0 = h.
|
|
2714
|
+
var x_0 = h.e1n_1 * x - h.f1n_1;
|
|
2704
2715
|
power = tmp + tmp_0 * Math.cos(x_0);
|
|
2705
2716
|
}
|
|
2706
2717
|
}
|
|
2707
|
-
path.
|
|
2708
|
-
var powerNeeded = -PowerComputer_instance.
|
|
2709
|
-
path.
|
|
2718
|
+
path.v1k(pointIndex, power);
|
|
2719
|
+
var powerNeeded = -PowerComputer_instance.h1n(course, path, pointIndex, false);
|
|
2720
|
+
path.w1k(pointIndex, powerNeeded);
|
|
2710
2721
|
return power;
|
|
2711
2722
|
};
|
|
2712
2723
|
function GravPowerProvider() {
|
|
2713
2724
|
}
|
|
2714
|
-
protoOf(GravPowerProvider).
|
|
2725
|
+
protoOf(GravPowerProvider).v1m = function (course, path, pointIndex) {
|
|
2715
2726
|
var m = course.k1f().o1f_1;
|
|
2716
|
-
var grade = path.
|
|
2717
|
-
var speed = path.
|
|
2727
|
+
var grade = path.k1k(pointIndex);
|
|
2728
|
+
var speed = path.d1l(pointIndex);
|
|
2718
2729
|
var tmp = -m * 9.8 * speed;
|
|
2719
2730
|
// Inline function 'kotlin.math.atan' call
|
|
2720
2731
|
// Inline function 'kotlin.math.sin' call
|
|
2721
2732
|
var x = Math.atan(grade);
|
|
2722
2733
|
var p = tmp * Math.sin(x);
|
|
2723
|
-
path.
|
|
2734
|
+
path.r1k(pointIndex, p);
|
|
2724
2735
|
return p;
|
|
2725
2736
|
};
|
|
2726
2737
|
var GravPowerProvider_instance;
|
|
@@ -2728,17 +2739,17 @@
|
|
|
2728
2739
|
return GravPowerProvider_instance;
|
|
2729
2740
|
}
|
|
2730
2741
|
function Harmonic(freqRadS, phaseRad, amp) {
|
|
2731
|
-
this.
|
|
2732
|
-
this.
|
|
2733
|
-
this.
|
|
2742
|
+
this.e1n_1 = freqRadS;
|
|
2743
|
+
this.f1n_1 = phaseRad;
|
|
2744
|
+
this.g1n_1 = amp;
|
|
2734
2745
|
}
|
|
2735
2746
|
protoOf(Harmonic).toString = function () {
|
|
2736
|
-
return 'Harmonic(freqRadS=' + this.
|
|
2747
|
+
return 'Harmonic(freqRadS=' + this.e1n_1 + ', phaseRad=' + this.f1n_1 + ', amp=' + this.g1n_1 + ')';
|
|
2737
2748
|
};
|
|
2738
2749
|
protoOf(Harmonic).hashCode = function () {
|
|
2739
|
-
var result = getNumberHashCode(this.
|
|
2740
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2741
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2750
|
+
var result = getNumberHashCode(this.e1n_1);
|
|
2751
|
+
result = imul(result, 31) + getNumberHashCode(this.f1n_1) | 0;
|
|
2752
|
+
result = imul(result, 31) + getNumberHashCode(this.g1n_1) | 0;
|
|
2742
2753
|
return result;
|
|
2743
2754
|
};
|
|
2744
2755
|
protoOf(Harmonic).equals = function (other) {
|
|
@@ -2746,11 +2757,11 @@
|
|
|
2746
2757
|
return true;
|
|
2747
2758
|
if (!(other instanceof Harmonic))
|
|
2748
2759
|
return false;
|
|
2749
|
-
if (!equals(this.
|
|
2760
|
+
if (!equals(this.e1n_1, other.e1n_1))
|
|
2750
2761
|
return false;
|
|
2751
|
-
if (!equals(this.
|
|
2762
|
+
if (!equals(this.f1n_1, other.f1n_1))
|
|
2752
2763
|
return false;
|
|
2753
|
-
if (!equals(this.
|
|
2764
|
+
if (!equals(this.g1n_1, other.g1n_1))
|
|
2754
2765
|
return false;
|
|
2755
2766
|
return true;
|
|
2756
2767
|
};
|
|
@@ -2763,7 +2774,7 @@
|
|
|
2763
2774
|
// Inline function 'kotlin.math.min' call
|
|
2764
2775
|
var a = course.z1e_1.w1f();
|
|
2765
2776
|
var result = Math.min(a, vMax);
|
|
2766
|
-
path.
|
|
2777
|
+
path.h1l(currentIndex, result);
|
|
2767
2778
|
return result;
|
|
2768
2779
|
}
|
|
2769
2780
|
function computeRadiusWindowed($this, path, i, k) {
|
|
@@ -2774,11 +2785,11 @@
|
|
|
2774
2785
|
// Inline function 'kotlin.math.min' call
|
|
2775
2786
|
var b_0 = i + k | 0;
|
|
2776
2787
|
var maxi = Math.min(tmp0, b_0);
|
|
2777
|
-
var totalBearingChange = $this.
|
|
2788
|
+
var totalBearingChange = $this.i1n(path.i1k(maxi) - path.i1k(mini));
|
|
2778
2789
|
var totalDistance = path.b1k(maxi) - path.b1k(mini);
|
|
2779
2790
|
// Inline function 'kotlin.math.abs' call
|
|
2780
2791
|
if (Math.abs(totalBearingChange) < 0.001) {
|
|
2781
|
-
path.
|
|
2792
|
+
path.m1k(i, 200.0);
|
|
2782
2793
|
return 200.0;
|
|
2783
2794
|
}
|
|
2784
2795
|
// Inline function 'kotlin.math.abs' call
|
|
@@ -2787,12 +2798,12 @@
|
|
|
2787
2798
|
// Inline function 'kotlin.math.max' call
|
|
2788
2799
|
var b_1 = Math.min(200.0, raw);
|
|
2789
2800
|
var clamped = Math.max(5.0, b_1);
|
|
2790
|
-
path.
|
|
2801
|
+
path.m1k(i, clamped);
|
|
2791
2802
|
return clamped;
|
|
2792
2803
|
}
|
|
2793
2804
|
function computeBrakingLimit($this, course, currentIndex, nextIndex) {
|
|
2794
2805
|
var path = course.y1e_1;
|
|
2795
|
-
var vf = path.
|
|
2806
|
+
var vf = path.f1l(nextIndex);
|
|
2796
2807
|
var a = course.z1e_1.v1f();
|
|
2797
2808
|
var d = path.b1k(nextIndex) - path.b1k(currentIndex);
|
|
2798
2809
|
// Inline function 'kotlin.math.sqrt' call
|
|
@@ -2815,19 +2826,19 @@
|
|
|
2815
2826
|
var i = inductionVariable;
|
|
2816
2827
|
inductionVariable = inductionVariable + -1 | 0;
|
|
2817
2828
|
if (i === (n - 1 | 0)) {
|
|
2818
|
-
path.
|
|
2829
|
+
path.g1l(i, 2.0);
|
|
2819
2830
|
} else {
|
|
2820
2831
|
var cornering = computeCorneringLimit(this, course, i, 10);
|
|
2821
2832
|
var braking = computeBrakingLimit(this, course, i, i + 1 | 0);
|
|
2822
2833
|
// Inline function 'kotlin.math.min' call
|
|
2823
2834
|
var tmp$ret$0 = Math.min(cornering, braking);
|
|
2824
|
-
path.
|
|
2835
|
+
path.g1l(i, tmp$ret$0);
|
|
2825
2836
|
}
|
|
2826
2837
|
}
|
|
2827
2838
|
while (0 <= inductionVariable);
|
|
2828
2839
|
path.d1j();
|
|
2829
2840
|
};
|
|
2830
|
-
protoOf(MaxSpeedComputer).
|
|
2841
|
+
protoOf(MaxSpeedComputer).i1n = function (angleIn) {
|
|
2831
2842
|
var a = angleIn;
|
|
2832
2843
|
while (a > 3.141592653589793)
|
|
2833
2844
|
a = a - 2.0 * 3.141592653589793;
|
|
@@ -2841,11 +2852,11 @@
|
|
|
2841
2852
|
}
|
|
2842
2853
|
function MuscularPowerProvider() {
|
|
2843
2854
|
}
|
|
2844
|
-
protoOf(MuscularPowerProvider).
|
|
2845
|
-
var muscular = course.i1f_1.
|
|
2846
|
-
path.
|
|
2855
|
+
protoOf(MuscularPowerProvider).v1m = function (course, path, pointIndex) {
|
|
2856
|
+
var muscular = course.i1f_1.v1m(course, path, pointIndex);
|
|
2857
|
+
path.x1k(pointIndex, muscular);
|
|
2847
2858
|
var wheel = muscular * course.l1f().w1e_1;
|
|
2848
|
-
path.
|
|
2859
|
+
path.y1k(pointIndex, wheel);
|
|
2849
2860
|
return wheel;
|
|
2850
2861
|
};
|
|
2851
2862
|
var MuscularPowerProvider_instance;
|
|
@@ -2858,7 +2869,7 @@
|
|
|
2858
2869
|
var tol = dx / 1.0E7;
|
|
2859
2870
|
while (dt2 - dt1 >= tol) {
|
|
2860
2871
|
var dtMid = (dt1 + dt2) / 2.0;
|
|
2861
|
-
var dxMid = $this.
|
|
2872
|
+
var dxMid = $this.j1n(pSum, equivalentMass, currentSpeed, dtMid);
|
|
2862
2873
|
if (dxMid < dx)
|
|
2863
2874
|
dt1 = dtMid;
|
|
2864
2875
|
else
|
|
@@ -2868,18 +2879,18 @@
|
|
|
2868
2879
|
}
|
|
2869
2880
|
function PowerComputer() {
|
|
2870
2881
|
}
|
|
2871
|
-
protoOf(PowerComputer).
|
|
2882
|
+
protoOf(PowerComputer).h1n = function (course, path, pointIndex, withCyclist) {
|
|
2872
2883
|
var pSum = 0.0;
|
|
2873
|
-
pSum = pSum + WheelBearingsPowerProvider_instance.
|
|
2874
|
-
pSum = pSum + RollingResistancePowerProvider_instance.
|
|
2875
|
-
pSum = pSum + AeroPowerProvider_instance.
|
|
2876
|
-
pSum = pSum + GravPowerProvider_instance.
|
|
2884
|
+
pSum = pSum + WheelBearingsPowerProvider_instance.v1m(course, path, pointIndex);
|
|
2885
|
+
pSum = pSum + RollingResistancePowerProvider_instance.v1m(course, path, pointIndex);
|
|
2886
|
+
pSum = pSum + AeroPowerProvider_instance.v1m(course, path, pointIndex);
|
|
2887
|
+
pSum = pSum + GravPowerProvider_instance.v1m(course, path, pointIndex);
|
|
2877
2888
|
if (withCyclist) {
|
|
2878
|
-
pSum = pSum + MuscularPowerProvider_instance.
|
|
2889
|
+
pSum = pSum + MuscularPowerProvider_instance.v1m(course, path, pointIndex);
|
|
2879
2890
|
}
|
|
2880
2891
|
return pSum;
|
|
2881
2892
|
};
|
|
2882
|
-
protoOf(PowerComputer).
|
|
2893
|
+
protoOf(PowerComputer).j1n = function (pSum, equivalentMass, currentSpeed, dt) {
|
|
2883
2894
|
// Inline function 'kotlin.math.sqrt' call
|
|
2884
2895
|
var x = dt * pSum / (0.5 * equivalentMass) + currentSpeed * currentSpeed;
|
|
2885
2896
|
var tmp0 = Math.sqrt(x);
|
|
@@ -2888,40 +2899,40 @@
|
|
|
2888
2899
|
var newSpeed = Math.max(tmp0, b);
|
|
2889
2900
|
return (currentSpeed + newSpeed) * dt / 2.0;
|
|
2890
2901
|
};
|
|
2891
|
-
protoOf(PowerComputer).
|
|
2902
|
+
protoOf(PowerComputer).k1n = function (equivalentMass, s1, s2, dt) {
|
|
2892
2903
|
return 0.5 * equivalentMass * (s2 * s2 - s1 * s1) / dt;
|
|
2893
2904
|
};
|
|
2894
|
-
protoOf(PowerComputer).
|
|
2905
|
+
protoOf(PowerComputer).l1n = function (pSum, equivalentMass, currentSpeed, dx) {
|
|
2895
2906
|
var dt = 0.1;
|
|
2896
|
-
while (this.
|
|
2907
|
+
while (this.j1n(pSum, equivalentMass, currentSpeed, dt) <= dx) {
|
|
2897
2908
|
dt = dt + 0.1;
|
|
2898
2909
|
}
|
|
2899
2910
|
return getDtInner(this, pSum, equivalentMass, currentSpeed, dx, dt - 0.1, dt);
|
|
2900
2911
|
};
|
|
2901
|
-
protoOf(PowerComputer).
|
|
2912
|
+
protoOf(PowerComputer).m1n = function (course, path, equivalentMass, i) {
|
|
2902
2913
|
if (i === 0) {
|
|
2903
|
-
path.
|
|
2914
|
+
path.c1l(i, 0.0);
|
|
2904
2915
|
return Unit_instance;
|
|
2905
2916
|
}
|
|
2906
|
-
var resistive = this.
|
|
2907
|
-
var s1 = path.
|
|
2908
|
-
var s2 = path.
|
|
2909
|
-
var dtSeconds = path.
|
|
2910
|
-
var totPower = this.
|
|
2911
|
-
path.
|
|
2917
|
+
var resistive = this.h1n(course, path, i - 1 | 0, false);
|
|
2918
|
+
var s1 = path.d1l(i - 1 | 0);
|
|
2919
|
+
var s2 = path.d1l(i);
|
|
2920
|
+
var dtSeconds = path.g1k(i) / 1000.0;
|
|
2921
|
+
var totPower = this.k1n(equivalentMass, s1, s2, dtSeconds);
|
|
2922
|
+
path.z1k(i, totPower);
|
|
2912
2923
|
var powerWheel = totPower - resistive;
|
|
2913
|
-
path.
|
|
2924
|
+
path.a1l(i, powerWheel);
|
|
2914
2925
|
// Inline function 'kotlin.math.max' call
|
|
2915
2926
|
var computed = Math.max(0.0, powerWheel) / course.l1f().w1e_1;
|
|
2916
|
-
path.
|
|
2927
|
+
path.c1l(i, computed);
|
|
2917
2928
|
};
|
|
2918
|
-
protoOf(PowerComputer).
|
|
2929
|
+
protoOf(PowerComputer).n1n = function (course) {
|
|
2919
2930
|
var m = course.z1e_1.o1f_1;
|
|
2920
2931
|
var totalInertia = course.a1f_1.t1e_1 + course.a1f_1.u1e_1;
|
|
2921
2932
|
return m + totalInertia / (course.a1f_1.v1e_1 * course.a1f_1.v1e_1);
|
|
2922
2933
|
};
|
|
2923
|
-
protoOf(PowerComputer).
|
|
2924
|
-
return this.
|
|
2934
|
+
protoOf(PowerComputer).o1n = function (course) {
|
|
2935
|
+
return this.n1n(course.e1f_1);
|
|
2925
2936
|
};
|
|
2926
2937
|
var PowerComputer_instance;
|
|
2927
2938
|
function PowerComputer_getInstance() {
|
|
@@ -2931,14 +2942,42 @@
|
|
|
2931
2942
|
useHarmonics = useHarmonics === VOID ? false : useHarmonics;
|
|
2932
2943
|
random = random === VOID ? Default_getInstance() : random;
|
|
2933
2944
|
CyclistPowerProviderBase.call(this, useHarmonics, random);
|
|
2934
|
-
this.
|
|
2945
|
+
this.r1n_1 = power;
|
|
2935
2946
|
}
|
|
2936
|
-
protoOf(PowerProviderConstant).
|
|
2937
|
-
return this.
|
|
2947
|
+
protoOf(PowerProviderConstant).d1n = function (course, path, pointIndex) {
|
|
2948
|
+
return this.r1n_1;
|
|
2938
2949
|
};
|
|
2950
|
+
function PowerProviderConstantWithTiring(power, useHarmonics, durationSeconds, random) {
|
|
2951
|
+
useHarmonics = useHarmonics === VOID ? false : useHarmonics;
|
|
2952
|
+
random = random === VOID ? Default_getInstance() : random;
|
|
2953
|
+
CyclistPowerProviderBase.call(this, useHarmonics, random);
|
|
2954
|
+
this.u1n_1 = power;
|
|
2955
|
+
this.v1n_1 = durationSeconds;
|
|
2956
|
+
// Inline function 'kotlin.require' call
|
|
2957
|
+
if (!(this.v1n_1 > 0.0)) {
|
|
2958
|
+
var message = 'durationSeconds must be > 0, got ' + this.v1n_1;
|
|
2959
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2960
|
+
}
|
|
2961
|
+
}
|
|
2962
|
+
protoOf(PowerProviderConstantWithTiring).d1n = function (course, path, pointIndex) {
|
|
2963
|
+
var elapsedS = path.e1k(pointIndex) / 1000.0;
|
|
2964
|
+
// Inline function 'kotlin.math.max' call
|
|
2965
|
+
var b = 1.0 - 0.6 * elapsedS / this.v1n_1;
|
|
2966
|
+
var c = Math.max(0.5, b);
|
|
2967
|
+
return this.u1n_1 * c;
|
|
2968
|
+
};
|
|
2969
|
+
function PowerProviderFromData() {
|
|
2970
|
+
}
|
|
2971
|
+
protoOf(PowerProviderFromData).v1m = function (course, path, pointIndex) {
|
|
2972
|
+
return path.g1i(pointIndex);
|
|
2973
|
+
};
|
|
2974
|
+
var PowerProviderFromData_instance;
|
|
2975
|
+
function PowerProviderFromData_getInstance() {
|
|
2976
|
+
return PowerProviderFromData_instance;
|
|
2977
|
+
}
|
|
2939
2978
|
function RhoProviderDefault() {
|
|
2940
2979
|
}
|
|
2941
|
-
protoOf(RhoProviderDefault).
|
|
2980
|
+
protoOf(RhoProviderDefault).y1m = function (course, path, pointIndex) {
|
|
2942
2981
|
return 1.225;
|
|
2943
2982
|
};
|
|
2944
2983
|
var RhoProviderDefault_instance;
|
|
@@ -2946,13 +2985,13 @@
|
|
|
2946
2985
|
return RhoProviderDefault_instance;
|
|
2947
2986
|
}
|
|
2948
2987
|
function RhoProviderEstimate() {
|
|
2949
|
-
this.
|
|
2950
|
-
this.
|
|
2951
|
-
this.
|
|
2952
|
-
this.
|
|
2953
|
-
this.
|
|
2988
|
+
this.w1n_1 = 101325.0;
|
|
2989
|
+
this.x1n_1 = 288.15;
|
|
2990
|
+
this.y1n_1 = 9.80665;
|
|
2991
|
+
this.z1n_1 = 0.0065;
|
|
2992
|
+
this.a1o_1 = 287.05;
|
|
2954
2993
|
}
|
|
2955
|
-
protoOf(RhoProviderEstimate).
|
|
2994
|
+
protoOf(RhoProviderEstimate).y1m = function (course, path, pointIndex) {
|
|
2956
2995
|
var providedTemp = path.m1j(pointIndex, PointField_TEMPERATURE_getInstance());
|
|
2957
2996
|
var temperatureC = isNaN_0(providedTemp) || providedTemp === 0.0 ? 15.0 : providedTemp;
|
|
2958
2997
|
var providedElevation = path.b1i(pointIndex);
|
|
@@ -2970,17 +3009,17 @@
|
|
|
2970
3009
|
}
|
|
2971
3010
|
function RollingResistancePowerProvider() {
|
|
2972
3011
|
}
|
|
2973
|
-
protoOf(RollingResistancePowerProvider).
|
|
3012
|
+
protoOf(RollingResistancePowerProvider).v1m = function (course, path, pointIndex) {
|
|
2974
3013
|
var m = course.k1f().o1f_1;
|
|
2975
3014
|
var crr = course.l1f().s1e_1;
|
|
2976
|
-
var grade = path.
|
|
2977
|
-
var speed = path.
|
|
3015
|
+
var grade = path.k1k(pointIndex);
|
|
3016
|
+
var speed = path.d1l(pointIndex);
|
|
2978
3017
|
// Inline function 'kotlin.math.atan' call
|
|
2979
3018
|
// Inline function 'kotlin.math.cos' call
|
|
2980
3019
|
var x = Math.atan(grade);
|
|
2981
3020
|
var coef = Math.cos(x);
|
|
2982
3021
|
var p = -coef * m * 9.8 * speed * crr;
|
|
2983
|
-
path.
|
|
3022
|
+
path.s1k(pointIndex, p);
|
|
2984
3023
|
return p;
|
|
2985
3024
|
};
|
|
2986
3025
|
var RollingResistancePowerProvider_instance;
|
|
@@ -3007,25 +3046,25 @@
|
|
|
3007
3046
|
copyAllFields(this, input, 0, singleton, 0);
|
|
3008
3047
|
return singleton;
|
|
3009
3048
|
}
|
|
3010
|
-
var mEq = PowerComputer_instance.
|
|
3049
|
+
var mEq = PowerComputer_instance.o1n(course);
|
|
3011
3050
|
var out = new Path(n);
|
|
3012
3051
|
copyAllFields(this, input, 0, out, 0);
|
|
3013
3052
|
var speed = 0.5555555555555556;
|
|
3014
3053
|
var startTimeMs = 0.0;
|
|
3015
3054
|
var timeMs = startTimeMs;
|
|
3016
3055
|
out.p1i(0, timeMs);
|
|
3017
|
-
out.
|
|
3018
|
-
out.
|
|
3019
|
-
out.
|
|
3056
|
+
out.f1k(0, 0.0);
|
|
3057
|
+
out.e1l(0, speed);
|
|
3058
|
+
out.i1l(0, speed);
|
|
3020
3059
|
var i = 1;
|
|
3021
3060
|
var iter = 0;
|
|
3022
3061
|
$l$loop: while (i < n) {
|
|
3023
3062
|
var dx = input.b1k(i) - input.b1k(i - 1 | 0);
|
|
3024
|
-
var pSum = PowerComputer_instance.
|
|
3025
|
-
var dt = PowerComputer_instance.
|
|
3063
|
+
var pSum = PowerComputer_instance.h1n(course, out, i - 1 | 0, true);
|
|
3064
|
+
var dt = PowerComputer_instance.l1n(pSum, mEq, speed, dx);
|
|
3026
3065
|
var speedNew = 2.0 * dx / dt - speed;
|
|
3027
3066
|
copyAllFields(this, input, i, out, i);
|
|
3028
|
-
var speedMax = input.
|
|
3067
|
+
var speedMax = input.f1l(i);
|
|
3029
3068
|
if (speedNew > speedMax) {
|
|
3030
3069
|
speedNew = speedMax;
|
|
3031
3070
|
dt = 2.0 * dx / (speedNew + speed);
|
|
@@ -3033,25 +3072,25 @@
|
|
|
3033
3072
|
speed = speedNew;
|
|
3034
3073
|
timeMs = timeMs + dt * 1000.0;
|
|
3035
3074
|
out.p1i(i, timeMs);
|
|
3036
|
-
out.
|
|
3075
|
+
out.f1k(i, timeMs - startTimeMs);
|
|
3037
3076
|
out.d1k(i, dx);
|
|
3038
|
-
out.
|
|
3039
|
-
out.
|
|
3040
|
-
out.
|
|
3077
|
+
out.h1k(i, dt * 1000.0);
|
|
3078
|
+
out.e1l(i, speed);
|
|
3079
|
+
out.i1l(i, speed);
|
|
3041
3080
|
i = i + 1 | 0;
|
|
3042
3081
|
var _unary__edvuaz = iter;
|
|
3043
3082
|
iter = _unary__edvuaz + 1 | 0;
|
|
3044
3083
|
if (_unary__edvuaz > 100000)
|
|
3045
3084
|
break $l$loop;
|
|
3046
3085
|
}
|
|
3047
|
-
var progression = out.
|
|
3086
|
+
var progression = out.q1l();
|
|
3048
3087
|
var inductionVariable = progression.qa_1;
|
|
3049
3088
|
var last = progression.ra_1;
|
|
3050
3089
|
if (inductionVariable <= last)
|
|
3051
3090
|
do {
|
|
3052
3091
|
var j = inductionVariable;
|
|
3053
3092
|
inductionVariable = inductionVariable + 1 | 0;
|
|
3054
|
-
PowerComputer_instance.
|
|
3093
|
+
PowerComputer_instance.m1n(course, out, mEq, j);
|
|
3055
3094
|
}
|
|
3056
3095
|
while (!(j === last));
|
|
3057
3096
|
out.d1j();
|
|
@@ -3063,10 +3102,10 @@
|
|
|
3063
3102
|
}
|
|
3064
3103
|
function WheelBearingsPowerProvider() {
|
|
3065
3104
|
}
|
|
3066
|
-
protoOf(WheelBearingsPowerProvider).
|
|
3067
|
-
var speed = path.
|
|
3105
|
+
protoOf(WheelBearingsPowerProvider).v1m = function (course, path, pointIndex) {
|
|
3106
|
+
var speed = path.d1l(pointIndex);
|
|
3068
3107
|
var p = -speed * (91.0 + 8.7 * speed) / 1000.0;
|
|
3069
|
-
path.
|
|
3108
|
+
path.t1k(pointIndex, p);
|
|
3070
3109
|
return p;
|
|
3071
3110
|
};
|
|
3072
3111
|
var WheelBearingsPowerProvider_instance;
|
|
@@ -3075,7 +3114,7 @@
|
|
|
3075
3114
|
}
|
|
3076
3115
|
function Companion_7() {
|
|
3077
3116
|
Companion_instance_7 = this;
|
|
3078
|
-
this.
|
|
3117
|
+
this.b1o_1 = new Wind(0.0, 0.0);
|
|
3079
3118
|
}
|
|
3080
3119
|
var Companion_instance_7;
|
|
3081
3120
|
function Companion_getInstance_8() {
|
|
@@ -3085,15 +3124,15 @@
|
|
|
3085
3124
|
}
|
|
3086
3125
|
function Wind(speedMS, directionRad) {
|
|
3087
3126
|
Companion_getInstance_8();
|
|
3088
|
-
this.
|
|
3089
|
-
this.
|
|
3127
|
+
this.s1m_1 = speedMS;
|
|
3128
|
+
this.t1m_1 = directionRad;
|
|
3090
3129
|
}
|
|
3091
3130
|
protoOf(Wind).toString = function () {
|
|
3092
|
-
return 'Wind(speedMS=' + this.
|
|
3131
|
+
return 'Wind(speedMS=' + this.s1m_1 + ', directionRad=' + this.t1m_1 + ')';
|
|
3093
3132
|
};
|
|
3094
3133
|
protoOf(Wind).hashCode = function () {
|
|
3095
|
-
var result = getNumberHashCode(this.
|
|
3096
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3134
|
+
var result = getNumberHashCode(this.s1m_1);
|
|
3135
|
+
result = imul(result, 31) + getNumberHashCode(this.t1m_1) | 0;
|
|
3097
3136
|
return result;
|
|
3098
3137
|
};
|
|
3099
3138
|
protoOf(Wind).equals = function (other) {
|
|
@@ -3101,21 +3140,27 @@
|
|
|
3101
3140
|
return true;
|
|
3102
3141
|
if (!(other instanceof Wind))
|
|
3103
3142
|
return false;
|
|
3104
|
-
if (!equals(this.
|
|
3143
|
+
if (!equals(this.s1m_1, other.s1m_1))
|
|
3105
3144
|
return false;
|
|
3106
|
-
if (!equals(this.
|
|
3145
|
+
if (!equals(this.t1m_1, other.t1m_1))
|
|
3107
3146
|
return false;
|
|
3108
3147
|
return true;
|
|
3109
3148
|
};
|
|
3110
3149
|
function WindProviderNone() {
|
|
3111
3150
|
}
|
|
3112
|
-
protoOf(WindProviderNone).
|
|
3113
|
-
return Companion_getInstance_8().
|
|
3151
|
+
protoOf(WindProviderNone).x1m = function (course, path, pointIndex) {
|
|
3152
|
+
return Companion_getInstance_8().b1o_1;
|
|
3114
3153
|
};
|
|
3115
3154
|
var WindProviderNone_instance;
|
|
3116
3155
|
function WindProviderNone_getInstance() {
|
|
3117
3156
|
return WindProviderNone_instance;
|
|
3118
3157
|
}
|
|
3158
|
+
function WindProviderConstant(wind) {
|
|
3159
|
+
this.c1o_1 = wind;
|
|
3160
|
+
}
|
|
3161
|
+
protoOf(WindProviderConstant).x1m = function (course, path, pointIndex) {
|
|
3162
|
+
return this.c1o_1;
|
|
3163
|
+
};
|
|
3119
3164
|
function parseGpx(xml) {
|
|
3120
3165
|
return firstTrackAsPath(GpxParser_instance.l1i(xml));
|
|
3121
3166
|
}
|
|
@@ -3135,7 +3180,7 @@
|
|
|
3135
3180
|
return path.a1j_1;
|
|
3136
3181
|
}
|
|
3137
3182
|
function pointAt(path, i) {
|
|
3138
|
-
return pointObj(path.
|
|
3183
|
+
return pointObj(path.r1l(i), path.s1l(i), path.b1i(i), path.c1i(i), path.d1l(i), path.b1l(i), path.b1k(i), path.k1k(i));
|
|
3139
3184
|
}
|
|
3140
3185
|
function writeGpx(path) {
|
|
3141
3186
|
return GpxWriter_instance.l1j(toGpxDocument(path, VOID, 'virtualized'));
|
|
@@ -3144,6 +3189,51 @@
|
|
|
3144
3189
|
var tmp = GlobalScope_instance;
|
|
3145
3190
|
return promise(tmp, VOID, VOID, enhance$slambda_0(options, path, null));
|
|
3146
3191
|
}
|
|
3192
|
+
function enhanceWithCourse(path, cyclist, bike, wind, power, options) {
|
|
3193
|
+
var tmp = GlobalScope_instance;
|
|
3194
|
+
return promise(tmp, VOID, VOID, enhanceWithCourse$slambda_0(options, path, cyclist, bike, wind, power, null));
|
|
3195
|
+
}
|
|
3196
|
+
function getField(path, i, fieldProp) {
|
|
3197
|
+
var tmp0_elvis_lhs = Companion_getInstance_6().e1m(fieldProp);
|
|
3198
|
+
var tmp;
|
|
3199
|
+
if (tmp0_elvis_lhs == null) {
|
|
3200
|
+
// Inline function 'kotlin.error' call
|
|
3201
|
+
var message = 'Unknown PointField prop: ' + fieldProp;
|
|
3202
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
3203
|
+
} else {
|
|
3204
|
+
tmp = tmp0_elvis_lhs;
|
|
3205
|
+
}
|
|
3206
|
+
var field = tmp;
|
|
3207
|
+
return path.m1j(i, field);
|
|
3208
|
+
}
|
|
3209
|
+
function fieldDefinitions() {
|
|
3210
|
+
// Inline function 'kotlin.collections.map' call
|
|
3211
|
+
var this_0 = get_entries();
|
|
3212
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
3213
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
3214
|
+
var _iterator__ex2g4s = this_0.i();
|
|
3215
|
+
while (_iterator__ex2g4s.j()) {
|
|
3216
|
+
var item = _iterator__ex2g4s.k();
|
|
3217
|
+
var o = {};
|
|
3218
|
+
o.prop = item.y1l_1;
|
|
3219
|
+
o.unit = item.z1l_1;
|
|
3220
|
+
o.shortDescription = item.a1m_1;
|
|
3221
|
+
o.categoryId = item.b1m_1.h1m_1;
|
|
3222
|
+
o.categoryName = item.b1m_1.i1m_1;
|
|
3223
|
+
o.notSelectable = item.c1m_1;
|
|
3224
|
+
o.anglesInRadians = item.d1m_1;
|
|
3225
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
3226
|
+
destination.h(o);
|
|
3227
|
+
}
|
|
3228
|
+
// Inline function 'kotlin.collections.toTypedArray' call
|
|
3229
|
+
return copyToArray(destination);
|
|
3230
|
+
}
|
|
3231
|
+
function pathLatitudeDeg(path, i) {
|
|
3232
|
+
return path.r1l(i);
|
|
3233
|
+
}
|
|
3234
|
+
function pathLongitudeDeg(path, i) {
|
|
3235
|
+
return path.s1l(i);
|
|
3236
|
+
}
|
|
3147
3237
|
function pointObj(latitudeDeg, longitudeDeg, elevation, timeMs, speed, pComputedPower, distance, grade) {
|
|
3148
3238
|
var o = {};
|
|
3149
3239
|
o.latitudeDeg = latitudeDeg;
|
|
@@ -3178,19 +3268,64 @@
|
|
|
3178
3268
|
function defaultJsOptions() {
|
|
3179
3269
|
return new EnhanceOptions(false, true, true, false, new SimplifyPathOptions(false));
|
|
3180
3270
|
}
|
|
3271
|
+
function toCyclist(_this__u8e3s4) {
|
|
3272
|
+
if (_this__u8e3s4 == null)
|
|
3273
|
+
return new Cyclist();
|
|
3274
|
+
return new Cyclist(_this__u8e3s4.massKg, _this__u8e3s4.maxBrakeG, _this__u8e3s4.cd, _this__u8e3s4.frontalAreaM2, _this__u8e3s4.maxLeanAngleDeg, _this__u8e3s4.maxSpeedKmH);
|
|
3275
|
+
}
|
|
3276
|
+
function toBike(_this__u8e3s4) {
|
|
3277
|
+
if (_this__u8e3s4 == null)
|
|
3278
|
+
return new Bike();
|
|
3279
|
+
return new Bike(_this__u8e3s4.crr, _this__u8e3s4.inertiaFront, _this__u8e3s4.inertiaRear, _this__u8e3s4.wheelRadiusM, _this__u8e3s4.efficiency);
|
|
3280
|
+
}
|
|
3281
|
+
function toWindProvider(_this__u8e3s4) {
|
|
3282
|
+
if (_this__u8e3s4 == null)
|
|
3283
|
+
return WindProviderNone_instance;
|
|
3284
|
+
return new WindProviderConstant(new Wind(_this__u8e3s4.windSpeed, _this__u8e3s4.windDirection * 3.141592653589793 / 180.0));
|
|
3285
|
+
}
|
|
3286
|
+
function toCyclistPowerProvider(_this__u8e3s4) {
|
|
3287
|
+
if (_this__u8e3s4 == null)
|
|
3288
|
+
return new PowerProviderConstant(250.0, false);
|
|
3289
|
+
var tmp;
|
|
3290
|
+
switch (_this__u8e3s4.type) {
|
|
3291
|
+
case 'constant':
|
|
3292
|
+
var tmp1_elvis_lhs = _this__u8e3s4.power;
|
|
3293
|
+
var tmp_0 = tmp1_elvis_lhs == null ? 250.0 : tmp1_elvis_lhs;
|
|
3294
|
+
var tmp2_elvis_lhs = _this__u8e3s4.useHarmonics;
|
|
3295
|
+
tmp = new PowerProviderConstant(tmp_0, tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs);
|
|
3296
|
+
break;
|
|
3297
|
+
case 'constant_tiring':
|
|
3298
|
+
var tmp3_elvis_lhs = _this__u8e3s4.power;
|
|
3299
|
+
var tmp_1 = tmp3_elvis_lhs == null ? 250.0 : tmp3_elvis_lhs;
|
|
3300
|
+
var tmp4_elvis_lhs = _this__u8e3s4.useHarmonics;
|
|
3301
|
+
var tmp_2 = tmp4_elvis_lhs == null ? false : tmp4_elvis_lhs;
|
|
3302
|
+
var tmp5_elvis_lhs = _this__u8e3s4.tiringDuration;
|
|
3303
|
+
tmp = new PowerProviderConstantWithTiring(tmp_1, tmp_2, tmp5_elvis_lhs == null ? 7200.0 : tmp5_elvis_lhs);
|
|
3304
|
+
break;
|
|
3305
|
+
case 'from_data':
|
|
3306
|
+
tmp = PowerProviderFromData_instance;
|
|
3307
|
+
break;
|
|
3308
|
+
default:
|
|
3309
|
+
// Inline function 'kotlin.error' call
|
|
3310
|
+
|
|
3311
|
+
var message = 'Unknown PowerProviderDto.type: ' + _this__u8e3s4.type;
|
|
3312
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
3313
|
+
}
|
|
3314
|
+
return tmp;
|
|
3315
|
+
}
|
|
3181
3316
|
function enhance$slambda($options, $path, resultContinuation) {
|
|
3182
|
-
this.
|
|
3183
|
-
this.
|
|
3317
|
+
this.l1o_1 = $options;
|
|
3318
|
+
this.m1o_1 = $path;
|
|
3184
3319
|
CoroutineImpl.call(this, resultContinuation);
|
|
3185
3320
|
}
|
|
3186
|
-
protoOf(enhance$slambda).
|
|
3321
|
+
protoOf(enhance$slambda).o1o = function ($this$promise, $completion) {
|
|
3187
3322
|
var tmp = this.qz($this$promise, $completion);
|
|
3188
3323
|
tmp.w5_1 = Unit_instance;
|
|
3189
3324
|
tmp.x5_1 = null;
|
|
3190
3325
|
return tmp.c6();
|
|
3191
3326
|
};
|
|
3192
3327
|
protoOf(enhance$slambda).k6 = function (p1, $completion) {
|
|
3193
|
-
return this.
|
|
3328
|
+
return this.o1o((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
3194
3329
|
};
|
|
3195
3330
|
protoOf(enhance$slambda).c6 = function () {
|
|
3196
3331
|
var suspendResult = this.w5_1;
|
|
@@ -3200,10 +3335,10 @@
|
|
|
3200
3335
|
switch (tmp) {
|
|
3201
3336
|
case 0:
|
|
3202
3337
|
this.v5_1 = 2;
|
|
3203
|
-
var opts = toEnhanceOptions(this.
|
|
3338
|
+
var opts = toEnhanceOptions(this.l1o_1);
|
|
3204
3339
|
var provider = opts.b1g_1 ? new ElevationProvider() : null;
|
|
3205
3340
|
this.u5_1 = 1;
|
|
3206
|
-
suspendResult = Enhancer_instance.i1h(this.
|
|
3341
|
+
suspendResult = Enhancer_instance.i1h(this.m1o_1, provider, opts, this);
|
|
3207
3342
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3208
3343
|
return suspendResult;
|
|
3209
3344
|
}
|
|
@@ -3226,14 +3361,79 @@
|
|
|
3226
3361
|
while (true);
|
|
3227
3362
|
};
|
|
3228
3363
|
protoOf(enhance$slambda).qz = function ($this$promise, completion) {
|
|
3229
|
-
var i = new enhance$slambda(this.
|
|
3230
|
-
i.
|
|
3364
|
+
var i = new enhance$slambda(this.l1o_1, this.m1o_1, completion);
|
|
3365
|
+
i.n1o_1 = $this$promise;
|
|
3231
3366
|
return i;
|
|
3232
3367
|
};
|
|
3233
3368
|
function enhance$slambda_0($options, $path, resultContinuation) {
|
|
3234
3369
|
var i = new enhance$slambda($options, $path, resultContinuation);
|
|
3235
3370
|
var l = function ($this$promise, $completion) {
|
|
3236
|
-
return i.
|
|
3371
|
+
return i.o1o($this$promise, $completion);
|
|
3372
|
+
};
|
|
3373
|
+
l.$arity = 1;
|
|
3374
|
+
return l;
|
|
3375
|
+
}
|
|
3376
|
+
function enhanceWithCourse$slambda($options, $path, $cyclist, $bike, $wind, $power, resultContinuation) {
|
|
3377
|
+
this.x1o_1 = $options;
|
|
3378
|
+
this.y1o_1 = $path;
|
|
3379
|
+
this.z1o_1 = $cyclist;
|
|
3380
|
+
this.a1p_1 = $bike;
|
|
3381
|
+
this.b1p_1 = $wind;
|
|
3382
|
+
this.c1p_1 = $power;
|
|
3383
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
3384
|
+
}
|
|
3385
|
+
protoOf(enhanceWithCourse$slambda).o1o = function ($this$promise, $completion) {
|
|
3386
|
+
var tmp = this.qz($this$promise, $completion);
|
|
3387
|
+
tmp.w5_1 = Unit_instance;
|
|
3388
|
+
tmp.x5_1 = null;
|
|
3389
|
+
return tmp.c6();
|
|
3390
|
+
};
|
|
3391
|
+
protoOf(enhanceWithCourse$slambda).k6 = function (p1, $completion) {
|
|
3392
|
+
return this.o1o((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
3393
|
+
};
|
|
3394
|
+
protoOf(enhanceWithCourse$slambda).c6 = function () {
|
|
3395
|
+
var suspendResult = this.w5_1;
|
|
3396
|
+
$sm: do
|
|
3397
|
+
try {
|
|
3398
|
+
var tmp = this.u5_1;
|
|
3399
|
+
switch (tmp) {
|
|
3400
|
+
case 0:
|
|
3401
|
+
this.v5_1 = 2;
|
|
3402
|
+
var opts = toEnhanceOptions(this.x1o_1);
|
|
3403
|
+
var provider = opts.b1g_1 ? new ElevationProvider() : null;
|
|
3404
|
+
var course = new CoursePhysics(new Course(this.y1o_1, toCyclist(this.z1o_1), toBike(this.a1p_1)), RhoProviderEstimate_instance, AeroProviderConstant_instance, toWindProvider(this.b1p_1), toCyclistPowerProvider(this.c1p_1));
|
|
3405
|
+
this.u5_1 = 1;
|
|
3406
|
+
suspendResult = Enhancer_instance.j1h(course, opts, provider, this);
|
|
3407
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3408
|
+
return suspendResult;
|
|
3409
|
+
}
|
|
3410
|
+
|
|
3411
|
+
continue $sm;
|
|
3412
|
+
case 1:
|
|
3413
|
+
return suspendResult;
|
|
3414
|
+
case 2:
|
|
3415
|
+
throw this.x5_1;
|
|
3416
|
+
}
|
|
3417
|
+
} catch ($p) {
|
|
3418
|
+
var e = $p;
|
|
3419
|
+
if (this.v5_1 === 2) {
|
|
3420
|
+
throw e;
|
|
3421
|
+
} else {
|
|
3422
|
+
this.u5_1 = this.v5_1;
|
|
3423
|
+
this.x5_1 = e;
|
|
3424
|
+
}
|
|
3425
|
+
}
|
|
3426
|
+
while (true);
|
|
3427
|
+
};
|
|
3428
|
+
protoOf(enhanceWithCourse$slambda).qz = function ($this$promise, completion) {
|
|
3429
|
+
var i = new enhanceWithCourse$slambda(this.x1o_1, this.y1o_1, this.z1o_1, this.a1p_1, this.b1p_1, this.c1p_1, completion);
|
|
3430
|
+
i.d1p_1 = $this$promise;
|
|
3431
|
+
return i;
|
|
3432
|
+
};
|
|
3433
|
+
function enhanceWithCourse$slambda_0($options, $path, $cyclist, $bike, $wind, $power, resultContinuation) {
|
|
3434
|
+
var i = new enhanceWithCourse$slambda($options, $path, $cyclist, $bike, $wind, $power, resultContinuation);
|
|
3435
|
+
var l = function ($this$promise, $completion) {
|
|
3436
|
+
return i.o1o($this$promise, $completion);
|
|
3237
3437
|
};
|
|
3238
3438
|
l.$arity = 1;
|
|
3239
3439
|
return l;
|
|
@@ -3254,6 +3454,7 @@
|
|
|
3254
3454
|
MaxSpeedComputer_instance = new MaxSpeedComputer();
|
|
3255
3455
|
MuscularPowerProvider_instance = new MuscularPowerProvider();
|
|
3256
3456
|
PowerComputer_instance = new PowerComputer();
|
|
3457
|
+
PowerProviderFromData_instance = new PowerProviderFromData();
|
|
3257
3458
|
RhoProviderDefault_instance = new RhoProviderDefault();
|
|
3258
3459
|
RhoProviderEstimate_instance = new RhoProviderEstimate();
|
|
3259
3460
|
RollingResistancePowerProvider_instance = new RollingResistancePowerProvider();
|
|
@@ -3276,6 +3477,11 @@
|
|
|
3276
3477
|
engine.pointAt = pointAt;
|
|
3277
3478
|
engine.writeGpx = writeGpx;
|
|
3278
3479
|
engine.enhance = enhance;
|
|
3480
|
+
engine.enhanceWithCourse = enhanceWithCourse;
|
|
3481
|
+
engine.getField = getField;
|
|
3482
|
+
engine.fieldDefinitions = fieldDefinitions;
|
|
3483
|
+
engine.pathLatitudeDeg = pathLatitudeDeg;
|
|
3484
|
+
engine.pathLongitudeDeg = pathLongitudeDeg;
|
|
3279
3485
|
}
|
|
3280
3486
|
$jsExportAll$(_);
|
|
3281
3487
|
kotlin_io_github_glandais_elevation.$jsExportAll$(_);
|