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

Integrator double to float and hrt_abstime type useage #12935

Merged
merged 2 commits into from
Sep 25, 2019

Conversation

mcsauder
Copy link
Contributor

Describe problem solved by the proposed pull request
The Integrator class integral delta dt is currently created as a double type and then immediately recast in the next line of code to a float type:
const matrix::Vector3f delta_alpha = (val + _last_val) * dt * 0.5f;

This PR simply creates the dt as a float to save resources and employs the hrt_abstime typedef in the obvious instances within integrator.cpp.

Test data / coverage
This PR was test flown on a 250 size quad with pixhawk 4 mini until the battery gave out, tests perform identical to PX4:master branch:

Please let me know if you have any questions on this PR. Thanks!

-Mark

Copy link
Contributor

@julianoes julianoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's fine.

@julianoes julianoes merged commit db8e203 into PX4:master Sep 25, 2019
@mcsauder mcsauder deleted the integrator_double_to_float branch September 26, 2019 03:07
@mcsauder
Copy link
Contributor Author

Thanks @julianoes!

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.

2 participants