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
ekf2: migrate fuse_airspeed to SymForce #20333
Conversation
I added a little cmake helper to re-run the Symforce code generation. By default it shouldn't do anything. |
|
||
const float predicted_airspeed = sqrtf(IV2); | ||
const float R = sq(math::constrain(_params.eas_noise, 0.5f, 5.0f) * | ||
math::constrain(airspeed_sample.eas2tas, 0.9f, 10.0f)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10 seems kind of high for eas2tas, I think that would be > 30 km.
d3b5a3a
to
9eb6166
Compare
f053958
to
d124ad1
Compare
Added a unit test to compare the previous auto-generated code with the new functions to make sure the results are numerically identical. |
Describe problem solved by this pull request
Copy/paste and manually modifying auto-generated code is prone to human errors; it takes about a day of painful work to replace the existing auto-generated code if anything in the derivation is changed.
Describe your solution
Use SymForce to generate compatible C++ code and only use function calls within PX4
Test data / coverage
SITL test with
make px4_sitl gazebo_plane__windy
Before:
This PR: