SensorBasedNavController2 class

Provides a stream of predicted values based on sensor data.

This class initializes and manages the hardware sensor service and the ONNX model. It listens to sensor data, buffers it, and periodically uses the model to generate predictions, which are then exposed through the predictions stream.

This is a singleton class. Access its instance via SensorBasedNavController.instance. You MUST call await SensorBasedNavController.instance.initialize() before using it.

Properties

coordinates ← LatLng
stores the coordinates given here for the next calculation
no getter
currentCoordinates → LatLng
returns the last calculated coordinates
no setter
hashCode int
The hash code for this object.
no setterinherited
predictions Stream<List<double>>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
initialize() Future<void>
Initializes the sensor service, ONNX AI prediction model, and begins listening to sensor data streams. This method must be awaited before accessing predictions
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateCoordinates(LatLng oldCoodiatens, double metersNorth, double metersEast) → LatLng
calculates logitude and latitude based on given Coordinates and two distances (North (- South) and East (- West))

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance SensorBasedNavController2
no setter