@glandais/vcyclist-engine 6.0.1 → 6.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/index.d.ts CHANGED
@@ -25,6 +25,11 @@ export type ElevationGainPreset =
25
25
  | 'dem'
26
26
  | 'gps';
27
27
 
28
+ /** The spellings every door parses, derived from the `ElevationSource` catalogue in `commonMain`. */
29
+ export type ElevationSource =
30
+ | 'mapterhorn'
31
+ | 'ign-lidar-hd';
32
+
28
33
  /** The spellings every door parses, derived from the `RoadCondition` catalogue in `commonMain`. */
29
34
  export type RoadCondition =
30
35
  | 'dry'
@@ -196,8 +201,9 @@ export interface EnhanceOptionsDto {
196
201
  /**
197
202
  * Triangular-kernel half-width for the elevation smoother, in metres.
198
203
  *
199
- * The single largest determinant of both the reported climbing and the gradients the
200
- * simulation rides — it costs a clean route ~1.7 % and a noisy GPS trace ~49 %.
204
+ * It decides the gradients the simulation rides, and so the duration (17.6 % on a switchback
205
+ * climb between 10 and 300 m, about 1 % elsewhere). The reported climbing is measured before
206
+ * this smoothing, so the window barely moves it.
201
207
  */
202
208
  readonly elevationSmoothWindowM?: number | null;
203
209
  /**
@@ -207,6 +213,12 @@ export interface EnhanceOptionsDto {
207
213
  * where the provider is built rather than in `toEnhanceOptions`.
208
214
  */
209
215
  readonly demZoom?: number | null;
216
+ /**
217
+ * The DEM `fixElevation` reads, by `ElevationSource` id: `"mapterhorn"` (the default) or
218
+ * `"ign-lidar-hd"` (France only, falling back to Mapterhorn where IGN has no data). Read
219
+ * where the provider is built, like `demZoom`; `demZoom` then defaults to the source's own.
220
+ */
221
+ readonly demSource?: ElevationSource | null;
210
222
  }
211
223
 
212
224
  /**
@@ -552,7 +564,7 @@ export declare function enhance(path: Path, options: EnhanceOptionsDto | null):
552
564
  * (see `CyclistDto`, `BikeDto`, `WindDto`, `PowerProviderDto` KDoc for specifics).
553
565
  *
554
566
  * Like `enhance`, when `options.fixElevation == true` a default `ElevationProvider` is
555
- * auto-instantiated (Terrarium tiles via HTTP).
567
+ * auto-instantiated (`demSource`'s tiles via HTTP).
556
568
  */
557
569
  export declare function enhanceWithCourse(path: Path, cyclist: CyclistDto | null, bike: BikeDto | null, wind: WindDto | null, power: PowerProviderDto | null, options: EnhanceOptionsDto | null): Promise<Path>;
558
570