Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Reinecke
ducc
Commits
ae7892f3
Commit
ae7892f3
authored
Jun 26, 2020
by
Martin Reinecke
Browse files
fix order of rotations
parent
41cbbff3
Pipeline
#77328
passed with stages
in 16 minutes and 26 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
python/pointingprovider.cc
View file @
ae7892f3
...
...
@@ -84,7 +84,7 @@ template<typename T> class PointingProvider
w1
*
q1
.
y
+
w2
*
q2
.
y
,
w1
*
q1
.
z
+
w2
*
q2
.
z
,
w1
*
q1
.
w
+
w2
*
q2
.
w
);
q
*
=
rot_
;
q
=
rot_
*
q
;
out
.
v
(
i
,
0
)
=
q
.
x
;
out
.
v
(
i
,
1
)
=
q
.
y
;
out
.
v
(
i
,
2
)
=
q
.
z
;
...
...
@@ -136,7 +136,7 @@ t0 : float
freq : float
the frequency at which the provided satellite orientations are sampled
quat : np.ndarray((nval, 4), dtype=np.float64)
the satellite orientation quaternions. Co
ordinate
s are expecetd in the order
the satellite orientation quaternions. Co
mponent
s are expecetd in the order
(x, y, z, w). The quaternions need not be normalized.
Returns
...
...
@@ -159,7 +159,7 @@ freq : float
the frequency at which the output orientations should be sampled
rot : np.ndarray((4,), dtype=np.float64)
A single rotation quaternion describing the rotation from the satellite to
the detector reference system. Co
ordinate
s are expecetd in the order
the detector reference system. Co
mponent
s are expecetd in the order
(x, y, z, w). The quaternion need not be normalized.
nval : int
the number of requested quaternions
...
...
@@ -167,7 +167,7 @@ nval : int
Returns
-------
np.ndarray((nval, 4), dtype=np.float64) : the output quaternions
The quaternions are normalized
The quaternions are normalized
and in the order (x, y, z, w)
)"""
;
void
add_pointingprovider
(
py
::
module
&
msup
)
...
...
python/test/test_pointing.py
View file @
ae7892f3
...
...
@@ -68,7 +68,7 @@ def testp2():
rrquat
=
R
.
from_quat
(
rquat
)
slerp
=
Slerp
(
times1
,
r1
)
times2
=
t02
+
1.
/
f2
*
np
.
arange
(
size2
)
r2
=
slerp
(
times2
)
*
rrquat
r2
=
rrquat
*
slerp
(
times2
)
squat2
=
r2
.
as_quat
()
squat2
*=
np
.
sign
(
squat2
[:,
0
]).
reshape
((
-
1
,
1
))
_assert_close
(
quat2
,
squat2
,
1e-13
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment