-
Notifications
You must be signed in to change notification settings - Fork 44
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
Update fields of UnitQuaternion
#191
Update fields of UnitQuaternion
#191
Conversation
Codecov Report
@@ Coverage Diff @@
## master #191 +/- ##
==========================================
+ Coverage 86.12% 86.93% +0.80%
==========================================
Files 14 14
Lines 1341 1401 +60
==========================================
+ Hits 1155 1218 +63
+ Misses 186 183 -3
Continue to review full report at Codecov.
|
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.
Cool :)
Would it be worth renaming all the w
s to s
s to make the code a bit clearer?
Project.toml
Outdated
@@ -18,7 +19,8 @@ ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" | |||
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" | |||
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" | |||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | |||
Quaternions = "94ee1d12-ae83-5a48-8b1c-48b8ff168ae0" |
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 shouldn't need it here as well as above (same for Random
)
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.
Thanks, I also removed Quaternions
and Random
from targets/test
.
b687eb2
to
21d588b
Compare
@@ -134,16 +138,21 @@ end | |||
# Jacobian converting from a Quaternion to an MRP | |||
# | |||
function jacobian(::Type{MRP}, q::UnitQuaternion{T}) where T | |||
den = 1 + q.w | |||
w = q.q.s |
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.
Would it be worth renaming all the
w
s tos
s to make the code a bit clearer?
@andyferris Are you suggesting changes like this?
w = q.q.s | |
s = q.q.s |
We are using (w,x,y,z)
for symbols for coefficients of a quaternion of UnitQuaternion
, and (s,v1,v2,v3)
for Quaternion
. So, I would like to keep w
s here.
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.
Okay, I'll merge this PR.
If there is some problem with this, please open an issue about this.
This PR branch is based on #175, so please merge the PR first.
In the previous PR, I have written the following.
This PR fixes the problem.
WIP, not in this PR
UnitQuaternion
.QuatRotation
in the future._pure_quaternion
isQuaternion
.InfinitesimalQuatRotation <: InfinitesimalRotation
in the future.