Skip to content

Random value from yaw calculation? #17

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

Closed
eddyyanto opened this issue Apr 16, 2020 · 5 comments
Closed

Random value from yaw calculation? #17

eddyyanto opened this issue Apr 16, 2020 · 5 comments

Comments

@eddyyanto
Copy link

I am using MPU-9250/6500 and managed to get the filtered pitch and roll data just fine. But when I tried to calculate the yaw using the below yaw calculation at https://engineering.stackexchange.com/questions/3348/calculating-pitch-yaw-and-roll-from-mag-acc-and-gyro-data

yaw = 180 * atan (accelerationZ/sqrt(accelerationX*accelerationX + accelerationZ*accelerationZ))/M_PI;

The returned value seemed to be a bit random? Any idea?

@peterhinch
Copy link
Contributor

I suggest you use Madgwick fusion which has been tested.

@eddyyanto
Copy link
Author

Will do! Thanks @peterhinch! :)

@eddyyanto
Copy link
Author

Tried using Fusion and it seemed that my Adafruit Huzzah ESP8266 can't take the big library size:

File "main.py", line 4, in <module> MemoryError: memory allocation failed, allocating 761 bytes

I've cleared up unnecessary files and it keeps throwing me memory allocation failed issue.

@eddyyanto eddyyanto reopened this Apr 16, 2020
@peterhinch
Copy link
Contributor

You probably need to use frozen bytecode also my build scripts as the official docs aren't entirely up to date.

I don't think I've ever tried sensor fusion on an ESP8266.

@eddyyanto
Copy link
Author

Thanks for the pointer, @peterhinch! 🙏
I'll give it a shot! I'll close this thread now.

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