@ingissa/navcore-core 1.0.3 → 1.0.4

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 CHANGED
@@ -1,279 +1,136 @@
1
- # @ingissa/navcore-core
2
-
3
- > **The navigation layer you own.** A framework-agnostic, zero-dependency navigation engine that runs everywhere — browsers, React Native, Node.js, and CI/CD.
4
-
5
- [![npm version](https://img.shields.io/npm/v/@ingissa/navcore-core)](https://www.npmjs.com/package/@ingissa/navcore-core)
6
- [![License](https://img.shields.io/badge/license-MIT%20%2F%20Commercial-purple)]()
7
- [![TypeScript](https://img.shields.io/badge/TypeScript-strict-blue)](https://www.typescriptlang.org/)
8
- [![Zero deps](https://img.shields.io/badge/runtime_deps-0-brightgreen)](https://www.npmjs.com/package/@ingissa/navcore-core)
9
-
10
- ---
11
-
12
- ## Why NavCore?
13
-
14
- | Feature | NavCore | Mapbox Nav SDK | Google Maps |
15
- |---|---|---|---|
16
- | **Framework** | Any (pure TS) | React Native only | Platform-locked |
17
- | **Runtime deps** | 0 | 50+ | N/A |
18
- | **Map renderer** | BYO (adapter) | Mapbox GL only | Google Maps only |
19
- | **Directions** | BYO (adapter) | Mapbox API only | Google API only |
20
- | **Off-route detection** | Built-in FSM | Basic | Basic |
21
- | **U-turn protection** | ✅ Bearing penalty | ❌ | ❌ |
22
- | **Parallel road resolver** | ✅ Built-in | ❌ | ❌ |
23
- | **Dead reckoning** | ✅ Built-in | ❌ | ❌ |
24
- | **Geofencing** | ✅ Built-in | ❌ | Paid API |
25
- | **ETA** | ✅ Offline | API only | API only |
26
- | **Voice triggers** | ✅ Built-in | SDK only | ❌ |
27
- | **Headless testing** | ✅ Full pipeline | ❌ | ❌ |
28
- | **Custom routes** | ✅ GPX/GeoJSON/Builder | ❌ | ❌ |
29
- | **License** | Core MIT / Pro commercial | Commercial | Commercial |
30
-
31
- ---
32
-
33
- ## Tier Model
34
-
35
- NavCore uses a two-tier model controlled by a signed license key:
36
-
37
- | Tier | Import | License | Includes |
38
- |---|---|---|---|
39
- | **Core** | `@ingissa/navcore-core/core` | MIT — free forever | Geo utils, Kalman filter, route snapping, directions adapters, route builder |
40
- | **Pro** | `@ingissa/navcore-core/pro` | Commercial key required | Dead reckoning, advanced bearing, deviation detection, FSMs, voice, ETA, geofencing |
41
- | **Engine** | `@ingissa/navcore-core` | Gated internally at runtime | Full `NavCore` orchestrator (license key unlocks Pro features) |
42
-
43
- ---
44
-
45
- ## Installation
46
-
47
- ```bash
48
- npm install @ingissa/navcore-core
49
- ```
50
-
51
- ---
52
-
53
- ## Quick Start
54
-
55
- ### Core tier (no license needed)
56
-
57
- ```typescript
58
- import { NavCore } from '@ingissa/navcore-core';
59
- import { OSRMDirectionsProvider } from '@ingissa/navcore-core/core';
60
-
61
- // 1. Get a route from your self-hosted OSRM (free)
62
- const provider = new OSRMDirectionsProvider({ baseUrl: 'http://router.project-osrm.org' });
63
- const route = await provider.getRoute([[2.3522, 48.8566], [2.3400, 48.8700]]);
64
-
65
- // 2. Create engine (Core features work without a key)
66
- const engine = new NavCore();
67
- engine.setRoute(route.geometry);
68
- engine.startNavigation();
69
-
70
- // 3. Feed GPS updates
71
- engine.on('arrival', () => console.log('Arrived!'));
72
-
73
- navigator.geolocation.watchPosition(({ coords }) => {
74
- const state = engine.update({
75
- coord: [coords.longitude, coords.latitude],
76
- accuracy: coords.accuracy,
77
- bearing: coords.heading,
78
- speed: coords.speed ?? 0,
79
- timestamp: Date.now(),
80
- });
81
-
82
- console.log('Distance remaining:', state.distanceToDestination, 'm');
83
- });
84
- ```
85
-
86
- ### Pro tier (with license key)
87
-
88
- ```typescript
89
- import { NavCore } from '@ingissa/navcore-core';
90
-
91
- // Pro features unlock automatically with a valid key
92
- const engine = new NavCore({ licenseKey: 'your-signed-license-key' });
93
- engine.setRoute(routeCoords, instructions);
94
- engine.startNavigation();
95
-
96
- engine.on('instruction', (instr) => speak(instr.text)); // voice cues (PRO)
97
- engine.on('deviation', ({ anchorIndex }) => recalculate(anchorIndex));
98
- engine.on('arrival', () => console.log('Arrived!'));
99
- ```
100
-
101
- ### Using subpath imports directly
102
-
103
- ```typescript
104
- // Free MIT tier
105
- import { KalmanFilter2D } from '@ingissa/navcore-core/core';
106
- import { OSRMDirectionsProvider } from '@ingissa/navcore-core/core';
107
- import { CustomRouteBuilder } from '@ingissa/navcore-core/core';
108
-
109
- // Commercial Pro tier
110
- import { DeadReckoningEngine } from '@ingissa/navcore-core/pro';
111
- import { VoiceTriggerEngine } from '@ingissa/navcore-core/pro';
112
- import { ETAEngine } from '@ingissa/navcore-core/pro';
113
- import { GeofencingEngine } from '@ingissa/navcore-core/pro';
114
- ```
115
-
116
- ---
117
-
118
- ## Directions Providers (built-in, no extra install)
119
-
120
- ```typescript
121
- import {
122
- OSRMDirectionsProvider, // Self-hosted OSRM (recommended, free)
123
- ValhallaDirectionsProvider, // Self-hosted Valhalla (free)
124
- OpenRouteServiceProvider, // openrouteservice.org (free tier)
125
- } from '@ingissa/navcore-core/core';
126
-
127
- // OSRM
128
- const osrm = new OSRMDirectionsProvider({ baseUrl: 'http://router.project-osrm.org' });
129
- const route = await osrm.getRoute([[lng1, lat1], [lng2, lat2]]);
130
-
131
- // Valhalla
132
- const valhalla = new ValhallaDirectionsProvider({ baseUrl: 'https://valhalla1.openstreetmap.de' });
133
- const route = await valhalla.getRoute([[lng1, lat1], [lng2, lat2]], { costing: 'auto' });
134
- ```
135
-
136
- ---
137
-
138
- ## Renderer Adapters (separate packages)
139
-
140
- ```bash
141
- npm install @ingissa/navcore-maplibre # Web + MapLibre GL
142
- npm install @ingissa/navcore-leaflet # Web + Leaflet.js
143
- npm install @ingissa/navcore-google-maps # Google Maps JS API
144
- npm install @ingissa/navcore-mapbox # React Native + @rnmapbox/maps
145
- npm install @ingissa/navcore-react-native # React Native bindings
146
- npm install @ingissa/navcore-headless # Node.js / CI testing
147
- ```
148
-
149
- > ⚠️ Renderer adapter packages require a commercial license. [Get yours at Not yet available]()
150
-
151
- ---
152
-
153
- ## Feature Reference
154
-
155
- ### CORE — free, MIT
156
-
157
- | Feature | API |
158
- |---|---|
159
- | GPS smoothing | `KalmanFilter2D` |
160
- | Route snapping | `RouteSnapper` |
161
- | Haversine & bearing | `haversineDistance`, `getBearingBetweenPoints` |
162
- | Cumulative distances | `buildForwardCumulativeDistances` |
163
- | Route builder | `CustomRouteBuilder` |
164
- | Directions — OSRM | `OSRMDirectionsProvider` |
165
- | Directions — Valhalla | `ValhallaDirectionsProvider` |
166
- | Directions — ORS | `OpenRouteServiceProvider` |
167
- | Renderer interface | `MapRendererAdapter` |
168
- | License verification | `LicenseManager` |
169
-
170
- ### PRO — commercial license required
171
-
172
- | Feature | API | FEATURES key |
173
- |---|---|---|
174
- | Advanced snapping (bearing + inertia) | `RouteSnapper` options | `ADVANCED_SNAPPING` |
175
- | Parallel road resolver | `ParallelRoadResolver` | `PARALLEL_ROAD_RESOLUTION` |
176
- | Dead reckoning | `DeadReckoningEngine` | `DEAD_RECKONING` |
177
- | Compound deviation detection | `DeviationDetector` | `COMPOUND_DEVIATION` |
178
- | Advanced bearing engine | `BearingEngine` | `ADVANCED_BEARING` |
179
- | Progress anti-regression | `ProgressTracker` | `PROGRESS_TRACKING` |
180
- | Route offset predictor | `RouteOffsetPredictor` | `ROUTE_OFFSET` |
181
- | Navigation lifecycle FSM | `NavigationFSM` | — |
182
- | Off-route FSM | `OffRouteFSM` | — |
183
- | Instruction editor | `InstructionEditor` | — |
184
- | Voice trigger engine | `VoiceTriggerEngine` | `VOICE_TRIGGERS` |
185
- | ETA engine (offline) | `ETAEngine` | `ETA` |
186
- | Geofencing engine | `GeofencingEngine` | `GEOFENCING` |
187
-
188
- ---
189
-
190
- ## License Gate Behaviour
191
-
192
- | Condition | Result |
193
- |---|---|
194
- | No `licenseKey` | Core features work; Pro features blocked with `console.warn` |
195
- | Valid Pro key | All features unlocked; `🔑 [NavCore] License validation complete. Plan: pro` logged |
196
- | `isDev: true` | All features bypassed (development mode) |
197
- | Expired / tampered key | Pro features blocked; status: `EXPIRED` / `INVALID` |
198
-
199
- License keys are verified **offline** using ECDSA P-256 — no network calls, no tracking.
200
-
201
- ---
202
-
203
- ## NavCore Engine API
204
-
205
- ```typescript
206
- const engine = new NavCore(options?: NavCoreOptions);
207
-
208
- // Setup
209
- engine.setRoute(coords: Coordinate[], instructions?: NavInstruction[]);
210
- engine.startNavigation();
211
-
212
- // GPS update (returns state snapshot)
213
- const state: NavCoreState = engine.update(gpsUpdate: NavGpsUpdate);
214
-
215
- // Render tick (call at ~60fps between GPS updates)
216
- engine.tick(nowMs: number);
217
-
218
- // Events
219
- engine.on('instruction', (instr: NavInstruction) => void);
220
- engine.on('deviation', ({ anchorIndex, ghostCoord }) => void);
221
- engine.on('arrival', () => void);
222
- engine.on('routeLoaded', ({ routeLength }) => void);
223
- engine.off(event, handler);
224
-
225
- // State & introspection
226
- engine.getState(): NavCoreState;
227
- engine.getLicenseManager(): LicenseManager;
228
- engine.getRoute(): ReadonlyArray<Coordinate>;
229
- engine.destroy();
230
- ```
231
-
232
- ### NavCoreState
233
-
234
- ```typescript
235
- interface NavCoreState {
236
- snappedCoord: Coordinate | null; // GPS-snapped position on route
237
- rawGpsCoord: Coordinate | null; // Raw GPS position
238
- bearing: number; // Smoothed heading (degrees)
239
- routeIndex: number; // Current segment index
240
- distanceToRoute: number; // Distance from route (metres)
241
- corridor: number; // Dynamic off-route threshold (metres)
242
- isOffRoute: boolean; // True when deviation confirmed
243
- hasArrived: boolean;
244
- distanceToDestination: number | null; // Remaining distance (metres)
245
- distanceToNextInstruction: number | null; // Distance to next turn
246
- nextInstructionIndex: number | null;
247
- currentSpeed: number; // m/s
248
- isGpsStale: boolean;
249
- gpsAgeMs: number;
250
- licenseStatus: string; // 'VALID' | 'INVALID' | 'EXPIRED' | 'MISSING'
251
- }
252
- ```
253
-
254
- ---
255
-
256
- ## Documentation
257
-
258
- | Guide | Link |
259
- |---|---|
260
- | Architecture | [docs/architecture.md](./docs/architecture.md) |
261
- | Getting Started | [docs/getting-started.md](./docs/getting-started.md) |
262
- | Directions Providers | [docs/directions-providers.md](./docs/directions-providers.md) |
263
- | Renderer Adapters | [docs/renderer-adapters.md](./docs/renderer-adapters.md) |
264
- | API Reference | [docs/api-reference.md](./docs/api-reference.md) |
265
- | Custom Routes | [docs/custom-routes.md](./docs/custom-routes.md) |
266
- | Instructions & Voice | [docs/instructions.md](./docs/instructions.md) |
267
- | Pro Features | [docs/p3-features.md](./docs/p3-features.md) |
268
- | Testing Guide | [docs/testing.md](./docs/testing.md) |
269
-
270
- ---
271
-
272
- ## License
273
-
274
- - **Core engine** (`@ingissa/navcore-core`): [MIT](./LICENSE) for open-source projects
275
- - **Pro features & adapters**: Commercial license required — [Not yet available]()
276
-
277
- ---
278
-
279
- © Ingissa · [8abnav@gmail.com](mailto:8abnav@gmail.com)
1
+ # @ingissa/navcore-core
2
+
3
+ Framework-agnostic TypeScript navigation engine for browser, React Native,
4
+ Node.js, and CI environments.
5
+
6
+ [![npm version](https://img.shields.io/npm/v/@ingissa/navcore-core)](https://www.npmjs.com/package/@ingissa/navcore-core)
7
+ [![TypeScript](https://img.shields.io/badge/TypeScript-strict-blue)](https://www.typescriptlang.org/)
8
+ [![Pricing](https://img.shields.io/badge/licence_key-pricing-green)](https://navcore-web.vercel.app/pricing)
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ npm install @ingissa/navcore-core
14
+ ```
15
+
16
+ ## Quick Start
17
+
18
+ ```typescript
19
+ import { NavCore, OSRMDirectionsProvider } from '@ingissa/navcore-core';
20
+
21
+ const provider = new OSRMDirectionsProvider({
22
+ baseUrl: 'http://router.project-osrm.org',
23
+ });
24
+
25
+ const route = await provider.getRoute([
26
+ [2.3522, 48.8566],
27
+ [2.3400, 48.8700],
28
+ ]);
29
+
30
+ const engine = new NavCore({
31
+ licenseKey: process.env.NAVCORE_LICENSE_KEY,
32
+ });
33
+
34
+ engine.setRoute(route.geometry);
35
+ engine.startNavigation();
36
+
37
+ const state = engine.update({
38
+ coord: [2.3522, 48.8566],
39
+ accuracy: 8,
40
+ bearing: 90,
41
+ speed: 9,
42
+ timestamp: Date.now(),
43
+ });
44
+
45
+ console.log(state.snappedCoord, state.distanceToDestination);
46
+ ```
47
+
48
+ ## What Is Included
49
+
50
+ Core runtime behavior works without a licence key:
51
+
52
+ | Area | APIs |
53
+ |---|---|
54
+ | Geo utilities | `haversineDistance`, `getBearingBetweenPoints`, cumulative distance helpers |
55
+ | GPS smoothing | `KalmanFilter2D` |
56
+ | Route snapping | `RouteSnapper` |
57
+ | Route building | `CustomRouteBuilder` |
58
+ | Directions | `OSRMDirectionsProvider`, `ValhallaDirectionsProvider`, `OpenRouteServiceProvider` |
59
+ | Renderer contract | `MapRendererAdapter` types |
60
+ | Licence status | `LicenseManager` |
61
+
62
+ Pro behavior unlocks with a signed licence key:
63
+
64
+ | Area | APIs |
65
+ |---|---|
66
+ | Advanced route matching | `ParallelRoadResolver`, bearing and inertia scoring |
67
+ | Deviation handling | `DeviationDetector`, `OffRouteFSM`, `NavigationFSM` |
68
+ | Dead reckoning | `DeadReckoningEngine` |
69
+ | Turn guidance | `InstructionEditor`, voice trigger helpers |
70
+ | Driver UX | `ETAEngine`, `GeofencingEngine` |
71
+
72
+ Get a licence key:
73
+
74
+ https://navcore-web.vercel.app/pricing
75
+
76
+ ## Direction Providers
77
+
78
+ ```typescript
79
+ import {
80
+ OSRMDirectionsProvider,
81
+ ValhallaDirectionsProvider,
82
+ OpenRouteServiceProvider,
83
+ } from '@ingissa/navcore-core';
84
+ ```
85
+
86
+ All providers implement:
87
+
88
+ ```typescript
89
+ interface DirectionsProvider {
90
+ getRoute(
91
+ waypoints: Coordinate[],
92
+ options?: DirectionsOptions
93
+ ): Promise<DirectionsResult>;
94
+ }
95
+ ```
96
+
97
+ Provider options include:
98
+
99
+ | Option | Purpose |
100
+ |---|---|
101
+ | `profile` | Driving, cycling, or walking route mode |
102
+ | `steps` | Include maneuver data |
103
+ | `language` | Instruction language when supported |
104
+ | `fetchFn` | Custom fetch implementation for tests or runtimes |
105
+ | `timeoutMs` | Abort slow requests |
106
+
107
+ ## Public Subpaths
108
+
109
+ ```typescript
110
+ // Full engine and all public APIs
111
+ import { NavCore } from '@ingissa/navcore-core';
112
+
113
+ // Core-oriented subpath
114
+ import { RouteSnapper } from '@ingissa/navcore-core/core';
115
+
116
+ // Pro-oriented subpath
117
+ import { DeadReckoningEngine } from '@ingissa/navcore-core/pro';
118
+ ```
119
+
120
+ ## Licence Model
121
+
122
+ `@ingissa/navcore-core` is published publicly on npm and uses a commercial
123
+ licence model.
124
+
125
+ | Condition | Result |
126
+ |---|---|
127
+ | No licence key | Core behavior works with Core fallbacks. |
128
+ | Valid licence key | Pro features unlock according to the signed key. |
129
+ | Expired or invalid key | Pro features are blocked and status is reported. |
130
+ | Development key | Accepted only in local development/test environments. |
131
+
132
+ Pricing and licence keys:
133
+
134
+ https://navcore-web.vercel.app/pricing
135
+
136
+ Copyright Ingissa. All rights reserved.
@@ -371,11 +371,8 @@ declare class NavCore {
371
371
  private readonly options;
372
372
  private listeners;
373
373
  constructor(options?: NavCoreOptions);
374
- /**
375
- * Returns true if the feature is unlocked (dev mode OR valid license).
376
- * Emits a one-time console warning when a Pro feature is blocked.
377
- */
378
- private has;
374
+ /** Internal license check for automatic fallbacks that should not warn Core users every tick. */
375
+ private canUse;
379
376
  /** Load route geometry and instructions */
380
377
  setRoute(route: Coordinate[], instructions?: NavInstruction[]): void;
381
378
  /** Start navigation */
@@ -371,11 +371,8 @@ declare class NavCore {
371
371
  private readonly options;
372
372
  private listeners;
373
373
  constructor(options?: NavCoreOptions);
374
- /**
375
- * Returns true if the feature is unlocked (dev mode OR valid license).
376
- * Emits a one-time console warning when a Pro feature is blocked.
377
- */
378
- private has;
374
+ /** Internal license check for automatic fallbacks that should not warn Core users every tick. */
375
+ private canUse;
379
376
  /** Load route geometry and instructions */
380
377
  setRoute(route: Coordinate[], instructions?: NavInstruction[]): void;
381
378
  /** Start navigation */
package/dist/core.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as Coordinate, g as NavCoreState } from './NavCore.d-BuXR5DO7.mjs';
2
- export { F as FEATURES, a as FeatureKey, L as LicenseManager, b as LicensePayload, c as LicenseStatus, o as destinationPoint, p as geoGetBearing, q as haversineDistance } from './NavCore.d-BuXR5DO7.mjs';
1
+ import { C as Coordinate, g as NavCoreState } from './NavCore-DzTPBxIc.mjs';
2
+ export { F as FEATURES, a as FeatureKey, L as LicenseManager, b as LicensePayload, c as LicenseStatus, o as destinationPoint, p as geoGetBearing, q as haversineDistance } from './NavCore-DzTPBxIc.mjs';
3
3
 
4
4
  /**
5
5
  * Bearing and angular math utilities.
@@ -281,6 +281,10 @@ interface OSRMConfig {
281
281
  profile?: 'driving' | 'cycling' | 'walking';
282
282
  /** Max waypoints per API request (OSRM supports unlimited, but chunking keeps requests fast) */
283
283
  maxWaypointsPerChunk?: number;
284
+ /** Optional fetch implementation for tests, React Native, or custom runtimes */
285
+ fetchFn?: typeof fetch;
286
+ /** Request timeout in milliseconds. Set to 0 to disable. */
287
+ timeoutMs?: number;
284
288
  }
285
289
  declare class OSRMDirectionsProvider implements DirectionsProvider {
286
290
  private readonly config;
@@ -288,6 +292,7 @@ declare class OSRMDirectionsProvider implements DirectionsProvider {
288
292
  getRoute(waypoints: Coordinate[], options?: DirectionsOptions): Promise<DirectionsResult>;
289
293
  private fetchRoute;
290
294
  private fetchChunked;
295
+ private fetchWithTimeout;
291
296
  }
292
297
 
293
298
  /**
@@ -310,6 +315,10 @@ interface ValhallaConfig {
310
315
  apiKey?: string;
311
316
  /** Max waypoints per chunk (default: 50) */
312
317
  maxWaypointsPerChunk?: number;
318
+ /** Optional fetch implementation for tests, React Native, or custom runtimes */
319
+ fetchFn?: typeof fetch;
320
+ /** Request timeout in milliseconds. Set to 0 to disable. */
321
+ timeoutMs?: number;
313
322
  }
314
323
  declare class ValhallaDirectionsProvider implements DirectionsProvider {
315
324
  private readonly config;
@@ -319,7 +328,11 @@ declare class ValhallaDirectionsProvider implements DirectionsProvider {
319
328
  private fetchRoute;
320
329
  /** Decode Valhalla's encoded polyline6 format */
321
330
  private decodePolyline;
331
+ private stitchGeometry;
332
+ private sameCoordinate;
333
+ private shapeIndex;
322
334
  private fetchChunked;
335
+ private fetchWithTimeout;
323
336
  }
324
337
 
325
338
  /**
@@ -341,6 +354,10 @@ interface ORSConfig {
341
354
  baseUrl?: string;
342
355
  /** Max waypoints per request (ORS limit: 50) */
343
356
  maxWaypointsPerChunk?: number;
357
+ /** Optional fetch implementation for tests, React Native, or custom runtimes */
358
+ fetchFn?: typeof fetch;
359
+ /** Request timeout in milliseconds. Set to 0 to disable. */
360
+ timeoutMs?: number;
344
361
  }
345
362
  declare class OpenRouteServiceProvider implements DirectionsProvider {
346
363
  private readonly config;
@@ -349,6 +366,9 @@ declare class OpenRouteServiceProvider implements DirectionsProvider {
349
366
  private profileFromOptions;
350
367
  private fetchRoute;
351
368
  private fetchChunked;
369
+ private stepRange;
370
+ private bearingFromGeometry;
371
+ private fetchWithTimeout;
352
372
  }
353
373
 
354
374
  /**
@@ -454,35 +474,35 @@ declare const MIN_LOOK_AHEAD_METERS = 20;
454
474
  declare const MAX_LOOK_AHEAD_METERS = 100;
455
475
  declare const ARRIVAL_THRESHOLD_METERS = 30;
456
476
 
457
- declare const constants_d_ARRIVAL_THRESHOLD_METERS: typeof ARRIVAL_THRESHOLD_METERS;
458
- declare const constants_d_BASE_CORRIDOR_METERS: typeof BASE_CORRIDOR_METERS;
459
- declare const constants_d_BEARING_ALIGNMENT_THRESHOLD: typeof BEARING_ALIGNMENT_THRESHOLD;
460
- declare const constants_d_BEARING_MIN_SPEED_MPS: typeof BEARING_MIN_SPEED_MPS;
461
- declare const constants_d_BEARING_MISMATCH_PENALTY: typeof BEARING_MISMATCH_PENALTY;
462
- declare const constants_d_BEARING_MISMATCH_THRESHOLD: typeof BEARING_MISMATCH_THRESHOLD;
463
- declare const constants_d_BEARING_SMOOTHING_ALPHA: typeof BEARING_SMOOTHING_ALPHA;
464
- declare const constants_d_BETA_CORRECTION: typeof BETA_CORRECTION;
465
- declare const constants_d_DETOUR_COMMIT_MS: typeof DETOUR_COMMIT_MS;
466
- declare const constants_d_DR_MAX_AGE_MS: typeof DR_MAX_AGE_MS;
467
- declare const constants_d_GPS_ACCURACY_FACTOR: typeof GPS_ACCURACY_FACTOR;
468
- declare const constants_d_GPS_AGE_CAP_SECONDS: typeof GPS_AGE_CAP_SECONDS;
469
- declare const constants_d_GPS_STALE_MS: typeof GPS_STALE_MS;
470
- declare const constants_d_INERTIA_PENALTY: typeof INERTIA_PENALTY;
471
- declare const constants_d_INERTIA_SEGMENT_DIST: typeof INERTIA_SEGMENT_DIST;
472
- declare const constants_d_LOOK_AHEAD_SECONDS: typeof LOOK_AHEAD_SECONDS;
473
- declare const constants_d_MANEUVER_TRIGGER_DIST: typeof MANEUVER_TRIGGER_DIST;
474
- declare const constants_d_MAX_CORRIDOR_METERS: typeof MAX_CORRIDOR_METERS;
475
- declare const constants_d_MAX_LOOK_AHEAD_METERS: typeof MAX_LOOK_AHEAD_METERS;
476
- declare const constants_d_MAX_SNAP_DISTANCE: typeof MAX_SNAP_DISTANCE;
477
- declare const constants_d_MIN_LOOK_AHEAD_METERS: typeof MIN_LOOK_AHEAD_METERS;
478
- declare const constants_d_OFF_ROUTE_CONFIRM_MS: typeof OFF_ROUTE_CONFIRM_MS;
479
- declare const constants_d_REJOIN_CONFIRM_MS: typeof REJOIN_CONFIRM_MS;
480
- declare const constants_d_REJOIN_COOLDOWN_MS: typeof REJOIN_COOLDOWN_MS;
481
- declare const constants_d_SNAP_WINDOW_SIZE: typeof SNAP_WINDOW_SIZE;
482
- declare const constants_d_SPEED_CORRIDOR_FACTOR: typeof SPEED_CORRIDOR_FACTOR;
483
- declare const constants_d_STARTUP_GRACE_MS: typeof STARTUP_GRACE_MS;
484
- declare namespace constants_d {
485
- export { constants_d_ARRIVAL_THRESHOLD_METERS as ARRIVAL_THRESHOLD_METERS, constants_d_BASE_CORRIDOR_METERS as BASE_CORRIDOR_METERS, constants_d_BEARING_ALIGNMENT_THRESHOLD as BEARING_ALIGNMENT_THRESHOLD, constants_d_BEARING_MIN_SPEED_MPS as BEARING_MIN_SPEED_MPS, constants_d_BEARING_MISMATCH_PENALTY as BEARING_MISMATCH_PENALTY, constants_d_BEARING_MISMATCH_THRESHOLD as BEARING_MISMATCH_THRESHOLD, constants_d_BEARING_SMOOTHING_ALPHA as BEARING_SMOOTHING_ALPHA, constants_d_BETA_CORRECTION as BETA_CORRECTION, constants_d_DETOUR_COMMIT_MS as DETOUR_COMMIT_MS, constants_d_DR_MAX_AGE_MS as DR_MAX_AGE_MS, constants_d_GPS_ACCURACY_FACTOR as GPS_ACCURACY_FACTOR, constants_d_GPS_AGE_CAP_SECONDS as GPS_AGE_CAP_SECONDS, constants_d_GPS_STALE_MS as GPS_STALE_MS, constants_d_INERTIA_PENALTY as INERTIA_PENALTY, constants_d_INERTIA_SEGMENT_DIST as INERTIA_SEGMENT_DIST, constants_d_LOOK_AHEAD_SECONDS as LOOK_AHEAD_SECONDS, constants_d_MANEUVER_TRIGGER_DIST as MANEUVER_TRIGGER_DIST, constants_d_MAX_CORRIDOR_METERS as MAX_CORRIDOR_METERS, constants_d_MAX_LOOK_AHEAD_METERS as MAX_LOOK_AHEAD_METERS, constants_d_MAX_SNAP_DISTANCE as MAX_SNAP_DISTANCE, constants_d_MIN_LOOK_AHEAD_METERS as MIN_LOOK_AHEAD_METERS, constants_d_OFF_ROUTE_CONFIRM_MS as OFF_ROUTE_CONFIRM_MS, constants_d_REJOIN_CONFIRM_MS as REJOIN_CONFIRM_MS, constants_d_REJOIN_COOLDOWN_MS as REJOIN_COOLDOWN_MS, constants_d_SNAP_WINDOW_SIZE as SNAP_WINDOW_SIZE, constants_d_SPEED_CORRIDOR_FACTOR as SPEED_CORRIDOR_FACTOR, constants_d_STARTUP_GRACE_MS as STARTUP_GRACE_MS };
477
+ declare const constants_ARRIVAL_THRESHOLD_METERS: typeof ARRIVAL_THRESHOLD_METERS;
478
+ declare const constants_BASE_CORRIDOR_METERS: typeof BASE_CORRIDOR_METERS;
479
+ declare const constants_BEARING_ALIGNMENT_THRESHOLD: typeof BEARING_ALIGNMENT_THRESHOLD;
480
+ declare const constants_BEARING_MIN_SPEED_MPS: typeof BEARING_MIN_SPEED_MPS;
481
+ declare const constants_BEARING_MISMATCH_PENALTY: typeof BEARING_MISMATCH_PENALTY;
482
+ declare const constants_BEARING_MISMATCH_THRESHOLD: typeof BEARING_MISMATCH_THRESHOLD;
483
+ declare const constants_BEARING_SMOOTHING_ALPHA: typeof BEARING_SMOOTHING_ALPHA;
484
+ declare const constants_BETA_CORRECTION: typeof BETA_CORRECTION;
485
+ declare const constants_DETOUR_COMMIT_MS: typeof DETOUR_COMMIT_MS;
486
+ declare const constants_DR_MAX_AGE_MS: typeof DR_MAX_AGE_MS;
487
+ declare const constants_GPS_ACCURACY_FACTOR: typeof GPS_ACCURACY_FACTOR;
488
+ declare const constants_GPS_AGE_CAP_SECONDS: typeof GPS_AGE_CAP_SECONDS;
489
+ declare const constants_GPS_STALE_MS: typeof GPS_STALE_MS;
490
+ declare const constants_INERTIA_PENALTY: typeof INERTIA_PENALTY;
491
+ declare const constants_INERTIA_SEGMENT_DIST: typeof INERTIA_SEGMENT_DIST;
492
+ declare const constants_LOOK_AHEAD_SECONDS: typeof LOOK_AHEAD_SECONDS;
493
+ declare const constants_MANEUVER_TRIGGER_DIST: typeof MANEUVER_TRIGGER_DIST;
494
+ declare const constants_MAX_CORRIDOR_METERS: typeof MAX_CORRIDOR_METERS;
495
+ declare const constants_MAX_LOOK_AHEAD_METERS: typeof MAX_LOOK_AHEAD_METERS;
496
+ declare const constants_MAX_SNAP_DISTANCE: typeof MAX_SNAP_DISTANCE;
497
+ declare const constants_MIN_LOOK_AHEAD_METERS: typeof MIN_LOOK_AHEAD_METERS;
498
+ declare const constants_OFF_ROUTE_CONFIRM_MS: typeof OFF_ROUTE_CONFIRM_MS;
499
+ declare const constants_REJOIN_CONFIRM_MS: typeof REJOIN_CONFIRM_MS;
500
+ declare const constants_REJOIN_COOLDOWN_MS: typeof REJOIN_COOLDOWN_MS;
501
+ declare const constants_SNAP_WINDOW_SIZE: typeof SNAP_WINDOW_SIZE;
502
+ declare const constants_SPEED_CORRIDOR_FACTOR: typeof SPEED_CORRIDOR_FACTOR;
503
+ declare const constants_STARTUP_GRACE_MS: typeof STARTUP_GRACE_MS;
504
+ declare namespace constants {
505
+ export { constants_ARRIVAL_THRESHOLD_METERS as ARRIVAL_THRESHOLD_METERS, constants_BASE_CORRIDOR_METERS as BASE_CORRIDOR_METERS, constants_BEARING_ALIGNMENT_THRESHOLD as BEARING_ALIGNMENT_THRESHOLD, constants_BEARING_MIN_SPEED_MPS as BEARING_MIN_SPEED_MPS, constants_BEARING_MISMATCH_PENALTY as BEARING_MISMATCH_PENALTY, constants_BEARING_MISMATCH_THRESHOLD as BEARING_MISMATCH_THRESHOLD, constants_BEARING_SMOOTHING_ALPHA as BEARING_SMOOTHING_ALPHA, constants_BETA_CORRECTION as BETA_CORRECTION, constants_DETOUR_COMMIT_MS as DETOUR_COMMIT_MS, constants_DR_MAX_AGE_MS as DR_MAX_AGE_MS, constants_GPS_ACCURACY_FACTOR as GPS_ACCURACY_FACTOR, constants_GPS_AGE_CAP_SECONDS as GPS_AGE_CAP_SECONDS, constants_GPS_STALE_MS as GPS_STALE_MS, constants_INERTIA_PENALTY as INERTIA_PENALTY, constants_INERTIA_SEGMENT_DIST as INERTIA_SEGMENT_DIST, constants_LOOK_AHEAD_SECONDS as LOOK_AHEAD_SECONDS, constants_MANEUVER_TRIGGER_DIST as MANEUVER_TRIGGER_DIST, constants_MAX_CORRIDOR_METERS as MAX_CORRIDOR_METERS, constants_MAX_LOOK_AHEAD_METERS as MAX_LOOK_AHEAD_METERS, constants_MAX_SNAP_DISTANCE as MAX_SNAP_DISTANCE, constants_MIN_LOOK_AHEAD_METERS as MIN_LOOK_AHEAD_METERS, constants_OFF_ROUTE_CONFIRM_MS as OFF_ROUTE_CONFIRM_MS, constants_REJOIN_CONFIRM_MS as REJOIN_CONFIRM_MS, constants_REJOIN_COOLDOWN_MS as REJOIN_COOLDOWN_MS, constants_SNAP_WINDOW_SIZE as SNAP_WINDOW_SIZE, constants_SPEED_CORRIDOR_FACTOR as SPEED_CORRIDOR_FACTOR, constants_STARTUP_GRACE_MS as STARTUP_GRACE_MS };
486
506
  }
487
507
 
488
- export { type BuildOptions, type CameraOptions, constants_d as Constants, Coordinate, CustomRouteBuilder, type CustomWaypoint, type DirectionsLeg, type DirectionsManeuver, type DirectionsOptions, type DirectionsProvider, type DirectionsResult, type DirectionsStep, type Kalman2DState, KalmanFilter2D, type MapRendererAdapter, type ORSConfig, type ORSProfile, type OSRMConfig, OSRMDirectionsProvider, OpenRouteServiceProvider, RouteSnapper, type RouteStyle, type SnapResult, type SnapperOptions, type ValhallaConfig, type ValhallaCostingModel, ValhallaDirectionsProvider, type VehicleStyle, type WaypointOptions, buildForwardCumulativeDistances, buildReverseCumulativeDistances, getBearingBetweenPoints, interpolatePoint, kalmanUpdate2D, normalizeAngle, projectPointOnSegment };
508
+ export { type BuildOptions, type CameraOptions, constants as Constants, Coordinate, CustomRouteBuilder, type CustomWaypoint, type DirectionsLeg, type DirectionsManeuver, type DirectionsOptions, type DirectionsProvider, type DirectionsResult, type DirectionsStep, type Kalman2DState, KalmanFilter2D, type MapRendererAdapter, type ORSConfig, type ORSProfile, type OSRMConfig, OSRMDirectionsProvider, OpenRouteServiceProvider, RouteSnapper, type RouteStyle, type SnapResult, type SnapperOptions, type ValhallaConfig, type ValhallaCostingModel, ValhallaDirectionsProvider, type VehicleStyle, type WaypointOptions, buildForwardCumulativeDistances, buildReverseCumulativeDistances, getBearingBetweenPoints, interpolatePoint, kalmanUpdate2D, normalizeAngle, projectPointOnSegment };