-
Notifications
You must be signed in to change notification settings - Fork 510
EKF: Add Emergency yaw recovery using EKF-GSF estimator #764
Conversation
This reverts commit 9300530.
Also remove unnecessary operations
Flight testing was repeated with a total of 9 takeoffs with a multi-rotor. The following test data was from one of the mission mode flights |
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.
@priseborough Great work moving this to a separate class. I only reviewed part of the PR until now.
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.
You could use a lot more of the functionality provided in the matrix library. That would have the benefit, that the operations are already tested. I added some some suggestions.
Use conversion from rotation matrix to Euler angles instead of quaternion to euler angles.
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.
There seems to be some unaddressed suggestions. I hope you don't mind the numerous review comments.
memcpy bypasses compiler sanity checks and is unnecessary in this instance.
Adds a common function to support yaw reset that can be used elsewhere.
@bresch I've split out the common element of the various yaw resets into a separate function. I now need to do a reversion test with a RW and FW SITL flight to ensure this refactor has not broken something. |
806c52a
to
c8e73d3
Compare
3e54891
to
d130250
Compare
_R_to_earth is updated by this function. |
@priseborough it might make sense to reopen this as a new PR. With the existing feedback it is quite hard to keep the overview. |
54ba1d1
to
a2afbee
Compare
@kamilritz New PR opened here: #766. It has been rebased. |
Replaces #754
The estimator has been moved into its own class. Some other minor efficiency improvements have been made.
Replay of a flyaway test log shows the same performance .
Before (with N_MODELS_EKFGSF set to 5)
After:
This was tested with the following firmware changes. Note - an externally requested yaw reset has not been tested and may add unnecessary complexity so the commander changes and the ekf2_main call to Ekf::requestEmergencyNavReset is probably unnecessary.
https://github.com/priseborough/Firmware/tree/pr-yawEKFGSF-refactor