-
Notifications
You must be signed in to change notification settings - Fork 1
Roll Pitch Yaw Calculations #326
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #ifndef N_MATH_UTILS_H | ||
| #define N_MATH_UTILS_H | ||
|
|
||
| #include <zsl/orientation/quaternions.h> | ||
|
|
||
| namespace NMathUtils { | ||
| /** | ||
| * @brief Calculate roll, pitch, and yaw from a quaternion. | ||
| * | ||
| * @param[in] inputQuat The input quaternion. | ||
| * @param[out] roll Output roll angle in radians. | ||
| * @param[out] pitch Output pitch angle in radians. | ||
| * @param[out] yaw Output yaw angle in radians. | ||
| */ | ||
| void CalculateRollPitchYaw(zsl_quat inputQuat, float& roll, float& pitch, float& yaw); | ||
| }; | ||
|
|
||
| #endif //N_MATH_UTILS_H | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Copyright (c) 2025 RIT Launch Initiative | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| zephyr_library() | ||
| FILE(GLOB sources *.cpp) | ||
| zephyr_library_sources(${sources}) | ||
|
|
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,14 @@ | ||||||
| #include "f_core/math/n_math_utils.h" | ||||||
|
|
||||||
|
|
||||||
| void NMathUtils::CalculateRollPitchYaw(zsl_quat inputQuat, float& roll, float& pitch, float& yaw) | ||||||
| { | ||||||
| static constexpr multiplier = 180 / ZSL_PI; | ||||||
|
||||||
| static constexpr multiplier = 180 / ZSL_PI; | |
| static constexpr double multiplier = 180 / ZSL_PI; |
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.
robots kinda cooking with this one
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,9 +21,10 @@ manifest: | |
| - hal_nxp | ||
| - littlefs | ||
| - loramac-node | ||
| - hal_st | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note github diff doesn't show that it's present above. This is just deleting a duplicate entry |
||
| - lz4 | ||
| - segger | ||
| - percepio | ||
| - lz4 | ||
| clone-depth: 1 | ||
|
|
||
| - name: zscilib | ||
| remote: zephyrproject-rtos | ||
| revision: master | ||
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.
either this comment is wrong or the implementation is wrong? You have a multiplier of 180/pi which turns radians into degrees in the implementation but say it comes out as radians?