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

replaced look-up tables with <math.h> lib functions and updated press… #437

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

avtoku
Copy link
Contributor

@avtoku avtoku commented Sep 25, 2024

Turbomath update

@avtoku
Copy link
Contributor Author

avtoku commented Sep 25, 2024

Replaced table look-up functions for math lib functions.
Updated pressure altitude calculation.

This update requires changes to sensors.h/cpp from ptt/barocal and ptt/pitotspeed pull requests.

@jsjax
Copy link

jsjax commented Sep 26, 2024

I'm happy to see this being replaced, even though it's like saying goodbye to an old friend :). The STM32F103 didn't have a floating-point unit, so this was really the only way to get our loop time down under 1ms. I'm curious what the new timings look like with the H7.

@avtoku
Copy link
Contributor Author

avtoku commented Sep 26, 2024

I'm happy to see this being replaced, even though it's like saying goodbye to an old friend :). The STM32F103 didn't have a floating-point unit, so this was really the only way to get our loop time down under 1ms. I'm curious what the new timings look like with the H7.

Yup, sad to see old friends retire. estimator_.run() went from 26us to 16us with the change. We still need to verify that there were no errors in the conversion.

@iandareid
Copy link
Contributor

@avtoku I will put this on a board and do a test flight. I will let you know how it goes!

@avtoku
Copy link
Contributor Author

avtoku commented Sep 30, 2024

@avtoku I will put this on a board and do a test flight. I will let you know how it goes!

Probably run it in the simulator first?

@avtoku avtoku marked this pull request as ready for review October 4, 2024 18:23
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

Successfully merging this pull request may close these issues.

3 participants