-
Notifications
You must be signed in to change notification settings - Fork 196
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
Big modifications, but most importantly added NED and ENU frame supports. #40
Open
CK-Explorer
wants to merge
9
commits into
arduino-libraries:master
Choose a base branch
from
CK-Explorer:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
Added NED, ENU local reference frame supports. Added supports of passing different gyroscope reading's unit (rad or deg) based on user preference into Madgwick::update() and Madgwick::updateIMU(). Added non-constant IMU's update frequency support by allowing users to use elapsed time, while constant frequency still supports. All the above changes are achieved using template and functions overloading. Added Madgwick::updateCore() and Madgwick::updateCoreIMU() to avoid some code duplications for constant and non-constant frequency supports in Madgwick::update() and Madgwick::updateIMU() respectively. Added a getter function to obtain quaternion, and setter functions for filter parameter (beta) and IMU's frequency separately. Added constructors overloading to initialize filter parameter (beta) and IMU's frequency. Added inline wrapper functions for degree to radians and vice-versa conversion for readability purpose. Rearranged some previous codes for readability purpose. Added comments.
Using PI constant from Arduino.h instead.
Memory usage change @ 0f1a839
Click for full report table
Click for full report CSV
|
Memory usage change @ cddf138
Click for full report table
Click for full report CSV
|
Memory usage change @ 1ebe2f0
Click for full report table
Click for full report CSV
|
per1234
added
type: enhancement
Proposed improvement
topic: code
Related to content of the project itself
labels
Apr 2, 2023
digisomni
added a commit
to neocadia/MadgwickAHRS
that referenced
this pull request
Aug 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Added NED, ENU local reference frame supports.$b_x$ $b_z$ ]. These modifications lead to different matrices in Eqs. 25 and 26 for NED frame, while in Eqs. 29 and 30 for ENU frame.
The original code was designed for NWU local reference frame, as observed from Eqs. 23 and 27 in his paper. So, for NED frame, Eq. 23 is changed to be equaled to [0 0 0 -1], while for ENU frame, Eq. 27 is changed to be equaled to [0 0
Added supports of passing different gyroscope reading's unit (rad or deg) based on user preference into Madgwick::update() and Madgwick::updateIMU().
Added non-constant IMU's update frequency support by allowing users to use elapsed time, while constant frequency still supports.
NOTE: Changes 1 to 3 are achieved using template and functions overloading, but requires C++ 17 supports.
For lower than C++ 17, "if ... " is used instead of "if constexpr ... ", which hinders those branches to be evaluated during compile-time. Hence, this might impact the performance.
Added Madgwick::updateCore() and Madgwick::updateCoreIMU() to avoid some code duplications (maintainability purpose) for constant and non-constant frequency supports in Madgwick::update() and Madgwick::updateIMU() respectively.
Added a getter function to obtain quaternion.
Obtaining the quaternion is an essential feature of this filter, that avoids numerical instability in determining roll and yaw angles when pitch angle reaches +/-90 degree.
Added setter functions for filter parameter (beta) and IMU's frequency separately.
Added constructors overloading to initialize filter parameter (beta) and IMU's frequency.
Added inline wrapper functions for degree to radians and vice-versa conversion (readability purpose).
Rearranged some previous codes (readability purpose).
Added comments.