1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6<meta name="generator" content="Doxygen 1.8.13"/>
7<meta name="viewport" content="width=device-width, initial-scale=1"/>
8<title>ISSDK: algorithms/sensorfusion/sources/orientation.c File Reference</title>
9<link href="tabs.css" rel="stylesheet" type="text/css"/>
10<script type="text/javascript" src="jquery.js"></script>
11<script type="text/javascript" src="dynsections.js"></script>
12<link href="issdk_stylesheet.css" rel="stylesheet" type="text/css" />
13</head>
14<body>
15<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
16<div id="titlearea">
17<table cellspacing="0" cellpadding="0">
18 <tbody>
19 <tr style="height: 56px;">
20  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
21  <td id="projectalign" style="padding-left: 0.5em;">
22   <div id="projectname">ISSDK
23   &#160;<span id="projectnumber">1.8</span>
24   </div>
25   <div id="projectbrief">IoT Sensing Software Development Kit</div>
26  </td>
27 </tr>
28 </tbody>
29</table>
30</div>
31<!-- end header part -->
32<!-- Generated by Doxygen 1.8.13 -->
33<script type="text/javascript" src="menudata.js"></script>
34<script type="text/javascript" src="menu.js"></script>
35<script type="text/javascript">
36$(function() {
37  initMenu('',false,false,'search.php','Search');
38});
39</script>
40<div id="main-nav"></div>
41<div id="nav-path" class="navpath">
42  <ul>
43<li class="navelem"><a class="el" href="dir_c0ce462e37efe0a8d60c01d75f78f8a0.html">algorithms</a></li><li class="navelem"><a class="el" href="dir_cb8ed5ffd1f20a5af7e420f81f312621.html">sensorfusion</a></li><li class="navelem"><a class="el" href="dir_c60867674b20e7d761cd401b87ce879d.html">sources</a></li>  </ul>
44</div>
45</div><!-- top -->
46<div class="header">
47  <div class="summary">
48<a href="#define-members">Macros</a> &#124;
49<a href="#func-members">Functions</a>  </div>
50  <div class="headertitle">
51<div class="title">orientation.c File Reference</div>  </div>
52</div><!--header-->
53<div class="contents">
54
55<p>Functions to convert between various orientation representations.
56<a href="#details">More...</a></p>
57<div class="textblock"><code>#include &quot;stdio.h&quot;</code><br />
58<code>#include &quot;math.h&quot;</code><br />
59<code>#include &quot;stdlib.h&quot;</code><br />
60<code>#include &quot;time.h&quot;</code><br />
61<code>#include &quot;string.h&quot;</code><br />
62<code>#include &quot;<a class="el" href="a00914_source.html">sensor_fusion.h</a>&quot;</code><br />
63<code>#include &quot;<a class="el" href="a00899_source.html">orientation.h</a>&quot;</code><br />
64<code>#include &quot;<a class="el" href="a00848_source.html">fusion.h</a>&quot;</code><br />
65<code>#include &quot;<a class="el" href="a00890_source.html">matrix.h</a>&quot;</code><br />
66<code>#include &quot;<a class="el" href="a00764_source.html">approximations.h</a>&quot;</code><br />
67</div><div class="textblock"><div class="dynheader">
68Include dependency graph for orientation.c:</div>
69<div class="dyncontent">
70<div class="center"><img src="a00897.png" border="0" usemap="#algorithms_2sensorfusion_2sources_2orientation_8c" alt=""/></div>
71<map name="algorithms_2sensorfusion_2sources_2orientation_8c" id="algorithms_2sensorfusion_2sources_2orientation_8c">
72<area shape="rect" id="node7" href="a00914.html" title="The sensor_fusion.h file implements the top level programming interface. " alt="" coords="126,169,239,196"/>
73<area shape="rect" id="node8" href="a00899.html" title="Functions to convert between various orientation representations. " alt="" coords="179,244,272,271"/>
74<area shape="rect" id="node9" href="a00890.html" title="Matrix manipulation functions. " alt="" coords="296,244,365,271"/>
75<area shape="rect" id="node10" href="a00848.html" title="Lower level sensor fusion interface. " alt="" coords="175,95,241,121"/>
76<area shape="rect" id="node11" href="a00764.html" title="Math approximations file. " alt="" coords="627,95,749,121"/>
77</map>
78</div>
79</div>
80<p><a href="a00896_source.html">Go to the source code of this file.</a></p>
81<table class="memberdecls">
82<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
83Macros</h2></td></tr>
84<tr class="memitem:a66564e58123257e31716bc9cfdc0754b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00896.html#a66564e58123257e31716bc9cfdc0754b">SMALLQ0</a>&#160;&#160;&#160;1E-4F</td></tr>
85<tr class="separator:a66564e58123257e31716bc9cfdc0754b"><td class="memSeparator" colspan="2">&#160;</td></tr>
86<tr class="memitem:ac8e335a45faed642aab8a104b24b68c6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00896.html#ac8e335a45faed642aab8a104b24b68c6">CORRUPTQUAT</a>&#160;&#160;&#160;0.001F</td></tr>
87<tr class="separator:ac8e335a45faed642aab8a104b24b68c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
88<tr class="memitem:a75fd3bc70409015ca43f604bb0ba3c4c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00896.html#a75fd3bc70409015ca43f604bb0ba3c4c">SMALLMODULUS</a>&#160;&#160;&#160;0.01F</td></tr>
89<tr class="separator:a75fd3bc70409015ca43f604bb0ba3c4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
90</table><table class="memberdecls">
91<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
92Functions</h2></td></tr>
93<tr class="memitem:a3aea6b9a9647d15db0dad4be820fbba9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00896.html#a3aea6b9a9647d15db0dad4be820fbba9">f3DOFMagnetometerMatrixNED</a> (float fR[][3], float fBc[])</td></tr>
94<tr class="memdesc:a3aea6b9a9647d15db0dad4be820fbba9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Aerospace NED magnetometer 3DOF flat eCompass function, computing rotation matrix fR.  <a href="#a3aea6b9a9647d15db0dad4be820fbba9">More...</a><br /></td></tr>
95<tr class="separator:a3aea6b9a9647d15db0dad4be820fbba9"><td class="memSeparator" colspan="2">&#160;</td></tr>
96<tr class="memitem:a765e472022e2ba9717989e6527df49a8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00896.html#a765e472022e2ba9717989e6527df49a8">f3DOFMagnetometerMatrixAndroid</a> (float fR[][3], float fBc[])</td></tr>
97<tr class="memdesc:a765e472022e2ba9717989e6527df49a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Android magnetometer 3DOF flat eCompass function, computing rotation matrix fR.  <a href="#a765e472022e2ba9717989e6527df49a8">More...</a><br /></td></tr>
98<tr class="separator:a765e472022e2ba9717989e6527df49a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
99<tr class="memitem:a79e9bfb4c86c1cd82b83058afd08df10"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00896.html#a79e9bfb4c86c1cd82b83058afd08df10">f3DOFMagnetometerMatrixWin8</a> (float fR[][3], float fBc[])</td></tr>
100<tr class="memdesc:a79e9bfb4c86c1cd82b83058afd08df10"><td class="mdescLeft">&#160;</td><td class="mdescRight">Windows 8 magnetometer 3DOF flat eCompass function, computing rotation matrix fR.  <a href="#a79e9bfb4c86c1cd82b83058afd08df10">More...</a><br /></td></tr>
101<tr class="separator:a79e9bfb4c86c1cd82b83058afd08df10"><td class="memSeparator" colspan="2">&#160;</td></tr>
102<tr class="memitem:afcde979fba0bcae15591096fe68648c9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00896.html#afcde979fba0bcae15591096fe68648c9">feCompassNED</a> (float fR[][3], float *pfDelta, float *pfsinDelta, float *pfcosDelta, float fBc[], float fGc[], float *pfmodBc, float *pfmodGc)</td></tr>
103<tr class="memdesc:afcde979fba0bcae15591096fe68648c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">NED: basic 6DOF e-Compass function, computing rotation matrix fR and magnetic inclination angle fDelta.  <a href="#afcde979fba0bcae15591096fe68648c9">More...</a><br /></td></tr>
104<tr class="separator:afcde979fba0bcae15591096fe68648c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
105<tr class="memitem:a43ad72cf13f54b0f96355bb7005b6872"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00896.html#a43ad72cf13f54b0f96355bb7005b6872">feCompassAndroid</a> (float fR[][3], float *pfDelta, float *pfsinDelta, float *pfcosDelta, float fBc[], float fGc[], float *pfmodBc, float *pfmodGc)</td></tr>
106<tr class="memdesc:a43ad72cf13f54b0f96355bb7005b6872"><td class="mdescLeft">&#160;</td><td class="mdescRight">Android: basic 6DOF e-Compass function, computing rotation matrix fR and magnetic inclination angle fDelta.  <a href="#a43ad72cf13f54b0f96355bb7005b6872">More...</a><br /></td></tr>
107<tr class="separator:a43ad72cf13f54b0f96355bb7005b6872"><td class="memSeparator" colspan="2">&#160;</td></tr>
108<tr class="memitem:aabc044b27a0cdd7db677c3203b77de90"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00896.html#aabc044b27a0cdd7db677c3203b77de90">feCompassWin8</a> (float fR[][3], float *pfDelta, float *pfsinDelta, float *pfcosDelta, float fBc[], float fGc[], float *pfmodBc, float *pfmodGc)</td></tr>
109<tr class="memdesc:aabc044b27a0cdd7db677c3203b77de90"><td class="mdescLeft">&#160;</td><td class="mdescRight">Win8: basic 6DOF e-Compass function, computing rotation matrix fR and magnetic inclination angle fDelta.  <a href="#aabc044b27a0cdd7db677c3203b77de90">More...</a><br /></td></tr>
110<tr class="separator:aabc044b27a0cdd7db677c3203b77de90"><td class="memSeparator" colspan="2">&#160;</td></tr>
111<tr class="memitem:aa781ea4b9430531df4697d3cb39f7454"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00896.html#aa781ea4b9430531df4697d3cb39f7454">fNEDAnglesDegFromRotationMatrix</a> (float <a class="el" href="a00920.html#a5c71a5e59a53413cd6c270266d63b031">R</a>[][3], float *pfPhiDeg, float *pfTheDeg, float *pfPsiDeg, float *pfRhoDeg, float *pfChiDeg)</td></tr>
112<tr class="memdesc:aa781ea4b9430531df4697d3cb39f7454"><td class="mdescLeft">&#160;</td><td class="mdescRight">extract the NED angles in degrees from the NED rotation matrix  <a href="#aa781ea4b9430531df4697d3cb39f7454">More...</a><br /></td></tr>
113<tr class="separator:aa781ea4b9430531df4697d3cb39f7454"><td class="memSeparator" colspan="2">&#160;</td></tr>
114<tr class="memitem:a77eeda9a699b1456bb8b02665ad80522"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00896.html#a77eeda9a699b1456bb8b02665ad80522">fAndroidAnglesDegFromRotationMatrix</a> (float <a class="el" href="a00920.html#a5c71a5e59a53413cd6c270266d63b031">R</a>[][3], float *pfPhiDeg, float *pfTheDeg, float *pfPsiDeg, float *pfRhoDeg, float *pfChiDeg)</td></tr>
115<tr class="memdesc:a77eeda9a699b1456bb8b02665ad80522"><td class="mdescLeft">&#160;</td><td class="mdescRight">extract the Android angles in degrees from the Android rotation matrix  <a href="#a77eeda9a699b1456bb8b02665ad80522">More...</a><br /></td></tr>
116<tr class="separator:a77eeda9a699b1456bb8b02665ad80522"><td class="memSeparator" colspan="2">&#160;</td></tr>
117<tr class="memitem:a13cd93780206a620abc7bdf7907e6dc6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00896.html#a13cd93780206a620abc7bdf7907e6dc6">fWin8AnglesDegFromRotationMatrix</a> (float <a class="el" href="a00920.html#a5c71a5e59a53413cd6c270266d63b031">R</a>[][3], float *pfPhiDeg, float *pfTheDeg, float *pfPsiDeg, float *pfRhoDeg, float *pfChiDeg)</td></tr>
118<tr class="memdesc:a13cd93780206a620abc7bdf7907e6dc6"><td class="mdescLeft">&#160;</td><td class="mdescRight">extract the Windows 8 angles in degrees from the Windows 8 rotation matrix  <a href="#a13cd93780206a620abc7bdf7907e6dc6">More...</a><br /></td></tr>
119<tr class="separator:a13cd93780206a620abc7bdf7907e6dc6"><td class="memSeparator" colspan="2">&#160;</td></tr>
120<tr class="memitem:a9f946d534fae22e9e68b9f0e2e2822ef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00896.html#a9f946d534fae22e9e68b9f0e2e2822ef">fQuaternionFromRotationVectorDeg</a> (<a class="el" href="a03979.html">Quaternion</a> *pq, const float rvecdeg[], float fscaling)</td></tr>
121<tr class="memdesc:a9f946d534fae22e9e68b9f0e2e2822ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">computes normalized rotation quaternion from a rotation vector (deg)  <a href="#a9f946d534fae22e9e68b9f0e2e2822ef">More...</a><br /></td></tr>
122<tr class="separator:a9f946d534fae22e9e68b9f0e2e2822ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
123<tr class="memitem:a04da5468213c1687c5b3485f15af288e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00896.html#a04da5468213c1687c5b3485f15af288e">fQuaternionFromRotationMatrix</a> (float <a class="el" href="a00920.html#a5c71a5e59a53413cd6c270266d63b031">R</a>[][3], <a class="el" href="a03979.html">Quaternion</a> *pq)</td></tr>
124<tr class="memdesc:a04da5468213c1687c5b3485f15af288e"><td class="mdescLeft">&#160;</td><td class="mdescRight">compute the orientation quaternion from a 3x3 rotation matrix  <a href="#a04da5468213c1687c5b3485f15af288e">More...</a><br /></td></tr>
125<tr class="separator:a04da5468213c1687c5b3485f15af288e"><td class="memSeparator" colspan="2">&#160;</td></tr>
126<tr class="memitem:ab93a6fd700fd1557e9b8f6796bfe3035"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00896.html#ab93a6fd700fd1557e9b8f6796bfe3035">fRotationMatrixFromQuaternion</a> (float <a class="el" href="a00920.html#a5c71a5e59a53413cd6c270266d63b031">R</a>[][3], const <a class="el" href="a03979.html">Quaternion</a> *pq)</td></tr>
127<tr class="memdesc:ab93a6fd700fd1557e9b8f6796bfe3035"><td class="mdescLeft">&#160;</td><td class="mdescRight">compute the rotation matrix from an orientation quaternion  <a href="#ab93a6fd700fd1557e9b8f6796bfe3035">More...</a><br /></td></tr>
128<tr class="separator:ab93a6fd700fd1557e9b8f6796bfe3035"><td class="memSeparator" colspan="2">&#160;</td></tr>
129<tr class="memitem:aa48ae334cf6bbedf2b9e7423d17cb4ac"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00896.html#aa48ae334cf6bbedf2b9e7423d17cb4ac">fRotationVectorDegFromQuaternion</a> (<a class="el" href="a03979.html">Quaternion</a> *pq, float rvecdeg[])</td></tr>
130<tr class="memdesc:aa48ae334cf6bbedf2b9e7423d17cb4ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">computes rotation vector (deg) from rotation quaternion  <a href="#aa48ae334cf6bbedf2b9e7423d17cb4ac">More...</a><br /></td></tr>
131<tr class="separator:aa48ae334cf6bbedf2b9e7423d17cb4ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
132<tr class="memitem:ad60a32e44f24a4b8fa5bddfb23721bc8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00896.html#ad60a32e44f24a4b8fa5bddfb23721bc8">fLPFOrientationQuaternion</a> (<a class="el" href="a03979.html">Quaternion</a> *pq, <a class="el" href="a03979.html">Quaternion</a> *pLPq, float flpf, float fdeltat, float fOmega[])</td></tr>
133<tr class="memdesc:ad60a32e44f24a4b8fa5bddfb23721bc8"><td class="mdescLeft">&#160;</td><td class="mdescRight">function low pass filters an orientation quaternion and computes virtual gyro rotation rate  <a href="#ad60a32e44f24a4b8fa5bddfb23721bc8">More...</a><br /></td></tr>
134<tr class="separator:ad60a32e44f24a4b8fa5bddfb23721bc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
135<tr class="memitem:a12448c36b93d8f3375ce000ef4527b4a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00896.html#a12448c36b93d8f3375ce000ef4527b4a">qAeqBxC</a> (<a class="el" href="a03979.html">Quaternion</a> *pqA, const <a class="el" href="a03979.html">Quaternion</a> *pqB, const <a class="el" href="a03979.html">Quaternion</a> *pqC)</td></tr>
136<tr class="memdesc:a12448c36b93d8f3375ce000ef4527b4a"><td class="mdescLeft">&#160;</td><td class="mdescRight">function compute the quaternion product qB * qC  <a href="#a12448c36b93d8f3375ce000ef4527b4a">More...</a><br /></td></tr>
137<tr class="separator:a12448c36b93d8f3375ce000ef4527b4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
138<tr class="memitem:a22a32becfcb162db012f41ff4f3bc942"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00896.html#a22a32becfcb162db012f41ff4f3bc942">qAeqAxB</a> (<a class="el" href="a03979.html">Quaternion</a> *pqA, const <a class="el" href="a03979.html">Quaternion</a> *pqB)</td></tr>
139<tr class="memdesc:a22a32becfcb162db012f41ff4f3bc942"><td class="mdescLeft">&#160;</td><td class="mdescRight">function compute the quaternion product qA = qA * qB  <a href="#a22a32becfcb162db012f41ff4f3bc942">More...</a><br /></td></tr>
140<tr class="separator:a22a32becfcb162db012f41ff4f3bc942"><td class="memSeparator" colspan="2">&#160;</td></tr>
141<tr class="memitem:adb2ea2734ac13ca77b3218d761fe45e0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a03979.html">Quaternion</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00896.html#adb2ea2734ac13ca77b3218d761fe45e0">qconjgAxB</a> (const <a class="el" href="a03979.html">Quaternion</a> *pqA, const <a class="el" href="a03979.html">Quaternion</a> *pqB)</td></tr>
142<tr class="memdesc:adb2ea2734ac13ca77b3218d761fe45e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">function compute the quaternion product conjg(qA) * qB  <a href="#adb2ea2734ac13ca77b3218d761fe45e0">More...</a><br /></td></tr>
143<tr class="separator:adb2ea2734ac13ca77b3218d761fe45e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
144<tr class="memitem:a3bcc5aef9bd7abd545d33660aa3ccbd0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00896.html#a3bcc5aef9bd7abd545d33660aa3ccbd0">fqAeqNormqA</a> (<a class="el" href="a03979.html">Quaternion</a> *pqA)</td></tr>
145<tr class="memdesc:a3bcc5aef9bd7abd545d33660aa3ccbd0"><td class="mdescLeft">&#160;</td><td class="mdescRight">function normalizes a rotation quaternion and ensures q0 is non-negative  <a href="#a3bcc5aef9bd7abd545d33660aa3ccbd0">More...</a><br /></td></tr>
146<tr class="separator:a3bcc5aef9bd7abd545d33660aa3ccbd0"><td class="memSeparator" colspan="2">&#160;</td></tr>
147<tr class="memitem:a624e56625ef65d6af54643c866a6c64c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00896.html#a624e56625ef65d6af54643c866a6c64c">fqAeq1</a> (<a class="el" href="a03979.html">Quaternion</a> *pqA)</td></tr>
148<tr class="memdesc:a624e56625ef65d6af54643c866a6c64c"><td class="mdescLeft">&#160;</td><td class="mdescRight">set a quaternion to the unit quaternion  <a href="#a624e56625ef65d6af54643c866a6c64c">More...</a><br /></td></tr>
149<tr class="separator:a624e56625ef65d6af54643c866a6c64c"><td class="memSeparator" colspan="2">&#160;</td></tr>
150<tr class="memitem:a4ced4d83316052e2c97ce2746abdc1e0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00896.html#a4ced4d83316052e2c97ce2746abdc1e0">fveqconjgquq</a> (<a class="el" href="a03979.html">Quaternion</a> *pfq, float fu[], float fv[])</td></tr>
151<tr class="separator:a4ced4d83316052e2c97ce2746abdc1e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
152</table>
153<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
154<div class="textblock"><p>Functions to convert between various orientation representations. </p>
155<p>Functions to convert between various orientation representations. Also includes functions for manipulating quaternions. </p>
156
157<p class="definition">Definition in file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
158</div><h2 class="groupheader">Macro Definition Documentation</h2>
159<a id="ac8e335a45faed642aab8a104b24b68c6"></a>
160<h2 class="memtitle"><span class="permalink"><a href="#ac8e335a45faed642aab8a104b24b68c6">&#9670;&nbsp;</a></span>CORRUPTQUAT</h2>
161
162<div class="memitem">
163<div class="memproto">
164      <table class="memname">
165        <tr>
166          <td class="memname">#define CORRUPTQUAT&#160;&#160;&#160;0.001F</td>
167        </tr>
168      </table>
169</div><div class="memdoc">
170
171<p class="definition">Definition at line <a class="el" href="a00896_source.html#l00036">36</a> of file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
172
173<p class="reference">Referenced by <a class="el" href="a00896_source.html#l00983">fqAeqNormqA()</a>.</p>
174
175</div>
176</div>
177<a id="a75fd3bc70409015ca43f604bb0ba3c4c"></a>
178<h2 class="memtitle"><span class="permalink"><a href="#a75fd3bc70409015ca43f604bb0ba3c4c">&#9670;&nbsp;</a></span>SMALLMODULUS</h2>
179
180<div class="memitem">
181<div class="memproto">
182      <table class="memname">
183        <tr>
184          <td class="memname">#define SMALLMODULUS&#160;&#160;&#160;0.01F</td>
185        </tr>
186      </table>
187</div><div class="memdoc">
188
189<p class="definition">Definition at line <a class="el" href="a00896_source.html#l00037">37</a> of file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
190
191</div>
192</div>
193<a id="a66564e58123257e31716bc9cfdc0754b"></a>
194<h2 class="memtitle"><span class="permalink"><a href="#a66564e58123257e31716bc9cfdc0754b">&#9670;&nbsp;</a></span>SMALLQ0</h2>
195
196<div class="memitem">
197<div class="memproto">
198      <table class="memname">
199        <tr>
200          <td class="memname">#define SMALLQ0&#160;&#160;&#160;1E-4F</td>
201        </tr>
202      </table>
203</div><div class="memdoc">
204
205<p class="definition">Definition at line <a class="el" href="a00896_source.html#l00035">35</a> of file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
206
207<p class="reference">Referenced by <a class="el" href="a00896_source.html#l00765">fQuaternionFromRotationMatrix()</a>.</p>
208
209</div>
210</div>
211<h2 class="groupheader">Function Documentation</h2>
212<a id="a765e472022e2ba9717989e6527df49a8"></a>
213<h2 class="memtitle"><span class="permalink"><a href="#a765e472022e2ba9717989e6527df49a8">&#9670;&nbsp;</a></span>f3DOFMagnetometerMatrixAndroid()</h2>
214
215<div class="memitem">
216<div class="memproto">
217      <table class="memname">
218        <tr>
219          <td class="memname">void f3DOFMagnetometerMatrixAndroid </td>
220          <td>(</td>
221          <td class="paramtype">float&#160;</td>
222          <td class="paramname"><em>fR</em>[][3], </td>
223        </tr>
224        <tr>
225          <td class="paramkey"></td>
226          <td></td>
227          <td class="paramtype">float&#160;</td>
228          <td class="paramname"><em>fBc</em>[]&#160;</td>
229        </tr>
230        <tr>
231          <td></td>
232          <td>)</td>
233          <td></td><td></td>
234        </tr>
235      </table>
236</div><div class="memdoc">
237
238<p>Android magnetometer 3DOF flat eCompass function, computing rotation matrix fR. </p>
239<dl class="params"><dt>Parameters</dt><dd>
240  <table class="params">
241    <tr><td class="paramname">fR</td><td>computed rotation matrix (output) </td></tr>
242    <tr><td class="paramname">fBc</td><td>calibrated magnetometer reading (input) </td></tr>
243  </table>
244  </dd>
245</dl>
246
247<p class="definition">Definition at line <a class="el" href="a00896_source.html#l00229">229</a> of file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
248
249<p class="reference">References <a class="el" href="a00914_source.html#l00060">CHX</a>, <a class="el" href="a00914_source.html#l00061">CHY</a>, <a class="el" href="a00914_source.html#l00062">CHZ</a>, and <a class="el" href="a00887_source.html#l00027">f3x3matrixAeqI()</a>.</p>
250
251<p class="reference">Referenced by <a class="el" href="a00896_source.html#l00259">f3DOFMagnetometerMatrixWin8()</a>, <a class="el" href="a00845_source.html#l00207">fInit_3DOF_B_BASIC()</a>, and <a class="el" href="a00845_source.html#l00489">fRun_3DOF_B_BASIC()</a>.</p>
252<div class="dynheader">
253Here is the call graph for this function:</div>
254<div class="dyncontent">
255<div class="center"><img src="a00896_a765e472022e2ba9717989e6527df49a8_cgraph.png" border="0" usemap="#a00896_a765e472022e2ba9717989e6527df49a8_cgraph" alt=""/></div>
256<map name="a00896_a765e472022e2ba9717989e6527df49a8_cgraph" id="a00896_a765e472022e2ba9717989e6527df49a8_cgraph">
257<area shape="rect" id="node2" href="a00887.html#a54f510d9d257d6063412a9ed5adddd6f" title="function sets the 3x3 matrix A to the identity matrix " alt="" coords="276,5,384,32"/>
258</map>
259</div>
260<div class="dynheader">
261Here is the caller graph for this function:</div>
262<div class="dyncontent">
263<div class="center"><img src="a00896_a765e472022e2ba9717989e6527df49a8_icgraph.png" border="0" usemap="#a00896_a765e472022e2ba9717989e6527df49a8_icgraph" alt=""/></div>
264<map name="a00896_a765e472022e2ba9717989e6527df49a8_icgraph" id="a00896_a765e472022e2ba9717989e6527df49a8_icgraph">
265<area shape="rect" id="node2" href="a00899.html#a79e9bfb4c86c1cd82b83058afd08df10" title="Windows 8 magnetometer 3DOF flat eCompass function, computing rotation matrix fR. ..." alt="" coords="276,56,484,83"/>
266<area shape="rect" id="node3" href="a00848.html#adc49d74394c2a94a33ff65edea18233b" title="fInit_3DOF_B_BASIC" alt="" coords="532,5,677,32"/>
267<area shape="rect" id="node4" href="a00848.html#a2df5be5795338038774a64b41cf53a8e" title="fRun_3DOF_B_BASIC" alt="" coords="725,56,876,83"/>
268</map>
269</div>
270
271</div>
272</div>
273<a id="a3aea6b9a9647d15db0dad4be820fbba9"></a>
274<h2 class="memtitle"><span class="permalink"><a href="#a3aea6b9a9647d15db0dad4be820fbba9">&#9670;&nbsp;</a></span>f3DOFMagnetometerMatrixNED()</h2>
275
276<div class="memitem">
277<div class="memproto">
278      <table class="memname">
279        <tr>
280          <td class="memname">void f3DOFMagnetometerMatrixNED </td>
281          <td>(</td>
282          <td class="paramtype">float&#160;</td>
283          <td class="paramname"><em>fR</em>[][3], </td>
284        </tr>
285        <tr>
286          <td class="paramkey"></td>
287          <td></td>
288          <td class="paramtype">float&#160;</td>
289          <td class="paramname"><em>fBc</em>[]&#160;</td>
290        </tr>
291        <tr>
292          <td></td>
293          <td>)</td>
294          <td></td><td></td>
295        </tr>
296      </table>
297</div><div class="memdoc">
298
299<p>Aerospace NED magnetometer 3DOF flat eCompass function, computing rotation matrix fR. </p>
300<dl class="params"><dt>Parameters</dt><dd>
301  <table class="params">
302    <tr><td class="paramname">fR</td><td>computed rotation matrix (output) </td></tr>
303    <tr><td class="paramname">fBc</td><td>calibrated magnetometer reading (input) </td></tr>
304  </table>
305  </dd>
306</dl>
307
308<p class="definition">Definition at line <a class="el" href="a00896_source.html#l00199">199</a> of file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
309
310<p class="reference">References <a class="el" href="a00914_source.html#l00060">CHX</a>, <a class="el" href="a00914_source.html#l00061">CHY</a>, <a class="el" href="a00914_source.html#l00062">CHZ</a>, and <a class="el" href="a00887_source.html#l00027">f3x3matrixAeqI()</a>.</p>
311
312<p class="reference">Referenced by <a class="el" href="a00845_source.html#l00207">fInit_3DOF_B_BASIC()</a>, and <a class="el" href="a00845_source.html#l00489">fRun_3DOF_B_BASIC()</a>.</p>
313<div class="dynheader">
314Here is the call graph for this function:</div>
315<div class="dyncontent">
316<div class="center"><img src="a00896_a3aea6b9a9647d15db0dad4be820fbba9_cgraph.png" border="0" usemap="#a00896_a3aea6b9a9647d15db0dad4be820fbba9_cgraph" alt=""/></div>
317<map name="a00896_a3aea6b9a9647d15db0dad4be820fbba9_cgraph" id="a00896_a3aea6b9a9647d15db0dad4be820fbba9_cgraph">
318<area shape="rect" id="node2" href="a00887.html#a54f510d9d257d6063412a9ed5adddd6f" title="function sets the 3x3 matrix A to the identity matrix " alt="" coords="259,5,367,32"/>
319</map>
320</div>
321<div class="dynheader">
322Here is the caller graph for this function:</div>
323<div class="dyncontent">
324<div class="center"><img src="a00896_a3aea6b9a9647d15db0dad4be820fbba9_icgraph.png" border="0" usemap="#a00896_a3aea6b9a9647d15db0dad4be820fbba9_icgraph" alt=""/></div>
325<map name="a00896_a3aea6b9a9647d15db0dad4be820fbba9_icgraph" id="a00896_a3aea6b9a9647d15db0dad4be820fbba9_icgraph">
326<area shape="rect" id="node2" href="a00848.html#adc49d74394c2a94a33ff65edea18233b" title="fInit_3DOF_B_BASIC" alt="" coords="259,5,404,32"/>
327<area shape="rect" id="node3" href="a00848.html#a2df5be5795338038774a64b41cf53a8e" title="fRun_3DOF_B_BASIC" alt="" coords="452,31,603,57"/>
328</map>
329</div>
330
331</div>
332</div>
333<a id="a79e9bfb4c86c1cd82b83058afd08df10"></a>
334<h2 class="memtitle"><span class="permalink"><a href="#a79e9bfb4c86c1cd82b83058afd08df10">&#9670;&nbsp;</a></span>f3DOFMagnetometerMatrixWin8()</h2>
335
336<div class="memitem">
337<div class="memproto">
338      <table class="memname">
339        <tr>
340          <td class="memname">void f3DOFMagnetometerMatrixWin8 </td>
341          <td>(</td>
342          <td class="paramtype">float&#160;</td>
343          <td class="paramname"><em>fR</em>[][3], </td>
344        </tr>
345        <tr>
346          <td class="paramkey"></td>
347          <td></td>
348          <td class="paramtype">float&#160;</td>
349          <td class="paramname"><em>fBc</em>[]&#160;</td>
350        </tr>
351        <tr>
352          <td></td>
353          <td>)</td>
354          <td></td><td></td>
355        </tr>
356      </table>
357</div><div class="memdoc">
358
359<p>Windows 8 magnetometer 3DOF flat eCompass function, computing rotation matrix fR. </p>
360<dl class="params"><dt>Parameters</dt><dd>
361  <table class="params">
362    <tr><td class="paramname">fR</td><td>computed rotation matrix (output) </td></tr>
363    <tr><td class="paramname">fBc</td><td>calibrated magnetometer reading (input) </td></tr>
364  </table>
365  </dd>
366</dl>
367
368<p class="definition">Definition at line <a class="el" href="a00896_source.html#l00259">259</a> of file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
369
370<p class="reference">References <a class="el" href="a00896_source.html#l00229">f3DOFMagnetometerMatrixAndroid()</a>.</p>
371
372<p class="reference">Referenced by <a class="el" href="a00845_source.html#l00207">fInit_3DOF_B_BASIC()</a>, and <a class="el" href="a00845_source.html#l00489">fRun_3DOF_B_BASIC()</a>.</p>
373<div class="dynheader">
374Here is the call graph for this function:</div>
375<div class="dyncontent">
376<div class="center"><img src="a00896_a79e9bfb4c86c1cd82b83058afd08df10_cgraph.png" border="0" usemap="#a00896_a79e9bfb4c86c1cd82b83058afd08df10_cgraph" alt=""/></div>
377<map name="a00896_a79e9bfb4c86c1cd82b83058afd08df10_cgraph" id="a00896_a79e9bfb4c86c1cd82b83058afd08df10_cgraph">
378<area shape="rect" id="node2" href="a00896.html#a765e472022e2ba9717989e6527df49a8" title="Android magnetometer 3DOF flat eCompass function, computing rotation matrix fR. " alt="" coords="261,5,484,32"/>
379</map>
380</div>
381<div class="dynheader">
382Here is the caller graph for this function:</div>
383<div class="dyncontent">
384<div class="center"><img src="a00896_a79e9bfb4c86c1cd82b83058afd08df10_icgraph.png" border="0" usemap="#a00896_a79e9bfb4c86c1cd82b83058afd08df10_icgraph" alt=""/></div>
385<map name="a00896_a79e9bfb4c86c1cd82b83058afd08df10_icgraph" id="a00896_a79e9bfb4c86c1cd82b83058afd08df10_icgraph">
386<area shape="rect" id="node2" href="a00848.html#adc49d74394c2a94a33ff65edea18233b" title="fInit_3DOF_B_BASIC" alt="" coords="261,5,407,32"/>
387<area shape="rect" id="node3" href="a00848.html#a2df5be5795338038774a64b41cf53a8e" title="fRun_3DOF_B_BASIC" alt="" coords="455,31,605,57"/>
388</map>
389</div>
390
391</div>
392</div>
393<a id="a77eeda9a699b1456bb8b02665ad80522"></a>
394<h2 class="memtitle"><span class="permalink"><a href="#a77eeda9a699b1456bb8b02665ad80522">&#9670;&nbsp;</a></span>fAndroidAnglesDegFromRotationMatrix()</h2>
395
396<div class="memitem">
397<div class="memproto">
398      <table class="memname">
399        <tr>
400          <td class="memname">void fAndroidAnglesDegFromRotationMatrix </td>
401          <td>(</td>
402          <td class="paramtype">float&#160;</td>
403          <td class="paramname"><em>R</em>[][3], </td>
404        </tr>
405        <tr>
406          <td class="paramkey"></td>
407          <td></td>
408          <td class="paramtype">float *&#160;</td>
409          <td class="paramname"><em>pfPhiDeg</em>, </td>
410        </tr>
411        <tr>
412          <td class="paramkey"></td>
413          <td></td>
414          <td class="paramtype">float *&#160;</td>
415          <td class="paramname"><em>pfTheDeg</em>, </td>
416        </tr>
417        <tr>
418          <td class="paramkey"></td>
419          <td></td>
420          <td class="paramtype">float *&#160;</td>
421          <td class="paramname"><em>pfPsiDeg</em>, </td>
422        </tr>
423        <tr>
424          <td class="paramkey"></td>
425          <td></td>
426          <td class="paramtype">float *&#160;</td>
427          <td class="paramname"><em>pfRhoDeg</em>, </td>
428        </tr>
429        <tr>
430          <td class="paramkey"></td>
431          <td></td>
432          <td class="paramtype">float *&#160;</td>
433          <td class="paramname"><em>pfChiDeg</em>&#160;</td>
434        </tr>
435        <tr>
436          <td></td>
437          <td>)</td>
438          <td></td><td></td>
439        </tr>
440      </table>
441</div><div class="memdoc">
442
443<p>extract the Android angles in degrees from the Android rotation matrix </p>
444<dl class="params"><dt>Parameters</dt><dd>
445  <table class="params">
446    <tr><td class="paramname">R</td><td>rotation matrix input </td></tr>
447    <tr><td class="paramname">pfPhiDeg</td><td>the roll angle -90.0 &lt;= Phi &lt;= 90.0 deg </td></tr>
448    <tr><td class="paramname">pfTheDeg</td><td>the pitch angle -180.0 &lt;= The &lt; 180.0 deg </td></tr>
449    <tr><td class="paramname">pfPsiDeg</td><td>yaw angle Psi with range 0.0 &lt;= Psi &lt; 360.0 deg </td></tr>
450    <tr><td class="paramname">pfRhoDeg</td><td>the compass heading angle Rho equals the yaw angle Psi </td></tr>
451    <tr><td class="paramname">pfChiDeg</td><td>the tilt angle from vertical Chi (0 &lt;= Chi &lt;= 180 deg) </td></tr>
452  </table>
453  </dd>
454</dl>
455
456<p class="definition">Definition at line <a class="el" href="a00896_source.html#l00548">548</a> of file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
457
458<p class="reference">References <a class="el" href="a00914_source.html#l00060">CHX</a>, <a class="el" href="a00914_source.html#l00061">CHY</a>, <a class="el" href="a00914_source.html#l00062">CHZ</a>, <a class="el" href="a00761_source.html#l00043">facos_deg()</a>, <a class="el" href="a00761_source.html#l00028">fasin_deg()</a>, and <a class="el" href="a00761_source.html#l00109">fatan2_deg()</a>.</p>
459
460<p class="reference">Referenced by <a class="el" href="a00845_source.html#l00489">fRun_3DOF_B_BASIC()</a>, <a class="el" href="a00845_source.html#l00439">fRun_3DOF_G_BASIC()</a>, <a class="el" href="a00845_source.html#l00534">fRun_3DOF_Y_BASIC()</a>, <a class="el" href="a00845_source.html#l00582">fRun_6DOF_GB_BASIC()</a>, and <a class="el" href="a00845_source.html#l00635">fRun_6DOF_GY_KALMAN()</a>.</p>
461<div class="dynheader">
462Here is the call graph for this function:</div>
463<div class="dyncontent">
464<div class="center"><img src="a00896_a77eeda9a699b1456bb8b02665ad80522_cgraph.png" border="0" usemap="#a00896_a77eeda9a699b1456bb8b02665ad80522_cgraph" alt=""/></div>
465<map name="a00896_a77eeda9a699b1456bb8b02665ad80522_cgraph" id="a00896_a77eeda9a699b1456bb8b02665ad80522_cgraph">
466<area shape="rect" id="node2" href="a00761.html#a084fe0ff189767dca40fbe330d7394f0" title="facos_deg" alt="" coords="266,5,347,32"/>
467<area shape="rect" id="node3" href="a00761.html#a956336cb9e7270c6cfbf667b1075c063" title="fasin_deg" alt="" coords="268,56,345,83"/>
468<area shape="rect" id="node4" href="a00761.html#aebfdfbd2df0fe4472f9861b0738bb410" title="fatan2_deg" alt="" coords="264,107,349,133"/>
469</map>
470</div>
471<div class="dynheader">
472Here is the caller graph for this function:</div>
473<div class="dyncontent">
474<div class="center"><img src="a00896_a77eeda9a699b1456bb8b02665ad80522_icgraph.png" border="0" usemap="#a00896_a77eeda9a699b1456bb8b02665ad80522_icgraph" alt=""/></div>
475<map name="a00896_a77eeda9a699b1456bb8b02665ad80522_icgraph" id="a00896_a77eeda9a699b1456bb8b02665ad80522_icgraph">
476<area shape="rect" id="node2" href="a00848.html#a2df5be5795338038774a64b41cf53a8e" title="fRun_3DOF_B_BASIC" alt="" coords="277,5,427,32"/>
477<area shape="rect" id="node3" href="a00848.html#a7b5db1923cfa0dc160016e7d9b45b1c2" title="fRun_3DOF_G_BASIC" alt="" coords="276,56,428,83"/>
478<area shape="rect" id="node4" href="a00848.html#a288f51cd39aeb8ace643d844e219e9d3" title="fRun_3DOF_Y_BASIC" alt="" coords="277,107,427,133"/>
479<area shape="rect" id="node5" href="a00848.html#a34c550860d0e4e42bf22a2a3527043b9" title="fRun_6DOF_GB_BASIC" alt="" coords="271,157,433,184"/>
480<area shape="rect" id="node6" href="a00848.html#a942d619f897d6820d5c148bdc910f962" title="fRun_6DOF_GY_KALMAN" alt="" coords="264,208,440,235"/>
481</map>
482</div>
483
484</div>
485</div>
486<a id="a43ad72cf13f54b0f96355bb7005b6872"></a>
487<h2 class="memtitle"><span class="permalink"><a href="#a43ad72cf13f54b0f96355bb7005b6872">&#9670;&nbsp;</a></span>feCompassAndroid()</h2>
488
489<div class="memitem">
490<div class="memproto">
491      <table class="memname">
492        <tr>
493          <td class="memname">void feCompassAndroid </td>
494          <td>(</td>
495          <td class="paramtype">float&#160;</td>
496          <td class="paramname"><em>fR</em>[][3], </td>
497        </tr>
498        <tr>
499          <td class="paramkey"></td>
500          <td></td>
501          <td class="paramtype">float *&#160;</td>
502          <td class="paramname"><em>pfDelta</em>, </td>
503        </tr>
504        <tr>
505          <td class="paramkey"></td>
506          <td></td>
507          <td class="paramtype">float *&#160;</td>
508          <td class="paramname"><em>pfsinDelta</em>, </td>
509        </tr>
510        <tr>
511          <td class="paramkey"></td>
512          <td></td>
513          <td class="paramtype">float *&#160;</td>
514          <td class="paramname"><em>pfcosDelta</em>, </td>
515        </tr>
516        <tr>
517          <td class="paramkey"></td>
518          <td></td>
519          <td class="paramtype">float&#160;</td>
520          <td class="paramname"><em>fBc</em>[], </td>
521        </tr>
522        <tr>
523          <td class="paramkey"></td>
524          <td></td>
525          <td class="paramtype">float&#160;</td>
526          <td class="paramname"><em>fGc</em>[], </td>
527        </tr>
528        <tr>
529          <td class="paramkey"></td>
530          <td></td>
531          <td class="paramtype">float *&#160;</td>
532          <td class="paramname"><em>pfmodBc</em>, </td>
533        </tr>
534        <tr>
535          <td class="paramkey"></td>
536          <td></td>
537          <td class="paramtype">float *&#160;</td>
538          <td class="paramname"><em>pfmodGc</em>&#160;</td>
539        </tr>
540        <tr>
541          <td></td>
542          <td>)</td>
543          <td></td><td></td>
544        </tr>
545      </table>
546</div><div class="memdoc">
547
548<p>Android: basic 6DOF e-Compass function, computing rotation matrix fR and magnetic inclination angle fDelta. </p>
549<dl class="params"><dt>Parameters</dt><dd>
550  <table class="params">
551    <tr><td class="paramname">fR</td><td>computed rotation matrix (output) </td></tr>
552    <tr><td class="paramname">pfDelta</td><td>magnetic inclination angle (output) </td></tr>
553    <tr><td class="paramname">pfsinDelta</td><td>sin of the inclination angle </td></tr>
554    <tr><td class="paramname">pfcosDelta</td><td>cos of the inclination angle </td></tr>
555    <tr><td class="paramname">fBc</td><td>calibrated magnetometer reading (input) </td></tr>
556    <tr><td class="paramname">fGc</td><td>calibrated accelerometer input vector (input) </td></tr>
557    <tr><td class="paramname">pfmodBc</td><td>modulus of the calibrated magnetic vector </td></tr>
558    <tr><td class="paramname">pfmodGc</td><td>modulus of the calibrated accelerometer vector </td></tr>
559  </table>
560  </dd>
561</dl>
562
563<p class="definition">Definition at line <a class="el" href="a00896_source.html#l00343">343</a> of file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
564
565<p class="reference">References <a class="el" href="a00914_source.html#l00060">CHX</a>, <a class="el" href="a00914_source.html#l00061">CHY</a>, <a class="el" href="a00914_source.html#l00062">CHZ</a>, <a class="el" href="a00887_source.html#l00027">f3x3matrixAeqI()</a>, and <a class="el" href="a00761_source.html#l00028">fasin_deg()</a>.</p>
566
567<p class="reference">Referenced by <a class="el" href="a00845_source.html#l00250">fInit_6DOF_GB_BASIC()</a>, <a class="el" href="a00845_source.html#l00346">fInit_9DOF_GBY_KALMAN()</a>, <a class="el" href="a00845_source.html#l00582">fRun_6DOF_GB_BASIC()</a>, and <a class="el" href="a00845_source.html#l00635">fRun_6DOF_GY_KALMAN()</a>.</p>
568<div class="dynheader">
569Here is the call graph for this function:</div>
570<div class="dyncontent">
571<div class="center"><img src="a00896_a43ad72cf13f54b0f96355bb7005b6872_cgraph.png" border="0" usemap="#a00896_a43ad72cf13f54b0f96355bb7005b6872_cgraph" alt=""/></div>
572<map name="a00896_a43ad72cf13f54b0f96355bb7005b6872_cgraph" id="a00896_a43ad72cf13f54b0f96355bb7005b6872_cgraph">
573<area shape="rect" id="node2" href="a00887.html#a54f510d9d257d6063412a9ed5adddd6f" title="function sets the 3x3 matrix A to the identity matrix " alt="" coords="184,5,292,32"/>
574<area shape="rect" id="node3" href="a00761.html#a956336cb9e7270c6cfbf667b1075c063" title="fasin_deg" alt="" coords="199,56,277,83"/>
575</map>
576</div>
577<div class="dynheader">
578Here is the caller graph for this function:</div>
579<div class="dyncontent">
580<div class="center"><img src="a00896_a43ad72cf13f54b0f96355bb7005b6872_icgraph.png" border="0" usemap="#a00896_a43ad72cf13f54b0f96355bb7005b6872_icgraph" alt=""/></div>
581<map name="a00896_a43ad72cf13f54b0f96355bb7005b6872_icgraph" id="a00896_a43ad72cf13f54b0f96355bb7005b6872_icgraph">
582<area shape="rect" id="node2" href="a00848.html#ab5f459ab0c8c9b4123e2fb33f5061332" title="fInit_6DOF_GB_BASIC" alt="" coords="196,5,351,32"/>
583<area shape="rect" id="node3" href="a00848.html#a34c550860d0e4e42bf22a2a3527043b9" title="fRun_6DOF_GB_BASIC" alt="" coords="418,44,579,71"/>
584<area shape="rect" id="node4" href="a00848.html#a5627f82d4cbb9af1102d10ad1bea3699" title="fInit_9DOF_GBY_KALMAN" alt="" coords="184,107,363,133"/>
585<area shape="rect" id="node5" href="a00848.html#a942d619f897d6820d5c148bdc910f962" title="fRun_6DOF_GY_KALMAN" alt="" coords="411,120,587,147"/>
586</map>
587</div>
588
589</div>
590</div>
591<a id="afcde979fba0bcae15591096fe68648c9"></a>
592<h2 class="memtitle"><span class="permalink"><a href="#afcde979fba0bcae15591096fe68648c9">&#9670;&nbsp;</a></span>feCompassNED()</h2>
593
594<div class="memitem">
595<div class="memproto">
596      <table class="memname">
597        <tr>
598          <td class="memname">void feCompassNED </td>
599          <td>(</td>
600          <td class="paramtype">float&#160;</td>
601          <td class="paramname"><em>fR</em>[][3], </td>
602        </tr>
603        <tr>
604          <td class="paramkey"></td>
605          <td></td>
606          <td class="paramtype">float *&#160;</td>
607          <td class="paramname"><em>pfDelta</em>, </td>
608        </tr>
609        <tr>
610          <td class="paramkey"></td>
611          <td></td>
612          <td class="paramtype">float *&#160;</td>
613          <td class="paramname"><em>pfsinDelta</em>, </td>
614        </tr>
615        <tr>
616          <td class="paramkey"></td>
617          <td></td>
618          <td class="paramtype">float *&#160;</td>
619          <td class="paramname"><em>pfcosDelta</em>, </td>
620        </tr>
621        <tr>
622          <td class="paramkey"></td>
623          <td></td>
624          <td class="paramtype">float&#160;</td>
625          <td class="paramname"><em>fBc</em>[], </td>
626        </tr>
627        <tr>
628          <td class="paramkey"></td>
629          <td></td>
630          <td class="paramtype">float&#160;</td>
631          <td class="paramname"><em>fGc</em>[], </td>
632        </tr>
633        <tr>
634          <td class="paramkey"></td>
635          <td></td>
636          <td class="paramtype">float *&#160;</td>
637          <td class="paramname"><em>pfmodBc</em>, </td>
638        </tr>
639        <tr>
640          <td class="paramkey"></td>
641          <td></td>
642          <td class="paramtype">float *&#160;</td>
643          <td class="paramname"><em>pfmodGc</em>&#160;</td>
644        </tr>
645        <tr>
646          <td></td>
647          <td>)</td>
648          <td></td><td></td>
649        </tr>
650      </table>
651</div><div class="memdoc">
652
653<p>NED: basic 6DOF e-Compass function, computing rotation matrix fR and magnetic inclination angle fDelta. </p>
654<dl class="params"><dt>Parameters</dt><dd>
655  <table class="params">
656    <tr><td class="paramname">fR</td><td>computed rotation matrix (output) </td></tr>
657    <tr><td class="paramname">pfDelta</td><td>magnetic inclination angle (output) </td></tr>
658    <tr><td class="paramname">pfsinDelta</td><td>sin of the inclination angle </td></tr>
659    <tr><td class="paramname">pfcosDelta</td><td>cos of the inclination angle </td></tr>
660    <tr><td class="paramname">fBc</td><td>calibrated magnetometer vector (input) </td></tr>
661    <tr><td class="paramname">fGc</td><td>calibrated accelerometer input vector (input) </td></tr>
662    <tr><td class="paramname">pfmodBc</td><td>modulus of the calibrated magnetic vector </td></tr>
663    <tr><td class="paramname">pfmodGc</td><td>modulus of the calibrated accelerometer vector </td></tr>
664  </table>
665  </dd>
666</dl>
667
668<p class="definition">Definition at line <a class="el" href="a00896_source.html#l00270">270</a> of file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
669
670<p class="reference">References <a class="el" href="a00914_source.html#l00060">CHX</a>, <a class="el" href="a00914_source.html#l00061">CHY</a>, <a class="el" href="a00914_source.html#l00062">CHZ</a>, <a class="el" href="a00887_source.html#l00027">f3x3matrixAeqI()</a>, and <a class="el" href="a00761_source.html#l00028">fasin_deg()</a>.</p>
671
672<p class="reference">Referenced by <a class="el" href="a00845_source.html#l00250">fInit_6DOF_GB_BASIC()</a>, <a class="el" href="a00845_source.html#l00346">fInit_9DOF_GBY_KALMAN()</a>, <a class="el" href="a00845_source.html#l00582">fRun_6DOF_GB_BASIC()</a>, and <a class="el" href="a00845_source.html#l00635">fRun_6DOF_GY_KALMAN()</a>.</p>
673<div class="dynheader">
674Here is the call graph for this function:</div>
675<div class="dyncontent">
676<div class="center"><img src="a00896_afcde979fba0bcae15591096fe68648c9_cgraph.png" border="0" usemap="#a00896_afcde979fba0bcae15591096fe68648c9_cgraph" alt=""/></div>
677<map name="a00896_afcde979fba0bcae15591096fe68648c9_cgraph" id="a00896_afcde979fba0bcae15591096fe68648c9_cgraph">
678<area shape="rect" id="node2" href="a00887.html#a54f510d9d257d6063412a9ed5adddd6f" title="function sets the 3x3 matrix A to the identity matrix " alt="" coords="168,5,276,32"/>
679<area shape="rect" id="node3" href="a00761.html#a956336cb9e7270c6cfbf667b1075c063" title="fasin_deg" alt="" coords="183,56,261,83"/>
680</map>
681</div>
682<div class="dynheader">
683Here is the caller graph for this function:</div>
684<div class="dyncontent">
685<div class="center"><img src="a00896_afcde979fba0bcae15591096fe68648c9_icgraph.png" border="0" usemap="#a00896_afcde979fba0bcae15591096fe68648c9_icgraph" alt=""/></div>
686<map name="a00896_afcde979fba0bcae15591096fe68648c9_icgraph" id="a00896_afcde979fba0bcae15591096fe68648c9_icgraph">
687<area shape="rect" id="node2" href="a00848.html#ab5f459ab0c8c9b4123e2fb33f5061332" title="fInit_6DOF_GB_BASIC" alt="" coords="180,5,335,32"/>
688<area shape="rect" id="node3" href="a00848.html#a34c550860d0e4e42bf22a2a3527043b9" title="fRun_6DOF_GB_BASIC" alt="" coords="402,44,563,71"/>
689<area shape="rect" id="node4" href="a00848.html#a5627f82d4cbb9af1102d10ad1bea3699" title="fInit_9DOF_GBY_KALMAN" alt="" coords="168,107,347,133"/>
690<area shape="rect" id="node5" href="a00848.html#a942d619f897d6820d5c148bdc910f962" title="fRun_6DOF_GY_KALMAN" alt="" coords="395,120,571,147"/>
691</map>
692</div>
693
694</div>
695</div>
696<a id="aabc044b27a0cdd7db677c3203b77de90"></a>
697<h2 class="memtitle"><span class="permalink"><a href="#aabc044b27a0cdd7db677c3203b77de90">&#9670;&nbsp;</a></span>feCompassWin8()</h2>
698
699<div class="memitem">
700<div class="memproto">
701      <table class="memname">
702        <tr>
703          <td class="memname">void feCompassWin8 </td>
704          <td>(</td>
705          <td class="paramtype">float&#160;</td>
706          <td class="paramname"><em>fR</em>[][3], </td>
707        </tr>
708        <tr>
709          <td class="paramkey"></td>
710          <td></td>
711          <td class="paramtype">float *&#160;</td>
712          <td class="paramname"><em>pfDelta</em>, </td>
713        </tr>
714        <tr>
715          <td class="paramkey"></td>
716          <td></td>
717          <td class="paramtype">float *&#160;</td>
718          <td class="paramname"><em>pfsinDelta</em>, </td>
719        </tr>
720        <tr>
721          <td class="paramkey"></td>
722          <td></td>
723          <td class="paramtype">float *&#160;</td>
724          <td class="paramname"><em>pfcosDelta</em>, </td>
725        </tr>
726        <tr>
727          <td class="paramkey"></td>
728          <td></td>
729          <td class="paramtype">float&#160;</td>
730          <td class="paramname"><em>fBc</em>[], </td>
731        </tr>
732        <tr>
733          <td class="paramkey"></td>
734          <td></td>
735          <td class="paramtype">float&#160;</td>
736          <td class="paramname"><em>fGc</em>[], </td>
737        </tr>
738        <tr>
739          <td class="paramkey"></td>
740          <td></td>
741          <td class="paramtype">float *&#160;</td>
742          <td class="paramname"><em>pfmodBc</em>, </td>
743        </tr>
744        <tr>
745          <td class="paramkey"></td>
746          <td></td>
747          <td class="paramtype">float *&#160;</td>
748          <td class="paramname"><em>pfmodGc</em>&#160;</td>
749        </tr>
750        <tr>
751          <td></td>
752          <td>)</td>
753          <td></td><td></td>
754        </tr>
755      </table>
756</div><div class="memdoc">
757
758<p>Win8: basic 6DOF e-Compass function, computing rotation matrix fR and magnetic inclination angle fDelta. </p>
759<dl class="params"><dt>Parameters</dt><dd>
760  <table class="params">
761    <tr><td class="paramname">fR</td><td>computed rotation matrix (output) </td></tr>
762    <tr><td class="paramname">pfDelta</td><td>magnetic inclination angle (output) </td></tr>
763    <tr><td class="paramname">pfsinDelta</td><td>sin of the inclination angle </td></tr>
764    <tr><td class="paramname">pfcosDelta</td><td>cos of the inclination angle </td></tr>
765    <tr><td class="paramname">fBc</td><td>calibrated magnetometer reading (input) </td></tr>
766    <tr><td class="paramname">fGc</td><td>calibrated accelerometer input vector (input) </td></tr>
767    <tr><td class="paramname">pfmodBc</td><td>modulus of the calibrated magnetic vector </td></tr>
768    <tr><td class="paramname">pfmodGc</td><td>modulus of the calibrated accelerometer vector </td></tr>
769  </table>
770  </dd>
771</dl>
772
773<p class="definition">Definition at line <a class="el" href="a00896_source.html#l00417">417</a> of file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
774
775<p class="reference">References <a class="el" href="a00914_source.html#l00060">CHX</a>, <a class="el" href="a00914_source.html#l00061">CHY</a>, <a class="el" href="a00914_source.html#l00062">CHZ</a>, <a class="el" href="a00887_source.html#l00027">f3x3matrixAeqI()</a>, and <a class="el" href="a00761_source.html#l00028">fasin_deg()</a>.</p>
776
777<p class="reference">Referenced by <a class="el" href="a00845_source.html#l00250">fInit_6DOF_GB_BASIC()</a>, <a class="el" href="a00845_source.html#l00346">fInit_9DOF_GBY_KALMAN()</a>, <a class="el" href="a00845_source.html#l00582">fRun_6DOF_GB_BASIC()</a>, and <a class="el" href="a00845_source.html#l00635">fRun_6DOF_GY_KALMAN()</a>.</p>
778<div class="dynheader">
779Here is the call graph for this function:</div>
780<div class="dyncontent">
781<div class="center"><img src="a00896_aabc044b27a0cdd7db677c3203b77de90_cgraph.png" border="0" usemap="#a00896_aabc044b27a0cdd7db677c3203b77de90_cgraph" alt=""/></div>
782<map name="a00896_aabc044b27a0cdd7db677c3203b77de90_cgraph" id="a00896_aabc044b27a0cdd7db677c3203b77de90_cgraph">
783<area shape="rect" id="node2" href="a00887.html#a54f510d9d257d6063412a9ed5adddd6f" title="function sets the 3x3 matrix A to the identity matrix " alt="" coords="171,5,279,32"/>
784<area shape="rect" id="node3" href="a00761.html#a956336cb9e7270c6cfbf667b1075c063" title="fasin_deg" alt="" coords="186,56,263,83"/>
785</map>
786</div>
787<div class="dynheader">
788Here is the caller graph for this function:</div>
789<div class="dyncontent">
790<div class="center"><img src="a00896_aabc044b27a0cdd7db677c3203b77de90_icgraph.png" border="0" usemap="#a00896_aabc044b27a0cdd7db677c3203b77de90_icgraph" alt=""/></div>
791<map name="a00896_aabc044b27a0cdd7db677c3203b77de90_icgraph" id="a00896_aabc044b27a0cdd7db677c3203b77de90_icgraph">
792<area shape="rect" id="node2" href="a00848.html#ab5f459ab0c8c9b4123e2fb33f5061332" title="fInit_6DOF_GB_BASIC" alt="" coords="183,5,337,32"/>
793<area shape="rect" id="node3" href="a00848.html#a34c550860d0e4e42bf22a2a3527043b9" title="fRun_6DOF_GB_BASIC" alt="" coords="405,44,566,71"/>
794<area shape="rect" id="node4" href="a00848.html#a5627f82d4cbb9af1102d10ad1bea3699" title="fInit_9DOF_GBY_KALMAN" alt="" coords="171,107,349,133"/>
795<area shape="rect" id="node5" href="a00848.html#a942d619f897d6820d5c148bdc910f962" title="fRun_6DOF_GY_KALMAN" alt="" coords="397,120,573,147"/>
796</map>
797</div>
798
799</div>
800</div>
801<a id="ad60a32e44f24a4b8fa5bddfb23721bc8"></a>
802<h2 class="memtitle"><span class="permalink"><a href="#ad60a32e44f24a4b8fa5bddfb23721bc8">&#9670;&nbsp;</a></span>fLPFOrientationQuaternion()</h2>
803
804<div class="memitem">
805<div class="memproto">
806      <table class="memname">
807        <tr>
808          <td class="memname">void fLPFOrientationQuaternion </td>
809          <td>(</td>
810          <td class="paramtype"><a class="el" href="a03979.html">Quaternion</a> *&#160;</td>
811          <td class="paramname"><em>pq</em>, </td>
812        </tr>
813        <tr>
814          <td class="paramkey"></td>
815          <td></td>
816          <td class="paramtype"><a class="el" href="a03979.html">Quaternion</a> *&#160;</td>
817          <td class="paramname"><em>pLPq</em>, </td>
818        </tr>
819        <tr>
820          <td class="paramkey"></td>
821          <td></td>
822          <td class="paramtype">float&#160;</td>
823          <td class="paramname"><em>flpf</em>, </td>
824        </tr>
825        <tr>
826          <td class="paramkey"></td>
827          <td></td>
828          <td class="paramtype">float&#160;</td>
829          <td class="paramname"><em>fdeltat</em>, </td>
830        </tr>
831        <tr>
832          <td class="paramkey"></td>
833          <td></td>
834          <td class="paramtype">float&#160;</td>
835          <td class="paramname"><em>fOmega</em>[]&#160;</td>
836        </tr>
837        <tr>
838          <td></td>
839          <td>)</td>
840          <td></td><td></td>
841        </tr>
842      </table>
843</div><div class="memdoc">
844
845<p>function low pass filters an orientation quaternion and computes virtual gyro rotation rate </p>
846
847<p class="definition">Definition at line <a class="el" href="a00896_source.html#l00896">896</a> of file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
848
849<p class="reference">References <a class="el" href="a00914_source.html#l00060">CHX</a>, <a class="el" href="a00914_source.html#l00061">CHY</a>, <a class="el" href="a00914_source.html#l00062">CHZ</a>, <a class="el" href="a00896_source.html#l00983">fqAeqNormqA()</a>, <a class="el" href="a00896_source.html#l00846">fRotationVectorDegFromQuaternion()</a>, <a class="el" href="a00899_source.html#l00022">Quaternion::q0</a>, <a class="el" href="a00899_source.html#l00023">Quaternion::q1</a>, <a class="el" href="a00899_source.html#l00024">Quaternion::q2</a>, <a class="el" href="a00899_source.html#l00025">Quaternion::q3</a>, <a class="el" href="a00896_source.html#l00953">qAeqAxB()</a>, and <a class="el" href="a00896_source.html#l00970">qconjgAxB()</a>.</p>
850
851<p class="reference">Referenced by <a class="el" href="a00845_source.html#l00489">fRun_3DOF_B_BASIC()</a>, <a class="el" href="a00845_source.html#l00439">fRun_3DOF_G_BASIC()</a>, and <a class="el" href="a00845_source.html#l00582">fRun_6DOF_GB_BASIC()</a>.</p>
852<div class="dynheader">
853Here is the call graph for this function:</div>
854<div class="dyncontent">
855<div class="center"><img src="a00896_ad60a32e44f24a4b8fa5bddfb23721bc8_cgraph.png" border="0" usemap="#a00896_ad60a32e44f24a4b8fa5bddfb23721bc8_cgraph" alt=""/></div>
856<map name="a00896_ad60a32e44f24a4b8fa5bddfb23721bc8_cgraph" id="a00896_ad60a32e44f24a4b8fa5bddfb23721bc8_cgraph">
857<area shape="rect" id="node2" href="a00896.html#a3bcc5aef9bd7abd545d33660aa3ccbd0" title="function normalizes a rotation quaternion and ensures q0 is non&#45;negative " alt="" coords="290,5,393,32"/>
858<area shape="rect" id="node3" href="a00896.html#aa48ae334cf6bbedf2b9e7423d17cb4ac" title="computes rotation vector (deg) from rotation quaternion " alt="" coords="228,56,455,83"/>
859<area shape="rect" id="node4" href="a00896.html#a22a32becfcb162db012f41ff4f3bc942" title="function compute the quaternion product qA = qA * qB " alt="" coords="303,107,380,133"/>
860<area shape="rect" id="node5" href="a00896.html#adb2ea2734ac13ca77b3218d761fe45e0" title="function compute the quaternion product conjg(qA) * qB " alt="" coords="299,157,384,184"/>
861</map>
862</div>
863<div class="dynheader">
864Here is the caller graph for this function:</div>
865<div class="dyncontent">
866<div class="center"><img src="a00896_ad60a32e44f24a4b8fa5bddfb23721bc8_icgraph.png" border="0" usemap="#a00896_ad60a32e44f24a4b8fa5bddfb23721bc8_icgraph" alt=""/></div>
867<map name="a00896_ad60a32e44f24a4b8fa5bddfb23721bc8_icgraph" id="a00896_ad60a32e44f24a4b8fa5bddfb23721bc8_icgraph">
868<area shape="rect" id="node2" href="a00848.html#a2df5be5795338038774a64b41cf53a8e" title="fRun_3DOF_B_BASIC" alt="" coords="233,5,384,32"/>
869<area shape="rect" id="node3" href="a00848.html#a7b5db1923cfa0dc160016e7d9b45b1c2" title="fRun_3DOF_G_BASIC" alt="" coords="233,56,385,83"/>
870<area shape="rect" id="node4" href="a00848.html#a34c550860d0e4e42bf22a2a3527043b9" title="fRun_6DOF_GB_BASIC" alt="" coords="228,107,389,133"/>
871</map>
872</div>
873
874</div>
875</div>
876<a id="aa781ea4b9430531df4697d3cb39f7454"></a>
877<h2 class="memtitle"><span class="permalink"><a href="#aa781ea4b9430531df4697d3cb39f7454">&#9670;&nbsp;</a></span>fNEDAnglesDegFromRotationMatrix()</h2>
878
879<div class="memitem">
880<div class="memproto">
881      <table class="memname">
882        <tr>
883          <td class="memname">void fNEDAnglesDegFromRotationMatrix </td>
884          <td>(</td>
885          <td class="paramtype">float&#160;</td>
886          <td class="paramname"><em>R</em>[][3], </td>
887        </tr>
888        <tr>
889          <td class="paramkey"></td>
890          <td></td>
891          <td class="paramtype">float *&#160;</td>
892          <td class="paramname"><em>pfPhiDeg</em>, </td>
893        </tr>
894        <tr>
895          <td class="paramkey"></td>
896          <td></td>
897          <td class="paramtype">float *&#160;</td>
898          <td class="paramname"><em>pfTheDeg</em>, </td>
899        </tr>
900        <tr>
901          <td class="paramkey"></td>
902          <td></td>
903          <td class="paramtype">float *&#160;</td>
904          <td class="paramname"><em>pfPsiDeg</em>, </td>
905        </tr>
906        <tr>
907          <td class="paramkey"></td>
908          <td></td>
909          <td class="paramtype">float *&#160;</td>
910          <td class="paramname"><em>pfRhoDeg</em>, </td>
911        </tr>
912        <tr>
913          <td class="paramkey"></td>
914          <td></td>
915          <td class="paramtype">float *&#160;</td>
916          <td class="paramname"><em>pfChiDeg</em>&#160;</td>
917        </tr>
918        <tr>
919          <td></td>
920          <td>)</td>
921          <td></td><td></td>
922        </tr>
923      </table>
924</div><div class="memdoc">
925
926<p>extract the NED angles in degrees from the NED rotation matrix </p>
927<dl class="params"><dt>Parameters</dt><dd>
928  <table class="params">
929    <tr><td class="paramname">R</td><td>rotation matrix input </td></tr>
930    <tr><td class="paramname">pfPhiDeg</td><td>output: the roll angle range -180.0 &lt;= Phi &lt; 180.0 deg </td></tr>
931    <tr><td class="paramname">pfTheDeg</td><td>output: the pitch angle -90.0 &lt;= Theta &lt;= 90.0 deg </td></tr>
932    <tr><td class="paramname">pfPsiDeg</td><td>output: the yaw (compass) angle 0.0 &lt;= Psi &lt; 360.0 deg </td></tr>
933    <tr><td class="paramname">pfRhoDeg</td><td>output: For NED, the compass heading Rho equals the yaw angle Psi </td></tr>
934    <tr><td class="paramname">pfChiDeg</td><td>output: the tilt angle from vertical Chi (0 &lt;= Chi &lt;= 180 deg) </td></tr>
935  </table>
936  </dd>
937</dl>
938
939<p class="definition">Definition at line <a class="el" href="a00896_source.html#l00492">492</a> of file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
940
941<p class="reference">References <a class="el" href="a00914_source.html#l00060">CHX</a>, <a class="el" href="a00914_source.html#l00061">CHY</a>, <a class="el" href="a00914_source.html#l00062">CHZ</a>, <a class="el" href="a00761_source.html#l00043">facos_deg()</a>, <a class="el" href="a00761_source.html#l00028">fasin_deg()</a>, and <a class="el" href="a00761_source.html#l00109">fatan2_deg()</a>.</p>
942
943<p class="reference">Referenced by <a class="el" href="a00845_source.html#l00489">fRun_3DOF_B_BASIC()</a>, <a class="el" href="a00845_source.html#l00439">fRun_3DOF_G_BASIC()</a>, <a class="el" href="a00845_source.html#l00534">fRun_3DOF_Y_BASIC()</a>, <a class="el" href="a00845_source.html#l00582">fRun_6DOF_GB_BASIC()</a>, and <a class="el" href="a00845_source.html#l00635">fRun_6DOF_GY_KALMAN()</a>.</p>
944<div class="dynheader">
945Here is the call graph for this function:</div>
946<div class="dyncontent">
947<div class="center"><img src="a00896_aa781ea4b9430531df4697d3cb39f7454_cgraph.png" border="0" usemap="#a00896_aa781ea4b9430531df4697d3cb39f7454_cgraph" alt=""/></div>
948<map name="a00896_aa781ea4b9430531df4697d3cb39f7454_cgraph" id="a00896_aa781ea4b9430531df4697d3cb39f7454_cgraph">
949<area shape="rect" id="node2" href="a00761.html#a084fe0ff189767dca40fbe330d7394f0" title="facos_deg" alt="" coords="249,5,330,32"/>
950<area shape="rect" id="node3" href="a00761.html#a956336cb9e7270c6cfbf667b1075c063" title="fasin_deg" alt="" coords="251,56,328,83"/>
951<area shape="rect" id="node4" href="a00761.html#aebfdfbd2df0fe4472f9861b0738bb410" title="fatan2_deg" alt="" coords="247,107,332,133"/>
952</map>
953</div>
954<div class="dynheader">
955Here is the caller graph for this function:</div>
956<div class="dyncontent">
957<div class="center"><img src="a00896_aa781ea4b9430531df4697d3cb39f7454_icgraph.png" border="0" usemap="#a00896_aa781ea4b9430531df4697d3cb39f7454_icgraph" alt=""/></div>
958<map name="a00896_aa781ea4b9430531df4697d3cb39f7454_icgraph" id="a00896_aa781ea4b9430531df4697d3cb39f7454_icgraph">
959<area shape="rect" id="node2" href="a00848.html#a2df5be5795338038774a64b41cf53a8e" title="fRun_3DOF_B_BASIC" alt="" coords="259,5,410,32"/>
960<area shape="rect" id="node3" href="a00848.html#a7b5db1923cfa0dc160016e7d9b45b1c2" title="fRun_3DOF_G_BASIC" alt="" coords="259,56,411,83"/>
961<area shape="rect" id="node4" href="a00848.html#a288f51cd39aeb8ace643d844e219e9d3" title="fRun_3DOF_Y_BASIC" alt="" coords="259,107,410,133"/>
962<area shape="rect" id="node5" href="a00848.html#a34c550860d0e4e42bf22a2a3527043b9" title="fRun_6DOF_GB_BASIC" alt="" coords="254,157,415,184"/>
963<area shape="rect" id="node6" href="a00848.html#a942d619f897d6820d5c148bdc910f962" title="fRun_6DOF_GY_KALMAN" alt="" coords="247,208,423,235"/>
964</map>
965</div>
966
967</div>
968</div>
969<a id="a624e56625ef65d6af54643c866a6c64c"></a>
970<h2 class="memtitle"><span class="permalink"><a href="#a624e56625ef65d6af54643c866a6c64c">&#9670;&nbsp;</a></span>fqAeq1()</h2>
971
972<div class="memitem">
973<div class="memproto">
974      <table class="memname">
975        <tr>
976          <td class="memname">void fqAeq1 </td>
977          <td>(</td>
978          <td class="paramtype"><a class="el" href="a03979.html">Quaternion</a> *&#160;</td>
979          <td class="paramname"><em>pqA</em></td><td>)</td>
980          <td></td>
981        </tr>
982      </table>
983</div><div class="memdoc">
984
985<p>set a quaternion to the unit quaternion </p>
986
987<p class="definition">Definition at line <a class="el" href="a00896_source.html#l01018">1018</a> of file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
988
989<p class="reference">References <a class="el" href="a00899_source.html#l00022">Quaternion::q0</a>, <a class="el" href="a00899_source.html#l00023">Quaternion::q1</a>, <a class="el" href="a00899_source.html#l00024">Quaternion::q2</a>, and <a class="el" href="a00899_source.html#l00025">Quaternion::q3</a>.</p>
990
991<p class="reference">Referenced by <a class="el" href="a00845_source.html#l00235">fInit_3DOF_Y_BASIC()</a>.</p>
992<div class="dynheader">
993Here is the caller graph for this function:</div>
994<div class="dyncontent">
995<div class="center"><img src="a00896_a624e56625ef65d6af54643c866a6c64c_icgraph.png" border="0" usemap="#a00896_a624e56625ef65d6af54643c866a6c64c_icgraph" alt=""/></div>
996<map name="a00896_a624e56625ef65d6af54643c866a6c64c_icgraph" id="a00896_a624e56625ef65d6af54643c866a6c64c_icgraph">
997<area shape="rect" id="node2" href="a00848.html#a0d585ddb24fa91e8d18228bee7a9539c" title="fInit_3DOF_Y_BASIC" alt="" coords="116,5,261,32"/>
998</map>
999</div>
1000
1001</div>
1002</div>
1003<a id="a3bcc5aef9bd7abd545d33660aa3ccbd0"></a>
1004<h2 class="memtitle"><span class="permalink"><a href="#a3bcc5aef9bd7abd545d33660aa3ccbd0">&#9670;&nbsp;</a></span>fqAeqNormqA()</h2>
1005
1006<div class="memitem">
1007<div class="memproto">
1008      <table class="memname">
1009        <tr>
1010          <td class="memname">void fqAeqNormqA </td>
1011          <td>(</td>
1012          <td class="paramtype"><a class="el" href="a03979.html">Quaternion</a> *&#160;</td>
1013          <td class="paramname"><em>pqA</em></td><td>)</td>
1014          <td></td>
1015        </tr>
1016      </table>
1017</div><div class="memdoc">
1018
1019<p>function normalizes a rotation quaternion and ensures q0 is non-negative </p>
1020
1021<p class="definition">Definition at line <a class="el" href="a00896_source.html#l00983">983</a> of file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
1022
1023<p class="reference">References <a class="el" href="a00896_source.html#l00036">CORRUPTQUAT</a>, <a class="el" href="a00899_source.html#l00022">Quaternion::q0</a>, <a class="el" href="a00899_source.html#l00023">Quaternion::q1</a>, <a class="el" href="a00899_source.html#l00024">Quaternion::q2</a>, and <a class="el" href="a00899_source.html#l00025">Quaternion::q3</a>.</p>
1024
1025<p class="reference">Referenced by <a class="el" href="a00896_source.html#l00896">fLPFOrientationQuaternion()</a>, <a class="el" href="a00896_source.html#l00765">fQuaternionFromRotationMatrix()</a>, <a class="el" href="a00845_source.html#l00534">fRun_3DOF_Y_BASIC()</a>, and <a class="el" href="a00845_source.html#l00635">fRun_6DOF_GY_KALMAN()</a>.</p>
1026<div class="dynheader">
1027Here is the caller graph for this function:</div>
1028<div class="dyncontent">
1029<div class="center"><img src="a00896_a3bcc5aef9bd7abd545d33660aa3ccbd0_icgraph.png" border="0" usemap="#a00896_a3bcc5aef9bd7abd545d33660aa3ccbd0_icgraph" alt=""/></div>
1030<map name="a00896_a3bcc5aef9bd7abd545d33660aa3ccbd0_icgraph" id="a00896_a3bcc5aef9bd7abd545d33660aa3ccbd0_icgraph">
1031<area shape="rect" id="node2" href="a00899.html#ad60a32e44f24a4b8fa5bddfb23721bc8" title="function low pass filters an orientation quaternion and computes virtual gyro rotation rate ..." alt="" coords="170,5,345,32"/>
1032<area shape="rect" id="node3" href="a00899.html#a04da5468213c1687c5b3485f15af288e" title="compute the orientation quaternion from a 3x3 rotation matrix " alt="" coords="156,56,359,83"/>
1033<area shape="rect" id="node4" href="a00848.html#a942d619f897d6820d5c148bdc910f962" title="fRun_6DOF_GY_KALMAN" alt="" coords="407,81,583,108"/>
1034<area shape="rect" id="node5" href="a00848.html#a288f51cd39aeb8ace643d844e219e9d3" title="fRun_3DOF_Y_BASIC" alt="" coords="182,157,333,184"/>
1035</map>
1036</div>
1037
1038</div>
1039</div>
1040<a id="a04da5468213c1687c5b3485f15af288e"></a>
1041<h2 class="memtitle"><span class="permalink"><a href="#a04da5468213c1687c5b3485f15af288e">&#9670;&nbsp;</a></span>fQuaternionFromRotationMatrix()</h2>
1042
1043<div class="memitem">
1044<div class="memproto">
1045      <table class="memname">
1046        <tr>
1047          <td class="memname">void fQuaternionFromRotationMatrix </td>
1048          <td>(</td>
1049          <td class="paramtype">float&#160;</td>
1050          <td class="paramname"><em>R</em>[][3], </td>
1051        </tr>
1052        <tr>
1053          <td class="paramkey"></td>
1054          <td></td>
1055          <td class="paramtype"><a class="el" href="a03979.html">Quaternion</a> *&#160;</td>
1056          <td class="paramname"><em>pq</em>&#160;</td>
1057        </tr>
1058        <tr>
1059          <td></td>
1060          <td>)</td>
1061          <td></td><td></td>
1062        </tr>
1063      </table>
1064</div><div class="memdoc">
1065
1066<p>compute the orientation quaternion from a 3x3 rotation matrix </p>
1067<dl class="params"><dt>Parameters</dt><dd>
1068  <table class="params">
1069    <tr><td class="paramname">R</td><td>Rotation matrix (input) </td></tr>
1070    <tr><td class="paramname">pq</td><td><a class="el" href="a03979.html" title="quaternion structure definition ">Quaternion</a> (output) </td></tr>
1071  </table>
1072  </dd>
1073</dl>
1074
1075<p class="definition">Definition at line <a class="el" href="a00896_source.html#l00765">765</a> of file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
1076
1077<p class="reference">References <a class="el" href="a00914_source.html#l00060">CHX</a>, <a class="el" href="a00914_source.html#l00061">CHY</a>, <a class="el" href="a00914_source.html#l00062">CHZ</a>, <a class="el" href="a00896_source.html#l00983">fqAeqNormqA()</a>, <a class="el" href="a00899_source.html#l00022">Quaternion::q0</a>, <a class="el" href="a00899_source.html#l00023">Quaternion::q1</a>, <a class="el" href="a00899_source.html#l00024">Quaternion::q2</a>, <a class="el" href="a00899_source.html#l00025">Quaternion::q3</a>, and <a class="el" href="a00896_source.html#l00035">SMALLQ0</a>.</p>
1078
1079<p class="reference">Referenced by <a class="el" href="a00845_source.html#l00207">fInit_3DOF_B_BASIC()</a>, <a class="el" href="a00845_source.html#l00179">fInit_3DOF_G_BASIC()</a>, <a class="el" href="a00845_source.html#l00250">fInit_6DOF_GB_BASIC()</a>, <a class="el" href="a00845_source.html#l00282">fInit_6DOF_GY_KALMAN()</a>, <a class="el" href="a00845_source.html#l00346">fInit_9DOF_GBY_KALMAN()</a>, <a class="el" href="a00845_source.html#l00489">fRun_3DOF_B_BASIC()</a>, <a class="el" href="a00845_source.html#l00439">fRun_3DOF_G_BASIC()</a>, <a class="el" href="a00845_source.html#l00582">fRun_6DOF_GB_BASIC()</a>, and <a class="el" href="a00845_source.html#l00635">fRun_6DOF_GY_KALMAN()</a>.</p>
1080<div class="dynheader">
1081Here is the call graph for this function:</div>
1082<div class="dyncontent">
1083<div class="center"><img src="a00896_a04da5468213c1687c5b3485f15af288e_cgraph.png" border="0" usemap="#a00896_a04da5468213c1687c5b3485f15af288e_cgraph" alt=""/></div>
1084<map name="a00896_a04da5468213c1687c5b3485f15af288e_cgraph" id="a00896_a04da5468213c1687c5b3485f15af288e_cgraph">
1085<area shape="rect" id="node2" href="a00896.html#a3bcc5aef9bd7abd545d33660aa3ccbd0" title="function normalizes a rotation quaternion and ensures q0 is non&#45;negative " alt="" coords="256,5,359,32"/>
1086</map>
1087</div>
1088<div class="dynheader">
1089Here is the caller graph for this function:</div>
1090<div class="dyncontent">
1091<div class="center"><img src="a00896_a04da5468213c1687c5b3485f15af288e_icgraph.png" border="0" usemap="#a00896_a04da5468213c1687c5b3485f15af288e_icgraph" alt=""/></div>
1092<map name="a00896_a04da5468213c1687c5b3485f15af288e_icgraph" id="a00896_a04da5468213c1687c5b3485f15af288e_icgraph">
1093<area shape="rect" id="node2" href="a00848.html#adc49d74394c2a94a33ff65edea18233b" title="fInit_3DOF_B_BASIC" alt="" coords="273,5,418,32"/>
1094<area shape="rect" id="node3" href="a00848.html#a2df5be5795338038774a64b41cf53a8e" title="fRun_3DOF_B_BASIC" alt="" coords="495,31,646,57"/>
1095<area shape="rect" id="node4" href="a00848.html#a41f2c6419c8e0c019e08618283338d21" title="fInit_3DOF_G_BASIC" alt="" coords="272,107,419,133"/>
1096<area shape="rect" id="node5" href="a00848.html#a7b5db1923cfa0dc160016e7d9b45b1c2" title="fRun_3DOF_G_BASIC" alt="" coords="495,132,647,159"/>
1097<area shape="rect" id="node6" href="a00848.html#ab5f459ab0c8c9b4123e2fb33f5061332" title="fInit_6DOF_GB_BASIC" alt="" coords="268,208,423,235"/>
1098<area shape="rect" id="node7" href="a00848.html#a34c550860d0e4e42bf22a2a3527043b9" title="fRun_6DOF_GB_BASIC" alt="" coords="490,233,651,260"/>
1099<area shape="rect" id="node8" href="a00848.html#adb837744c0801f50a0890f1385ca5c75" title="fInit_6DOF_GY_KALMAN" alt="" coords="260,309,431,336"/>
1100<area shape="rect" id="node9" href="a00848.html#a942d619f897d6820d5c148bdc910f962" title="fRun_6DOF_GY_KALMAN" alt="" coords="483,360,659,387"/>
1101<area shape="rect" id="node10" href="a00848.html#a5627f82d4cbb9af1102d10ad1bea3699" title="fInit_9DOF_GBY_KALMAN" alt="" coords="256,411,435,437"/>
1102</map>
1103</div>
1104
1105</div>
1106</div>
1107<a id="a9f946d534fae22e9e68b9f0e2e2822ef"></a>
1108<h2 class="memtitle"><span class="permalink"><a href="#a9f946d534fae22e9e68b9f0e2e2822ef">&#9670;&nbsp;</a></span>fQuaternionFromRotationVectorDeg()</h2>
1109
1110<div class="memitem">
1111<div class="memproto">
1112      <table class="memname">
1113        <tr>
1114          <td class="memname">void fQuaternionFromRotationVectorDeg </td>
1115          <td>(</td>
1116          <td class="paramtype"><a class="el" href="a03979.html">Quaternion</a> *&#160;</td>
1117          <td class="paramname"><em>pq</em>, </td>
1118        </tr>
1119        <tr>
1120          <td class="paramkey"></td>
1121          <td></td>
1122          <td class="paramtype">const float&#160;</td>
1123          <td class="paramname"><em>rvecdeg</em>[], </td>
1124        </tr>
1125        <tr>
1126          <td class="paramkey"></td>
1127          <td></td>
1128          <td class="paramtype">float&#160;</td>
1129          <td class="paramname"><em>fscaling</em>&#160;</td>
1130        </tr>
1131        <tr>
1132          <td></td>
1133          <td>)</td>
1134          <td></td><td></td>
1135        </tr>
1136      </table>
1137</div><div class="memdoc">
1138
1139<p>computes normalized rotation quaternion from a rotation vector (deg) </p>
1140<dl class="params"><dt>Parameters</dt><dd>
1141  <table class="params">
1142    <tr><td class="paramname">pq</td><td>quaternion (output) </td></tr>
1143    <tr><td class="paramname">rvecdeg</td><td>rotation vector in degrees </td></tr>
1144    <tr><td class="paramname">fscaling</td><td>delta Time </td></tr>
1145  </table>
1146  </dd>
1147</dl>
1148
1149<p class="definition">Definition at line <a class="el" href="a00896_source.html#l00697">697</a> of file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
1150
1151<p class="reference">References <a class="el" href="a00914_source.html#l00060">CHX</a>, <a class="el" href="a00914_source.html#l00061">CHY</a>, <a class="el" href="a00914_source.html#l00062">CHZ</a>, <a class="el" href="a00914_source.html#l00083">FPIOVER180</a>, <a class="el" href="a00914_source.html#l00092">ONEOVER3840</a>, <a class="el" href="a00914_source.html#l00090">ONEOVER48</a>, <a class="el" href="a00899_source.html#l00022">Quaternion::q0</a>, <a class="el" href="a00899_source.html#l00023">Quaternion::q1</a>, <a class="el" href="a00899_source.html#l00024">Quaternion::q2</a>, and <a class="el" href="a00899_source.html#l00025">Quaternion::q3</a>.</p>
1152
1153<p class="reference">Referenced by <a class="el" href="a00845_source.html#l00534">fRun_3DOF_Y_BASIC()</a>, and <a class="el" href="a00845_source.html#l00635">fRun_6DOF_GY_KALMAN()</a>.</p>
1154<div class="dynheader">
1155Here is the caller graph for this function:</div>
1156<div class="dyncontent">
1157<div class="center"><img src="a00896_a9f946d534fae22e9e68b9f0e2e2822ef_icgraph.png" border="0" usemap="#a00896_a9f946d534fae22e9e68b9f0e2e2822ef_icgraph" alt=""/></div>
1158<map name="a00896_a9f946d534fae22e9e68b9f0e2e2822ef_icgraph" id="a00896_a9f946d534fae22e9e68b9f0e2e2822ef_icgraph">
1159<area shape="rect" id="node2" href="a00848.html#a288f51cd39aeb8ace643d844e219e9d3" title="fRun_3DOF_Y_BASIC" alt="" coords="293,5,443,32"/>
1160<area shape="rect" id="node3" href="a00848.html#a942d619f897d6820d5c148bdc910f962" title="fRun_6DOF_GY_KALMAN" alt="" coords="280,56,456,83"/>
1161</map>
1162</div>
1163
1164</div>
1165</div>
1166<a id="ab93a6fd700fd1557e9b8f6796bfe3035"></a>
1167<h2 class="memtitle"><span class="permalink"><a href="#ab93a6fd700fd1557e9b8f6796bfe3035">&#9670;&nbsp;</a></span>fRotationMatrixFromQuaternion()</h2>
1168
1169<div class="memitem">
1170<div class="memproto">
1171      <table class="memname">
1172        <tr>
1173          <td class="memname">void fRotationMatrixFromQuaternion </td>
1174          <td>(</td>
1175          <td class="paramtype">float&#160;</td>
1176          <td class="paramname"><em>R</em>[][3], </td>
1177        </tr>
1178        <tr>
1179          <td class="paramkey"></td>
1180          <td></td>
1181          <td class="paramtype">const <a class="el" href="a03979.html">Quaternion</a> *&#160;</td>
1182          <td class="paramname"><em>pq</em>&#160;</td>
1183        </tr>
1184        <tr>
1185          <td></td>
1186          <td>)</td>
1187          <td></td><td></td>
1188        </tr>
1189      </table>
1190</div><div class="memdoc">
1191
1192<p>compute the rotation matrix from an orientation quaternion </p>
1193<dl class="params"><dt>Parameters</dt><dd>
1194  <table class="params">
1195    <tr><td class="paramname">R</td><td>Rotation matrix (output) </td></tr>
1196    <tr><td class="paramname">pq</td><td><a class="el" href="a03979.html" title="quaternion structure definition ">Quaternion</a> (input) </td></tr>
1197  </table>
1198  </dd>
1199</dl>
1200
1201<p class="definition">Definition at line <a class="el" href="a00896_source.html#l00806">806</a> of file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
1202
1203<p class="reference">References <a class="el" href="a00914_source.html#l00060">CHX</a>, <a class="el" href="a00914_source.html#l00061">CHY</a>, <a class="el" href="a00914_source.html#l00062">CHZ</a>, <a class="el" href="a00899_source.html#l00022">Quaternion::q0</a>, <a class="el" href="a00899_source.html#l00023">Quaternion::q1</a>, <a class="el" href="a00899_source.html#l00024">Quaternion::q2</a>, and <a class="el" href="a00899_source.html#l00025">Quaternion::q3</a>.</p>
1204
1205<p class="reference">Referenced by <a class="el" href="a00845_source.html#l00489">fRun_3DOF_B_BASIC()</a>, <a class="el" href="a00845_source.html#l00439">fRun_3DOF_G_BASIC()</a>, <a class="el" href="a00845_source.html#l00534">fRun_3DOF_Y_BASIC()</a>, <a class="el" href="a00845_source.html#l00582">fRun_6DOF_GB_BASIC()</a>, and <a class="el" href="a00845_source.html#l00635">fRun_6DOF_GY_KALMAN()</a>.</p>
1206<div class="dynheader">
1207Here is the caller graph for this function:</div>
1208<div class="dyncontent">
1209<div class="center"><img src="a00896_ab93a6fd700fd1557e9b8f6796bfe3035_icgraph.png" border="0" usemap="#a00896_ab93a6fd700fd1557e9b8f6796bfe3035_icgraph" alt=""/></div>
1210<map name="a00896_ab93a6fd700fd1557e9b8f6796bfe3035_icgraph" id="a00896_ab93a6fd700fd1557e9b8f6796bfe3035_icgraph">
1211<area shape="rect" id="node2" href="a00848.html#a2df5be5795338038774a64b41cf53a8e" title="fRun_3DOF_B_BASIC" alt="" coords="269,5,419,32"/>
1212<area shape="rect" id="node3" href="a00848.html#a7b5db1923cfa0dc160016e7d9b45b1c2" title="fRun_3DOF_G_BASIC" alt="" coords="268,56,420,83"/>
1213<area shape="rect" id="node4" href="a00848.html#a288f51cd39aeb8ace643d844e219e9d3" title="fRun_3DOF_Y_BASIC" alt="" coords="269,107,419,133"/>
1214<area shape="rect" id="node5" href="a00848.html#a34c550860d0e4e42bf22a2a3527043b9" title="fRun_6DOF_GB_BASIC" alt="" coords="263,157,425,184"/>
1215<area shape="rect" id="node6" href="a00848.html#a942d619f897d6820d5c148bdc910f962" title="fRun_6DOF_GY_KALMAN" alt="" coords="256,208,432,235"/>
1216</map>
1217</div>
1218
1219</div>
1220</div>
1221<a id="aa48ae334cf6bbedf2b9e7423d17cb4ac"></a>
1222<h2 class="memtitle"><span class="permalink"><a href="#aa48ae334cf6bbedf2b9e7423d17cb4ac">&#9670;&nbsp;</a></span>fRotationVectorDegFromQuaternion()</h2>
1223
1224<div class="memitem">
1225<div class="memproto">
1226      <table class="memname">
1227        <tr>
1228          <td class="memname">void fRotationVectorDegFromQuaternion </td>
1229          <td>(</td>
1230          <td class="paramtype"><a class="el" href="a03979.html">Quaternion</a> *&#160;</td>
1231          <td class="paramname"><em>pq</em>, </td>
1232        </tr>
1233        <tr>
1234          <td class="paramkey"></td>
1235          <td></td>
1236          <td class="paramtype">float&#160;</td>
1237          <td class="paramname"><em>rvecdeg</em>[]&#160;</td>
1238        </tr>
1239        <tr>
1240          <td></td>
1241          <td>)</td>
1242          <td></td><td></td>
1243        </tr>
1244      </table>
1245</div><div class="memdoc">
1246
1247<p>computes rotation vector (deg) from rotation quaternion </p>
1248<dl class="params"><dt>Parameters</dt><dd>
1249  <table class="params">
1250    <tr><td class="paramname">pq</td><td>quaternion (input) </td></tr>
1251    <tr><td class="paramname">rvecdeg</td><td>rotation vector in degrees (output) </td></tr>
1252  </table>
1253  </dd>
1254</dl>
1255
1256<p class="definition">Definition at line <a class="el" href="a00896_source.html#l00846">846</a> of file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
1257
1258<p class="reference">References <a class="el" href="a00914_source.html#l00060">CHX</a>, <a class="el" href="a00914_source.html#l00061">CHY</a>, <a class="el" href="a00914_source.html#l00062">CHZ</a>, <a class="el" href="a00914_source.html#l00084">F180OVERPI</a>, <a class="el" href="a00914_source.html#l00083">FPIOVER180</a>, <a class="el" href="a00899_source.html#l00022">Quaternion::q0</a>, <a class="el" href="a00899_source.html#l00023">Quaternion::q1</a>, <a class="el" href="a00899_source.html#l00024">Quaternion::q2</a>, and <a class="el" href="a00899_source.html#l00025">Quaternion::q3</a>.</p>
1259
1260<p class="reference">Referenced by <a class="el" href="a00896_source.html#l00896">fLPFOrientationQuaternion()</a>, <a class="el" href="a00845_source.html#l00489">fRun_3DOF_B_BASIC()</a>, <a class="el" href="a00845_source.html#l00439">fRun_3DOF_G_BASIC()</a>, <a class="el" href="a00845_source.html#l00534">fRun_3DOF_Y_BASIC()</a>, <a class="el" href="a00845_source.html#l00582">fRun_6DOF_GB_BASIC()</a>, and <a class="el" href="a00845_source.html#l00635">fRun_6DOF_GY_KALMAN()</a>.</p>
1261<div class="dynheader">
1262Here is the caller graph for this function:</div>
1263<div class="dyncontent">
1264<div class="center"><img src="a00896_aa48ae334cf6bbedf2b9e7423d17cb4ac_icgraph.png" border="0" usemap="#a00896_aa48ae334cf6bbedf2b9e7423d17cb4ac_icgraph" alt=""/></div>
1265<map name="a00896_aa48ae334cf6bbedf2b9e7423d17cb4ac_icgraph" id="a00896_aa48ae334cf6bbedf2b9e7423d17cb4ac_icgraph">
1266<area shape="rect" id="node2" href="a00899.html#ad60a32e44f24a4b8fa5bddfb23721bc8" title="function low pass filters an orientation quaternion and computes virtual gyro rotation rate ..." alt="" coords="281,43,455,69"/>
1267<area shape="rect" id="node3" href="a00848.html#a7b5db1923cfa0dc160016e7d9b45b1c2" title="fRun_3DOF_G_BASIC" alt="" coords="509,5,661,32"/>
1268<area shape="rect" id="node4" href="a00848.html#a2df5be5795338038774a64b41cf53a8e" title="fRun_3DOF_B_BASIC" alt="" coords="509,81,660,108"/>
1269<area shape="rect" id="node5" href="a00848.html#a34c550860d0e4e42bf22a2a3527043b9" title="fRun_6DOF_GB_BASIC" alt="" coords="504,132,665,159"/>
1270<area shape="rect" id="node6" href="a00848.html#a288f51cd39aeb8ace643d844e219e9d3" title="fRun_3DOF_Y_BASIC" alt="" coords="293,195,443,221"/>
1271<area shape="rect" id="node7" href="a00848.html#a942d619f897d6820d5c148bdc910f962" title="fRun_6DOF_GY_KALMAN" alt="" coords="280,245,456,272"/>
1272</map>
1273</div>
1274
1275</div>
1276</div>
1277<a id="a4ced4d83316052e2c97ce2746abdc1e0"></a>
1278<h2 class="memtitle"><span class="permalink"><a href="#a4ced4d83316052e2c97ce2746abdc1e0">&#9670;&nbsp;</a></span>fveqconjgquq()</h2>
1279
1280<div class="memitem">
1281<div class="memproto">
1282      <table class="memname">
1283        <tr>
1284          <td class="memname">void fveqconjgquq </td>
1285          <td>(</td>
1286          <td class="paramtype"><a class="el" href="a03979.html">Quaternion</a> *&#160;</td>
1287          <td class="paramname"><em>pfq</em>, </td>
1288        </tr>
1289        <tr>
1290          <td class="paramkey"></td>
1291          <td></td>
1292          <td class="paramtype">float&#160;</td>
1293          <td class="paramname"><em>fu</em>[], </td>
1294        </tr>
1295        <tr>
1296          <td class="paramkey"></td>
1297          <td></td>
1298          <td class="paramtype">float&#160;</td>
1299          <td class="paramname"><em>fv</em>[]&#160;</td>
1300        </tr>
1301        <tr>
1302          <td></td>
1303          <td>)</td>
1304          <td></td><td></td>
1305        </tr>
1306      </table>
1307</div><div class="memdoc">
1308<p>function computes the rotation quaternion that rotates unit vector u onto unit vector v as v=q*.u.q using q = 1/sqrt(2) * {sqrt(1 + u.v) - u x v / sqrt(1 + u.v)} </p>
1309
1310<p class="definition">Definition at line <a class="el" href="a00896_source.html#l01028">1028</a> of file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
1311
1312<p class="reference">References <a class="el" href="a00914_source.html#l00060">CHX</a>, <a class="el" href="a00914_source.html#l00061">CHY</a>, <a class="el" href="a00914_source.html#l00062">CHZ</a>, <a class="el" href="a00914_source.html#l00093">ONEOVERSQRT2</a>, <a class="el" href="a00899_source.html#l00022">Quaternion::q0</a>, <a class="el" href="a00899_source.html#l00023">Quaternion::q1</a>, <a class="el" href="a00899_source.html#l00024">Quaternion::q2</a>, and <a class="el" href="a00899_source.html#l00025">Quaternion::q3</a>.</p>
1313
1314<p class="reference">Referenced by <a class="el" href="a00845_source.html#l00635">fRun_6DOF_GY_KALMAN()</a>.</p>
1315<div class="dynheader">
1316Here is the caller graph for this function:</div>
1317<div class="dyncontent">
1318<div class="center"><img src="a00896_a4ced4d83316052e2c97ce2746abdc1e0_icgraph.png" border="0" usemap="#a00896_a4ced4d83316052e2c97ce2746abdc1e0_icgraph" alt=""/></div>
1319<map name="a00896_a4ced4d83316052e2c97ce2746abdc1e0_icgraph" id="a00896_a4ced4d83316052e2c97ce2746abdc1e0_icgraph">
1320<area shape="rect" id="node2" href="a00848.html#a942d619f897d6820d5c148bdc910f962" title="fRun_6DOF_GY_KALMAN" alt="" coords="149,5,325,32"/>
1321</map>
1322</div>
1323
1324</div>
1325</div>
1326<a id="a13cd93780206a620abc7bdf7907e6dc6"></a>
1327<h2 class="memtitle"><span class="permalink"><a href="#a13cd93780206a620abc7bdf7907e6dc6">&#9670;&nbsp;</a></span>fWin8AnglesDegFromRotationMatrix()</h2>
1328
1329<div class="memitem">
1330<div class="memproto">
1331      <table class="memname">
1332        <tr>
1333          <td class="memname">void fWin8AnglesDegFromRotationMatrix </td>
1334          <td>(</td>
1335          <td class="paramtype">float&#160;</td>
1336          <td class="paramname"><em>R</em>[][3], </td>
1337        </tr>
1338        <tr>
1339          <td class="paramkey"></td>
1340          <td></td>
1341          <td class="paramtype">float *&#160;</td>
1342          <td class="paramname"><em>pfPhiDeg</em>, </td>
1343        </tr>
1344        <tr>
1345          <td class="paramkey"></td>
1346          <td></td>
1347          <td class="paramtype">float *&#160;</td>
1348          <td class="paramname"><em>pfTheDeg</em>, </td>
1349        </tr>
1350        <tr>
1351          <td class="paramkey"></td>
1352          <td></td>
1353          <td class="paramtype">float *&#160;</td>
1354          <td class="paramname"><em>pfPsiDeg</em>, </td>
1355        </tr>
1356        <tr>
1357          <td class="paramkey"></td>
1358          <td></td>
1359          <td class="paramtype">float *&#160;</td>
1360          <td class="paramname"><em>pfRhoDeg</em>, </td>
1361        </tr>
1362        <tr>
1363          <td class="paramkey"></td>
1364          <td></td>
1365          <td class="paramtype">float *&#160;</td>
1366          <td class="paramname"><em>pfChiDeg</em>&#160;</td>
1367        </tr>
1368        <tr>
1369          <td></td>
1370          <td>)</td>
1371          <td></td><td></td>
1372        </tr>
1373      </table>
1374</div><div class="memdoc">
1375
1376<p>extract the Windows 8 angles in degrees from the Windows 8 rotation matrix </p>
1377<dl class="params"><dt>Parameters</dt><dd>
1378  <table class="params">
1379    <tr><td class="paramname">R</td><td>rotation matrix input </td></tr>
1380    <tr><td class="paramname">pfPhiDeg</td><td>the roll angle -90.0 &lt;= Phi &lt;= 90.0 deg </td></tr>
1381    <tr><td class="paramname">pfTheDeg</td><td>pitch angle Theta in the range -180.0 &lt;= The &lt; 180.0 deg </td></tr>
1382    <tr><td class="paramname">pfPsiDeg</td><td>yaw angle Psi in range 0.0 &lt;= Psi &lt; 360.0 deg </td></tr>
1383    <tr><td class="paramname">pfRhoDeg</td><td>the compass angle Rho = 360 - Psi </td></tr>
1384    <tr><td class="paramname">pfChiDeg</td><td>tilt angle from vertical Chi (0 &lt;= Chi &lt;= 180 deg) </td></tr>
1385  </table>
1386  </dd>
1387</dl>
1388
1389<p class="definition">Definition at line <a class="el" href="a00896_source.html#l00605">605</a> of file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
1390
1391<p class="reference">References <a class="el" href="a00914_source.html#l00060">CHX</a>, <a class="el" href="a00914_source.html#l00061">CHY</a>, <a class="el" href="a00914_source.html#l00062">CHZ</a>, <a class="el" href="a00761_source.html#l00043">facos_deg()</a>, <a class="el" href="a00761_source.html#l00028">fasin_deg()</a>, <a class="el" href="a00761_source.html#l00109">fatan2_deg()</a>, and <a class="el" href="a00761_source.html#l00059">fatan_deg()</a>.</p>
1392
1393<p class="reference">Referenced by <a class="el" href="a00845_source.html#l00489">fRun_3DOF_B_BASIC()</a>, <a class="el" href="a00845_source.html#l00439">fRun_3DOF_G_BASIC()</a>, <a class="el" href="a00845_source.html#l00534">fRun_3DOF_Y_BASIC()</a>, <a class="el" href="a00845_source.html#l00582">fRun_6DOF_GB_BASIC()</a>, and <a class="el" href="a00845_source.html#l00635">fRun_6DOF_GY_KALMAN()</a>.</p>
1394<div class="dynheader">
1395Here is the call graph for this function:</div>
1396<div class="dyncontent">
1397<div class="center"><img src="a00896_a13cd93780206a620abc7bdf7907e6dc6_cgraph.png" border="0" usemap="#a00896_a13cd93780206a620abc7bdf7907e6dc6_cgraph" alt=""/></div>
1398<map name="a00896_a13cd93780206a620abc7bdf7907e6dc6_cgraph" id="a00896_a13cd93780206a620abc7bdf7907e6dc6_cgraph">
1399<area shape="rect" id="node2" href="a00761.html#a084fe0ff189767dca40fbe330d7394f0" title="facos_deg" alt="" coords="251,5,333,32"/>
1400<area shape="rect" id="node3" href="a00761.html#a09d50b3d2c3d4d24e447a9b960eb5267" title="fatan_deg" alt="" coords="383,81,461,108"/>
1401<area shape="rect" id="node4" href="a00761.html#a956336cb9e7270c6cfbf667b1075c063" title="fasin_deg" alt="" coords="253,107,331,133"/>
1402<area shape="rect" id="node5" href="a00761.html#aebfdfbd2df0fe4472f9861b0738bb410" title="fatan2_deg" alt="" coords="249,157,335,184"/>
1403</map>
1404</div>
1405<div class="dynheader">
1406Here is the caller graph for this function:</div>
1407<div class="dyncontent">
1408<div class="center"><img src="a00896_a13cd93780206a620abc7bdf7907e6dc6_icgraph.png" border="0" usemap="#a00896_a13cd93780206a620abc7bdf7907e6dc6_icgraph" alt=""/></div>
1409<map name="a00896_a13cd93780206a620abc7bdf7907e6dc6_icgraph" id="a00896_a13cd93780206a620abc7bdf7907e6dc6_icgraph">
1410<area shape="rect" id="node2" href="a00848.html#a2df5be5795338038774a64b41cf53a8e" title="fRun_3DOF_B_BASIC" alt="" coords="262,5,413,32"/>
1411<area shape="rect" id="node3" href="a00848.html#a7b5db1923cfa0dc160016e7d9b45b1c2" title="fRun_3DOF_G_BASIC" alt="" coords="261,56,413,83"/>
1412<area shape="rect" id="node4" href="a00848.html#a288f51cd39aeb8ace643d844e219e9d3" title="fRun_3DOF_Y_BASIC" alt="" coords="262,107,413,133"/>
1413<area shape="rect" id="node5" href="a00848.html#a34c550860d0e4e42bf22a2a3527043b9" title="fRun_6DOF_GB_BASIC" alt="" coords="257,157,418,184"/>
1414<area shape="rect" id="node6" href="a00848.html#a942d619f897d6820d5c148bdc910f962" title="fRun_6DOF_GY_KALMAN" alt="" coords="249,208,425,235"/>
1415</map>
1416</div>
1417
1418</div>
1419</div>
1420<a id="a22a32becfcb162db012f41ff4f3bc942"></a>
1421<h2 class="memtitle"><span class="permalink"><a href="#a22a32becfcb162db012f41ff4f3bc942">&#9670;&nbsp;</a></span>qAeqAxB()</h2>
1422
1423<div class="memitem">
1424<div class="memproto">
1425      <table class="memname">
1426        <tr>
1427          <td class="memname">void qAeqAxB </td>
1428          <td>(</td>
1429          <td class="paramtype"><a class="el" href="a03979.html">Quaternion</a> *&#160;</td>
1430          <td class="paramname"><em>pqA</em>, </td>
1431        </tr>
1432        <tr>
1433          <td class="paramkey"></td>
1434          <td></td>
1435          <td class="paramtype">const <a class="el" href="a03979.html">Quaternion</a> *&#160;</td>
1436          <td class="paramname"><em>pqB</em>&#160;</td>
1437        </tr>
1438        <tr>
1439          <td></td>
1440          <td>)</td>
1441          <td></td><td></td>
1442        </tr>
1443      </table>
1444</div><div class="memdoc">
1445
1446<p>function compute the quaternion product qA = qA * qB </p>
1447
1448<p class="definition">Definition at line <a class="el" href="a00896_source.html#l00953">953</a> of file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
1449
1450<p class="reference">References <a class="el" href="a00899_source.html#l00022">Quaternion::q0</a>, <a class="el" href="a00899_source.html#l00023">Quaternion::q1</a>, <a class="el" href="a00899_source.html#l00024">Quaternion::q2</a>, and <a class="el" href="a00899_source.html#l00025">Quaternion::q3</a>.</p>
1451
1452<p class="reference">Referenced by <a class="el" href="a00788_source.html#l00036">ApplyPerturbation()</a>, <a class="el" href="a00896_source.html#l00896">fLPFOrientationQuaternion()</a>, <a class="el" href="a00845_source.html#l00534">fRun_3DOF_Y_BASIC()</a>, and <a class="el" href="a00845_source.html#l00635">fRun_6DOF_GY_KALMAN()</a>.</p>
1453<div class="dynheader">
1454Here is the caller graph for this function:</div>
1455<div class="dyncontent">
1456<div class="center"><img src="a00896_a22a32becfcb162db012f41ff4f3bc942_icgraph.png" border="0" usemap="#a00896_a22a32becfcb162db012f41ff4f3bc942_icgraph" alt=""/></div>
1457<map name="a00896_a22a32becfcb162db012f41ff4f3bc942_icgraph" id="a00896_a22a32becfcb162db012f41ff4f3bc942_icgraph">
1458<area shape="rect" id="node2" href="a00791.html#a4cfb25cf8dddd5b009b793929f32429e" title="ApplyPerturbation" alt="" coords="156,5,281,32"/>
1459<area shape="rect" id="node3" href="a00899.html#ad60a32e44f24a4b8fa5bddfb23721bc8" title="function low pass filters an orientation quaternion and computes virtual gyro rotation rate ..." alt="" coords="131,56,306,83"/>
1460<area shape="rect" id="node4" href="a00848.html#a288f51cd39aeb8ace643d844e219e9d3" title="fRun_3DOF_Y_BASIC" alt="" coords="143,107,294,133"/>
1461<area shape="rect" id="node5" href="a00848.html#a942d619f897d6820d5c148bdc910f962" title="fRun_6DOF_GY_KALMAN" alt="" coords="131,157,307,184"/>
1462</map>
1463</div>
1464
1465</div>
1466</div>
1467<a id="a12448c36b93d8f3375ce000ef4527b4a"></a>
1468<h2 class="memtitle"><span class="permalink"><a href="#a12448c36b93d8f3375ce000ef4527b4a">&#9670;&nbsp;</a></span>qAeqBxC()</h2>
1469
1470<div class="memitem">
1471<div class="memproto">
1472      <table class="memname">
1473        <tr>
1474          <td class="memname">void qAeqBxC </td>
1475          <td>(</td>
1476          <td class="paramtype"><a class="el" href="a03979.html">Quaternion</a> *&#160;</td>
1477          <td class="paramname"><em>pqA</em>, </td>
1478        </tr>
1479        <tr>
1480          <td class="paramkey"></td>
1481          <td></td>
1482          <td class="paramtype">const <a class="el" href="a03979.html">Quaternion</a> *&#160;</td>
1483          <td class="paramname"><em>pqB</em>, </td>
1484        </tr>
1485        <tr>
1486          <td class="paramkey"></td>
1487          <td></td>
1488          <td class="paramtype">const <a class="el" href="a03979.html">Quaternion</a> *&#160;</td>
1489          <td class="paramname"><em>pqC</em>&#160;</td>
1490        </tr>
1491        <tr>
1492          <td></td>
1493          <td>)</td>
1494          <td></td><td></td>
1495        </tr>
1496      </table>
1497</div><div class="memdoc">
1498
1499<p>function compute the quaternion product qB * qC </p>
1500
1501<p class="definition">Definition at line <a class="el" href="a00896_source.html#l00942">942</a> of file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
1502
1503<p class="reference">References <a class="el" href="a00899_source.html#l00022">Quaternion::q0</a>, <a class="el" href="a00899_source.html#l00023">Quaternion::q1</a>, <a class="el" href="a00899_source.html#l00024">Quaternion::q2</a>, and <a class="el" href="a00899_source.html#l00025">Quaternion::q3</a>.</p>
1504
1505<p class="reference">Referenced by <a class="el" href="a00845_source.html#l00635">fRun_6DOF_GY_KALMAN()</a>.</p>
1506<div class="dynheader">
1507Here is the caller graph for this function:</div>
1508<div class="dyncontent">
1509<div class="center"><img src="a00896_a12448c36b93d8f3375ce000ef4527b4a_icgraph.png" border="0" usemap="#a00896_a12448c36b93d8f3375ce000ef4527b4a_icgraph" alt=""/></div>
1510<map name="a00896_a12448c36b93d8f3375ce000ef4527b4a_icgraph" id="a00896_a12448c36b93d8f3375ce000ef4527b4a_icgraph">
1511<area shape="rect" id="node2" href="a00848.html#a942d619f897d6820d5c148bdc910f962" title="fRun_6DOF_GY_KALMAN" alt="" coords="131,5,307,32"/>
1512</map>
1513</div>
1514
1515</div>
1516</div>
1517<a id="adb2ea2734ac13ca77b3218d761fe45e0"></a>
1518<h2 class="memtitle"><span class="permalink"><a href="#adb2ea2734ac13ca77b3218d761fe45e0">&#9670;&nbsp;</a></span>qconjgAxB()</h2>
1519
1520<div class="memitem">
1521<div class="memproto">
1522      <table class="memname">
1523        <tr>
1524          <td class="memname"><a class="el" href="a03979.html">Quaternion</a> qconjgAxB </td>
1525          <td>(</td>
1526          <td class="paramtype">const <a class="el" href="a03979.html">Quaternion</a> *&#160;</td>
1527          <td class="paramname"><em>pqA</em>, </td>
1528        </tr>
1529        <tr>
1530          <td class="paramkey"></td>
1531          <td></td>
1532          <td class="paramtype">const <a class="el" href="a03979.html">Quaternion</a> *&#160;</td>
1533          <td class="paramname"><em>pqB</em>&#160;</td>
1534        </tr>
1535        <tr>
1536          <td></td>
1537          <td>)</td>
1538          <td></td><td></td>
1539        </tr>
1540      </table>
1541</div><div class="memdoc">
1542
1543<p>function compute the quaternion product conjg(qA) * qB </p>
1544
1545<p class="definition">Definition at line <a class="el" href="a00896_source.html#l00970">970</a> of file <a class="el" href="a00896_source.html">orientation.c</a>.</p>
1546
1547<p class="reference">References <a class="el" href="a00899_source.html#l00022">Quaternion::q0</a>, <a class="el" href="a00899_source.html#l00023">Quaternion::q1</a>, <a class="el" href="a00899_source.html#l00024">Quaternion::q2</a>, and <a class="el" href="a00899_source.html#l00025">Quaternion::q3</a>.</p>
1548
1549<p class="reference">Referenced by <a class="el" href="a00896_source.html#l00896">fLPFOrientationQuaternion()</a>.</p>
1550<div class="dynheader">
1551Here is the caller graph for this function:</div>
1552<div class="dyncontent">
1553<div class="center"><img src="a00896_adb2ea2734ac13ca77b3218d761fe45e0_icgraph.png" border="0" usemap="#a00896_adb2ea2734ac13ca77b3218d761fe45e0_icgraph" alt=""/></div>
1554<map name="a00896_adb2ea2734ac13ca77b3218d761fe45e0_icgraph" id="a00896_adb2ea2734ac13ca77b3218d761fe45e0_icgraph">
1555<area shape="rect" id="node2" href="a00899.html#ad60a32e44f24a4b8fa5bddfb23721bc8" title="function low pass filters an orientation quaternion and computes virtual gyro rotation rate ..." alt="" coords="139,5,313,32"/>
1556</map>
1557</div>
1558
1559</div>
1560</div>
1561</div><!-- contents -->
1562
1563<hr class="footer"/><address class="footer"><small>
1564&copy; Copyright 2016-2022 NXP. All Rights Reserved. SPDX-License-Identifier: BSD-3-Clause
1565</small></address>
1566</body>
1567</html>
1568