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

Yaw values are not precise #489

Open
taiebzbaiba opened this issue Jun 29, 2023 · 9 comments
Open

Yaw values are not precise #489

taiebzbaiba opened this issue Jun 29, 2023 · 9 comments

Comments

@taiebzbaiba
Copy link

Hi kris , I can't get precise yaw values on my mpu-9250 , I'm using Madgwick filter for sensor fusion , I tried changing sample rates parameters yet yaw values seem to drift for low sample rates values and for high sample rate I lose so much precision .

@kriswiner
Copy link
Owner

kriswiner commented Jun 29, 2023 via email

@taiebzbaiba
Copy link
Author

I tend to calibrate my sensors by measuring biases everytime I connect the device and as for how I test it is I put my sensor on a certain position for a while , measure offsets so it becomes my zero , do random movements and rotations and then put the sensor back into that zero position .

@kriswiner
Copy link
Owner

kriswiner commented Jun 29, 2023 via email

@kriswiner
Copy link
Owner

kriswiner commented Jun 29, 2023 via email

@taiebzbaiba
Copy link
Author

And how do you calibrate the mag?

On Thu, Jun 29, 2023 at 9:20 AM Taieb Zbaiba @.> wrote: I tend to calibrate my sensors by measuring biases everytime I connect the device and as for how I test it is I put my sensor on a certain position for a while , measure offsets so it becomes my zero , do random movements and rotations and then put the sensor back into that zero position . — Reply to this email directly, view it on GitHub <#489 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTDLKV66QFTT6C4Y4OVQ2TXNWTL3ANCNFSM6AAAAAAZYEON2Q . You are receiving this because you commented.Message ID: @.>

I collect mag data for about 15 seconds , I rotate my sensor in every axis , I measure average mag biases and scale values in each axe based on collected data then store them for the main program

@taiebzbaiba
Copy link
Author

The next thing to check is what orientation convention are you using? NED or ENU? Are you passing the scaled sensor data to the Madgwick algorithm in the proper order for one of these? On Thu, Jun 29, 2023 at 9:49 AM Tlera Corporation @.> wrote:

And how do you calibrate the mag? On Thu, Jun 29, 2023 at 9:20 AM Taieb Zbaiba @.
> wrote: > I tend to calibrate my sensors by measuring biases everytime I connect > the device and as for how I test it is I put my sensor on a certain > position for a while , measure offsets so it becomes my zero , do random > movements and rotations and then put the sensor back into that zero > position . > > — > Reply to this email directly, view it on GitHub > <#489 (comment)>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/ABTDLKV66QFTT6C4Y4OVQ2TXNWTL3ANCNFSM6AAAAAAZYEON2Q > . > You are receiving this because you commented.Message ID: > @.***> >

I guess you're referring to this issue #368 , I am passing these as parameters for my madgwick algorithm , I tried removing the (-) from mz out of curiosity and it gives way worse values. madgwick(ax, ay, az, gx, gy, gz, mx, my, -mz, q);

@kriswiner
Copy link
Owner

kriswiner commented Jun 30, 2023 via email

@taiebzbaiba
Copy link
Author

I tried ENU and NED , ENU seems to be more working for me , NED more drifty and I lose the origine (the zero value orientation)
the problem for me is that for small angles it works decently , for big angles like 90 i get 130 , (always for yaw values)
Although I modified all sample rates , low pass filters according to your suggestion . As far the processor I'm working with ESP32-C3 32-bit RISC-V @160MHz.

@kriswiner
Copy link
Owner

kriswiner commented Jul 11, 2023 via email

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