core library

Provider-neutral tracking core: models, engine and simulation.

Pure Dart (no Flutter or Google Maps imports).

Classes

BufferConfig
Sample retention limits (live mode).
FakeTrackingClock
Manually advanced clock for tests and deterministic replays.
GeoPoint
A geographic position in WGS-84 degrees.
LocalFrame
A local tangent-plane (equirectangular) frame around an origin.
LocationSample
One location observation supplied by the application.
MatchingConfig
Route matching thresholds and weights.
MotionConfig
Visual motion settings (render delay, corrections, heading).
PhaseChanged
The tracking phase changed.
PlaybackEnded
History playback reached its end.
PolylineCodec
Encoder/decoder for the Google Encoded Polyline Algorithm Format.
PredictionConfig
Prediction and freshness limits.
RenderedVehicleState
The vehicle state to draw for one frame. This is a visual estimate; never store or upload it as the vehicle's real location — use TrackingStatus.lastAuthoritativeSample for that.
RouteIndex
Immutable, preprocessed route geometry with fast progress and spatial lookups. Safe to build on a background isolate and send across.
RouteProjection
Projection of a point onto one route segment.
RouteSimulator
Deterministic vehicle and GPS-feed simulator along a route. Used for demos, previews and as the trace generator of the test suite.
RouteStatusChanged
The route status changed (e.g. the vehicle left the route).
RouteStop
A stop shown on the map along a route.
SampleRejected
A sample was rejected.
SimulatedDelivery
A sample with its simulated delivery time (seconds from trip start).
SimulatedStop
A stop the simulated vehicle makes along the route.
SimulatedTruth
Ground truth of the simulated vehicle at one instant.
SimulationProfile
Parameters of a simulated trip and of the simulated GPS feed.
SourceError
The application's sample stream reported an error.
SystemTrackingClock
Process-wide monotonic clock (not affected by wall-clock changes).
TrackerConfig
Complete, immutable tracker configuration.
TrackingClock
Monotonic time source for the engine, in seconds.
TrackingDiagnostics
Rejection and quality counters.
TrackingEngine
Single-vehicle tracking engine. Pure Dart, synchronous and driven by an external clock: ingest on every sample, render on every frame.
TrackingEvent
Events emitted by a tracker.
TrackingRoute
Ordered route geometry the vehicle is expected to follow.
TrackingStatus
Snapshot of tracking health, emitted when it changes.
ValidationConfig
Input validation rules.
VehicleProfile
Kinematic limits of a vehicle class, used for outlier rejection, matching windows and process noise.
VehicleTapped
The vehicle marker was tapped.
VehicleTeleported
The rendered vehicle snapped instead of animating.

Enums

RejectionReason
Why a sample was rejected.
RenderMode
How the current rendered position was produced.
RouteStatus
Relationship between the vehicle and the supplied route.
RouteStopKind
The role of a stop along a route.
SampleFlag
Quality flags attached to an accepted sample.
TrackingPhase
Lifecycle / freshness phase of a tracked vehicle.

Functions

destinationPoint(GeoPoint start, double bearing, double distance) → GeoPoint
The point reached by travelling distance metres from start along the great circle with initial bearing (degrees).
distanceMeters(GeoPoint a, GeoPoint b) → double
Great-circle distance in metres (haversine).
initialBearing(GeoPoint a, GeoPoint b) → double
Initial great-circle bearing from a to b, degrees clockwise from north in [0, 360).
normalizeDegrees(double deg) → double
Normalizes an angle to [0, 360).
secondsOf(Duration d) → double
Seconds as double, the engine's internal time unit.
shortestAngleDelta(double from, double to) → double
Signed shortest rotation from from to to, in (-180, 180].