@ingissa/navcore-core
v1.0.4
Published
NavCore navigation engine - zero runtime dependencies. Framework-agnostic. Works in browsers, React Native, Node.js, and CI/CD.
Downloads
21
Maintainers
Readme
@ingissa/navcore-core
Framework-agnostic TypeScript navigation engine for browser, React Native, Node.js, and CI environments.
Install
npm install @ingissa/navcore-coreQuick Start
import { NavCore, OSRMDirectionsProvider } from '@ingissa/navcore-core';
const provider = new OSRMDirectionsProvider({
baseUrl: 'http://router.project-osrm.org',
});
const route = await provider.getRoute([
[2.3522, 48.8566],
[2.3400, 48.8700],
]);
const engine = new NavCore({
licenseKey: process.env.NAVCORE_LICENSE_KEY,
});
engine.setRoute(route.geometry);
engine.startNavigation();
const state = engine.update({
coord: [2.3522, 48.8566],
accuracy: 8,
bearing: 90,
speed: 9,
timestamp: Date.now(),
});
console.log(state.snappedCoord, state.distanceToDestination);What Is Included
Core runtime behavior works without a licence key:
| Area | APIs |
|---|---|
| Geo utilities | haversineDistance, getBearingBetweenPoints, cumulative distance helpers |
| GPS smoothing | KalmanFilter2D |
| Route snapping | RouteSnapper |
| Route building | CustomRouteBuilder |
| Directions | OSRMDirectionsProvider, ValhallaDirectionsProvider, OpenRouteServiceProvider |
| Renderer contract | MapRendererAdapter types |
| Licence status | LicenseManager |
Pro behavior unlocks with a signed licence key:
| Area | APIs |
|---|---|
| Advanced route matching | ParallelRoadResolver, bearing and inertia scoring |
| Deviation handling | DeviationDetector, OffRouteFSM, NavigationFSM |
| Dead reckoning | DeadReckoningEngine |
| Turn guidance | InstructionEditor, voice trigger helpers |
| Driver UX | ETAEngine, GeofencingEngine |
Get a licence key:
https://navcore-web.vercel.app/pricing
Direction Providers
import {
OSRMDirectionsProvider,
ValhallaDirectionsProvider,
OpenRouteServiceProvider,
} from '@ingissa/navcore-core';All providers implement:
interface DirectionsProvider {
getRoute(
waypoints: Coordinate[],
options?: DirectionsOptions
): Promise<DirectionsResult>;
}Provider options include:
| Option | Purpose |
|---|---|
| profile | Driving, cycling, or walking route mode |
| steps | Include maneuver data |
| language | Instruction language when supported |
| fetchFn | Custom fetch implementation for tests or runtimes |
| timeoutMs | Abort slow requests |
Public Subpaths
// Full engine and all public APIs
import { NavCore } from '@ingissa/navcore-core';
// Core-oriented subpath
import { RouteSnapper } from '@ingissa/navcore-core/core';
// Pro-oriented subpath
import { DeadReckoningEngine } from '@ingissa/navcore-core/pro';Licence Model
@ingissa/navcore-core is published publicly on npm and uses a commercial
licence model.
| Condition | Result | |---|---| | No licence key | Core behavior works with Core fallbacks. | | Valid licence key | Pro features unlock according to the signed key. | | Expired or invalid key | Pro features are blocked and status is reported. | | Development key | Accepted only in local development/test environments. |
Pricing and licence keys:
https://navcore-web.vercel.app/pricing
Copyright Ingissa. All rights reserved.
