maddevsio / mad-location-manager

Mad Location Manager is a library for GPS and Accelerometer data "fusion" with Kalman filter
MIT License
533 stars 154 forks source link

Why you did not use SensorEvent.timestamp? #77

Open ftabashir opened 4 years ago

ftabashir commented 4 years ago

In KalmanLocationService.onSensorChanged elapsed nanos was retrieved like this:

long now = android.os.SystemClock.elapsedRealtimeNanos();

While we have it already in SensorEvent.timestamp.

Is there any issue in using SensorEvent.timestamp which you avoid to use?

Lezh1k commented 4 years ago

Yes. I'm not sure why, but seems, like those events use different clock sources. I wanted to be sure, that we use same clock source for each event type.