kalman_dr 0.3.0 copy "kalman_dr: ^0.3.0" to clipboard
kalman_dr: ^0.3.0 copied to clipboard

4D Extended Kalman Filter for dead reckoning during GPS loss. Covariance-driven accuracy with EKF and linear extrapolation modes. Maintains position estimation through tunnels and urban canyons. Pure [...]

example/main.dart

import 'package:kalman_dr/kalman_dr.dart';

void main() {
  final timestamp = DateTime.now();
  final filter = KalmanFilter.withState(
    latitude: 35.1709,
    longitude: 136.9066,
    speed: 13.5,
    heading: 90.0,
    timestamp: timestamp,
    initialAccuracy: 5.0,
  );

  final predicted = filter.predict(const Duration(seconds: 2));

  filter.update(
    lat: 35.1709,
    lon: 136.9070,
    speed: 12.8,
    heading: 92.0,
    accuracy: 4.5,
    timestamp: timestamp.add(const Duration(seconds: 2)),
  );

  print('predicted lat/lon: '
      '${predicted.lat.toStringAsFixed(6)}, '
      '${predicted.lon.toStringAsFixed(6)}');
  print('predicted accuracy: ${predicted.accuracy.toStringAsFixed(1)}m');
  print('updated accuracy: ${filter.accuracyMetres.toStringAsFixed(1)}m');
  print('safety cap exceeded: ${filter.isAccuracyExceeded}');
}
0
likes
150
points
418
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

4D Extended Kalman Filter for dead reckoning during GPS loss. Covariance-driven accuracy with EKF and linear extrapolation modes. Maintains position estimation through tunnels and urban canyons. Pure Dart, no native dependencies.

Repository (GitHub)
View/report issues
Contributing

Topics

#kalman-filter #dead-reckoning #gps #navigation #positioning

License

BSD-3-Clause (license)

Dependencies

equatable

More

Packages that depend on kalman_dr