Trajectory Tracking Kit
Track and analyze movement patterns over time.
0/5 complete
Tracking Steps
Connect to streamOpen websocket to GPS feed300ms
Initialize trackerCreate Kalman filter per entity500ms
Process GPS pointsIngest and smooth raw coordinates1500ms
Update trajectoriesAppend points and compute velocity800ms
Predict next positionForecast based on current trajectory400ms
Integration Code
import { createTrajectoryTracker } from 'agent-tools-kit/spatial'
const tracker = createTrajectoryTracker({
mode: 'realtime',
predictNext: true,
smoothing: 'kalman',
})
tracker.on('position', (entity, point) => {
console.log(`${entity.id} at ${point.lat},${point.lng}`)
})
const prediction = await tracker.predict('entity-1', {
horizon: 5,
})
console.log(prediction.nextPoints)