This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 510
EKF: Fix innovation in fuseDeclination() #590
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…was not zero in fuseDeclination() Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
EKF/ekf.h
Outdated
@@ -553,7 +551,7 @@ class Ekf : public EstimatorInterface | |||
bool realignYawGPS(); | |||
|
|||
// calculate the magnetic declination to be used by the alignment and fusion processing |
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.
Now that this is returning the value, please ensure the header documentation indicates the units, eg radians
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.
Suggest:
// Returns the magnetic declination in radians to be used by the alignment and fusion processing.
EKF/ekf_helper.cpp
Outdated
@@ -767,28 +767,28 @@ bool Ekf::resetMagHeading(Vector3f &mag_init, bool increase_yaw_var, bool update | |||
} | |||
|
|||
// Calculate the magnetic declination to be used by the alignment and fusion processing |
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.
Suggest
// Return the magnetic declination in radians to be used by the alignment and fusion processing.
priseborough
approved these changes
Mar 12, 2019
dagar
pushed a commit
to priseborough/PX4-Autopilot
that referenced
this pull request
Mar 13, 2019
Bug Fixes: PX4/PX4-ECL#586 - EKF: fix covariance and output filter buffer initialization PX4/PX4-ECL#590 - EKF: Fix innovation in fuseDeclination() Enhancements: PX4/PX4-ECL#543 - ekf_helper: add more useful methods to interface with the covariances PX4/PX4-ECL#588 - Add unit tests for DataValidator Note: PX4/PX4-ECL#543 has required a change to how the state variances are accessed .
priseborough
added a commit
to PX4/PX4-Autopilot
that referenced
this pull request
Mar 14, 2019
Bug Fixes: PX4/PX4-ECL#586 - EKF: fix covariance and output filter buffer initialization PX4/PX4-ECL#590 - EKF: Fix innovation in fuseDeclination() Enhancements: PX4/PX4-ECL#543 - ekf_helper: add more useful methods to interface with the covariances PX4/PX4-ECL#588 - Add unit tests for DataValidator Note: PX4/PX4-ECL#543 has required a change to how the state variances are accessed .
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before we only calculated the
_mag_declination
variable before mag fusion, leading to the fact that in fuseDeclination() the innovation was not zero (since mag fusion updated the states) even though mag_align_complete was true.