-
Notifications
You must be signed in to change notification settings - Fork 0
/
giant.rotations.html
266 lines (236 loc) · 17.9 KB
/
giant.rotations.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>giant.rotations — GIANT 1.0.0 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
<link rel="stylesheet" type="text/css" href="_static/graphviz.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<link rel="icon" href="_static/logo.ico"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="next" title="Rotation" href="rotations/giant.rotations.Rotation.html" />
<link rel="prev" title="giant.image_processing.SECOND_ORDER_MOMENTS" href="image_processing/giant.image_processing.SECOND_ORDER_MOMENTS.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo">
<a href="index.html">
<img class="logo" src="_static/logo.png" alt="Logo"/>
</a>
</p>
<p class="blurb">A powerful API for Optical Navigation</p>
<p>
<iframe src="https://ghbtns.com/github-btn.html?user=nasa&repo=giant&type=watch&count=true&size=large&v=2"
allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
</p>
<h3>Navigation</h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installing GIANT</a></li>
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="giant.html">API Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="giant.html#indices">Indices</a></li>
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
<li class="toctree-l1"><a class="reference internal" href="copyright.html">Copyright</a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li><a href="giant.html">API Reference</a><ul>
<li>Previous: <a href="image_processing/giant.image_processing.SECOND_ORDER_MOMENTS.html" title="previous chapter">giant.image_processing.SECOND_ORDER_MOMENTS</a></li>
<li>Next: <a href="rotations/giant.rotations.Rotation.html" title="next chapter">Rotation</a></li>
</ul></li>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="documentwrapper">
<div class="bodywrapper">
<div class="related top">
<nav id="rellinks">
<ul>
<li>
←
<a href="image_processing/giant.image_processing.SECOND_ORDER_MOMENTS.html" title="Previous document">giant.image_processing.SECOND_ORDER_MOMENTS</a>
</li>
<li>
<a href="rotations/giant.rotations.Rotation.html" title="Next document">Rotation</a>
→
</li>
</ul>
</nav>
</div>
<div class="body" role="main">
<section id="module-giant.rotations">
<span id="giant-rotations"></span><h1>giant.rotations<a class="headerlink" href="#module-giant.rotations" title="Permalink to this heading">¶</a></h1>
<p>This module defines a number of useful routines for converting between various attitude and rotation representations
as well as a class which acts as the primary way to express attitude and rotation data in GIANT.</p>
<p>There are a few different rotation representations that are used in this module and their format is described as
follows:</p>
<table class="docutils align-default" id="rotation-representation-table">
<thead>
<tr class="row-odd"><th class="head"><p>Representation</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>quaternion</p></td>
<td><p>A 4 element rotation quaternion of the form
<span class="math notranslate nohighlight">\(\mathbf{q}=\left[\begin{array}{c} q_x \\ q_y \\ q_z \\ q_s\end{array}\right]=
\left[\begin{array}{c}\text{sin}(\frac{\theta}{2})\hat{\mathbf{x}}\\
\text{cos}(\frac{\theta}{2})\end{array}\right]\)</span>
where <span class="math notranslate nohighlight">\(\hat{\mathbf{x}}\)</span> is a 3 element unit vector representing the axis of rotation and
<span class="math notranslate nohighlight">\(\theta\)</span> is the total angle to rotate about that vector. Note that quaternions are not unique
in that the rotation represented by <span class="math notranslate nohighlight">\(\mathbf{q}\)</span> is the same rotation represented by
<span class="math notranslate nohighlight">\(-\mathbf{q}\)</span>.</p></td>
</tr>
<tr class="row-odd"><td><p>rotation vector</p></td>
<td><p>A 3 element rotation vector of the form <span class="math notranslate nohighlight">\(\mathbf{v}=\theta\hat{\mathbf{x}}\)</span> where
<span class="math notranslate nohighlight">\(\theta\)</span> is the total angle to rotate by in radians and <span class="math notranslate nohighlight">\(\hat{\mathbf{x}}\)</span> is the
rotation axis. Note that rotation vectors are not unique as there is a long and a short vector that
both represent the same rotation.</p></td>
</tr>
<tr class="row-even"><td><p>rotation matrix</p></td>
<td><p>A <span class="math notranslate nohighlight">\(3\times 3\)</span> orthonormal matrix representing a rotation such that
<span class="math notranslate nohighlight">\(\mathbf{T}_B^A\mathbf{y}_A\)</span> rotates the 3 element position/direction vector
<span class="math notranslate nohighlight">\(\mathbf{y}_A\)</span> from frame <span class="math notranslate nohighlight">\(A\)</span> to <span class="math notranslate nohighlight">\(B\)</span> where <span class="math notranslate nohighlight">\(\mathbf{T}_B^A\)</span> is the rotation
matrix from <span class="math notranslate nohighlight">\(A\)</span> to <span class="math notranslate nohighlight">\(B\)</span>. Rotation matrices uniquely represent a single rotation.</p></td>
</tr>
<tr class="row-odd"><td><p>euler angles</p></td>
<td><p>A sequence of 3 angles corresponding to a rotation about 3 unit axes. There are 12 different axis
combinations for euler angles. Mathematically they relate to the rotation matrix as
<span class="math notranslate nohighlight">\(\mathbf{T}=\mathbf{R}_3(c)\mathbf{R}_2(b)\mathbf{R}_1(a)\)</span> where <span class="math notranslate nohighlight">\(\mathbf{R}_i(\theta)\)</span>
represents a rotation about axis <span class="math notranslate nohighlight">\(i\)</span> (either x, y, or z) by angle <span class="math notranslate nohighlight">\(\theta\)</span>, <span class="math notranslate nohighlight">\(a\)</span> is
the angle to rotate about the first axis, <span class="math notranslate nohighlight">\(b\)</span> is angle to rotate about the second axis, and
<span class="math notranslate nohighlight">\(c\)</span> is the angle to rotate about the third axis.</p></td>
</tr>
</tbody>
</table>
<p>The <a class="reference internal" href="rotations/giant.rotations.Rotation.html#giant.rotations.Rotation" title="giant.rotations.Rotation"><code class="xref py py-class docutils literal notranslate"><span class="pre">Rotation</span></code></a> object is the primary tool that will be used by users. It offers a convenient constructor which
accepts 3 common rotation representations to initialize the object. It also offers operator overloading to allow
a sequence of rotations to be performed using the standard multiplication operator <code class="docutils literal notranslate"><span class="pre">*</span></code>. Finally, it offers properties
of the three most common rotation representations (quaternion, matrix, rotation vector).</p>
<p>In addition, there are also a number of utilities provided in this module for converting between different
representations of attitudes and rotations, as well as for working with this data.</p>
<p class="rubric">Classes</p>
<table class="autosummary longtable docutils align-default">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="rotations/giant.rotations.Rotation.html#giant.rotations.Rotation" title="giant.rotations.Rotation"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Rotation</span></code></a></p></td>
<td><p>A class to represent and manipulate rotations in GIANT.</p></td>
</tr>
</tbody>
</table>
<p class="rubric">Functions</p>
<table class="autosummary longtable docutils align-default">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="rotations/giant.rotations.quaternion_inverse.html#giant.rotations.quaternion_inverse" title="giant.rotations.quaternion_inverse"><code class="xref py py-obj docutils literal notranslate"><span class="pre">quaternion_inverse</span></code></a></p></td>
<td><p>This function provides the inverse of a rotation quaternion of the form discussed in <a class="reference internal" href="#rotation-representation-table"><span class="std std-ref">Rotation Representations</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="rotations/giant.rotations.quaternion_multiplication.html#giant.rotations.quaternion_multiplication" title="giant.rotations.quaternion_multiplication"><code class="xref py py-obj docutils literal notranslate"><span class="pre">quaternion_multiplication</span></code></a></p></td>
<td><p>This function performs the hamiltonian quaternion multiplication operation.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="rotations/giant.rotations.quaternion_to_rotvec.html#giant.rotations.quaternion_to_rotvec" title="giant.rotations.quaternion_to_rotvec"><code class="xref py py-obj docutils literal notranslate"><span class="pre">quaternion_to_rotvec</span></code></a></p></td>
<td><p>This function converts a rotation quaternion into a rotation vector of the form discussed in <a class="reference internal" href="#rotation-representation-table"><span class="std std-ref">Rotation Representations</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="rotations/giant.rotations.quaternion_to_rotmat.html#giant.rotations.quaternion_to_rotmat" title="giant.rotations.quaternion_to_rotmat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">quaternion_to_rotmat</span></code></a></p></td>
<td><p>This function converts an attitude quaternion into its equivalent rotation matrix of the form discussed in <a class="reference internal" href="#rotation-representation-table"><span class="std std-ref">Rotation Representations</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="rotations/giant.rotations.quaternion_to_euler.html#giant.rotations.quaternion_to_euler" title="giant.rotations.quaternion_to_euler"><code class="xref py py-obj docutils literal notranslate"><span class="pre">quaternion_to_euler</span></code></a></p></td>
<td><p>This function converts a rotation quaternion to 3 euler angles to be applied to the axes specified in order.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="rotations/giant.rotations.rotvec_to_rotmat.html#giant.rotations.rotvec_to_rotmat" title="giant.rotations.rotvec_to_rotmat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rotvec_to_rotmat</span></code></a></p></td>
<td><p>This function converts a rotation vector to a rotation matrix according to the form specified in <a class="reference internal" href="#rotation-representation-table"><span class="std std-ref">Rotation Representations</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="rotations/giant.rotations.rotvec_to_quaternion.html#giant.rotations.rotvec_to_quaternion" title="giant.rotations.rotvec_to_quaternion"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rotvec_to_quaternion</span></code></a></p></td>
<td><p>This function converts a rotation vector given as a 3 element Sequence into a rotation quaternion of the form discussed in <a class="reference internal" href="#rotation-representation-table"><span class="std std-ref">Rotation Representations</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="rotations/giant.rotations.rotmat_to_quaternion.html#giant.rotations.rotmat_to_quaternion" title="giant.rotations.rotmat_to_quaternion"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rotmat_to_quaternion</span></code></a></p></td>
<td><p>This function converts a rotation matrix into a rotation quaternion of the form discussed in <a class="reference internal" href="#rotation-representation-table"><span class="std std-ref">Rotation Representations</span></a>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="rotations/giant.rotations.rotmat_to_euler.html#giant.rotations.rotmat_to_euler" title="giant.rotations.rotmat_to_euler"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rotmat_to_euler</span></code></a></p></td>
<td><p>This function converts a rotation matrix to 3 euler angles to be applied to the axes specified in order.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="rotations/giant.rotations.euler_to_rotmat.html#giant.rotations.euler_to_rotmat" title="giant.rotations.euler_to_rotmat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">euler_to_rotmat</span></code></a></p></td>
<td><p>This function converts a sequence of 3 euler angles into a rotation matrix.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="rotations/giant.rotations.rot_x.html#giant.rotations.rot_x" title="giant.rotations.rot_x"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rot_x</span></code></a></p></td>
<td><p>This function performs a right handed rotation about the x axis by angle theta.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="rotations/giant.rotations.rot_y.html#giant.rotations.rot_y" title="giant.rotations.rot_y"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rot_y</span></code></a></p></td>
<td><p>This function performs a right handed rotation about the y axis by angle theta.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="rotations/giant.rotations.rot_z.html#giant.rotations.rot_z" title="giant.rotations.rot_z"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rot_z</span></code></a></p></td>
<td><p>This function performs a right handed rotation about the z axis by angle theta.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="rotations/giant.rotations.skew.html#giant.rotations.skew" title="giant.rotations.skew"><code class="xref py py-obj docutils literal notranslate"><span class="pre">skew</span></code></a></p></td>
<td><p>This function returns a numpy array with the skew symmetric cross product matrix for vector.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="rotations/giant.rotations.nlerp.html#giant.rotations.nlerp" title="giant.rotations.nlerp"><code class="xref py py-obj docutils literal notranslate"><span class="pre">nlerp</span></code></a></p></td>
<td><p>This function performs normalized linear interpolation of rotation quaternions.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="rotations/giant.rotations.slerp.html#giant.rotations.slerp" title="giant.rotations.slerp"><code class="xref py py-obj docutils literal notranslate"><span class="pre">slerp</span></code></a></p></td>
<td><p>This function performs spherical linear interpolation of rotation quaternions.</p></td>
</tr>
</tbody>
</table>
<div class="line-block">
<div class="line"><br /></div>
</div>
</section>
</div>
<div class="related bottom">
<nav id="rellinks">
<ul>
<li>
←
<a href="image_processing/giant.image_processing.SECOND_ORDER_MOMENTS.html" title="Previous document">giant.image_processing.SECOND_ORDER_MOMENTS</a>
</li>
<li>
<a href="rotations/giant.rotations.Rotation.html" title="Next document">Rotation</a>
→
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
©2023 United States Government |
NASA Official: <a href="mailto:[email protected]">Andrew Liounis</a> |
Curator: <a href="mailto:[email protected]">Andrew Liounis</a>
<br>
Last updated on Mar 08, 2023 |
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 6.1.3</a>
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
|
<a href="_sources/giant.rotations.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>