Fix roll, pitch and yaw: NED formula was applied to an ENU quaternion - #286
Open
1-Bart-1 wants to merge 2 commits into
Open
Fix roll, pitch and yaw: NED formula was applied to an ENU quaternion#2861-Bart-1 wants to merge 2 commits into
1-Bart-1 wants to merge 2 commits into
Conversation
Q_b_to_w is ENU, but the Euler angles were computed with a NED aerospace formula, so they were not the angles any sensor or controller reports. At zenith, nose north, wings level, yaw came out as -90 degrees where the answer is zero. KiteUtils.euler_ks converts the KA attitude to KS first, which is the convention roll, pitch and yaw are defined in. ss.orient needs no conversion: KiteUtils 0.13 stores KA, which is what Q_b_to_w already is. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
KiteUtils 0.13 dropped the fields: they were the same orientation the quaternion already holds, and keeping them kept a second convention in the state. euler_ks(ss.orient) reports them, still against NED. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
wing.Q_b_to_wis ENU, butupdate_sys_state!computedss.roll/pitch/yawfrom it with a NED aerospace formula. The result was not the angles any sensor or controller reports.Measured, kite at zenith with the nose north and wings level:
KiteUtils.euler_ksconverts theKAattitude toKSfirst, which is the convention roll, pitch and yaw are defined in — against NED, because that is what the sensors deliver.ss.orientneeds no conversion: KiteUtils 0.13 storesKA, which is whatQ_b_to_walready is. SAM was the package that already had this right.Depends on OpenSourceAWE/KiteUtils.jl#130 for
euler_ks; compat bound raised to0.13, so this cannot merge before that release.Three reference attitudes are pinned in KiteUtils'
test-frames.jl.🤖 Generated with Claude Code