@glandais/vcyclist-engine 6.2.0 → 6.4.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/fit-kotlin-sdk.js +3744 -3744
- package/index.cjs +1 -0
- package/index.d.ts +48 -0
- package/index.mjs +1 -0
- package/kotlin-kotlin-stdlib.js +21 -21
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlinx-coroutines-core.js +2 -2
- package/package.json +1 -1
- package/vcyclist-elevation.js +686 -685
- package/vcyclist-elevation.js.map +1 -1
- package/vcyclist-engine.d.ts +1 -0
- package/vcyclist-engine.js +1854 -1649
- package/vcyclist-engine.js.map +1 -1
- package/vcyclist-fit.js +204 -204
- package/vcyclist-gpx.js +1513 -1379
- package/vcyclist-gpx.js.map +1 -1
- package/xmlutil-core.js +2393 -2393
package/index.cjs
CHANGED
|
@@ -46,6 +46,7 @@ module.exports = {
|
|
|
46
46
|
pathElevationLossFiltered: ns.pathElevationLossFiltered,
|
|
47
47
|
pathReportedElevationGain: ns.pathReportedElevationGain,
|
|
48
48
|
pathReportedElevationLoss: ns.pathReportedElevationLoss,
|
|
49
|
+
pathElevationCorrections: ns.pathElevationCorrections,
|
|
49
50
|
pointAt: ns.pointAt,
|
|
50
51
|
writeGpx: ns.writeGpx,
|
|
51
52
|
writeGpxAt: ns.writeGpxAt,
|
package/index.d.ts
CHANGED
|
@@ -89,6 +89,15 @@ export type PointFieldProp =
|
|
|
89
89
|
| 'sourceLongitude'
|
|
90
90
|
| 'sourceElevation';
|
|
91
91
|
|
|
92
|
+
/** The spellings every door parses, derived from the `ElevationCorrectionStatus` catalogue in `commonMain`. */
|
|
93
|
+
export type ElevationCorrectionStatus =
|
|
94
|
+
| 'not-run'
|
|
95
|
+
| 'unavailable'
|
|
96
|
+
| 'no-coverage'
|
|
97
|
+
| 'none-found'
|
|
98
|
+
| 'applied'
|
|
99
|
+
| 'fetch-failed';
|
|
100
|
+
|
|
92
101
|
/** The spellings every door parses, derived from the `CornerKind` catalogue in `commonMain`. */
|
|
93
102
|
export type CornerKind =
|
|
94
103
|
| 'GENTLE'
|
|
@@ -206,6 +215,22 @@ export interface EnhanceOptionsDto {
|
|
|
206
215
|
* this smoothing, so the window barely moves it.
|
|
207
216
|
*/
|
|
208
217
|
readonly elevationSmoothWindowM?: number | null;
|
|
218
|
+
/**
|
|
219
|
+
* **Allow** the bridge-deck correction after `fixElevation`: ride each bridge deck the LiDAR
|
|
220
|
+
* surface model shows instead of the valley floor the terrain model reads under it. A
|
|
221
|
+
* permission, not a promise — it runs only with `demSource: "ign-lidar-hd"` at that source's
|
|
222
|
+
* default zoom, the one provider carrying a surface model, and reports `"unavailable"`
|
|
223
|
+
* otherwise. `false` saves the surface-model fetches and makes the profile independent of the
|
|
224
|
+
* network. Defaults to `true`. What it did is read back with `pathElevationCorrections`.
|
|
225
|
+
*/
|
|
226
|
+
readonly bridgeDecksEnabled?: boolean | null;
|
|
227
|
+
/**
|
|
228
|
+
* Allow the tunnel correction after `fixElevation`, on any DEM: flatten each tunnel the terrain
|
|
229
|
+
* model betrays onto the line between its portals. Its precision is unmeasured on tracks with
|
|
230
|
+
* steep real knolls (≥ 30 %) and in regions only GLO-30 covers, where a false tunnel flattens a
|
|
231
|
+
* real climb — turn it off there. Defaults to `true`.
|
|
232
|
+
*/
|
|
233
|
+
readonly tunnelsEnabled?: boolean | null;
|
|
209
234
|
/**
|
|
210
235
|
* Web-Mercator zoom for the DEM lookup, `0..15`, used only when `fixElevation` is on.
|
|
211
236
|
*
|
|
@@ -337,6 +362,20 @@ export interface FieldDefinitionDto {
|
|
|
337
362
|
readonly anglesInRadians: boolean;
|
|
338
363
|
}
|
|
339
364
|
|
|
365
|
+
/**
|
|
366
|
+
* JS view of `ElevationCorrections`. Statuses are `ElevationCorrectionStatus` ids: `"not-run"`,
|
|
367
|
+
* `"unavailable"`, `"no-coverage"`, `"none-found"`, `"applied"`, `"fetch-failed"`.
|
|
368
|
+
*/
|
|
369
|
+
export interface ElevationCorrectionsDto {
|
|
370
|
+
readonly bridgeDecks: ElevationCorrectionStatus;
|
|
371
|
+
readonly bridgeDecksApplied: number;
|
|
372
|
+
readonly bridgeDecksDropped: number;
|
|
373
|
+
readonly tunnels: ElevationCorrectionStatus;
|
|
374
|
+
readonly tunnelsApplied: number;
|
|
375
|
+
readonly tunnelsDropped: number;
|
|
376
|
+
readonly warnings: string[];
|
|
377
|
+
}
|
|
378
|
+
|
|
340
379
|
/**
|
|
341
380
|
* A homogeneous-grade segment of a climb. Distances are absolute along the path, in meters;
|
|
342
381
|
* `grade` is dimensionless (`0.08` = 8 %), matching `averageGrade`.
|
|
@@ -525,6 +564,15 @@ export declare function pathReportedElevationGain(path: Path): number;
|
|
|
525
564
|
*/
|
|
526
565
|
export declare function pathReportedElevationLoss(path: Path): number;
|
|
527
566
|
|
|
567
|
+
/**
|
|
568
|
+
* What the enhancer's elevation corrections (bridge decks, tunnels) did to `path`, as a plain JS
|
|
569
|
+
* object; `null` when `path` never went through `enhance` / `enhanceWithCourse`.
|
|
570
|
+
*
|
|
571
|
+
* `warnings` holds one sentence per outcome that is knowingly wrong or depends on the network (a
|
|
572
|
+
* tile that could not be read, a detected deck left on the valley floor) and is empty otherwise.
|
|
573
|
+
*/
|
|
574
|
+
export declare function pathElevationCorrections(path: Path): ElevationCorrectionsDto | null;
|
|
575
|
+
|
|
528
576
|
export declare function pointAt(path: Path, i: number): PointDto;
|
|
529
577
|
|
|
530
578
|
/**
|
package/index.mjs
CHANGED
|
@@ -27,6 +27,7 @@ export const pathElevationGainFiltered = ns.pathElevationGainFiltered;
|
|
|
27
27
|
export const pathElevationLossFiltered = ns.pathElevationLossFiltered;
|
|
28
28
|
export const pathReportedElevationGain = ns.pathReportedElevationGain;
|
|
29
29
|
export const pathReportedElevationLoss = ns.pathReportedElevationLoss;
|
|
30
|
+
export const pathElevationCorrections = ns.pathElevationCorrections;
|
|
30
31
|
export const pointAt = ns.pointAt;
|
|
31
32
|
export const writeGpx = ns.writeGpx;
|
|
32
33
|
export const writeGpxAt = ns.writeGpxAt;
|
package/kotlin-kotlin-stdlib.js
CHANGED
|
@@ -175,23 +175,23 @@ if (typeof String.prototype.startsWith === 'undefined') {
|
|
|
175
175
|
initMetadataForClass(AbstractMutableCollection, 'AbstractMutableCollection', VOID, AbstractCollection, [Collection, MutableIterable]);
|
|
176
176
|
initMetadataForClass(IteratorImpl, 'IteratorImpl');
|
|
177
177
|
initMetadataForClass(ListIteratorImpl, 'ListIteratorImpl', VOID, IteratorImpl);
|
|
178
|
-
initMetadataForClass(AbstractMutableList, 'AbstractMutableList', VOID, AbstractMutableCollection, [
|
|
178
|
+
initMetadataForClass(AbstractMutableList, 'AbstractMutableList', VOID, AbstractMutableCollection, [KtList, Collection, MutableIterable]);
|
|
179
179
|
initMetadataForClass(AbstractMap, 'AbstractMap', VOID, VOID, [KtMap]);
|
|
180
180
|
initMetadataForClass(AbstractMutableMap, 'AbstractMutableMap', VOID, AbstractMap, [KtMap]);
|
|
181
|
-
initMetadataForClass(AbstractMutableSet, 'AbstractMutableSet', VOID, AbstractMutableCollection, [
|
|
181
|
+
initMetadataForClass(AbstractMutableSet, 'AbstractMutableSet', VOID, AbstractMutableCollection, [KtSet, Collection, MutableIterable]);
|
|
182
182
|
initMetadataForCompanion(Companion_2);
|
|
183
183
|
initMetadataForInterface(RandomAccess, 'RandomAccess');
|
|
184
|
-
initMetadataForClass(ArrayList, 'ArrayList', ArrayList_init_$Create$, AbstractMutableList, [
|
|
184
|
+
initMetadataForClass(ArrayList, 'ArrayList', ArrayList_init_$Create$, AbstractMutableList, [KtList, Collection, MutableIterable, RandomAccess]);
|
|
185
185
|
initMetadataForClass(HashMap, 'HashMap', HashMap_init_$Create$, AbstractMutableMap, [KtMap]);
|
|
186
|
-
initMetadataForClass(HashMapKeys, 'HashMapKeys', VOID, AbstractMutableSet, [
|
|
186
|
+
initMetadataForClass(HashMapKeys, 'HashMapKeys', VOID, AbstractMutableSet, [KtSet, Collection, MutableIterable]);
|
|
187
187
|
initMetadataForClass(HashMapValues, 'HashMapValues', VOID, AbstractMutableCollection, [Collection, MutableIterable]);
|
|
188
|
-
initMetadataForClass(HashMapEntrySetBase, 'HashMapEntrySetBase', VOID, AbstractMutableSet, [
|
|
188
|
+
initMetadataForClass(HashMapEntrySetBase, 'HashMapEntrySetBase', VOID, AbstractMutableSet, [KtSet, Collection, MutableIterable]);
|
|
189
189
|
initMetadataForClass(HashMapEntrySet, 'HashMapEntrySet', VOID, HashMapEntrySetBase);
|
|
190
190
|
initMetadataForClass(HashMapKeysDefault$iterator$1);
|
|
191
191
|
initMetadataForClass(HashMapKeysDefault, 'HashMapKeysDefault', VOID, AbstractMutableSet);
|
|
192
192
|
initMetadataForClass(HashMapValuesDefault$iterator$1);
|
|
193
193
|
initMetadataForClass(HashMapValuesDefault, 'HashMapValuesDefault', VOID, AbstractMutableCollection);
|
|
194
|
-
initMetadataForClass(HashSet, 'HashSet', HashSet_init_$Create$, AbstractMutableSet, [
|
|
194
|
+
initMetadataForClass(HashSet, 'HashSet', HashSet_init_$Create$, AbstractMutableSet, [KtSet, Collection, MutableIterable]);
|
|
195
195
|
initMetadataForCompanion(Companion_3);
|
|
196
196
|
initMetadataForClass(Itr, 'Itr');
|
|
197
197
|
initMetadataForClass(KeysItr, 'KeysItr', VOID, Itr);
|
|
@@ -236,7 +236,7 @@ if (typeof String.prototype.startsWith === 'undefined') {
|
|
|
236
236
|
initMetadataForInterface(InternalMap, 'InternalMap');
|
|
237
237
|
initMetadataForClass(InternalHashMap, 'InternalHashMap', InternalHashMap_init_$Create$, VOID, [InternalMap]);
|
|
238
238
|
initMetadataForClass(LinkedHashMap, 'LinkedHashMap', LinkedHashMap_init_$Create$, HashMap, [KtMap]);
|
|
239
|
-
initMetadataForClass(LinkedHashSet, 'LinkedHashSet', LinkedHashSet_init_$Create$, HashSet, [
|
|
239
|
+
initMetadataForClass(LinkedHashSet, 'LinkedHashSet', LinkedHashSet_init_$Create$, HashSet, [KtSet, Collection, MutableIterable]);
|
|
240
240
|
initMetadataForInterface(Continuation, 'Continuation');
|
|
241
241
|
initMetadataForClass(InterceptedCoroutine, 'InterceptedCoroutine', VOID, VOID, [Continuation]);
|
|
242
242
|
initMetadataForClass(CoroutineImpl, 'CoroutineImpl', VOID, InterceptedCoroutine, [Continuation]);
|
|
@@ -972,20 +972,20 @@ if (typeof String.prototype.startsWith === 'undefined') {
|
|
|
972
972
|
return _this__u8e3s4 < minimumValue ? minimumValue : _this__u8e3s4;
|
|
973
973
|
}
|
|
974
974
|
function coerceIn(_this__u8e3s4, minimumValue, maximumValue) {
|
|
975
|
-
if (
|
|
976
|
-
throw IllegalArgumentException_init_$Create$_0('Cannot coerce value to an empty range: maximum ' + maximumValue
|
|
977
|
-
if (
|
|
975
|
+
if (minimumValue > maximumValue)
|
|
976
|
+
throw IllegalArgumentException_init_$Create$_0('Cannot coerce value to an empty range: maximum ' + maximumValue + ' is less than minimum ' + minimumValue + '.');
|
|
977
|
+
if (_this__u8e3s4 < minimumValue)
|
|
978
978
|
return minimumValue;
|
|
979
|
-
if (
|
|
979
|
+
if (_this__u8e3s4 > maximumValue)
|
|
980
980
|
return maximumValue;
|
|
981
981
|
return _this__u8e3s4;
|
|
982
982
|
}
|
|
983
983
|
function coerceIn_0(_this__u8e3s4, minimumValue, maximumValue) {
|
|
984
|
-
if (minimumValue >
|
|
985
|
-
throw IllegalArgumentException_init_$Create$_0('Cannot coerce value to an empty range: maximum ' + maximumValue + ' is less than minimum ' + minimumValue + '.');
|
|
986
|
-
if (_this__u8e3s4 <
|
|
984
|
+
if (compare(minimumValue, maximumValue) > 0)
|
|
985
|
+
throw IllegalArgumentException_init_$Create$_0('Cannot coerce value to an empty range: maximum ' + maximumValue.toString() + ' is less than minimum ' + minimumValue.toString() + '.');
|
|
986
|
+
if (compare(_this__u8e3s4, minimumValue) < 0)
|
|
987
987
|
return minimumValue;
|
|
988
|
-
if (_this__u8e3s4 >
|
|
988
|
+
if (compare(_this__u8e3s4, maximumValue) > 0)
|
|
989
989
|
return maximumValue;
|
|
990
990
|
return _this__u8e3s4;
|
|
991
991
|
}
|
|
@@ -9375,7 +9375,7 @@ if (typeof String.prototype.startsWith === 'undefined') {
|
|
|
9375
9375
|
function DelimitedRangesSequence$iterator$1(this$0) {
|
|
9376
9376
|
this.hf_1 = this$0;
|
|
9377
9377
|
this.cf_1 = -1;
|
|
9378
|
-
this.df_1 =
|
|
9378
|
+
this.df_1 = coerceIn(this$0.jf_1, 0, charSequenceLength(this$0.if_1));
|
|
9379
9379
|
this.ef_1 = this.df_1;
|
|
9380
9380
|
this.ff_1 = null;
|
|
9381
9381
|
this.gf_1 = 0;
|
|
@@ -9995,7 +9995,7 @@ if (typeof String.prototype.startsWith === 'undefined') {
|
|
|
9995
9995
|
var tmp$ret$0 = add(this_0, fromInt(1));
|
|
9996
9996
|
tmp = durationOfMillis(multiply(numberToLong(tmp_0), convertDurationUnitToMilliseconds(abs_0(coerceAtLeast_1(_this__u8e3s4, tmp$ret$0)), unit)));
|
|
9997
9997
|
} else {
|
|
9998
|
-
tmp = durationOfMillis(
|
|
9998
|
+
tmp = durationOfMillis(coerceIn_0(convertDurationUnit_0(_this__u8e3s4, unit, DurationUnit_MILLISECONDS_getInstance()), new Long(1, -1073741824), new Long(-1, 1073741823)));
|
|
9999
9999
|
}
|
|
10000
10000
|
return tmp;
|
|
10001
10001
|
}
|
|
@@ -10056,7 +10056,7 @@ if (typeof String.prototype.startsWith === 'undefined') {
|
|
|
10056
10056
|
if (equalsLong(other, new Long(-1, 1073741823)) || equalsLong(other, new Long(1, -1073741824))) {
|
|
10057
10057
|
tmp = other;
|
|
10058
10058
|
} else {
|
|
10059
|
-
tmp =
|
|
10059
|
+
tmp = coerceIn_0(add(_this__u8e3s4, other), new Long(1, -1073741824), new Long(-1, 1073741823));
|
|
10060
10060
|
}
|
|
10061
10061
|
}
|
|
10062
10062
|
return tmp;
|
|
@@ -10066,7 +10066,7 @@ if (typeof String.prototype.startsWith === 'undefined') {
|
|
|
10066
10066
|
if (compare(new Long(1108857478, -1074), millis) <= 0 ? compare(millis, new Long(-1108857478, 1073)) <= 0 : false) {
|
|
10067
10067
|
tmp = durationOfNanos(millisToNanos(millis));
|
|
10068
10068
|
} else {
|
|
10069
|
-
tmp = durationOfMillis(
|
|
10069
|
+
tmp = durationOfMillis(coerceIn_0(millis, new Long(1, -1073741824), new Long(-1, 1073741823)));
|
|
10070
10070
|
}
|
|
10071
10071
|
return tmp;
|
|
10072
10072
|
}
|
|
@@ -11671,8 +11671,8 @@ if (typeof String.prototype.startsWith === 'undefined') {
|
|
|
11671
11671
|
_.$_$.q8 = coerceAtLeast;
|
|
11672
11672
|
_.$_$.r8 = coerceAtMost;
|
|
11673
11673
|
_.$_$.s8 = coerceIn_1;
|
|
11674
|
-
_.$_$.t8 =
|
|
11675
|
-
_.$_$.u8 =
|
|
11674
|
+
_.$_$.t8 = coerceIn;
|
|
11675
|
+
_.$_$.u8 = coerceIn_0;
|
|
11676
11676
|
_.$_$.v8 = contains_2;
|
|
11677
11677
|
_.$_$.w8 = downTo;
|
|
11678
11678
|
_.$_$.x8 = rangeTo;
|