UNPKG

mobility-toolbox-js

Version:

Toolbox for JavaScript applications in the domains of mobility and logistics.

23 lines (22 loc) 858 B
import type { Coordinate } from 'ol/coordinate'; import type { SimpleGeometry } from 'ol/geom'; import type { RealtimeTrajectory } from '../../types'; export interface VehiclePosition { coord?: Coordinate; rotation?: number; } /** * Interpolate or not the vehicle position from a trajectory at a specific date. * * @param {number} now Current date to interpolate a position with. In ms. * @param {RealtimeTrajectory} trajectory The trajectory to interpolate. * @param {boolean} noInterpolate If true, the vehicle position is not interpolated on each render but only once. * @returns {VehiclePosition} * @private */ declare const getVehiclePosition: (now: number, trajectory: { properties: { olGeometry?: SimpleGeometry; }; } & RealtimeTrajectory, noInterpolate: boolean) => VehiclePosition; export default getVehiclePosition;