문제

My mobile web app utilizes navigator.geolocation.watchPosition to track polylines and waypoints for historical walking tours. (A customer requirement no-native app)

My first testing was done in a vehicle due to bad weather and seemed to produce reasonable results when plotting the polyline on an embedded Google Map in real-time. However, when walking it produced a more zig zag line.

Some research has revealed that I need to filter the retrieved location instead of just calculating the distance of two points.

The suggested filter, Kalman filter, seems to be something over my head, and I'm wondering whether there is an open source implementation for JavaScript available, which can be of help for my use case.

An open source C/C++ implementation of the Kalman filter that could be compiled to JavaScript using emscripten might be of help too.

도움이 되었습니까?

해결책

I posted a simple Kalman filter that can be used for geolocation data in an answer to this question: Smooth GPS data . It was designed for Android, where the GPS location readings are accompanied by a single error-bar number called accuracy which is measured in metres. That means that for each GPS location reading, with 67% probability the true location is within the circle centered on the specified location, and the radius of the circle is given by the accuracy number. If your situation is different then a bit of work will be required, and if so I would suggest that you edit the question to spec out in more detail what inputs you have for the Kalman filter.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top