An honest, high-accuracy Flutter compass with continuous heading uncertainty, confidence scoring, sensor fusion, and reliable calibration detection.
Flutter plugin
precise_compass
flutter pub add precise_compass160/160
Pub points
3
Likes
113
30-day downloads
Precise Compass is an open-source Flutter plugin for apps that need to know whether a heading can be trusted, not just what the heading is. It normalizes Android and iOS sensor data into a clear reading with heading, continuous accuracy in degrees, a confidence score, stable calibration guidance, and graceful behavior when compass hardware is unavailable.
Documentation
Listen to the heading stream, then use its accuracy and confidence to decide when to display a direction and when to guide the user through calibration.
import 'package:precise_compass/precise_compass.dart';
final subscription = PreciseCompass.heading.listen((reading) {
if (!reading.hasHeading) return;
print('${reading.heading.toStringAsFixed(0)}° '
'± ${reading.accuracyDegrees.toStringAsFixed(0)}° '
'· ${(reading.confidence * 100).toStringAsFixed(0)}% confident');
if (reading.shouldCalibrate) {
// Ask the user to move the device in a figure eight.
}
});
await subscription.cancel();Browse the API reference, usage examples, and integration guidance for the selected package.