Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

questions on some logic used in code #123

Open
mkandulavm opened this issue Mar 28, 2023 · 1 comment
Open

questions on some logic used in code #123

mkandulavm opened this issue Mar 28, 2023 · 1 comment

Comments

@mkandulavm
Copy link

Hi

I have some questions on some logic

  1. In rebuildR() inside GPSAccKalman.cpp, there is this line
    double velSigma = posSigma * 1.0e-01;

Can you please explain this ? Do you suggest or have ideas how to improve this by measuring the device parameters/sensors ?

  1. In GPSAccKalmanAlloc() inside GPSAccKalman.cpp, how to prepare a proper value for accDev ?
    Please suggest here also how it can be improved.

  2. for calling GPSAccKalmanPredict(),
    Is it wise to accumulate the sensors , average it and call this function OR
    keep calling for every callback from the device ?

Thank you so much for the help.

@Lezh1k
Copy link
Collaborator

Lezh1k commented Mar 29, 2023

@mkandulavm

Hello.

  1. It means that we trust position measurement 10 times less than we trust velocity measurement. (as bigger value in R matrix as less we trust this measurment. and the oposite is right too).

It's not totally random but still very inaccurate value. I found somewhere that velocity received from GPS sattelite based on Doppler effect and it's ten times more accurate than coordinates. That's why I used this coefficient.

I'm not sure how to improve these values, sorry.

  1. Accelerometer deviation can be found in 2 ways. First - you can get it from documentation to your particular accelerometer. Second - you can ask user and apply calibration step. I'm not sure if calibration step in this repo or not. But the princip is very simple. You need to log accelerometer measurements during 1 minute (or 30 seconds) when your phone/device is laying without movement. Expected measurement for Z axis is 9.81, and for X and Y - zeroes . SO the mean value for X and Y will be our accelerometer deviation. For Z axis you need to subtract mean value from 9.81 .

  2. It's better to call predict every time you get measurements from sensor.

Thank you for interest. The library is outdated so I'd recommend to use it as base for your solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants