Git Product home page Git Product logo

Comments (12)

Pstoppani avatar Pstoppani commented on July 18, 2024 1

from mad-location-manager.

thxmxx avatar thxmxx commented on July 18, 2024

@Pstoppani I'm also using a similar approach:

private void rebuildQ(double dtUpdate, double accDev) {
        double velDev = accDev * dtUpdate;
        double posDev = (accDev * dtUpdate * dtUpdate) / 2.0;
        double covDev = velDev * posDev;

        double posSig = posDev * posDev;
        double velSig = velDev * velDev;

        double Q[] = {
                posSig, 0.0, covDev, 0.0,
                0.0, posSig, 0.0, covDev,
                covDev, 0.0, velSig, 0.0,
                0.0, covDev, 0.0, velSig
        };
        m_kf.Q.setData(Q);
    }

I'm working on android btw, there was also a wrong size of B matrix and u vector. They should be (4x2) and (2x1) respectively.

Btw, now it seems the vectors (east, north) from accelerometer are not on the same orientation as the gps speed vectors.

from mad-location-manager.

thxmxx avatar thxmxx commented on July 18, 2024

I think it's also a mistake to use the orientation from the gps on update cause we have this data more accurate from magnetometer.

from mad-location-manager.

Pstoppani avatar Pstoppani commented on July 18, 2024

from mad-location-manager.

farfromrefug avatar farfromrefug commented on July 18, 2024

@thxmxx @Pstoppani can you elaborate on what you changed for gps orientation?

from mad-location-manager.

Pstoppani avatar Pstoppani commented on July 18, 2024

from mad-location-manager.

farfromrefug avatar farfromrefug commented on July 18, 2024

@Pstoppani thanks! Will test it on my side. I ported the code to JS as i use it within Nativescript cross platform environment.
Thanks

from mad-location-manager.

thxmxx avatar thxmxx commented on July 18, 2024

@farfromrefug Instead of using loc.getBearing() on the SensorGpsDataItem (used on update step), I used the magnetometer reading.
I did that because the GPS reading can be 0 in case the bearing is not delivered...

https://developer.android.com/reference/android/location/Location.html#getBearing()

from mad-location-manager.

farfromrefug avatar farfromrefug commented on July 18, 2024

@thxmxx thanks a lot! will use that too.
Now did you get the speed to be accurate? That s actually the reason why i am looking at this lib.
My client find the GPS speed to not be accurate and responsive enough. So i look here.
Now i have to lib working correctly except for the speed. The reading are wrong.
I have looked at both rebuildQ implementations here but i dont get a correct result.
Well it see wrong result with my JS port. Need to test android version with your implementation to see what i get

from mad-location-manager.

thxmxx avatar thxmxx commented on July 18, 2024

@farfromrefug you should also use this #51
It's already merged btw

from mad-location-manager.

thxmxx avatar thxmxx commented on July 18, 2024

Now did you get the speed to be accurate?

I'm getting the error of +-5Km/h. But I'm still working on that, since I'm using GPS speed on updates and the predict results are still bad.

from mad-location-manager.

farfromrefug avatar farfromrefug commented on July 18, 2024

@thxmxx Thanks for the infos!
I added the bearing from sensors as you mentioned (Also reported in test app for easier debug). You can see it here :
https://github.com/farfromrefug/mad-location-manager
Now what i am seeing is a lot more accurate speed reading from the GPS right now.

My question is this. When updating the Kalman filter with the GPS location, what we are doing is using GPS speed as a reference for the Kalman Filter to "predict" it afterwards based on Linear ACceleration, right? I am not that familiar with the Kalman Filter
But if it is so shouldn't we "reset" the Q matrix on new Location update?

What i am seeing when outside is that the GPS speed pretty quickly goes to 0 when i stop walking. But the Filtered speed does not want to go to 0. It just slowly goes down.
Also Do you use the m_useGpsSpeed of the GPSKalmanFilter? I am not sure what it does.
Thanks

EDIT: found out that article. And i think it is the inspiration for that repo
http://scottlobdell.me/2017/01/gps-accelerometer-sensor-fusion-kalman-filter-practical-walkthrough
And the output that i have is exactly what a comment is talking about
http://scottlobdell.me/2017/01/gps-accelerometer-sensor-fusion-kalman-filter-practical-walkthrough/#comment-3733623833

from mad-location-manager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.