mad-location-manager
mad-location-manager copied to clipboard
working without sensor
I am working on a port to JS.
And i am facing an issue. When not using sensors (comment the registerListener on android) the returned locations in onLocationChangedImp are 0,0.
This is not expected. It means the kalman filter does not work when no sensor are used. I suppose it is because the matrices are not initialized correctly. But i am not sure how to initialize them.
Can anyone help?
Thanks
Actually might have solved this. I added this
long now = android.os.SystemClock.elapsedRealtimeNanos();
long nowMs = Utils.nano2milli(now);
SensorGpsDataItem sdi = new SensorGpsDataItem(nowMs,
SensorGpsDataItem.NOT_INITIALIZED,
SensorGpsDataItem.NOT_INITIALIZED,
SensorGpsDataItem.NOT_INITIALIZED,
0,
0,
0,
SensorGpsDataItem.NOT_INITIALIZED,
SensorGpsDataItem.NOT_INITIALIZED,
SensorGpsDataItem.NOT_INITIALIZED,
SensorGpsDataItem.NOT_INITIALIZED,
m_magneticDeclination);
m_sensorDataQueue.add(sdi);
just after the GPSAccKalmanFilter creation. Hope that's good