Added doxygen doc for library.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1282 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
james.goppert 2010-12-27 00:59:17 +00:00
parent bce0c6723b
commit 9770a743d2
1412 changed files with 114816 additions and 0 deletions

1662
libraries/doc/Doxyfile Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,49 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC.cpp File Reference</h1> </div>
</div>
<div class="contents">
<code>#include &quot;<a class="el" href="_a_p___a_d_c_8h_source.html">AP_ADC.h</a>&quot;</code><br/>
<div class="dynheader">
Include dependency graph for AP_ADC.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___a_d_c_8cpp__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c_8cpp" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c_8cpp" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c_8cpp">
<area shape="rect" id="node3" href="_a_p___a_d_c_8h.html" title="AP_ADC.h" alt="" coords="156,83,241,112"/><area shape="rect" id="node5" href="_a_p___a_d_c___a_d_s7844_8h.html" title="AP_ADC_ADS7844.h" alt="" coords="45,160,197,189"/><area shape="rect" id="node8" href="_a_p___a_d_c___h_i_l_8h.html" title="AP_ADC_HIL.h" alt="" coords="221,160,333,189"/></map>
</div>
<p><a href="_a_p___a_d_c_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
</table>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:34 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,5 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_a_p___a_d_c_8h.html" title="AP_ADC.h" alt="" coords="156,83,241,112"/>
<area shape="rect" id="node5" href="$_a_p___a_d_c___a_d_s7844_8h.html" title="AP_ADC_ADS7844.h" alt="" coords="45,160,197,189"/>
<area shape="rect" id="node8" href="$_a_p___a_d_c___h_i_l_8h.html" title="AP_ADC_HIL.h" alt="" coords="221,160,333,189"/>
</map>

View File

@ -0,0 +1 @@
fa46ceae07a84820662988312ce3bf06

View File

@ -0,0 +1,60 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC.cpp</h1> </div>
</div>
<div class="contents">
<a href="_a_p___a_d_c_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> ADC.cpp - Analog Digital Converter Base Class for Ardupilot Mega</span>
<a name="l00003"></a>00003 <span class="comment"> Code by James Goppert. DIYDrones.com</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment"> This library is free software; you can redistribute it and/or</span>
<a name="l00006"></a>00006 <span class="comment"> modify it under the terms of the GNU Lesser General Public</span>
<a name="l00007"></a>00007 <span class="comment"> License as published by the Free Software Foundation; either</span>
<a name="l00008"></a>00008 <span class="comment"> version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment">*/</span>
<a name="l00010"></a>00010
<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;<a class="code" href="_a_p___a_d_c_8h.html">AP_ADC.h</a>&quot;</span>
<a name="l00012"></a>00012
<a name="l00013"></a><a class="code" href="class_a_p___a_d_c.html#a5666c75df84871939288fb4d3da4e090">00013</a> <a class="code" href="class_a_p___a_d_c.html#a5666c75df84871939288fb4d3da4e090">AP_ADC::AP_ADC</a>()
<a name="l00014"></a>00014 {
<a name="l00015"></a>00015 }
<a name="l00016"></a>00016
<a name="l00017"></a><a class="code" href="class_a_p___a_d_c.html#a3e508676c58e628fb39f7d12e8bac011">00017</a> <span class="keywordtype">void</span> <a class="code" href="class_a_p___a_d_c.html#a3e508676c58e628fb39f7d12e8bac011">AP_ADC::Init</a>()
<a name="l00018"></a>00018 {
<a name="l00019"></a>00019 }
<a name="l00020"></a>00020
<a name="l00021"></a><a class="code" href="class_a_p___a_d_c.html#a86463917e4e51400a0de3e12bb566c72">00021</a> <span class="keywordtype">int</span> <a class="code" href="class_a_p___a_d_c.html#a86463917e4e51400a0de3e12bb566c72">AP_ADC::Ch</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> ch_num)
<a name="l00022"></a>00022 {
<a name="l00023"></a>00023 }
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:33 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,62 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> </div>
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC.h File Reference</h1> </div>
</div>
<div class="contents">
<code>#include &quot;<a class="el" href="_a_p___a_d_c___a_d_s7844_8h_source.html">AP_ADC_ADS7844.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_a_p___a_d_c___h_i_l_8h_source.html">AP_ADC_HIL.h</a>&quot;</code><br/>
<div class="dynheader">
Include dependency graph for AP_ADC.h:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___a_d_c_8h__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c_8h" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c_8h" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c_8h">
<area shape="rect" id="node3" href="_a_p___a_d_c___a_d_s7844_8h.html" title="AP_ADC_ADS7844.h" alt="" coords="39,83,191,112"/><area shape="rect" id="node6" href="_a_p___a_d_c___h_i_l_8h.html" title="AP_ADC_HIL.h" alt="" coords="215,83,327,112"/></map>
</div>
<div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___a_d_c_8h__dep__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c_8hdep" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c_8hdep" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c_8hdep">
<area shape="rect" id="node3" href="_a_p___a_d_c_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC.cpp" alt="" coords="5,83,392,112"/><area shape="rect" id="node5" href="_a_p___a_d_c___a_d_s7844_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_ADS7844.h" alt="" coords="416,83,856,112"/><area shape="rect" id="node10" href="_a_p___a_d_c___h_i_l_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_HIL.h" alt="" coords="880,83,1280,112"/><area shape="rect" id="node15" href="_a_p___d_c_m___h_i_l_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.h" alt="" coords="1808,160,2211,189"/><area shape="rect" id="node17" href="_a_p___d_c_m_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.h" alt="" coords="1180,237,1556,267"/><area shape="rect" id="node24" href="_a_p___i_m_u_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_IMU/AP_IMU.h" alt="" coords="1383,83,1748,112"/><area shape="rect" id="node8" href="_a_p___a_d_c___a_d_s7844_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_ADS7844.cpp" alt="" coords="389,160,843,189"/><area shape="rect" id="node13" href="_a_p___a_d_c___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_HIL.cpp" alt="" coords="867,160,1280,189"/><area shape="rect" id="node21" href="_a_p___d_c_m___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.cpp" alt="" coords="1800,237,2219,267"/><area shape="rect" id="node19" href="_a_p___d_c_m_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.cpp" alt="" coords="1172,315,1564,344"/><area shape="rect" id="node28" href="_a_p___i_m_u_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_IMU/AP_IMU.cpp" alt="" coords="1405,160,1784,189"/></map>
</div>
<p><a href="_a_p___a_d_c_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___a_d_c.html">AP_ADC</a></td></tr>
</table>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:34 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,13 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_a_p___a_d_c_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC.cpp" alt="" coords="5,83,392,112"/>
<area shape="rect" id="node5" href="$_a_p___a_d_c___a_d_s7844_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_ADS7844.h" alt="" coords="416,83,856,112"/>
<area shape="rect" id="node10" href="$_a_p___a_d_c___h_i_l_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_HIL.h" alt="" coords="880,83,1280,112"/>
<area shape="rect" id="node15" href="$_a_p___d_c_m___h_i_l_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.h" alt="" coords="1808,160,2211,189"/>
<area shape="rect" id="node17" href="$_a_p___d_c_m_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.h" alt="" coords="1180,237,1556,267"/>
<area shape="rect" id="node24" href="$_a_p___i_m_u_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_IMU/AP_IMU.h" alt="" coords="1383,83,1748,112"/>
<area shape="rect" id="node8" href="$_a_p___a_d_c___a_d_s7844_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_ADS7844.cpp" alt="" coords="389,160,843,189"/>
<area shape="rect" id="node13" href="$_a_p___a_d_c___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_HIL.cpp" alt="" coords="867,160,1280,189"/>
<area shape="rect" id="node21" href="$_a_p___d_c_m___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.cpp" alt="" coords="1800,237,2219,267"/>
<area shape="rect" id="node19" href="$_a_p___d_c_m_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.cpp" alt="" coords="1172,315,1564,344"/>
<area shape="rect" id="node28" href="$_a_p___i_m_u_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_IMU/AP_IMU.cpp" alt="" coords="1405,160,1784,189"/>
</map>

View File

@ -0,0 +1 @@
91e4b4447089ab7237ddbc985be0ef44

View File

@ -0,0 +1,4 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_a_p___a_d_c___a_d_s7844_8h.html" title="AP_ADC_ADS7844.h" alt="" coords="39,83,191,112"/>
<area shape="rect" id="node6" href="$_a_p___a_d_c___h_i_l_8h.html" title="AP_ADC_HIL.h" alt="" coords="215,83,327,112"/>
</map>

View File

@ -0,0 +1 @@
a51d1399e0d6f81e83c4ec298be5e93d

View File

@ -0,0 +1,68 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC.h</h1> </div>
</div>
<div class="contents">
<a href="_a_p___a_d_c_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef AP_ADC_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define AP_ADC_H</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="comment">/*</span>
<a name="l00005"></a>00005 <span class="comment"> AP_ADC.cpp - Analog Digital Converter Base Class for Ardupilot Mega</span>
<a name="l00006"></a>00006 <span class="comment"> Code by James Goppert. DIYDrones.com</span>
<a name="l00007"></a>00007 <span class="comment"></span>
<a name="l00008"></a>00008 <span class="comment"> This library is free software; you can redistribute it and/or</span>
<a name="l00009"></a>00009 <span class="comment"> modify it under the terms of the GNU Lesser General Public</span>
<a name="l00010"></a>00010 <span class="comment"> License as published by the Free Software Foundation; either</span>
<a name="l00011"></a>00011 <span class="comment"> version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00012"></a>00012 <span class="comment"></span>
<a name="l00013"></a>00013 <span class="comment"> Methods:</span>
<a name="l00014"></a>00014 <span class="comment"> Init() : Initialization of ADC. (interrupts etc)</span>
<a name="l00015"></a>00015 <span class="comment"> Ch(ch_num) : Return the ADC channel value</span>
<a name="l00016"></a>00016 <span class="comment"></span>
<a name="l00017"></a>00017 <span class="comment">*/</span>
<a name="l00018"></a>00018
<a name="l00019"></a><a class="code" href="class_a_p___a_d_c.html">00019</a> <span class="keyword">class </span><a class="code" href="class_a_p___a_d_c.html">AP_ADC</a>
<a name="l00020"></a>00020 {
<a name="l00021"></a>00021 <span class="keyword">public</span>:
<a name="l00022"></a>00022 <a class="code" href="class_a_p___a_d_c.html#a5666c75df84871939288fb4d3da4e090">AP_ADC</a>(); <span class="comment">// Constructor</span>
<a name="l00023"></a>00023 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_a_p___a_d_c.html#a3e508676c58e628fb39f7d12e8bac011">Init</a>();
<a name="l00024"></a>00024 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="class_a_p___a_d_c.html#a86463917e4e51400a0de3e12bb566c72">Ch</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> ch_num);
<a name="l00025"></a>00025 <span class="keyword">private</span>:
<a name="l00026"></a>00026 };
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#include &quot;<a class="code" href="_a_p___a_d_c___a_d_s7844_8h.html">AP_ADC_ADS7844.h</a>&quot;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &quot;<a class="code" href="_a_p___a_d_c___h_i_l_8h.html">AP_ADC_HIL.h</a>&quot;</span>
<a name="l00030"></a>00030
<a name="l00031"></a>00031 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:33 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,78 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_ADS7844.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_ADS7844.cpp File Reference</h1> </div>
</div>
<div class="contents">
<code>#include &lt;inttypes.h&gt;</code><br/>
<code>#include &lt;avr/interrupt.h&gt;</code><br/>
<code>#include &quot;WConstants.h&quot;</code><br/>
<code>#include &quot;<a class="el" href="_a_p___a_d_c___a_d_s7844_8h_source.html">AP_ADC_ADS7844.h</a>&quot;</code><br/>
<div class="dynheader">
Include dependency graph for AP_ADC_ADS7844.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___a_d_c___a_d_s7844_8cpp__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c___a_d_s7844_8cpp" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c___a_d_s7844_8cpp" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c___a_d_s7844_8cpp">
<area shape="rect" id="node9" href="_a_p___a_d_c___a_d_s7844_8h.html" title="AP_ADC_ADS7844.h" alt="" coords="379,83,531,112"/><area shape="rect" id="node11" href="_a_p___a_d_c_8h.html" title="AP_ADC.h" alt="" coords="412,160,497,189"/><area shape="rect" id="node14" href="_a_p___a_d_c___h_i_l_8h.html" title="AP_ADC_HIL.h" alt="" coords="399,237,511,267"/></map>
</div>
<p><a href="_a_p___a_d_c___a_d_s7844_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___a_d_c___a_d_s7844_8cpp.html#a7cfcbe42bd266750aeb6e5d71e5ea479">ISR</a> (TIMER2_OVF_vect)</td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a7cfcbe42bd266750aeb6e5d71e5ea479"></a><!-- doxytag: member="AP_ADC_ADS7844.cpp::ISR" ref="a7cfcbe42bd266750aeb6e5d71e5ea479" args="(TIMER2_OVF_vect)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ISR </td>
<td>(</td>
<td class="paramtype">TIMER2_OVF_vect&nbsp;</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___a_d_c___a_d_s7844_8cpp_source.html#l00072">72</a> of file <a class="el" href="_a_p___a_d_c___a_d_s7844_8cpp_source.html">AP_ADC_ADS7844.cpp</a>.</p>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:34 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,5 @@
<map id="G" name="G">
<area shape="rect" id="node9" href="$_a_p___a_d_c___a_d_s7844_8h.html" title="AP_ADC_ADS7844.h" alt="" coords="379,83,531,112"/>
<area shape="rect" id="node11" href="$_a_p___a_d_c_8h.html" title="AP_ADC.h" alt="" coords="412,160,497,189"/>
<area shape="rect" id="node14" href="$_a_p___a_d_c___h_i_l_8h.html" title="AP_ADC_HIL.h" alt="" coords="399,237,511,267"/>
</map>

View File

@ -0,0 +1 @@
3a5b55560a58ad6124bf5cb2af3677d3

View File

@ -0,0 +1,183 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_ADS7844.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_ADS7844.cpp</h1> </div>
</div>
<div class="contents">
<a href="_a_p___a_d_c___a_d_s7844_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> AP_ADC_ADS7844.cpp - ADC ADS7844 Library for Ardupilot Mega</span>
<a name="l00003"></a>00003 <span class="comment"> Code by Jordi Muñoz and Jose Julio. DIYDrones.com</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment"> Modified by John Ihlein 6/19/2010 to:</span>
<a name="l00006"></a>00006 <span class="comment"> 1)Prevent overflow of adc_counter when more than 8 samples collected between reads. Probably</span>
<a name="l00007"></a>00007 <span class="comment"> only an issue on initial read of ADC at program start.</span>
<a name="l00008"></a>00008 <span class="comment"> 2)Reorder analog read order as follows:</span>
<a name="l00009"></a>00009 <span class="comment"> p, q, r, ax, ay, az</span>
<a name="l00010"></a>00010 <span class="comment"></span>
<a name="l00011"></a>00011 <span class="comment"> This library is free software; you can redistribute it and/or</span>
<a name="l00012"></a>00012 <span class="comment"> modify it under the terms of the GNU Lesser General Public</span>
<a name="l00013"></a>00013 <span class="comment"> License as published by the Free Software Foundation; either</span>
<a name="l00014"></a>00014 <span class="comment"> version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00015"></a>00015 <span class="comment"></span>
<a name="l00016"></a>00016 <span class="comment"> External ADC ADS7844 is connected via Serial port 2 (in SPI mode)</span>
<a name="l00017"></a>00017 <span class="comment"> TXD2 = MOSI = pin PH1</span>
<a name="l00018"></a>00018 <span class="comment"> RXD2 = MISO = pin PH0</span>
<a name="l00019"></a>00019 <span class="comment"> XCK2 = SCK = pin PH2</span>
<a name="l00020"></a>00020 <span class="comment"> Chip Select pin is PC4 (33) [PH6 (9)]</span>
<a name="l00021"></a>00021 <span class="comment"> We are using the 16 clocks per conversion timming to increase efficiency (fast)</span>
<a name="l00022"></a>00022 <span class="comment"> The sampling frequency is 400Hz (Timer2 overflow interrupt)</span>
<a name="l00023"></a>00023 <span class="comment"> So if our loop is at 50Hz, our needed sampling freq should be 100Hz, so</span>
<a name="l00024"></a>00024 <span class="comment"> we have an 4x oversampling and averaging.</span>
<a name="l00025"></a>00025 <span class="comment"></span>
<a name="l00026"></a>00026 <span class="comment"> Methods:</span>
<a name="l00027"></a>00027 <span class="comment"> Init() : Initialization of interrupts an Timers (Timer2 overflow interrupt)</span>
<a name="l00028"></a>00028 <span class="comment"> Ch(ch_num) : Return the ADC channel value</span>
<a name="l00029"></a>00029 <span class="comment"></span>
<a name="l00030"></a>00030 <span class="comment"> // HJI - Input definitions. USB connector assumed to be on the left, Rx and servo</span>
<a name="l00031"></a>00031 <span class="comment"> // connector pins to the rear. IMU shield components facing up. These are board</span>
<a name="l00032"></a>00032 <span class="comment"> // referenced sensor inputs, not device referenced.</span>
<a name="l00033"></a>00033 <span class="comment"> On Ardupilot Mega Hardware, oriented as described above:</span>
<a name="l00034"></a>00034 <span class="comment"> Chennel 0 : yaw rate, r</span>
<a name="l00035"></a>00035 <span class="comment"> Channel 1 : roll rate, p</span>
<a name="l00036"></a>00036 <span class="comment"> Channel 2 : pitch rate, q</span>
<a name="l00037"></a>00037 <span class="comment"> Channel 3 : x/y gyro temperature</span>
<a name="l00038"></a>00038 <span class="comment"> Channel 4 : x acceleration, aX</span>
<a name="l00039"></a>00039 <span class="comment"> Channel 5 : y acceleration, aY</span>
<a name="l00040"></a>00040 <span class="comment"> Channel 6 : z acceleration, aZ</span>
<a name="l00041"></a>00041 <span class="comment"> Channel 7 : Differential pressure sensor port</span>
<a name="l00042"></a>00042 <span class="comment"></span>
<a name="l00043"></a>00043 <span class="comment">*/</span>
<a name="l00044"></a>00044 <span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00045"></a>00045 <span class="comment">// AVR LibC Includes</span>
<a name="l00046"></a>00046 <span class="preprocessor"> #include &lt;inttypes.h&gt;</span>
<a name="l00047"></a>00047 <span class="preprocessor"> #include &lt;avr/interrupt.h&gt;</span>
<a name="l00048"></a>00048 <span class="preprocessor"> #include &quot;WConstants.h&quot;</span>
<a name="l00049"></a>00049 }
<a name="l00050"></a>00050
<a name="l00051"></a>00051 <span class="preprocessor">#include &quot;<a class="code" href="_a_p___a_d_c___a_d_s7844_8h.html">AP_ADC_ADS7844.h</a>&quot;</span>
<a name="l00052"></a>00052
<a name="l00053"></a>00053
<a name="l00054"></a>00054 <span class="comment">// Commands for reading ADC channels on ADS7844</span>
<a name="l00055"></a>00055 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> adc_cmd[9]= { 0x87, 0xC7, 0x97, 0xD7, 0xA7, 0xE7, 0xB7, 0xF7, 0x00 };
<a name="l00056"></a>00056 <span class="keyword">static</span> <span class="keyword">volatile</span> <span class="keywordtype">long</span> adc_value[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
<a name="l00057"></a>00057 <span class="keyword">static</span> <span class="keyword">volatile</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> adc_counter[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
<a name="l00058"></a>00058
<a name="l00059"></a>00059 <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> ADC_SPI_transfer(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> data)
<a name="l00060"></a>00060 {
<a name="l00061"></a>00061 <span class="comment">/* Wait for empty transmit buffer */</span>
<a name="l00062"></a>00062 <span class="keywordflow">while</span> ( !( UCSR2A &amp; (1&lt;&lt;UDRE2)) );
<a name="l00063"></a>00063 <span class="comment">/* Put data into buffer, sends the data */</span>
<a name="l00064"></a>00064 UDR2 = data;
<a name="l00065"></a>00065 <span class="comment">/* Wait for data to be received */</span>
<a name="l00066"></a>00066 <span class="keywordflow">while</span> ( !(UCSR2A &amp; (1&lt;&lt;RXC2)) );
<a name="l00067"></a>00067 <span class="comment">/* Get and return received data from buffer */</span>
<a name="l00068"></a>00068 <span class="keywordflow">return</span> UDR2;
<a name="l00069"></a>00069 }
<a name="l00070"></a>00070
<a name="l00071"></a>00071
<a name="l00072"></a><a class="code" href="_a_p___a_d_c___a_d_s7844_8cpp.html#a7cfcbe42bd266750aeb6e5d71e5ea479">00072</a> <a class="code" href="_a_p___a_d_c___a_d_s7844_8cpp.html#a7cfcbe42bd266750aeb6e5d71e5ea479">ISR</a> (TIMER2_OVF_vect)
<a name="l00073"></a>00073 {
<a name="l00074"></a>00074 uint8_t ch;
<a name="l00075"></a>00075 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> adc_tmp;
<a name="l00076"></a>00076
<a name="l00077"></a>00077 <span class="comment">//bit_set(PORTL,6); // To test performance</span>
<a name="l00078"></a>00078 <a class="code" href="_a_p___a_d_c___a_d_s7844_8h.html#a4befea8f39b82371375372c32827a577">bit_clear</a>(PORTC,4); <span class="comment">// Enable Chip Select (PIN PC4)</span>
<a name="l00079"></a>00079 ADC_SPI_transfer(adc_cmd[0]); <span class="comment">// Command to read the first channel</span>
<a name="l00080"></a>00080 <span class="keywordflow">for</span> (ch=0;ch&lt;8;ch++)
<a name="l00081"></a>00081 {
<a name="l00082"></a>00082 <span class="keywordflow">if</span> (adc_counter[ch] &gt;= 17) <span class="comment">// HJI - Added this to prevent</span>
<a name="l00083"></a>00083 { <span class="comment">// overflow of adc_value</span>
<a name="l00084"></a>00084 adc_value[ch] = 0;
<a name="l00085"></a>00085 adc_counter[ch] = 0;
<a name="l00086"></a>00086 }
<a name="l00087"></a>00087 adc_tmp = ADC_SPI_transfer(0)&lt;&lt;8; <span class="comment">// Read first byte</span>
<a name="l00088"></a>00088 adc_tmp |= ADC_SPI_transfer(adc_cmd[ch+1]); <span class="comment">// Read second byte and send next command</span>
<a name="l00089"></a>00089 adc_value[ch] += adc_tmp&gt;&gt;3; <span class="comment">// Shift to 12 bits</span>
<a name="l00090"></a>00090 adc_counter[ch]++; <span class="comment">// Number of samples</span>
<a name="l00091"></a>00091 }
<a name="l00092"></a>00092 <a class="code" href="_a_p___a_d_c___a_d_s7844_8h.html#a05adecac4f6f6e2d5e6bf43b496bbc9f">bit_set</a>(PORTC,4); <span class="comment">// Disable Chip Select (PIN PC4)</span>
<a name="l00093"></a>00093 <span class="comment">//bit_clear(PORTL,6); // To test performance</span>
<a name="l00094"></a>00094 TCNT2 = 104; <span class="comment">// 400 Hz</span>
<a name="l00095"></a>00095 }
<a name="l00096"></a>00096
<a name="l00097"></a>00097
<a name="l00098"></a>00098 <span class="comment">// Constructors ////////////////////////////////////////////////////////////////</span>
<a name="l00099"></a><a class="code" href="class_a_p___a_d_c___a_d_s7844.html#a282a180859046b6cf98782fc150fa61a">00099</a> <a class="code" href="class_a_p___a_d_c___a_d_s7844.html#a282a180859046b6cf98782fc150fa61a">AP_ADC_ADS7844::AP_ADC_ADS7844</a>()
<a name="l00100"></a>00100 {
<a name="l00101"></a>00101 }
<a name="l00102"></a>00102
<a name="l00103"></a>00103 <span class="comment">// Public Methods //////////////////////////////////////////////////////////////</span>
<a name="l00104"></a><a class="code" href="class_a_p___a_d_c___a_d_s7844.html#a15f6735b9bbe6c15a097bbb45bb024ad">00104</a> <span class="keywordtype">void</span> <a class="code" href="class_a_p___a_d_c___a_d_s7844.html#a15f6735b9bbe6c15a097bbb45bb024ad">AP_ADC_ADS7844::Init</a>(<span class="keywordtype">void</span>)
<a name="l00105"></a>00105 {
<a name="l00106"></a>00106 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> tmp;
<a name="l00107"></a>00107
<a name="l00108"></a>00108 pinMode(<a class="code" href="_a_p___a_d_c___a_d_s7844_8h.html#ae3ad6262e79df85ff68f27ad8293e8d1">ADC_CHIP_SELECT</a>,OUTPUT);
<a name="l00109"></a>00109
<a name="l00110"></a>00110 digitalWrite(<a class="code" href="_a_p___a_d_c___a_d_s7844_8h.html#ae3ad6262e79df85ff68f27ad8293e8d1">ADC_CHIP_SELECT</a>,HIGH); <span class="comment">// Disable device (Chip select is active low)</span>
<a name="l00111"></a>00111
<a name="l00112"></a>00112 <span class="comment">// Setup Serial Port2 in SPI mode</span>
<a name="l00113"></a>00113 UBRR2 = 0;
<a name="l00114"></a>00114 DDRH |= (1&lt;&lt;PH2); <span class="comment">// SPI clock XCK2 (PH2) as output. This enable SPI Master mode</span>
<a name="l00115"></a>00115 <span class="comment">// Set MSPI mode of operation and SPI data mode 0.</span>
<a name="l00116"></a>00116 UCSR2C = (1&lt;&lt;UMSEL21)|(1&lt;&lt;UMSEL20); <span class="comment">//|(0&lt;&lt;UCPHA2)|(0&lt;&lt;UCPOL2);</span>
<a name="l00117"></a>00117 <span class="comment">// Enable receiver and transmitter.</span>
<a name="l00118"></a>00118 UCSR2B = (1&lt;&lt;RXEN2)|(1&lt;&lt;TXEN2);
<a name="l00119"></a>00119 <span class="comment">// Set Baud rate</span>
<a name="l00120"></a>00120 UBRR2 = 2; <span class="comment">// SPI clock running at 2.6MHz</span>
<a name="l00121"></a>00121
<a name="l00122"></a>00122
<a name="l00123"></a>00123 <span class="comment">// Enable Timer2 Overflow interrupt to capture ADC data</span>
<a name="l00124"></a>00124 TIMSK2 = 0; <span class="comment">// Disable interrupts</span>
<a name="l00125"></a>00125 TCCR2A = 0; <span class="comment">// normal counting mode</span>
<a name="l00126"></a>00126 TCCR2B = _BV(CS21)|_BV(CS22); <span class="comment">// Set prescaler of 256</span>
<a name="l00127"></a>00127 TCNT2 = 0;
<a name="l00128"></a>00128 TIFR2 = _BV(TOV2); <span class="comment">// clear pending interrupts;</span>
<a name="l00129"></a>00129 TIMSK2 = _BV(TOIE2) ; <span class="comment">// enable the overflow interrupt</span>
<a name="l00130"></a>00130 }
<a name="l00131"></a>00131
<a name="l00132"></a>00132 <span class="comment">// Read one channel value</span>
<a name="l00133"></a><a class="code" href="class_a_p___a_d_c___a_d_s7844.html#a34bdd64e83c812bdecbe9ece209cd6f3">00133</a> <span class="keywordtype">int</span> <a class="code" href="class_a_p___a_d_c___a_d_s7844.html#a34bdd64e83c812bdecbe9ece209cd6f3">AP_ADC_ADS7844::Ch</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> ch_num)
<a name="l00134"></a>00134 {
<a name="l00135"></a>00135 <span class="keywordtype">int</span> result;
<a name="l00136"></a>00136
<a name="l00137"></a>00137 cli(); <span class="comment">// We stop interrupts to read the variables</span>
<a name="l00138"></a>00138 <span class="keywordflow">if</span> (adc_counter[ch_num]&gt;0)
<a name="l00139"></a>00139 result = adc_value[ch_num]/adc_counter[ch_num];
<a name="l00140"></a>00140 <span class="keywordflow">else</span>
<a name="l00141"></a>00141 result = 0;
<a name="l00142"></a>00142 adc_value[ch_num] = 0; <span class="comment">// Initialize for next reading</span>
<a name="l00143"></a>00143 adc_counter[ch_num] = 0;
<a name="l00144"></a>00144 sei();
<a name="l00145"></a>00145 <span class="keywordflow">return</span>(result);
<a name="l00146"></a>00146 }
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:33 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,189 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_ADS7844.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#define-members">Defines</a> </div>
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_ADS7844.h File Reference</h1> </div>
</div>
<div class="contents">
<code>#include &quot;<a class="el" href="_a_p___a_d_c_8h_source.html">AP_ADC.h</a>&quot;</code><br/>
<div class="dynheader">
Include dependency graph for AP_ADC_ADS7844.h:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___a_d_c___a_d_s7844_8h__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c___a_d_s7844_8h" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c___a_d_s7844_8h" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c___a_d_s7844_8h">
<area shape="rect" id="node3" href="_a_p___a_d_c_8h.html" title="AP_ADC.h" alt="" coords="183,83,268,112"/><area shape="rect" id="node6" href="_a_p___a_d_c___h_i_l_8h.html" title="AP_ADC_HIL.h" alt="" coords="169,160,281,189"/></map>
</div>
<div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___a_d_c___a_d_s7844_8h__dep__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c___a_d_s7844_8hdep" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c___a_d_s7844_8hdep" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c___a_d_s7844_8hdep">
<area shape="rect" id="node3" href="_a_p___a_d_c_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC.h" alt="" coords="548,83,921,112"/><area shape="rect" id="node28" href="_a_p___a_d_c___a_d_s7844_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_ADS7844.cpp" alt="" coords="945,83,1399,112"/><area shape="rect" id="node5" href="_a_p___a_d_c_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC.cpp" alt="" coords="5,160,392,189"/><area shape="rect" id="node8" href="_a_p___a_d_c___h_i_l_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_HIL.h" alt="" coords="416,160,816,189"/><area shape="rect" id="node13" href="_a_p___d_c_m___h_i_l_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.h" alt="" coords="1344,237,1747,267"/><area shape="rect" id="node15" href="_a_p___d_c_m_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.h" alt="" coords="716,315,1092,344"/><area shape="rect" id="node22" href="_a_p___i_m_u_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_IMU/AP_IMU.h" alt="" coords="919,160,1284,189"/><area shape="rect" id="node11" href="_a_p___a_d_c___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_HIL.cpp" alt="" coords="403,237,816,267"/><area shape="rect" id="node19" href="_a_p___d_c_m___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.cpp" alt="" coords="1336,315,1755,344"/><area shape="rect" id="node17" href="_a_p___d_c_m_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.cpp" alt="" coords="708,392,1100,421"/><area shape="rect" id="node26" href="_a_p___i_m_u_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_IMU/AP_IMU.cpp" alt="" coords="941,237,1320,267"/></map>
</div>
<p><a href="_a_p___a_d_c___a_d_s7844_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___a_d_c___a_d_s7844.html">AP_ADC_ADS7844</a></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___a_d_c___a_d_s7844_8h.html#a05adecac4f6f6e2d5e6bf43b496bbc9f">bit_set</a>(p, m)&nbsp;&nbsp;&nbsp;((p) |= ( 1&lt;&lt;m))</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___a_d_c___a_d_s7844_8h.html#a4befea8f39b82371375372c32827a577">bit_clear</a>(p, m)&nbsp;&nbsp;&nbsp;((p) &amp;= ~(1&lt;&lt;m))</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___a_d_c___a_d_s7844_8h.html#a5aa2fb5f9d53ff212dba7368fd0c4e00">ADC_DATAOUT</a>&nbsp;&nbsp;&nbsp;51</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___a_d_c___a_d_s7844_8h.html#a26eb539027d693cc3826c414d11c366d">ADC_DATAIN</a>&nbsp;&nbsp;&nbsp;50</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___a_d_c___a_d_s7844_8h.html#ab73167dbbd40eb138e3eb548ef907351">ADC_SPICLOCK</a>&nbsp;&nbsp;&nbsp;52</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___a_d_c___a_d_s7844_8h.html#ae3ad6262e79df85ff68f27ad8293e8d1">ADC_CHIP_SELECT</a>&nbsp;&nbsp;&nbsp;33</td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="ae3ad6262e79df85ff68f27ad8293e8d1"></a><!-- doxytag: member="AP_ADC_ADS7844.h::ADC_CHIP_SELECT" ref="ae3ad6262e79df85ff68f27ad8293e8d1" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ADC_CHIP_SELECT&nbsp;&nbsp;&nbsp;33</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___a_d_c___a_d_s7844_8h_source.html#l00011">11</a> of file <a class="el" href="_a_p___a_d_c___a_d_s7844_8h_source.html">AP_ADC_ADS7844.h</a>.</p>
</div>
</div>
<a class="anchor" id="a26eb539027d693cc3826c414d11c366d"></a><!-- doxytag: member="AP_ADC_ADS7844.h::ADC_DATAIN" ref="a26eb539027d693cc3826c414d11c366d" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ADC_DATAIN&nbsp;&nbsp;&nbsp;50</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___a_d_c___a_d_s7844_8h_source.html#l00009">9</a> of file <a class="el" href="_a_p___a_d_c___a_d_s7844_8h_source.html">AP_ADC_ADS7844.h</a>.</p>
</div>
</div>
<a class="anchor" id="a5aa2fb5f9d53ff212dba7368fd0c4e00"></a><!-- doxytag: member="AP_ADC_ADS7844.h::ADC_DATAOUT" ref="a5aa2fb5f9d53ff212dba7368fd0c4e00" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ADC_DATAOUT&nbsp;&nbsp;&nbsp;51</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___a_d_c___a_d_s7844_8h_source.html#l00008">8</a> of file <a class="el" href="_a_p___a_d_c___a_d_s7844_8h_source.html">AP_ADC_ADS7844.h</a>.</p>
</div>
</div>
<a class="anchor" id="ab73167dbbd40eb138e3eb548ef907351"></a><!-- doxytag: member="AP_ADC_ADS7844.h::ADC_SPICLOCK" ref="ab73167dbbd40eb138e3eb548ef907351" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ADC_SPICLOCK&nbsp;&nbsp;&nbsp;52</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___a_d_c___a_d_s7844_8h_source.html#l00010">10</a> of file <a class="el" href="_a_p___a_d_c___a_d_s7844_8h_source.html">AP_ADC_ADS7844.h</a>.</p>
</div>
</div>
<a class="anchor" id="a4befea8f39b82371375372c32827a577"></a><!-- doxytag: member="AP_ADC_ADS7844.h::bit_clear" ref="a4befea8f39b82371375372c32827a577" args="(p, m)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define bit_clear</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">p, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">m</td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td>&nbsp;&nbsp;&nbsp;((p) &amp;= ~(1&lt;&lt;m))</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___a_d_c___a_d_s7844_8h_source.html#l00005">5</a> of file <a class="el" href="_a_p___a_d_c___a_d_s7844_8h_source.html">AP_ADC_ADS7844.h</a>.</p>
</div>
</div>
<a class="anchor" id="a05adecac4f6f6e2d5e6bf43b496bbc9f"></a><!-- doxytag: member="AP_ADC_ADS7844.h::bit_set" ref="a05adecac4f6f6e2d5e6bf43b496bbc9f" args="(p, m)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define bit_set</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">p, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">m</td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td>&nbsp;&nbsp;&nbsp;((p) |= ( 1&lt;&lt;m))</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___a_d_c___a_d_s7844_8h_source.html#l00004">4</a> of file <a class="el" href="_a_p___a_d_c___a_d_s7844_8h_source.html">AP_ADC_ADS7844.h</a>.</p>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:34 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,13 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_a_p___a_d_c_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC.h" alt="" coords="548,83,921,112"/>
<area shape="rect" id="node28" href="$_a_p___a_d_c___a_d_s7844_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_ADS7844.cpp" alt="" coords="945,83,1399,112"/>
<area shape="rect" id="node5" href="$_a_p___a_d_c_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC.cpp" alt="" coords="5,160,392,189"/>
<area shape="rect" id="node8" href="$_a_p___a_d_c___h_i_l_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_HIL.h" alt="" coords="416,160,816,189"/>
<area shape="rect" id="node13" href="$_a_p___d_c_m___h_i_l_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.h" alt="" coords="1344,237,1747,267"/>
<area shape="rect" id="node15" href="$_a_p___d_c_m_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.h" alt="" coords="716,315,1092,344"/>
<area shape="rect" id="node22" href="$_a_p___i_m_u_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_IMU/AP_IMU.h" alt="" coords="919,160,1284,189"/>
<area shape="rect" id="node11" href="$_a_p___a_d_c___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_HIL.cpp" alt="" coords="403,237,816,267"/>
<area shape="rect" id="node19" href="$_a_p___d_c_m___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.cpp" alt="" coords="1336,315,1755,344"/>
<area shape="rect" id="node17" href="$_a_p___d_c_m_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.cpp" alt="" coords="708,392,1100,421"/>
<area shape="rect" id="node26" href="$_a_p___i_m_u_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_IMU/AP_IMU.cpp" alt="" coords="941,237,1320,267"/>
</map>

View File

@ -0,0 +1 @@
c93cde9f93dbf54f81f337b7a1664d6d

View File

@ -0,0 +1,4 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_a_p___a_d_c_8h.html" title="AP_ADC.h" alt="" coords="183,83,268,112"/>
<area shape="rect" id="node6" href="$_a_p___a_d_c___h_i_l_8h.html" title="AP_ADC_HIL.h" alt="" coords="169,160,281,189"/>
</map>

View File

@ -0,0 +1 @@
ef5742a960ea4574cc3c053ca278ebfe

View File

@ -0,0 +1,61 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_ADS7844.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_ADS7844.h</h1> </div>
</div>
<div class="contents">
<a href="_a_p___a_d_c___a_d_s7844_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef AP_ADC_ADS7844_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define AP_ADC_ADS7844_H</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a><a class="code" href="_a_p___a_d_c___a_d_s7844_8h.html#a05adecac4f6f6e2d5e6bf43b496bbc9f">00004</a> <span class="preprocessor">#define bit_set(p,m) ((p) |= ( 1&lt;&lt;m))</span>
<a name="l00005"></a><a class="code" href="_a_p___a_d_c___a_d_s7844_8h.html#a4befea8f39b82371375372c32827a577">00005</a> <span class="preprocessor"></span><span class="preprocessor">#define bit_clear(p,m) ((p) &amp;= ~(1&lt;&lt;m))</span>
<a name="l00006"></a>00006 <span class="preprocessor"></span>
<a name="l00007"></a>00007 <span class="comment">// We use Serial Port 2 in SPI Mode</span>
<a name="l00008"></a><a class="code" href="_a_p___a_d_c___a_d_s7844_8h.html#a5aa2fb5f9d53ff212dba7368fd0c4e00">00008</a> <span class="preprocessor">#define ADC_DATAOUT 51 // MOSI</span>
<a name="l00009"></a><a class="code" href="_a_p___a_d_c___a_d_s7844_8h.html#a26eb539027d693cc3826c414d11c366d">00009</a> <span class="preprocessor"></span><span class="preprocessor">#define ADC_DATAIN 50 // MISO</span>
<a name="l00010"></a><a class="code" href="_a_p___a_d_c___a_d_s7844_8h.html#ab73167dbbd40eb138e3eb548ef907351">00010</a> <span class="preprocessor"></span><span class="preprocessor">#define ADC_SPICLOCK 52 // SCK</span>
<a name="l00011"></a><a class="code" href="_a_p___a_d_c___a_d_s7844_8h.html#ae3ad6262e79df85ff68f27ad8293e8d1">00011</a> <span class="preprocessor"></span><span class="preprocessor">#define ADC_CHIP_SELECT 33 // PC4 9 // PH6 Puerto:0x08 Bit mask : 0x40</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;<a class="code" href="_a_p___a_d_c_8h.html">AP_ADC.h</a>&quot;</span>
<a name="l00014"></a>00014
<a name="l00015"></a><a class="code" href="class_a_p___a_d_c___a_d_s7844.html">00015</a> <span class="keyword">class </span><a class="code" href="class_a_p___a_d_c___a_d_s7844.html">AP_ADC_ADS7844</a> : <span class="keyword">public</span> <a class="code" href="class_a_p___a_d_c.html">AP_ADC</a>
<a name="l00016"></a>00016 {
<a name="l00017"></a>00017 <span class="keyword">public</span>:
<a name="l00018"></a>00018 <a class="code" href="class_a_p___a_d_c___a_d_s7844.html#a282a180859046b6cf98782fc150fa61a">AP_ADC_ADS7844</a>(); <span class="comment">// Constructor</span>
<a name="l00019"></a>00019 <span class="keywordtype">void</span> <a class="code" href="class_a_p___a_d_c___a_d_s7844.html#a15f6735b9bbe6c15a097bbb45bb024ad">Init</a>();
<a name="l00020"></a>00020 <span class="keywordtype">int</span> <a class="code" href="class_a_p___a_d_c___a_d_s7844.html#a34bdd64e83c812bdecbe9ece209cd6f3">Ch</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> ch_num);
<a name="l00021"></a>00021 <span class="keyword">private</span>:
<a name="l00022"></a>00022 };
<a name="l00023"></a>00023
<a name="l00024"></a>00024 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:33 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,50 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_HIL.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_HIL.cpp File Reference</h1> </div>
</div>
<div class="contents">
<code>#include &quot;<a class="el" href="_a_p___a_d_c___h_i_l_8h_source.html">AP_ADC_HIL.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_w_program_8h_source.html">WProgram.h</a>&quot;</code><br/>
<div class="dynheader">
Include dependency graph for AP_ADC_HIL.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___a_d_c___h_i_l_8cpp__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c___h_i_l_8cpp" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c___h_i_l_8cpp" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c___h_i_l_8cpp">
<area shape="rect" id="node3" href="_a_p___a_d_c___h_i_l_8h.html" title="AP_ADC_HIL.h" alt="" coords="101,83,213,112"/><area shape="rect" id="node13" href="_w_program_8h.html" title="WProgram.h" alt="" coords="237,83,336,112"/><area shape="rect" id="node7" href="_a_p___a_d_c_8h.html" title="AP_ADC.h" alt="" coords="115,160,200,189"/><area shape="rect" id="node9" href="_a_p___a_d_c___a_d_s7844_8h.html" title="AP_ADC_ADS7844.h" alt="" coords="81,237,233,267"/></map>
</div>
<p><a href="_a_p___a_d_c___h_i_l_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
</table>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:34 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,6 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_a_p___a_d_c___h_i_l_8h.html" title="AP_ADC_HIL.h" alt="" coords="101,83,213,112"/>
<area shape="rect" id="node13" href="$_w_program_8h.html" title="WProgram.h" alt="" coords="237,83,336,112"/>
<area shape="rect" id="node7" href="$_a_p___a_d_c_8h.html" title="AP_ADC.h" alt="" coords="115,160,200,189"/>
<area shape="rect" id="node9" href="$_a_p___a_d_c___a_d_s7844_8h.html" title="AP_ADC_ADS7844.h" alt="" coords="81,237,233,267"/>
</map>

View File

@ -0,0 +1 @@
4e0a8f8994bb0317f99de4ce7722b504

View File

@ -0,0 +1,106 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_HIL.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_HIL.cpp</h1> </div>
</div>
<div class="contents">
<a href="_a_p___a_d_c___h_i_l_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include &quot;<a class="code" href="_a_p___a_d_c___h_i_l_8h.html">AP_ADC_HIL.h</a>&quot;</span>
<a name="l00002"></a>00002 <span class="preprocessor">#include &quot;<a class="code" href="_w_program_8h.html">WProgram.h</a>&quot;</span>
<a name="l00003"></a>00003
<a name="l00004"></a>00004 <span class="comment">/*</span>
<a name="l00005"></a>00005 <span class="comment"> AP_ADC_HIL.cpp</span>
<a name="l00006"></a>00006 <span class="comment"> Author: James Goppert</span>
<a name="l00007"></a>00007 <span class="comment"></span>
<a name="l00008"></a>00008 <span class="comment"> License:</span>
<a name="l00009"></a>00009 <span class="comment"> This library is free software; you can redistribute it and/or</span>
<a name="l00010"></a>00010 <span class="comment"> modify it under the terms of the GNU Lesser General Public</span>
<a name="l00011"></a>00011 <span class="comment"> License as published by the Free Software Foundation; either</span>
<a name="l00012"></a>00012 <span class="comment"> version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00013"></a>00013 <span class="comment">*/</span>
<a name="l00014"></a>00014
<a name="l00015"></a>00015 <span class="keyword">const</span> uint8_t AP_ADC_HIL::sensors[6] = {1,2,0,4,5,6};
<a name="l00016"></a>00016 <span class="keyword">const</span> int8_t AP_ADC_HIL::sensorSign[6] = { 1, -1, -1,-1, 1, 1};
<a name="l00017"></a>00017 <span class="keyword">const</span> <span class="keywordtype">float</span> AP_ADC_HIL::gyroBias[3] = {1665,1665,1665};
<a name="l00018"></a>00018 <span class="keyword">const</span> <span class="keywordtype">float</span> AP_ADC_HIL::accelBias[3] = {2025,2025,2025};
<a name="l00019"></a>00019 <span class="comment">// gyroScale = 1/[GyroGain*pi/180] GyroGains (0.4,0.41,0.41)</span>
<a name="l00020"></a>00020 <span class="keyword">const</span> <span class="keywordtype">float</span> AP_ADC_HIL::gyroScale[3] = {143.239, 139.746, 139.746};
<a name="l00021"></a>00021 <span class="keyword">const</span> <span class="keywordtype">float</span> AP_ADC_HIL::accelScale[3] = {418,418,418}; <span class="comment">// adcPerG</span>
<a name="l00022"></a>00022
<a name="l00023"></a><a class="code" href="class_a_p___a_d_c___h_i_l.html#aaf28ba26c4e5f7efb92ae5a77fb93b8e">00023</a> <a class="code" href="class_a_p___a_d_c___h_i_l.html#aaf28ba26c4e5f7efb92ae5a77fb93b8e">AP_ADC_HIL::AP_ADC_HIL</a>()
<a name="l00024"></a>00024 {
<a name="l00025"></a>00025 <span class="comment">// gyros set to zero for calibration</span>
<a name="l00026"></a>00026 setGyro(0,0);
<a name="l00027"></a>00027 setGyro(1,0);
<a name="l00028"></a>00028 setGyro(2,0);
<a name="l00029"></a>00029
<a name="l00030"></a>00030 <span class="comment">// accels set to zero for calibration</span>
<a name="l00031"></a>00031 setAccel(0,0);
<a name="l00032"></a>00032 setAccel(1,0);
<a name="l00033"></a>00033 setAccel(2,0);
<a name="l00034"></a>00034
<a name="l00035"></a>00035 <span class="comment">// set diff press and temp to zero</span>
<a name="l00036"></a>00036 setGyroTemp(0);
<a name="l00037"></a>00037 setPressure(0);
<a name="l00038"></a>00038 }
<a name="l00039"></a>00039
<a name="l00040"></a><a class="code" href="class_a_p___a_d_c___h_i_l.html#ad8daf76e8e59008219d7d1ff03d4b8f1">00040</a> <span class="keywordtype">void</span> <a class="code" href="class_a_p___a_d_c___h_i_l.html#ad8daf76e8e59008219d7d1ff03d4b8f1">AP_ADC_HIL::Init</a>(<span class="keywordtype">void</span>)
<a name="l00041"></a>00041 {
<a name="l00042"></a>00042 }
<a name="l00043"></a>00043
<a name="l00044"></a>00044 <span class="comment">// Read one channel value</span>
<a name="l00045"></a><a class="code" href="class_a_p___a_d_c___h_i_l.html#a7c79592a003322aec008aa48ebe8967c">00045</a> <span class="keywordtype">int</span> <a class="code" href="class_a_p___a_d_c___h_i_l.html#a7c79592a003322aec008aa48ebe8967c">AP_ADC_HIL::Ch</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> ch_num)
<a name="l00046"></a>00046 {
<a name="l00047"></a>00047 <span class="keywordflow">return</span> adcValue[ch_num];
<a name="l00048"></a>00048 }
<a name="l00049"></a>00049
<a name="l00050"></a>00050 <span class="comment">// Set one channel value</span>
<a name="l00051"></a><a class="code" href="class_a_p___a_d_c___h_i_l.html#afa27c576c7cc52fbac840c96b09bb238">00051</a> <span class="keywordtype">int</span> <a class="code" href="class_a_p___a_d_c___h_i_l.html#afa27c576c7cc52fbac840c96b09bb238">AP_ADC_HIL::setHIL</a>(int16_t p, int16_t q, int16_t r, int16_t gyroTemp,
<a name="l00052"></a>00052 int16_t aX, int16_t aY, int16_t aZ, int16_t diffPress)
<a name="l00053"></a>00053 {
<a name="l00054"></a>00054 <span class="comment">// gyros</span>
<a name="l00055"></a>00055 setGyro(0,p);
<a name="l00056"></a>00056 setGyro(1,q);
<a name="l00057"></a>00057 setGyro(2,r);
<a name="l00058"></a>00058
<a name="l00059"></a>00059 <span class="comment">// temp</span>
<a name="l00060"></a>00060 setGyroTemp(gyroTemp);
<a name="l00061"></a>00061
<a name="l00062"></a>00062 <span class="comment">// accel</span>
<a name="l00063"></a>00063 setAccel(0,aX);
<a name="l00064"></a>00064 setAccel(1,aY);
<a name="l00065"></a>00065 setAccel(2,aZ);
<a name="l00066"></a>00066
<a name="l00067"></a>00067 <span class="comment">// differential pressure</span>
<a name="l00068"></a>00068 setPressure(diffPress);
<a name="l00069"></a>00069 }
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:33 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,62 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_HIL.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> </div>
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_HIL.h File Reference</h1> </div>
</div>
<div class="contents">
<code>#include &lt;inttypes.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="_a_p___a_d_c_8h_source.html">AP_ADC.h</a>&quot;</code><br/>
<div class="dynheader">
Include dependency graph for AP_ADC_HIL.h:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___a_d_c___h_i_l_8h__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c___h_i_l_8h" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c___h_i_l_8h" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c___h_i_l_8h">
<area shape="rect" id="node5" href="_a_p___a_d_c_8h.html" title="AP_ADC.h" alt="" coords="163,83,248,112"/><area shape="rect" id="node7" href="_a_p___a_d_c___a_d_s7844_8h.html" title="AP_ADC_ADS7844.h" alt="" coords="129,160,281,189"/></map>
</div>
<div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___a_d_c___h_i_l_8h__dep__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c___h_i_l_8hdep" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c___h_i_l_8hdep" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___a_d_c_2_a_p___a_d_c___h_i_l_8hdep">
<area shape="rect" id="node3" href="_a_p___a_d_c_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC.h" alt="" coords="577,83,951,112"/><area shape="rect" id="node28" href="_a_p___a_d_c___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_HIL.cpp" alt="" coords="975,83,1388,112"/><area shape="rect" id="node5" href="_a_p___a_d_c_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC.cpp" alt="" coords="5,160,392,189"/><area shape="rect" id="node7" href="_a_p___a_d_c___a_d_s7844_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_ADS7844.h" alt="" coords="416,160,856,189"/><area shape="rect" id="node13" href="_a_p___d_c_m___h_i_l_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.h" alt="" coords="1384,237,1787,267"/><area shape="rect" id="node15" href="_a_p___d_c_m_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.h" alt="" coords="756,315,1132,344"/><area shape="rect" id="node22" href="_a_p___i_m_u_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_IMU/AP_IMU.h" alt="" coords="959,160,1324,189"/><area shape="rect" id="node10" href="_a_p___a_d_c___a_d_s7844_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_ADS7844.cpp" alt="" coords="403,237,856,267"/><area shape="rect" id="node19" href="_a_p___d_c_m___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.cpp" alt="" coords="1376,315,1795,344"/><area shape="rect" id="node17" href="_a_p___d_c_m_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.cpp" alt="" coords="748,392,1140,421"/><area shape="rect" id="node26" href="_a_p___i_m_u_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_IMU/AP_IMU.cpp" alt="" coords="981,237,1360,267"/></map>
</div>
<p><a href="_a_p___a_d_c___h_i_l_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___a_d_c___h_i_l.html">AP_ADC_HIL</a></td></tr>
</table>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:34 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,13 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_a_p___a_d_c_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC.h" alt="" coords="577,83,951,112"/>
<area shape="rect" id="node28" href="$_a_p___a_d_c___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_HIL.cpp" alt="" coords="975,83,1388,112"/>
<area shape="rect" id="node5" href="$_a_p___a_d_c_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC.cpp" alt="" coords="5,160,392,189"/>
<area shape="rect" id="node7" href="$_a_p___a_d_c___a_d_s7844_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_ADS7844.h" alt="" coords="416,160,856,189"/>
<area shape="rect" id="node13" href="$_a_p___d_c_m___h_i_l_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.h" alt="" coords="1384,237,1787,267"/>
<area shape="rect" id="node15" href="$_a_p___d_c_m_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.h" alt="" coords="756,315,1132,344"/>
<area shape="rect" id="node22" href="$_a_p___i_m_u_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_IMU/AP_IMU.h" alt="" coords="959,160,1324,189"/>
<area shape="rect" id="node10" href="$_a_p___a_d_c___a_d_s7844_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_ADS7844.cpp" alt="" coords="403,237,856,267"/>
<area shape="rect" id="node19" href="$_a_p___d_c_m___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.cpp" alt="" coords="1376,315,1795,344"/>
<area shape="rect" id="node17" href="$_a_p___d_c_m_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.cpp" alt="" coords="748,392,1140,421"/>
<area shape="rect" id="node26" href="$_a_p___i_m_u_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_IMU/AP_IMU.cpp" alt="" coords="981,237,1360,267"/>
</map>

View File

@ -0,0 +1 @@
29e8bb6fa047132e2ac25f8acfe14d8a

View File

@ -0,0 +1,4 @@
<map id="G" name="G">
<area shape="rect" id="node5" href="$_a_p___a_d_c_8h.html" title="AP_ADC.h" alt="" coords="163,83,248,112"/>
<area shape="rect" id="node7" href="$_a_p___a_d_c___a_d_s7844_8h.html" title="AP_ADC_ADS7844.h" alt="" coords="129,160,281,189"/>
</map>

View File

@ -0,0 +1 @@
1365f44f52bcf144d0d03f85e0897ce1

View File

@ -0,0 +1,115 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_HIL.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_ADC/AP_ADC_HIL.h</h1> </div>
</div>
<div class="contents">
<a href="_a_p___a_d_c___h_i_l_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef AP_ADC_HIL_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define AP_ADC_HIL_H</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="comment">/*</span>
<a name="l00005"></a>00005 <span class="comment"> AP_ADC_HIL.h</span>
<a name="l00006"></a>00006 <span class="comment"> Author: James Goppert</span>
<a name="l00007"></a>00007 <span class="comment"></span>
<a name="l00008"></a>00008 <span class="comment"> License:</span>
<a name="l00009"></a>00009 <span class="comment"> This library is free software; you can redistribute it and/or</span>
<a name="l00010"></a>00010 <span class="comment"> modify it under the terms of the GNU Lesser General Public</span>
<a name="l00011"></a>00011 <span class="comment"> License as published by the Free Software Foundation; either</span>
<a name="l00012"></a>00012 <span class="comment"> version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00013"></a>00013 <span class="comment">*/</span>
<a name="l00014"></a>00014
<a name="l00015"></a>00015 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
<a name="l00016"></a>00016 <span class="preprocessor">#include &quot;<a class="code" href="_a_p___a_d_c_8h.html">AP_ADC.h</a>&quot;</span>
<a name="l00017"></a>00017
<a name="l00019"></a>00019 <span class="comment">// A hardware in the loop model of the ADS7844 analog to digital converter</span>
<a name="l00020"></a>00020 <span class="comment">// @author James Goppert DIYDrones.com</span>
<a name="l00021"></a><a class="code" href="class_a_p___a_d_c___h_i_l.html">00021</a> <span class="keyword">class </span><a class="code" href="class_a_p___a_d_c___h_i_l.html">AP_ADC_HIL</a> : <span class="keyword">public</span> <a class="code" href="class_a_p___a_d_c.html">AP_ADC</a>
<a name="l00022"></a>00022 {
<a name="l00023"></a>00023 <span class="keyword">public</span>:
<a name="l00024"></a>00024
<a name="l00026"></a>00026 <span class="comment">// Constructor</span>
<a name="l00027"></a>00027 <a class="code" href="class_a_p___a_d_c___h_i_l.html#aaf28ba26c4e5f7efb92ae5a77fb93b8e">AP_ADC_HIL</a>(); <span class="comment">// Constructor</span>
<a name="l00028"></a>00028
<a name="l00030"></a>00030 <span class="comment">// Initializes sensor, part of public AP_ADC interface</span>
<a name="l00031"></a>00031 <span class="keywordtype">void</span> <a class="code" href="class_a_p___a_d_c___h_i_l.html#ad8daf76e8e59008219d7d1ff03d4b8f1">Init</a>();
<a name="l00032"></a>00032
<a name="l00034"></a>00034 <span class="comment">// Read the sensor, part of public AP_ADC interface</span>
<a name="l00035"></a>00035 <span class="keywordtype">int</span> <a class="code" href="class_a_p___a_d_c___h_i_l.html#a7c79592a003322aec008aa48ebe8967c">Ch</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> ch_num);
<a name="l00036"></a>00036
<a name="l00038"></a>00038 <span class="comment">// Set the adc raw values given the current rotations rates,</span>
<a name="l00039"></a>00039 <span class="comment">// temps, accels, and pressures</span>
<a name="l00040"></a>00040 <span class="keywordtype">int</span> <a class="code" href="class_a_p___a_d_c___h_i_l.html#afa27c576c7cc52fbac840c96b09bb238">setHIL</a>(int16_t p, int16_t q, int16_t r, int16_t gyroTemp,
<a name="l00041"></a>00041 int16_t aX, int16_t aY, int16_t aZ, int16_t diffPress);
<a name="l00042"></a>00042
<a name="l00043"></a>00043 <span class="keyword">private</span>:
<a name="l00044"></a>00044
<a name="l00046"></a>00046 <span class="comment">// The raw adc array</span>
<a name="l00047"></a>00047 uint16_t adcValue[8];
<a name="l00048"></a>00048
<a name="l00050"></a>00050 <span class="comment">// sensor constants</span>
<a name="l00051"></a>00051 <span class="comment">// constants declared in cpp file</span>
<a name="l00052"></a>00052 <span class="comment">// @see AP_ADC_HIL.cpp</span>
<a name="l00053"></a>00053 <span class="keyword">static</span> <span class="keyword">const</span> uint8_t sensors[6];
<a name="l00054"></a>00054 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">float</span> gyroBias[3];
<a name="l00055"></a>00055 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">float</span> gyroScale[3];
<a name="l00056"></a>00056 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">float</span> accelBias[3];
<a name="l00057"></a>00057 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">float</span> accelScale[3];
<a name="l00058"></a>00058 <span class="keyword">static</span> <span class="keyword">const</span> int8_t sensorSign[6];
<a name="l00059"></a>00059
<a name="l00061"></a>00061 <span class="comment">// gyro set function</span>
<a name="l00062"></a>00062 <span class="comment">// @param val the value of the gyro in milli rad/s</span>
<a name="l00063"></a>00063 <span class="comment">// @param index the axis for the gyro(0-x,1-y,2-z)</span>
<a name="l00064"></a>00064 <span class="keyword">inline</span> <span class="keywordtype">void</span> setGyro(uint8_t index, int16_t val) {
<a name="l00065"></a>00065 int16_t temp = val * gyroScale[index] / 1000 + gyroBias[index];
<a name="l00066"></a>00066 adcValue[sensors[index]] = (sensorSign[index] &lt; 0) ? -temp : temp;
<a name="l00067"></a>00067 }
<a name="l00068"></a>00068
<a name="l00070"></a>00070 <span class="comment">// accel set function</span>
<a name="l00071"></a>00071 <span class="comment">// @param val the value of the accel in milli g&#39;s</span>
<a name="l00072"></a>00072 <span class="comment">// @param index the axis for the accelerometer(0-x,1-y,2-z)</span>
<a name="l00073"></a>00073 <span class="keyword">inline</span> <span class="keywordtype">void</span> setAccel(uint8_t index, int16_t val) {
<a name="l00074"></a>00074 int16_t temp = val * accelScale[index] / 1000 + accelBias[index];
<a name="l00075"></a>00075 adcValue[sensors[index+3]] = (sensors[index+3] &lt; 0) ? -temp : temp;
<a name="l00076"></a>00076 }
<a name="l00077"></a>00077
<a name="l00079"></a>00079 <span class="comment">// Sets the differential pressure adc channel</span>
<a name="l00080"></a>00080 <span class="comment">// TODO: implement</span>
<a name="l00081"></a>00081 <span class="keywordtype">void</span> setPressure(int16_t val) {}
<a name="l00082"></a>00082
<a name="l00084"></a>00084 <span class="comment">// Sets the gyro temp adc channel</span>
<a name="l00085"></a>00085 <span class="comment">// TODO: implement</span>
<a name="l00086"></a>00086 <span class="keywordtype">void</span> setGyroTemp(int16_t val) {}
<a name="l00087"></a>00087 };
<a name="l00088"></a>00088
<a name="l00089"></a>00089 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:33 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,57 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_Common/AP_Common.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_Common/AP_Common.cpp File Reference</h1> </div>
</div>
<div class="contents">
<p>Common utility routines for the ArduPilot libraries.
<a href="#_details">More...</a></p>
<code>#include &quot;<a class="el" href="_a_p___common_8h_source.html">AP_Common.h</a>&quot;</code><br/>
<div class="dynheader">
Include dependency graph for AP_Common.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___common_8cpp__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___common_2_a_p___common_8cpp" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___common_2_a_p___common_8cpp" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___common_2_a_p___common_8cpp">
<area shape="rect" id="node3" href="_a_p___common_8h.html" title="Common definitions and utility routines for the ArduPilot libraries." alt="" coords="215,83,332,112"/><area shape="rect" id="node7" href="menu_8h.html" title="Simple commandline menu subsystem. &#160;The Menu class implements a simple CLI that accepts commands type..." alt="" coords="99,160,219,189"/><area shape="rect" id="node9" href="c_09_09_8h.html" title="c++.h" alt="" coords="243,160,304,189"/><area shape="rect" id="node11" href="_a_p___vector_8h.html" title="AP_Vector.h" alt="" coords="332,237,431,267"/><area shape="rect" id="node19" href="_a_p___loop_8h.html" title="AP_Loop.h" alt="" coords="379,160,467,189"/><area shape="rect" id="node17" href="_w_program_8h.html" title="WProgram.h" alt="" coords="448,315,547,344"/></map>
</div>
<p><a href="_a_p___common_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Common utility routines for the ArduPilot libraries. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Exercise restraint adding code here; everything in this library will be linked with any sketch using it. </dd></dl>
<p>Definition in file <a class="el" href="_a_p___common_8cpp_source.html">AP_Common.cpp</a>.</p>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:34 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,8 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_a_p___common_8h.html" title="Common definitions and utility routines for the ArduPilot libraries." alt="" coords="215,83,332,112"/>
<area shape="rect" id="node7" href="$menu_8h.html" title="Simple commandline menu subsystem. &#160;The Menu class implements a simple CLI that accepts commands type..." alt="" coords="99,160,219,189"/>
<area shape="rect" id="node9" href="$c_09_09_8h.html" title="c++.h" alt="" coords="243,160,304,189"/>
<area shape="rect" id="node11" href="$_a_p___vector_8h.html" title="AP_Vector.h" alt="" coords="332,237,431,267"/>
<area shape="rect" id="node19" href="$_a_p___loop_8h.html" title="AP_Loop.h" alt="" coords="379,160,467,189"/>
<area shape="rect" id="node17" href="$_w_program_8h.html" title="WProgram.h" alt="" coords="448,315,547,344"/>
</map>

View File

@ -0,0 +1 @@
114013364b91b7545d23a369bfa50efd

View File

@ -0,0 +1,48 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_Common/AP_Common.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_Common/AP_Common.cpp</h1> </div>
</div>
<div class="contents">
<a href="_a_p___common_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: t -*-</span>
<a name="l00002"></a>00002 <span class="comment">//</span>
<a name="l00003"></a>00003 <span class="comment">// This is free software; you can redistribute it and/or modify it under</span>
<a name="l00004"></a>00004 <span class="comment">// the terms of the GNU Lesser General Public License as published by the</span>
<a name="l00005"></a>00005 <span class="comment">// Free Software Foundation; either version 2.1 of the License, or (at</span>
<a name="l00006"></a>00006 <span class="comment">// your option) any later version.</span>
<a name="l00007"></a>00007 <span class="comment">//</span>
<a name="l00008"></a>00008
<a name="l00015"></a>00015
<a name="l00016"></a>00016 <span class="preprocessor">#include &quot;<a class="code" href="_a_p___common_8h.html" title="Common definitions and utility routines for the ArduPilot libraries.">AP_Common.h</a>&quot;</span>
<a name="l00017"></a>00017
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:33 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,141 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_Common/AP_Common.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> </div>
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_Common/AP_Common.h File Reference</h1> </div>
</div>
<div class="contents">
<p>Common definitions and utility routines for the ArduPilot libraries.
<a href="#_details">More...</a></p>
<code>#include &lt;stdint.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="menu_8h_source.html">include/menu.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="c_09_09_8h_source.html">c++.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_a_p___vector_8h_source.html">AP_Vector.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_a_p___loop_8h_source.html">AP_Loop.h</a>&quot;</code><br/>
<div class="dynheader">
Include dependency graph for AP_Common.h:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___common_8h__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___common_2_a_p___common_8h" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___common_2_a_p___common_8h" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___common_2_a_p___common_8h">
<area shape="rect" id="node5" href="menu_8h.html" title="Simple commandline menu subsystem. &#160;The Menu class implements a simple CLI that accepts commands type..." alt="" coords="99,83,219,112"/><area shape="rect" id="node7" href="c_09_09_8h.html" title="c++.h" alt="" coords="243,83,304,112"/><area shape="rect" id="node9" href="_a_p___vector_8h.html" title="AP_Vector.h" alt="" coords="332,160,431,189"/><area shape="rect" id="node17" href="_a_p___loop_8h.html" title="AP_Loop.h" alt="" coords="379,83,467,112"/><area shape="rect" id="node15" href="_w_program_8h.html" title="WProgram.h" alt="" coords="448,237,547,267"/></map>
</div>
<div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___common_8h__dep__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___common_2_a_p___common_8hdep" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___common_2_a_p___common_8hdep" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___common_2_a_p___common_8hdep">
<area shape="rect" id="node3" href="_a_p___common_8cpp.html" title="Common utility routines for the ArduPilot libraries." alt="" coords="5,83,456,112"/><area shape="rect" id="node5" href="menu_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_Common/menu.cpp" alt="" coords="480,83,883,112"/><area shape="rect" id="node7" href="_a_p___e_e_prom_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_EEProm/AP_EEProm.h" alt="" coords="907,83,1323,112"/><area shape="rect" id="node11" href="_a_p___rc_channel_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_RcChannel/AP_RcChannel.cpp" alt="" coords="1347,83,1813,112"/><area shape="rect" id="node9" href="_a_p___e_e_prom_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_EEProm/AP_EEProm.cpp" alt="" coords="899,160,1331,189"/></map>
</div>
<p><a href="_a_p___common_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_location.html">Location</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___var.html">AP_Var&lt; type &gt;</a></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Warning control</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpbb75df1695a438d2c1d8b28dd6c38c9f"></a>simple menu subsystem </p>
</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___common_8h.html#a75acaba9e781937468d0911423bc0c35">PROGMEM</a>&nbsp;&nbsp;&nbsp;__attribute__(( section(&quot;.progmem.data&quot;) ))</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___common_8h.html#a05ca900ebf7cd121be73c654d9ccb3eb">PSTR</a>(s)&nbsp;&nbsp;&nbsp;(__extension__({static prog_char __c[] PROGMEM = (s); &amp;__c[0];}))</td></tr>
<tr><td colspan="2"><div class="groupHeader">Conversions</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp6332798b12e537b25b1c6ad254e14f54"></a> Conversion macros and factors. </p>
</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___common_8h.html#a3c9d151923236c7e8ccccf86f131e550">ToDeg</a>(x)&nbsp;&nbsp;&nbsp;(x*57.2957795131)</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Common definitions and utility routines for the ArduPilot libraries. </p>
<p>Definition in file <a class="el" href="_a_p___common_8h_source.html">AP_Common.h</a>.</p>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a75acaba9e781937468d0911423bc0c35"></a><!-- doxytag: member="AP_Common.h::PROGMEM" ref="a75acaba9e781937468d0911423bc0c35" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define PROGMEM&nbsp;&nbsp;&nbsp;__attribute__(( section(&quot;.progmem.data&quot;) ))</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___common_8h_source.html#l00064">64</a> of file <a class="el" href="_a_p___common_8h_source.html">AP_Common.h</a>.</p>
</div>
</div>
<a class="anchor" id="a05ca900ebf7cd121be73c654d9ccb3eb"></a><!-- doxytag: member="AP_Common.h::PSTR" ref="a05ca900ebf7cd121be73c654d9ccb3eb" args="(s)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define PSTR</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">s</td>
<td>&nbsp;)&nbsp;</td>
<td>&nbsp;&nbsp;&nbsp;(__extension__({static prog_char __c[] PROGMEM = (s); &amp;__c[0];}))</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___common_8h_source.html#l00066">66</a> of file <a class="el" href="_a_p___common_8h_source.html">AP_Common.h</a>.</p>
</div>
</div>
<a class="anchor" id="a3c9d151923236c7e8ccccf86f131e550"></a><!-- doxytag: member="AP_Common.h::ToDeg" ref="a3c9d151923236c7e8ccccf86f131e550" args="(x)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ToDeg</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">x</td>
<td>&nbsp;)&nbsp;</td>
<td>&nbsp;&nbsp;&nbsp;(x*57.2957795131)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>XXX this should probably be replaced with radians()/degrees(), but their inclusion in wiring.h makes doing that here difficult. </p>
<p>Definition at line <a class="el" href="_a_p___common_8h_source.html#l00177">177</a> of file <a class="el" href="_a_p___common_8h_source.html">AP_Common.h</a>.</p>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:34 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,7 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_a_p___common_8cpp.html" title="Common utility routines for the ArduPilot libraries." alt="" coords="5,83,456,112"/>
<area shape="rect" id="node5" href="$menu_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_Common/menu.cpp" alt="" coords="480,83,883,112"/>
<area shape="rect" id="node7" href="$_a_p___e_e_prom_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_EEProm/AP_EEProm.h" alt="" coords="907,83,1323,112"/>
<area shape="rect" id="node11" href="$_a_p___rc_channel_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_RcChannel/AP_RcChannel.cpp" alt="" coords="1347,83,1813,112"/>
<area shape="rect" id="node9" href="$_a_p___e_e_prom_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_EEProm/AP_EEProm.cpp" alt="" coords="899,160,1331,189"/>
</map>

View File

@ -0,0 +1 @@
efbbb8fa3498672cdb91b79e1b9679f2

View File

@ -0,0 +1,7 @@
<map id="G" name="G">
<area shape="rect" id="node5" href="$menu_8h.html" title="Simple commandline menu subsystem. &#160;The Menu class implements a simple CLI that accepts commands type..." alt="" coords="99,83,219,112"/>
<area shape="rect" id="node7" href="$c_09_09_8h.html" title="c++.h" alt="" coords="243,83,304,112"/>
<area shape="rect" id="node9" href="$_a_p___vector_8h.html" title="AP_Vector.h" alt="" coords="332,160,431,189"/>
<area shape="rect" id="node17" href="$_a_p___loop_8h.html" title="AP_Loop.h" alt="" coords="379,83,467,112"/>
<area shape="rect" id="node15" href="$_w_program_8h.html" title="WProgram.h" alt="" coords="448,237,547,267"/>
</map>

View File

@ -0,0 +1 @@
a30b073eaf4623be5e29beea4f60b58a

View File

@ -0,0 +1,164 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_Common/AP_Common.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_Common/AP_Common.h</h1> </div>
</div>
<div class="contents">
<a href="_a_p___common_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: t -*-</span>
<a name="l00002"></a>00002 <span class="comment">//</span>
<a name="l00003"></a>00003 <span class="comment">// This is free software; you can redistribute it and/or modify it under</span>
<a name="l00004"></a>00004 <span class="comment">// the terms of the GNU Lesser General Public License as published by the</span>
<a name="l00005"></a>00005 <span class="comment">// Free Software Foundation; either version 2.1 of the License, or (at</span>
<a name="l00006"></a>00006 <span class="comment">// your option) any later version.</span>
<a name="l00007"></a>00007 <span class="comment">//</span>
<a name="l00008"></a>00008
<a name="l00014"></a>00014
<a name="l00015"></a>00015 <span class="preprocessor">#ifndef _AP_COMMON_H</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#define _AP_COMMON_H</span>
<a name="l00017"></a>00017 <span class="preprocessor"></span>
<a name="l00018"></a>00018 <span class="preprocessor">#include &lt;stdint.h&gt;</span>
<a name="l00019"></a>00019 <span class="preprocessor">#include &quot;<a class="code" href="menu_8h.html" title="Simple commandline menu subsystem. The Menu class implements a simple CLI that accepts commands type...">include/menu.h</a>&quot;</span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &quot;<a class="code" href="c_09_09_8h.html">c++.h</a>&quot;</span> <span class="comment">// c++ additions</span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &quot;<a class="code" href="_a_p___vector_8h.html">AP_Vector.h</a>&quot;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;<a class="code" href="_a_p___loop_8h.html">AP_Loop.h</a>&quot;</span>
<a name="l00023"></a>00023
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">//</span>
<a name="l00028"></a>00028 <span class="comment">// Turn on/off warnings of interest.</span>
<a name="l00029"></a>00029 <span class="comment">//</span>
<a name="l00030"></a>00030 <span class="comment">// These warnings are normally suppressed by the Arduino IDE,</span>
<a name="l00031"></a>00031 <span class="comment">// but with some minor hacks it&#39;s possible to have warnings</span>
<a name="l00032"></a>00032 <span class="comment">// emitted. This helps greatly when diagnosing subtle issues.</span>
<a name="l00033"></a>00033 <span class="comment">//</span>
<a name="l00034"></a>00034 <span class="preprocessor">#pragma GCC diagnostic warning &quot;-Wall&quot;</span>
<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#pragma GCC diagnostic warning &quot;-Wextra&quot;</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#pragma GCC diagnostic warning &quot;-Wlogical-op&quot;</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#pragma GCC diagnostic ignored &quot;-Wredundant-decls&quot;</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span>
<a name="l00039"></a>00039 <span class="comment">// Make some dire warnings into errors</span>
<a name="l00040"></a>00040 <span class="comment">//</span>
<a name="l00041"></a>00041 <span class="comment">// Some warnings indicate questionable code; rather than let</span>
<a name="l00042"></a>00042 <span class="comment">// these slide, we force them to become errors so that the</span>
<a name="l00043"></a>00043 <span class="comment">// developer has to find a safer alternative.</span>
<a name="l00044"></a>00044 <span class="comment">//</span>
<a name="l00045"></a>00045 <span class="preprocessor">#pragma GCC diagnostic error &quot;-Wfloat-equal&quot;</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span>
<a name="l00047"></a>00047 <span class="comment">// The following is strictly for type-checking arguments to printf_P calls</span>
<a name="l00048"></a>00048 <span class="comment">// in conjunction with a suitably modified Arduino IDE; never define for</span>
<a name="l00049"></a>00049 <span class="comment">// production as it generates bad code.</span>
<a name="l00050"></a>00050 <span class="comment">//</span>
<a name="l00051"></a>00051 <span class="preprocessor">#if PRINTF_FORMAT_WARNING_DEBUG</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor"># undef PSTR</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="preprocessor"># define PSTR(_x) _x // help the compiler with printf_P</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor"># define float double // silence spurious format warnings for %f</span>
<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00056"></a>00056 <span class="preprocessor"></span><span class="comment">// This is a workaround for GCC bug c++/34734.</span>
<a name="l00057"></a>00057 <span class="comment">//</span>
<a name="l00058"></a>00058 <span class="comment">// The C++ compiler normally emits many spurious warnings for the use</span>
<a name="l00059"></a>00059 <span class="comment">// of PSTR (even though it generates correct code). This workaround</span>
<a name="l00060"></a>00060 <span class="comment">// has an equivalent effect but avoids the warnings, which otherwise</span>
<a name="l00061"></a>00061 <span class="comment">// make finding real issues difficult.</span>
<a name="l00062"></a>00062 <span class="comment">//</span>
<a name="l00063"></a>00063 <span class="preprocessor"># undef PROGMEM </span>
<a name="l00064"></a><a class="code" href="_a_p___common_8h.html#a75acaba9e781937468d0911423bc0c35">00064</a> <span class="preprocessor"></span><span class="preprocessor"># define PROGMEM __attribute__(( section(&quot;.progmem.data&quot;) )) </span>
<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="preprocessor"># undef PSTR </span>
<a name="l00066"></a><a class="code" href="_a_p___common_8h.html#a05ca900ebf7cd121be73c654d9ccb3eb">00066</a> <span class="preprocessor"></span><span class="preprocessor"># define PSTR(s) (__extension__({static prog_char __c[] PROGMEM = (s); &amp;__c[0];})) </span>
<a name="l00067"></a>00067 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00068"></a>00068 <span class="preprocessor"></span>
<a name="l00070"></a>00070
<a name="l00076"></a>00076
<a name="l00077"></a>00077
<a name="l00078"></a><a class="code" href="struct_location.html">00078</a> <span class="keyword">struct </span><a class="code" href="struct_location.html">Location</a> {
<a name="l00079"></a><a class="code" href="struct_location.html#a593656d91e577815782c34c538d9d3e8">00079</a> uint8_t <a class="code" href="struct_location.html#a593656d91e577815782c34c538d9d3e8" title="command id">id</a>;
<a name="l00080"></a><a class="code" href="struct_location.html#a37174be5ef591767697043ca8b95155c">00080</a> uint8_t <a class="code" href="struct_location.html#a37174be5ef591767697043ca8b95155c" title="param 1">p1</a>;
<a name="l00081"></a><a class="code" href="struct_location.html#a89e532f5bcc13db2f51ff9eed667c2b6">00081</a> int32_t <a class="code" href="struct_location.html#a89e532f5bcc13db2f51ff9eed667c2b6" title="param 2 - Altitude in centimeters (meters * 100)">alt</a>;
<a name="l00082"></a><a class="code" href="struct_location.html#ae51548c2cf32311043ca19b94b9a9223">00082</a> int32_t <a class="code" href="struct_location.html#ae51548c2cf32311043ca19b94b9a9223" title="param 3 - Lattitude * 10**7">lat</a>;
<a name="l00083"></a><a class="code" href="struct_location.html#a5831f0aca9e51a15adb96fad465f72f8">00083</a> int32_t <a class="code" href="struct_location.html#a5831f0aca9e51a15adb96fad465f72f8" title="param 4 - Longitude * 10**7">lng</a>;
<a name="l00084"></a>00084 };
<a name="l00085"></a>00085
<a name="l00091"></a>00091 <span class="keyword">template</span> &lt;<span class="keyword">class</span> type&gt;
<a name="l00092"></a><a class="code" href="class_a_p___var.html">00092</a> <span class="keyword">class </span><a class="code" href="class_a_p___var.html">AP_Var</a>
<a name="l00093"></a>00093 {
<a name="l00094"></a>00094 <span class="keyword">public</span>:
<a name="l00098"></a><a class="code" href="class_a_p___var.html#a76488dc07d01ace3bf34ec4e00c3a061">00098</a> <a class="code" href="class_a_p___var.html#a76488dc07d01ace3bf34ec4e00c3a061">AP_Var</a>(<span class="keyword">const</span> type &amp; data, <span class="keyword">const</span> <span class="keywordtype">char</span> * name = <span class="stringliteral">&quot;&quot;</span>, <span class="keyword">const</span> <span class="keywordtype">bool</span> &amp; sync=<span class="keyword">false</span>) :
<a name="l00099"></a>00099 <a class="code" href="class_a_p___var.html#a03988b519ae71a3d59a74dede0b015f3">_data</a>(data), <a class="code" href="class_a_p___var.html#a0df623830e9c63d95c840f9b8c1d65d6">_name</a>(name), <a class="code" href="class_a_p___var.html#a45e789309835299b71050fda446b019a">_sync</a>(sync)
<a name="l00100"></a>00100 {
<a name="l00101"></a>00101 }
<a name="l00102"></a>00102
<a name="l00106"></a><a class="code" href="class_a_p___var.html#ac6d45de415b68d734876f3e4dd1e19f4">00106</a> <span class="keywordtype">void</span> <span class="keyword">set</span>(<span class="keyword">const</span> type &amp; val) {
<a name="l00107"></a>00107 <a class="code" href="class_a_p___var.html#a03988b519ae71a3d59a74dede0b015f3">_data</a> = val;
<a name="l00108"></a>00108 <span class="keywordflow">if</span> (<a class="code" href="class_a_p___var.html#a45e789309835299b71050fda446b019a">_sync</a>) <a class="code" href="class_a_p___var.html#afa88a5ff01e70d17529c683016d62456">save</a>();
<a name="l00109"></a>00109 }
<a name="l00110"></a>00110
<a name="l00114"></a><a class="code" href="class_a_p___var.html#a22c498cc35d5d69d1e4840bd4d9bacab">00114</a> <span class="keyword">const</span> type &amp; <span class="keyword">get</span>() {
<a name="l00115"></a>00115 <span class="keywordflow">if</span> (<a class="code" href="class_a_p___var.html#a45e789309835299b71050fda446b019a">_sync</a>) <a class="code" href="class_a_p___var.html#aa885a4c96d6e7b099bde8bde5669e407">load</a>();
<a name="l00116"></a>00116 <span class="keywordflow">return</span> <a class="code" href="class_a_p___var.html#a03988b519ae71a3d59a74dede0b015f3">_data</a>;
<a name="l00117"></a>00117 }
<a name="l00118"></a>00118
<a name="l00122"></a><a class="code" href="class_a_p___var.html#a7020d3d4f67e959ebf73268c3da5002a">00122</a> <span class="keywordtype">void</span> <a class="code" href="class_a_p___var.html#a7020d3d4f67e959ebf73268c3da5002a">setAsFloat</a>(<span class="keyword">const</span> <span class="keywordtype">float</span> &amp; val) {
<a name="l00123"></a>00123 <span class="keyword">set</span>(val);
<a name="l00124"></a>00124 }
<a name="l00125"></a>00125
<a name="l00129"></a><a class="code" href="class_a_p___var.html#a1677d6dcfb4ea5d6780633b60c94419d">00129</a> <span class="keyword">const</span> <span class="keywordtype">float</span> &amp; <a class="code" href="class_a_p___var.html#a1677d6dcfb4ea5d6780633b60c94419d">getAsFloat</a>() {
<a name="l00130"></a>00130 <span class="keywordflow">return</span> <span class="keyword">get</span>();
<a name="l00131"></a>00131 }
<a name="l00132"></a>00132
<a name="l00133"></a>00133
<a name="l00137"></a><a class="code" href="class_a_p___var.html#afa88a5ff01e70d17529c683016d62456">00137</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_a_p___var.html#afa88a5ff01e70d17529c683016d62456">save</a>()
<a name="l00138"></a>00138 {
<a name="l00139"></a>00139 }
<a name="l00140"></a>00140
<a name="l00144"></a><a class="code" href="class_a_p___var.html#aa885a4c96d6e7b099bde8bde5669e407">00144</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_a_p___var.html#aa885a4c96d6e7b099bde8bde5669e407">load</a>()
<a name="l00145"></a>00145 {
<a name="l00146"></a>00146 }
<a name="l00147"></a>00147
<a name="l00151"></a><a class="code" href="class_a_p___var.html#aedd42dd2270968c5f834d851d7eee0dd">00151</a> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="class_a_p___var.html#aedd42dd2270968c5f834d851d7eee0dd">getName</a>() { <span class="keywordflow">return</span> <a class="code" href="class_a_p___var.html#a0df623830e9c63d95c840f9b8c1d65d6">_name</a>; }
<a name="l00152"></a>00152
<a name="l00157"></a><a class="code" href="class_a_p___var.html#aa59a0e6a2da3cdbbf97cde09bb437af4">00157</a> <span class="keyword">const</span> <span class="keywordtype">bool</span> &amp; <a class="code" href="class_a_p___var.html#aa59a0e6a2da3cdbbf97cde09bb437af4">getSync</a>() { <span class="keywordflow">return</span> <a class="code" href="class_a_p___var.html#a45e789309835299b71050fda446b019a">_sync</a>; }
<a name="l00158"></a><a class="code" href="class_a_p___var.html#a76c043beeb6b2d7e82155657f4ac99e1">00158</a> <span class="keywordtype">void</span> <a class="code" href="class_a_p___var.html#a76c043beeb6b2d7e82155657f4ac99e1">setSync</a>(<span class="keywordtype">bool</span> sync) { <a class="code" href="class_a_p___var.html#a45e789309835299b71050fda446b019a">_sync</a> = sync; }
<a name="l00159"></a>00159
<a name="l00160"></a>00160 <span class="keyword">protected</span>:
<a name="l00161"></a><a class="code" href="class_a_p___var.html#a03988b519ae71a3d59a74dede0b015f3">00161</a> type <a class="code" href="class_a_p___var.html#a03988b519ae71a3d59a74dede0b015f3">_data</a>;
<a name="l00162"></a><a class="code" href="class_a_p___var.html#a0df623830e9c63d95c840f9b8c1d65d6">00162</a> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="class_a_p___var.html#a0df623830e9c63d95c840f9b8c1d65d6">_name</a>;
<a name="l00163"></a><a class="code" href="class_a_p___var.html#a45e789309835299b71050fda446b019a">00163</a> <span class="keywordtype">bool</span> <a class="code" href="class_a_p___var.html#a45e789309835299b71050fda446b019a">_sync</a>;
<a name="l00164"></a>00164 };
<a name="l00165"></a>00165
<a name="l00167"></a>00167
<a name="l00173"></a>00173
<a name="l00174"></a>00174
<a name="l00177"></a><a class="code" href="_a_p___common_8h.html#a3c9d151923236c7e8ccccf86f131e550">00177</a> <span class="preprocessor">#define ToDeg(x) (x*57.2957795131) // *180/pi</span>
<a name="l00178"></a>00178 <span class="preprocessor"></span>
<a name="l00180"></a>00180
<a name="l00181"></a>00181
<a name="l00182"></a>00182 <span class="preprocessor">#endif // _AP_COMMON_H</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:33 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,64 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass.h File Reference</h1> </div>
</div>
<div class="contents">
<p>Catch-all header that defines all supported compass classes.
<a href="#_details">More...</a></p>
<code>#include &quot;<a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_a_p___compass___h_i_l_8h_source.html">AP_Compass_HIL.h</a>&quot;</code><br/>
<div class="dynheader">
Include dependency graph for AP_Compass.h:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___compass_8h__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass_8h" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass_8h" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass_8h">
<area shape="rect" id="node3" href="_a_p___compass___h_m_c5843_8h.html" title="AP_Compass_HMC5843.h" alt="" coords="48,160,235,189"/><area shape="rect" id="node26" href="_a_p___compass___h_i_l_8h.html" title="AP_Compass_HIL.h" alt="" coords="221,83,365,112"/><area shape="rect" id="node5" href="_compass_8h.html" title="Compass.h" alt="" coords="281,237,375,267"/><area shape="rect" id="node9" href="_a_p___math_8h.html" title="../AP_Math/AP_Math.h" alt="" coords="247,315,409,344"/><area shape="rect" id="node11" href="vector2_8h.html" title="vector2.h" alt="" coords="236,469,319,499"/><area shape="rect" id="node15" href="vector3_8h.html" title="vector3.h" alt="" coords="343,469,425,499"/><area shape="rect" id="node20" href="matrix3_8h.html" title="matrix3.h" alt="" coords="365,392,448,421"/><area shape="rect" id="node30" href="_w_program_8h.html" title="WProgram.h" alt="" coords="259,160,357,189"/></map>
</div>
<div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___compass_8h__dep__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass_8hdep" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass_8hdep" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass_8hdep">
<area shape="rect" id="node3" href="_a_p___d_c_m___h_i_l_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.h" alt="" coords="239,83,641,112"/><area shape="rect" id="node5" href="_a_p___d_c_m_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.h" alt="" coords="13,160,389,189"/><area shape="rect" id="node9" href="_a_p___d_c_m___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.cpp" alt="" coords="413,160,832,189"/><area shape="rect" id="node7" href="_a_p___d_c_m_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.cpp" alt="" coords="5,237,397,267"/></map>
</div>
<p><a href="_a_p___compass_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Catch-all header that defines all supported compass classes. </p>
<p>Definition in file <a class="el" href="_a_p___compass_8h_source.html">AP_Compass.h</a>.</p>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:34 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,6 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_a_p___d_c_m___h_i_l_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.h" alt="" coords="239,83,641,112"/>
<area shape="rect" id="node5" href="$_a_p___d_c_m_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.h" alt="" coords="13,160,389,189"/>
<area shape="rect" id="node9" href="$_a_p___d_c_m___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.cpp" alt="" coords="413,160,832,189"/>
<area shape="rect" id="node7" href="$_a_p___d_c_m_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.cpp" alt="" coords="5,237,397,267"/>
</map>

View File

@ -0,0 +1 @@
cced4a98856fef944653c7cfdf8d0da0

View File

@ -0,0 +1,10 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_a_p___compass___h_m_c5843_8h.html" title="AP_Compass_HMC5843.h" alt="" coords="48,160,235,189"/>
<area shape="rect" id="node26" href="$_a_p___compass___h_i_l_8h.html" title="AP_Compass_HIL.h" alt="" coords="221,83,365,112"/>
<area shape="rect" id="node5" href="$_compass_8h.html" title="Compass.h" alt="" coords="281,237,375,267"/>
<area shape="rect" id="node9" href="$_a_p___math_8h.html" title="../AP_Math/AP_Math.h" alt="" coords="247,315,409,344"/>
<area shape="rect" id="node11" href="$vector2_8h.html" title="vector2.h" alt="" coords="236,469,319,499"/>
<area shape="rect" id="node15" href="$vector3_8h.html" title="vector3.h" alt="" coords="343,469,425,499"/>
<area shape="rect" id="node20" href="$matrix3_8h.html" title="matrix3.h" alt="" coords="365,392,448,421"/>
<area shape="rect" id="node30" href="$_w_program_8h.html" title="WProgram.h" alt="" coords="259,160,357,189"/>
</map>

View File

@ -0,0 +1 @@
fbe780db336af0efa637dd3555b51d2c

View File

@ -0,0 +1,42 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass.h</h1> </div>
</div>
<div class="contents">
<a href="_a_p___compass_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: t -*-</span>
<a name="l00002"></a>00002
<a name="l00005"></a>00005
<a name="l00006"></a>00006 <span class="preprocessor">#include &quot;<a class="code" href="_a_p___compass___h_m_c5843_8h.html">AP_Compass_HMC5843.h</a>&quot;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &quot;<a class="code" href="_a_p___compass___h_i_l_8h.html">AP_Compass_HIL.h</a>&quot;</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:33 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,49 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HIL.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HIL.cpp File Reference</h1> </div>
</div>
<div class="contents">
<code>#include &quot;<a class="el" href="_a_p___compass___h_i_l_8h_source.html">AP_Compass_HIL.h</a>&quot;</code><br/>
<div class="dynheader">
Include dependency graph for AP_Compass_HIL.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___compass___h_i_l_8cpp__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass___h_i_l_8cpp" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass___h_i_l_8cpp" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass___h_i_l_8cpp">
<area shape="rect" id="node3" href="_a_p___compass___h_i_l_8h.html" title="AP_Compass_HIL.h" alt="" coords="268,83,412,112"/><area shape="rect" id="node5" href="_compass_8h.html" title="Compass.h" alt="" coords="163,237,256,267"/><area shape="rect" id="node25" href="_a_p___compass___h_m_c5843_8h.html" title="AP_Compass_HMC5843.h" alt="" coords="247,160,433,189"/><area shape="rect" id="node29" href="_w_program_8h.html" title="WProgram.h" alt="" coords="457,160,556,189"/><area shape="rect" id="node9" href="_a_p___math_8h.html" title="../AP_Math/AP_Math.h" alt="" coords="115,315,277,344"/><area shape="rect" id="node11" href="vector2_8h.html" title="vector2.h" alt="" coords="104,469,187,499"/><area shape="rect" id="node15" href="vector3_8h.html" title="vector3.h" alt="" coords="211,469,293,499"/><area shape="rect" id="node20" href="matrix3_8h.html" title="matrix3.h" alt="" coords="233,392,316,421"/></map>
</div>
<p><a href="_a_p___compass___h_i_l_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
</table>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:34 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,10 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_a_p___compass___h_i_l_8h.html" title="AP_Compass_HIL.h" alt="" coords="268,83,412,112"/>
<area shape="rect" id="node5" href="$_compass_8h.html" title="Compass.h" alt="" coords="163,237,256,267"/>
<area shape="rect" id="node25" href="$_a_p___compass___h_m_c5843_8h.html" title="AP_Compass_HMC5843.h" alt="" coords="247,160,433,189"/>
<area shape="rect" id="node29" href="$_w_program_8h.html" title="WProgram.h" alt="" coords="457,160,556,189"/>
<area shape="rect" id="node9" href="$_a_p___math_8h.html" title="../AP_Math/AP_Math.h" alt="" coords="115,315,277,344"/>
<area shape="rect" id="node11" href="$vector2_8h.html" title="vector2.h" alt="" coords="104,469,187,499"/>
<area shape="rect" id="node15" href="$vector3_8h.html" title="vector3.h" alt="" coords="211,469,293,499"/>
<area shape="rect" id="node20" href="$matrix3_8h.html" title="matrix3.h" alt="" coords="233,392,316,421"/>
</map>

View File

@ -0,0 +1 @@
7785266b16dab674cdd9f470834979d6

View File

@ -0,0 +1,174 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HIL.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HIL.cpp</h1> </div>
</div>
<div class="contents">
<a href="_a_p___compass___h_i_l_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> AP_Compass_HIL.cpp - Arduino Library for HIL model of HMC5843 I2C Magnetometer</span>
<a name="l00003"></a>00003 <span class="comment"> Code by James Goppert. DIYDrones.com</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment"> This library is free software; you can redistribute it and / or</span>
<a name="l00006"></a>00006 <span class="comment"> modify it under the terms of the GNU Lesser General Public</span>
<a name="l00007"></a>00007 <span class="comment"> License as published by the Free Software Foundation; either</span>
<a name="l00008"></a>00008 <span class="comment"> version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment">*/</span>
<a name="l00010"></a>00010
<a name="l00011"></a>00011
<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;<a class="code" href="_a_p___compass___h_i_l_8h.html">AP_Compass_HIL.h</a>&quot;</span>
<a name="l00013"></a>00013
<a name="l00014"></a>00014 <span class="comment">// Constructors ////////////////////////////////////////////////////////////////</span>
<a name="l00015"></a><a class="code" href="class_a_p___compass___h_i_l.html#a54036d8a8354e8484db9f1ca33af9572">00015</a> <a class="code" href="class_a_p___compass___h_i_l.html#a54036d8a8354e8484db9f1ca33af9572">AP_Compass_HIL::AP_Compass_HIL</a>() : orientation(0), declination(0.0)
<a name="l00016"></a>00016 {
<a name="l00017"></a>00017 <span class="comment">// mag x y z offset initialisation</span>
<a name="l00018"></a>00018 offset[0] = 0;
<a name="l00019"></a>00019 offset[1] = 0;
<a name="l00020"></a>00020 offset[2] = 0;
<a name="l00021"></a>00021
<a name="l00022"></a>00022 <span class="comment">// initialise orientation matrix</span>
<a name="l00023"></a>00023 orientation_matrix = ROTATION_NONE;
<a name="l00024"></a>00024 }
<a name="l00025"></a>00025
<a name="l00026"></a>00026 <span class="comment">// Public Methods //////////////////////////////////////////////////////////////</span>
<a name="l00027"></a><a class="code" href="class_a_p___compass___h_i_l.html#aefa72efcf8536c3696a25de69f1731c7">00027</a> <span class="keywordtype">bool</span> <a class="code" href="class_a_p___compass___h_i_l.html#aefa72efcf8536c3696a25de69f1731c7">AP_Compass_HIL::init</a>(<span class="keywordtype">int</span> initialise_wire_lib)
<a name="l00028"></a>00028 {
<a name="l00029"></a>00029 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> currentTime = <a class="code" href="test_8cpp.html#a941a22cb7e0f6429fe40f91e83ead3d9">millis</a>(); <span class="comment">// record current time</span>
<a name="l00030"></a>00030 <span class="keywordtype">int</span> numAttempts = 0;
<a name="l00031"></a>00031 <span class="keywordtype">int</span> success = 0;
<a name="l00032"></a>00032
<a name="l00033"></a>00033 <span class="comment">// calibration initialisation</span>
<a name="l00034"></a>00034 calibration[0] = 1.0;
<a name="l00035"></a>00035 calibration[1] = 1.0;
<a name="l00036"></a>00036 calibration[2] = 1.0;
<a name="l00037"></a>00037
<a name="l00038"></a>00038 <span class="keywordflow">while</span>( success == 0 &amp;&amp; numAttempts &lt; 5 )
<a name="l00039"></a>00039 {
<a name="l00040"></a>00040 <span class="comment">// record number of attempts at initialisation</span>
<a name="l00041"></a>00041 numAttempts++;
<a name="l00042"></a>00042
<a name="l00043"></a>00043 <span class="comment">// read values from the compass</span>
<a name="l00044"></a>00044 <a class="code" href="class_a_p___compass___h_i_l.html#ac8d183edcd14cf5ee56895c498ebf02a">read</a>();
<a name="l00045"></a>00045 delay(10);
<a name="l00046"></a>00046
<a name="l00047"></a>00047 <span class="comment">// calibrate</span>
<a name="l00048"></a>00048 <span class="keywordflow">if</span>( abs(<a class="code" href="class_compass.html#a8324bcab8618a2a2076a511dec2cc8a0">mag_x</a>) &gt; 500 &amp;&amp; abs(<a class="code" href="class_compass.html#a8324bcab8618a2a2076a511dec2cc8a0">mag_x</a>) &lt; 1000 &amp;&amp; abs(<a class="code" href="class_compass.html#a4de5f44fab49fabf8524ea79e9d3f84a">mag_y</a>) &gt; 500 &amp;&amp; abs(<a class="code" href="class_compass.html#a4de5f44fab49fabf8524ea79e9d3f84a">mag_y</a>) &lt; 1000 &amp;&amp; abs(<a class="code" href="class_compass.html#a6c05eabd47bd8116c4823481c3ea4549">mag_z</a>) &gt; 500 &amp;&amp; abs(<a class="code" href="class_compass.html#a6c05eabd47bd8116c4823481c3ea4549">mag_z</a>) &lt; 1000)
<a name="l00049"></a>00049 {
<a name="l00050"></a>00050 calibration[0] = fabs(715.0 / <a class="code" href="class_compass.html#a8324bcab8618a2a2076a511dec2cc8a0">mag_x</a>);
<a name="l00051"></a>00051 calibration[1] = fabs(715.0 / <a class="code" href="class_compass.html#a4de5f44fab49fabf8524ea79e9d3f84a">mag_y</a>);
<a name="l00052"></a>00052 calibration[2] = fabs(715.0 / <a class="code" href="class_compass.html#a6c05eabd47bd8116c4823481c3ea4549">mag_z</a>);
<a name="l00053"></a>00053
<a name="l00054"></a>00054 <span class="comment">// mark success</span>
<a name="l00055"></a>00055 success = 1;
<a name="l00056"></a>00056 }
<a name="l00057"></a>00057 }
<a name="l00058"></a>00058 <span class="keywordflow">return</span>(success);
<a name="l00059"></a>00059 }
<a name="l00060"></a>00060
<a name="l00061"></a>00061 <span class="comment">// Read Sensor data</span>
<a name="l00062"></a><a class="code" href="class_a_p___compass___h_i_l.html#ac8d183edcd14cf5ee56895c498ebf02a">00062</a> <span class="keywordtype">void</span> <a class="code" href="class_a_p___compass___h_i_l.html#ac8d183edcd14cf5ee56895c498ebf02a">AP_Compass_HIL::read</a>()
<a name="l00063"></a>00063 {
<a name="l00064"></a>00064 <span class="comment">// values set by setHIL function</span>
<a name="l00065"></a>00065 }
<a name="l00066"></a>00066
<a name="l00067"></a><a class="code" href="class_a_p___compass___h_i_l.html#a755d7409dedf3e903225b36fbf16e622">00067</a> <span class="keywordtype">void</span> <a class="code" href="class_a_p___compass___h_i_l.html#a755d7409dedf3e903225b36fbf16e622">AP_Compass_HIL::calculate</a>(<span class="keywordtype">float</span> roll, <span class="keywordtype">float</span> pitch)
<a name="l00068"></a>00068 {
<a name="l00069"></a>00069 <span class="keywordtype">float</span> headX;
<a name="l00070"></a>00070 <span class="keywordtype">float</span> headY;
<a name="l00071"></a>00071 <span class="keywordtype">float</span> cos_roll;
<a name="l00072"></a>00072 <span class="keywordtype">float</span> sin_roll;
<a name="l00073"></a>00073 <span class="keywordtype">float</span> cos_pitch;
<a name="l00074"></a>00074 <span class="keywordtype">float</span> sin_pitch;
<a name="l00075"></a>00075 <a class="code" href="class_vector3.html">Vector3f</a> rotMagVec;
<a name="l00076"></a>00076
<a name="l00077"></a>00077 cos_roll = cos(roll); <span class="comment">// Optimizacion, se puede sacar esto de la matriz DCM?</span>
<a name="l00078"></a>00078 sin_roll = sin(roll);
<a name="l00079"></a>00079 cos_pitch = cos(pitch);
<a name="l00080"></a>00080 sin_pitch = sin(pitch);
<a name="l00081"></a>00081
<a name="l00082"></a>00082 <span class="comment">// rotate the magnetometer values depending upon orientation</span>
<a name="l00083"></a>00083 <span class="keywordflow">if</span>( orientation == 0 )
<a name="l00084"></a>00084 rotMagVec = <a class="code" href="vector3_8h.html#af345ad77ba5e240c7ab72b4b2077e754">Vector3f</a>(<a class="code" href="class_compass.html#a8324bcab8618a2a2076a511dec2cc8a0">mag_x</a>+offset[0],<a class="code" href="class_compass.html#a4de5f44fab49fabf8524ea79e9d3f84a">mag_y</a>+offset[1],<a class="code" href="class_compass.html#a6c05eabd47bd8116c4823481c3ea4549">mag_z</a>+offset[2]);
<a name="l00085"></a>00085 <span class="keywordflow">else</span>
<a name="l00086"></a>00086 rotMagVec = orientation_matrix*<a class="code" href="vector3_8h.html#af345ad77ba5e240c7ab72b4b2077e754">Vector3f</a>(<a class="code" href="class_compass.html#a8324bcab8618a2a2076a511dec2cc8a0">mag_x</a>+offset[0],<a class="code" href="class_compass.html#a4de5f44fab49fabf8524ea79e9d3f84a">mag_y</a>+offset[1],<a class="code" href="class_compass.html#a6c05eabd47bd8116c4823481c3ea4549">mag_z</a>+offset[2]);
<a name="l00087"></a>00087
<a name="l00088"></a>00088 <span class="comment">// Tilt compensated Magnetic field X component:</span>
<a name="l00089"></a>00089 headX = rotMagVec.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a>*cos_pitch+rotMagVec.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a>*sin_roll*sin_pitch+rotMagVec.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a>*cos_roll*sin_pitch;
<a name="l00090"></a>00090 <span class="comment">// Tilt compensated Magnetic field Y component:</span>
<a name="l00091"></a>00091 headY = rotMagVec.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a>*cos_roll-rotMagVec.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a>*sin_roll;
<a name="l00092"></a>00092 <span class="comment">// Magnetic heading</span>
<a name="l00093"></a>00093 <a class="code" href="class_compass.html#af34cf40b43e957554a48ed27b848a35f">heading</a> = atan2(-headY,headX);
<a name="l00094"></a>00094
<a name="l00095"></a>00095 <span class="comment">// Declination correction (if supplied)</span>
<a name="l00096"></a>00096 <span class="keywordflow">if</span>( declination != 0.0 )
<a name="l00097"></a>00097 {
<a name="l00098"></a>00098 <a class="code" href="class_compass.html#af34cf40b43e957554a48ed27b848a35f">heading</a> = <a class="code" href="class_compass.html#af34cf40b43e957554a48ed27b848a35f">heading</a> + declination;
<a name="l00099"></a>00099 <span class="keywordflow">if</span> (<a class="code" href="class_compass.html#af34cf40b43e957554a48ed27b848a35f">heading</a> &gt; M_PI) <span class="comment">// Angle normalization (-180 deg, 180 deg)</span>
<a name="l00100"></a>00100 <a class="code" href="class_compass.html#af34cf40b43e957554a48ed27b848a35f">heading</a> -= (2.0 * M_PI);
<a name="l00101"></a>00101 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="class_compass.html#af34cf40b43e957554a48ed27b848a35f">heading</a> &lt; -M_PI)
<a name="l00102"></a>00102 <a class="code" href="class_compass.html#af34cf40b43e957554a48ed27b848a35f">heading</a> += (2.0 * M_PI);
<a name="l00103"></a>00103 }
<a name="l00104"></a>00104
<a name="l00105"></a>00105 <span class="comment">// Optimization for external DCM use. Calculate normalized components</span>
<a name="l00106"></a>00106 <a class="code" href="class_compass.html#aafc7608bd711702f519d52afbc06dc7a">heading_x</a> = cos(<a class="code" href="class_compass.html#af34cf40b43e957554a48ed27b848a35f">heading</a>);
<a name="l00107"></a>00107 <a class="code" href="class_compass.html#a2e1554fb76b067f36d011f59e7e8dd58">heading_y</a> = sin(<a class="code" href="class_compass.html#af34cf40b43e957554a48ed27b848a35f">heading</a>);
<a name="l00108"></a>00108 }
<a name="l00109"></a>00109
<a name="l00110"></a><a class="code" href="class_a_p___compass___h_i_l.html#aae23c67a982d566e2f538509799ee277">00110</a> <span class="keywordtype">void</span> <a class="code" href="class_a_p___compass___h_i_l.html#aae23c67a982d566e2f538509799ee277">AP_Compass_HIL::set_orientation</a>(<span class="keyword">const</span> <a class="code" href="class_matrix3.html">Matrix3f</a> &amp;rotation_matrix)
<a name="l00111"></a>00111 {
<a name="l00112"></a>00112 orientation_matrix = rotation_matrix;
<a name="l00113"></a>00113 <span class="keywordflow">if</span>( orientation_matrix == <a class="code" href="_a_p___compass___h_m_c5843_8h.html#a4df2438502f1e4fcccf06122417ef115">ROTATION_NONE</a> )
<a name="l00114"></a>00114 orientation = 0;
<a name="l00115"></a>00115 <span class="keywordflow">else</span>
<a name="l00116"></a>00116 orientation = 1;
<a name="l00117"></a>00117 }
<a name="l00118"></a>00118
<a name="l00119"></a><a class="code" href="class_a_p___compass___h_i_l.html#a1fb0fcecfa08549ea1ca9d0cf9f7eb14">00119</a> <span class="keywordtype">void</span> <a class="code" href="class_a_p___compass___h_i_l.html#a1fb0fcecfa08549ea1ca9d0cf9f7eb14">AP_Compass_HIL::set_offsets</a>(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">int</span> z)
<a name="l00120"></a>00120 {
<a name="l00121"></a>00121 offset[0] = x;
<a name="l00122"></a>00122 offset[1] = y;
<a name="l00123"></a>00123 offset[2] = z;
<a name="l00124"></a>00124 }
<a name="l00125"></a>00125
<a name="l00126"></a><a class="code" href="class_a_p___compass___h_i_l.html#a4b4d22637d14bd5585aa8d2d5e32ea43">00126</a> <span class="keywordtype">void</span> <a class="code" href="class_a_p___compass___h_i_l.html#a4b4d22637d14bd5585aa8d2d5e32ea43">AP_Compass_HIL::set_declination</a>(<span class="keywordtype">float</span> radians)
<a name="l00127"></a>00127 {
<a name="l00128"></a>00128 declination = radians;
<a name="l00129"></a>00129 }
<a name="l00130"></a>00130
<a name="l00131"></a><a class="code" href="class_a_p___compass___h_i_l.html#a3a78f477d793be7840a2170de8f202d8">00131</a> <span class="keywordtype">void</span> <a class="code" href="class_a_p___compass___h_i_l.html#a3a78f477d793be7840a2170de8f202d8">AP_Compass_HIL::setHIL</a>(<span class="keywordtype">float</span> _mag_x, <span class="keywordtype">float</span> _mag_y, <span class="keywordtype">float</span> _mag_z)
<a name="l00132"></a>00132 {
<a name="l00133"></a>00133 <span class="comment">// TODO: map floats to raw</span>
<a name="l00134"></a>00134 <a class="code" href="class_compass.html#a8324bcab8618a2a2076a511dec2cc8a0">mag_x</a> = _mag_x;
<a name="l00135"></a>00135 <a class="code" href="class_compass.html#a4de5f44fab49fabf8524ea79e9d3f84a">mag_y</a> = _mag_y;
<a name="l00136"></a>00136 <a class="code" href="class_compass.html#a6c05eabd47bd8116c4823481c3ea4549">mag_z</a> = _mag_z;
<a name="l00137"></a>00137 }
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:33 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,63 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HIL.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> </div>
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HIL.h File Reference</h1> </div>
</div>
<div class="contents">
<code>#include &lt;<a class="el" href="_compass_8h_source.html">Compass.h</a>&gt;</code><br/>
<code>#include &quot;<a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_w_program_8h_source.html">WProgram.h</a>&quot;</code><br/>
<div class="dynheader">
Include dependency graph for AP_Compass_HIL.h:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___compass___h_i_l_8h__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass___h_i_l_8h" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass___h_i_l_8h" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass___h_i_l_8h">
<area shape="rect" id="node3" href="_compass_8h.html" title="Compass.h" alt="" coords="163,160,256,189"/><area shape="rect" id="node23" href="_a_p___compass___h_m_c5843_8h.html" title="AP_Compass_HMC5843.h" alt="" coords="247,83,433,112"/><area shape="rect" id="node27" href="_w_program_8h.html" title="WProgram.h" alt="" coords="457,83,556,112"/><area shape="rect" id="node7" href="_a_p___math_8h.html" title="../AP_Math/AP_Math.h" alt="" coords="115,237,277,267"/><area shape="rect" id="node9" href="vector2_8h.html" title="vector2.h" alt="" coords="104,392,187,421"/><area shape="rect" id="node13" href="vector3_8h.html" title="vector3.h" alt="" coords="211,392,293,421"/><area shape="rect" id="node18" href="matrix3_8h.html" title="matrix3.h" alt="" coords="233,315,316,344"/></map>
</div>
<div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___compass___h_i_l_8h__dep__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass___h_i_l_8hdep" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass___h_i_l_8hdep" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass___h_i_l_8hdep">
<area shape="rect" id="node3" href="_a_p___compass_8h.html" title="Catch&#45;all header that defines all supported compass classes." alt="" coords="101,83,539,112"/><area shape="rect" id="node14" href="_a_p___compass___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HIL.cpp" alt="" coords="563,83,1040,112"/><area shape="rect" id="node5" href="_a_p___d_c_m___h_i_l_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.h" alt="" coords="239,160,641,189"/><area shape="rect" id="node7" href="_a_p___d_c_m_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.h" alt="" coords="13,237,389,267"/><area shape="rect" id="node11" href="_a_p___d_c_m___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.cpp" alt="" coords="413,237,832,267"/><area shape="rect" id="node9" href="_a_p___d_c_m_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.cpp" alt="" coords="5,315,397,344"/></map>
</div>
<p><a href="_a_p___compass___h_i_l_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___compass___h_i_l.html">AP_Compass_HIL</a></td></tr>
</table>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:34 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,8 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_a_p___compass_8h.html" title="Catch&#45;all header that defines all supported compass classes." alt="" coords="101,83,539,112"/>
<area shape="rect" id="node14" href="$_a_p___compass___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HIL.cpp" alt="" coords="563,83,1040,112"/>
<area shape="rect" id="node5" href="$_a_p___d_c_m___h_i_l_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.h" alt="" coords="239,160,641,189"/>
<area shape="rect" id="node7" href="$_a_p___d_c_m_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.h" alt="" coords="13,237,389,267"/>
<area shape="rect" id="node11" href="$_a_p___d_c_m___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.cpp" alt="" coords="413,237,832,267"/>
<area shape="rect" id="node9" href="$_a_p___d_c_m_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.cpp" alt="" coords="5,315,397,344"/>
</map>

View File

@ -0,0 +1 @@
090a55b5ff3e894aa3b741579961b874

View File

@ -0,0 +1,9 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_compass_8h.html" title="Compass.h" alt="" coords="163,160,256,189"/>
<area shape="rect" id="node23" href="$_a_p___compass___h_m_c5843_8h.html" title="AP_Compass_HMC5843.h" alt="" coords="247,83,433,112"/>
<area shape="rect" id="node27" href="$_w_program_8h.html" title="WProgram.h" alt="" coords="457,83,556,112"/>
<area shape="rect" id="node7" href="$_a_p___math_8h.html" title="../AP_Math/AP_Math.h" alt="" coords="115,237,277,267"/>
<area shape="rect" id="node9" href="$vector2_8h.html" title="vector2.h" alt="" coords="104,392,187,421"/>
<area shape="rect" id="node13" href="$vector3_8h.html" title="vector3.h" alt="" coords="211,392,293,421"/>
<area shape="rect" id="node18" href="$matrix3_8h.html" title="matrix3.h" alt="" coords="233,315,316,344"/>
</map>

View File

@ -0,0 +1 @@
9e7b4be97155ad62c376ffc706a20397

View File

@ -0,0 +1,66 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HIL.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HIL.h</h1> </div>
</div>
<div class="contents">
<a href="_a_p___compass___h_i_l_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef AP_Compass_HIL_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define AP_Compass_HIL_H</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;<a class="code" href="_compass_8h.html">Compass.h</a>&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &quot;<a class="code" href="_a_p___compass___h_m_c5843_8h.html">AP_Compass_HMC5843.h</a>&quot;</span> <span class="comment">// to get #defines since we are modelling this</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &quot;<a class="code" href="_w_program_8h.html">WProgram.h</a>&quot;</span>
<a name="l00007"></a>00007
<a name="l00008"></a><a class="code" href="class_a_p___compass___h_i_l.html">00008</a> <span class="keyword">class </span><a class="code" href="class_a_p___compass___h_i_l.html">AP_Compass_HIL</a> : <span class="keyword">public</span> <a class="code" href="class_compass.html">Compass</a>
<a name="l00009"></a>00009 {
<a name="l00010"></a>00010 <span class="keyword">public</span>:
<a name="l00011"></a>00011 <a class="code" href="class_a_p___compass___h_i_l.html#a54036d8a8354e8484db9f1ca33af9572">AP_Compass_HIL</a>(); <span class="comment">// Constructor</span>
<a name="l00012"></a>00012
<a name="l00013"></a>00013 <span class="keywordtype">bool</span> <a class="code" href="class_a_p___compass___h_i_l.html#aefa72efcf8536c3696a25de69f1731c7">init</a>(<span class="keywordtype">int</span> initialise_wire_lib = 1);
<a name="l00014"></a>00014 <span class="keywordtype">void</span> <a class="code" href="class_a_p___compass___h_i_l.html#ac8d183edcd14cf5ee56895c498ebf02a">read</a>();
<a name="l00015"></a>00015 <span class="keywordtype">void</span> <a class="code" href="class_a_p___compass___h_i_l.html#a755d7409dedf3e903225b36fbf16e622">calculate</a>(<span class="keywordtype">float</span> roll, <span class="keywordtype">float</span> pitch);
<a name="l00016"></a>00016 <span class="keywordtype">void</span> <a class="code" href="class_a_p___compass___h_i_l.html#aae23c67a982d566e2f538509799ee277">set_orientation</a>(<span class="keyword">const</span> <a class="code" href="class_matrix3.html">Matrix3f</a> &amp;rotation_matrix);
<a name="l00017"></a>00017 <span class="keywordtype">void</span> <a class="code" href="class_a_p___compass___h_i_l.html#a1fb0fcecfa08549ea1ca9d0cf9f7eb14">set_offsets</a>(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">int</span> z);
<a name="l00018"></a>00018 <span class="keywordtype">void</span> <a class="code" href="class_a_p___compass___h_i_l.html#a4b4d22637d14bd5585aa8d2d5e32ea43">set_declination</a>(<span class="keywordtype">float</span> radians);
<a name="l00019"></a>00019 <span class="keywordtype">void</span> <a class="code" href="class_a_p___compass___h_i_l.html#a3a78f477d793be7840a2170de8f202d8">setHIL</a>(<span class="keywordtype">float</span> Mag_X, <span class="keywordtype">float</span> Mag_Y, <span class="keywordtype">float</span> Mag_Z);
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="keyword">private</span>:
<a name="l00022"></a>00022 <span class="keywordtype">int</span> orientation;
<a name="l00023"></a>00023 <a class="code" href="class_matrix3.html">Matrix3f</a> orientation_matrix;
<a name="l00024"></a>00024 <span class="keywordtype">float</span> calibration[3];
<a name="l00025"></a>00025 <span class="keywordtype">int</span> offset[3];
<a name="l00026"></a>00026 <span class="keywordtype">float</span> declination;
<a name="l00027"></a>00027 };
<a name="l00028"></a>00028
<a name="l00029"></a>00029 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:33 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,217 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HMC5843.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#define-members">Defines</a> </div>
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HMC5843.cpp File Reference</h1> </div>
</div>
<div class="contents">
<code>#include &lt;math.h&gt;</code><br/>
<code>#include &quot;WConstants.h&quot;</code><br/>
<code>#include &lt;Wire.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>&quot;</code><br/>
<div class="dynheader">
Include dependency graph for AP_Compass_HMC5843.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___compass___h_m_c5843_8cpp__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass___h_m_c5843_8cpp" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass___h_m_c5843_8cpp" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass___h_m_c5843_8cpp">
<area shape="rect" id="node9" href="_a_p___compass___h_m_c5843_8h.html" title="AP_Compass_HMC5843.h" alt="" coords="375,83,561,112"/><area shape="rect" id="node11" href="_compass_8h.html" title="Compass.h" alt="" coords="335,160,428,189"/><area shape="rect" id="node15" href="_a_p___math_8h.html" title="../AP_Math/AP_Math.h" alt="" coords="265,237,428,267"/><area shape="rect" id="node17" href="vector2_8h.html" title="vector2.h" alt="" coords="165,392,248,421"/><area shape="rect" id="node20" href="vector3_8h.html" title="vector3.h" alt="" coords="272,392,355,421"/><area shape="rect" id="node25" href="matrix3_8h.html" title="matrix3.h" alt="" coords="323,315,405,344"/></map>
</div>
<p><a href="_a_p___compass___h_m_c5843_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8cpp.html#a0deae345f38c0e72dd027b6c2e7c38e7">COMPASS_ADDRESS</a>&nbsp;&nbsp;&nbsp;0x1E</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8cpp.html#a15238b7dcf6a8be8f8f1cc2714e03497">ConfigRegA</a>&nbsp;&nbsp;&nbsp;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8cpp.html#a08deb6951571140601e7175e8333deae">ConfigRegB</a>&nbsp;&nbsp;&nbsp;0x01</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8cpp.html#aabdf9c2147724c049a9d863e05ccad74">magGain</a>&nbsp;&nbsp;&nbsp;0x20</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8cpp.html#a69f2264df9626794513fa93cec1b8d26">PositiveBiasConfig</a>&nbsp;&nbsp;&nbsp;0x11</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8cpp.html#aac9df902d44c45313c7145b6f2e24ed7">NegativeBiasConfig</a>&nbsp;&nbsp;&nbsp;0x12</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8cpp.html#acc27c13c79a5a7cd1c3469052779a2ca">NormalOperation</a>&nbsp;&nbsp;&nbsp;0x10</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8cpp.html#a588e30fd18c31816cde04b8e3b3adf15">ModeRegister</a>&nbsp;&nbsp;&nbsp;0x02</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8cpp.html#ade76e9a9487fab6bddb17d2073722cc4">ContinuousConversion</a>&nbsp;&nbsp;&nbsp;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8cpp.html#ac1e326f2b01d42fc81fe26463b4e84e6">SingleConversion</a>&nbsp;&nbsp;&nbsp;0x01</td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a0deae345f38c0e72dd027b6c2e7c38e7"></a><!-- doxytag: member="AP_Compass_HMC5843.cpp::COMPASS_ADDRESS" ref="a0deae345f38c0e72dd027b6c2e7c38e7" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define COMPASS_ADDRESS&nbsp;&nbsp;&nbsp;0x1E</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8cpp_source.html#l00044">44</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8cpp_source.html">AP_Compass_HMC5843.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a15238b7dcf6a8be8f8f1cc2714e03497"></a><!-- doxytag: member="AP_Compass_HMC5843.cpp::ConfigRegA" ref="a15238b7dcf6a8be8f8f1cc2714e03497" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ConfigRegA&nbsp;&nbsp;&nbsp;0x00</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8cpp_source.html#l00045">45</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8cpp_source.html">AP_Compass_HMC5843.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a08deb6951571140601e7175e8333deae"></a><!-- doxytag: member="AP_Compass_HMC5843.cpp::ConfigRegB" ref="a08deb6951571140601e7175e8333deae" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ConfigRegB&nbsp;&nbsp;&nbsp;0x01</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8cpp_source.html#l00046">46</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8cpp_source.html">AP_Compass_HMC5843.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ade76e9a9487fab6bddb17d2073722cc4"></a><!-- doxytag: member="AP_Compass_HMC5843.cpp::ContinuousConversion" ref="ade76e9a9487fab6bddb17d2073722cc4" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ContinuousConversion&nbsp;&nbsp;&nbsp;0x00</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8cpp_source.html#l00052">52</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8cpp_source.html">AP_Compass_HMC5843.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="aabdf9c2147724c049a9d863e05ccad74"></a><!-- doxytag: member="AP_Compass_HMC5843.cpp::magGain" ref="aabdf9c2147724c049a9d863e05ccad74" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define magGain&nbsp;&nbsp;&nbsp;0x20</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8cpp_source.html#l00047">47</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8cpp_source.html">AP_Compass_HMC5843.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a588e30fd18c31816cde04b8e3b3adf15"></a><!-- doxytag: member="AP_Compass_HMC5843.cpp::ModeRegister" ref="a588e30fd18c31816cde04b8e3b3adf15" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ModeRegister&nbsp;&nbsp;&nbsp;0x02</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8cpp_source.html#l00051">51</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8cpp_source.html">AP_Compass_HMC5843.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="aac9df902d44c45313c7145b6f2e24ed7"></a><!-- doxytag: member="AP_Compass_HMC5843.cpp::NegativeBiasConfig" ref="aac9df902d44c45313c7145b6f2e24ed7" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define NegativeBiasConfig&nbsp;&nbsp;&nbsp;0x12</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8cpp_source.html#l00049">49</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8cpp_source.html">AP_Compass_HMC5843.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="acc27c13c79a5a7cd1c3469052779a2ca"></a><!-- doxytag: member="AP_Compass_HMC5843.cpp::NormalOperation" ref="acc27c13c79a5a7cd1c3469052779a2ca" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define NormalOperation&nbsp;&nbsp;&nbsp;0x10</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8cpp_source.html#l00050">50</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8cpp_source.html">AP_Compass_HMC5843.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a69f2264df9626794513fa93cec1b8d26"></a><!-- doxytag: member="AP_Compass_HMC5843.cpp::PositiveBiasConfig" ref="a69f2264df9626794513fa93cec1b8d26" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define PositiveBiasConfig&nbsp;&nbsp;&nbsp;0x11</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8cpp_source.html#l00048">48</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8cpp_source.html">AP_Compass_HMC5843.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ac1e326f2b01d42fc81fe26463b4e84e6"></a><!-- doxytag: member="AP_Compass_HMC5843.cpp::SingleConversion" ref="ac1e326f2b01d42fc81fe26463b4e84e6" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define SingleConversion&nbsp;&nbsp;&nbsp;0x01</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8cpp_source.html#l00053">53</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8cpp_source.html">AP_Compass_HMC5843.cpp</a>.</p>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:34 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,8 @@
<map id="G" name="G">
<area shape="rect" id="node9" href="$_a_p___compass___h_m_c5843_8h.html" title="AP_Compass_HMC5843.h" alt="" coords="375,83,561,112"/>
<area shape="rect" id="node11" href="$_compass_8h.html" title="Compass.h" alt="" coords="335,160,428,189"/>
<area shape="rect" id="node15" href="$_a_p___math_8h.html" title="../AP_Math/AP_Math.h" alt="" coords="265,237,428,267"/>
<area shape="rect" id="node17" href="$vector2_8h.html" title="vector2.h" alt="" coords="165,392,248,421"/>
<area shape="rect" id="node20" href="$vector3_8h.html" title="vector3.h" alt="" coords="272,392,355,421"/>
<area shape="rect" id="node25" href="$matrix3_8h.html" title="matrix3.h" alt="" coords="323,315,405,344"/>
</map>

View File

@ -0,0 +1 @@
6e6bd5ac193a8a2f48ab22d33d54ed18

View File

@ -0,0 +1,269 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HMC5843.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HMC5843.cpp</h1> </div>
</div>
<div class="contents">
<a href="_a_p___compass___h_m_c5843_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- tab-width: 4; Mode: C++; c-basic-offset: 3; indent-tabs-mode: t -*-</span>
<a name="l00002"></a>00002 <span class="comment">/*</span>
<a name="l00003"></a>00003 <span class="comment"> AP_Compass_HMC5843.cpp - Arduino Library for HMC5843 I2C magnetometer</span>
<a name="l00004"></a>00004 <span class="comment"> Code by Jordi Muñoz and Jose Julio. DIYDrones.com</span>
<a name="l00005"></a>00005 <span class="comment"></span>
<a name="l00006"></a>00006 <span class="comment"> This library is free software; you can redistribute it and/or</span>
<a name="l00007"></a>00007 <span class="comment"> modify it under the terms of the GNU Lesser General Public</span>
<a name="l00008"></a>00008 <span class="comment"> License as published by the Free Software Foundation; either</span>
<a name="l00009"></a>00009 <span class="comment"> version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00010"></a>00010 <span class="comment"></span>
<a name="l00011"></a>00011 <span class="comment"> Sensor is conected to I2C port</span>
<a name="l00012"></a>00012 <span class="comment"> Sensor is initialized in Continuos mode (10Hz)</span>
<a name="l00013"></a>00013 <span class="comment"> </span>
<a name="l00014"></a>00014 <span class="comment"> Variables:</span>
<a name="l00015"></a>00015 <span class="comment"> heading : magnetic heading</span>
<a name="l00016"></a>00016 <span class="comment"> heading_x : magnetic heading X component</span>
<a name="l00017"></a>00017 <span class="comment"> heading_y : magnetic heading Y component</span>
<a name="l00018"></a>00018 <span class="comment"> mag_x : Raw X axis magnetometer data</span>
<a name="l00019"></a>00019 <span class="comment"> mag_y : Raw Y axis magnetometer data</span>
<a name="l00020"></a>00020 <span class="comment"> mag_z : Raw Z axis magnetometer data </span>
<a name="l00021"></a>00021 <span class="comment"> last_update : the time of the last successful reading </span>
<a name="l00022"></a>00022 <span class="comment"> </span>
<a name="l00023"></a>00023 <span class="comment"> Methods:</span>
<a name="l00024"></a>00024 <span class="comment"> init() : Initialization of I2C and sensor</span>
<a name="l00025"></a>00025 <span class="comment"> read() : Read Sensor data </span>
<a name="l00026"></a>00026 <span class="comment"> calculate(float roll, float pitch) : Calculate tilt adjusted heading</span>
<a name="l00027"></a>00027 <span class="comment"> set_orientation(const Matrix3f &amp;rotation_matrix) : Set orientation of compass</span>
<a name="l00028"></a>00028 <span class="comment"> set_offsets(int x, int y, int z) : Set adjustments for HardIron disturbances</span>
<a name="l00029"></a>00029 <span class="comment"> set_declination(float radians) : Set heading adjustment between true north and magnetic north</span>
<a name="l00030"></a>00030 <span class="comment"></span>
<a name="l00031"></a>00031 <span class="comment"> To do : code optimization</span>
<a name="l00032"></a>00032 <span class="comment"> Mount position : UPDATED</span>
<a name="l00033"></a>00033 <span class="comment"> Big capacitor pointing backward, connector forward</span>
<a name="l00034"></a>00034 <span class="comment"> </span>
<a name="l00035"></a>00035 <span class="comment">*/</span>
<a name="l00036"></a>00036
<a name="l00037"></a>00037 <span class="comment">// AVR LibC Includes</span>
<a name="l00038"></a>00038 <span class="preprocessor">#include &lt;math.h&gt;</span>
<a name="l00039"></a>00039 <span class="preprocessor">#include &quot;WConstants.h&quot;</span>
<a name="l00040"></a>00040
<a name="l00041"></a>00041 <span class="preprocessor">#include &lt;Wire.h&gt;</span>
<a name="l00042"></a>00042 <span class="preprocessor">#include &quot;<a class="code" href="_a_p___compass___h_m_c5843_8h.html">AP_Compass_HMC5843.h</a>&quot;</span>
<a name="l00043"></a>00043
<a name="l00044"></a><a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#a0deae345f38c0e72dd027b6c2e7c38e7">00044</a> <span class="preprocessor">#define COMPASS_ADDRESS 0x1E</span>
<a name="l00045"></a><a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#a15238b7dcf6a8be8f8f1cc2714e03497">00045</a> <span class="preprocessor"></span><span class="preprocessor">#define ConfigRegA 0x00</span>
<a name="l00046"></a><a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#a08deb6951571140601e7175e8333deae">00046</a> <span class="preprocessor"></span><span class="preprocessor">#define ConfigRegB 0x01</span>
<a name="l00047"></a><a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#aabdf9c2147724c049a9d863e05ccad74">00047</a> <span class="preprocessor"></span><span class="preprocessor">#define magGain 0x20</span>
<a name="l00048"></a><a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#a69f2264df9626794513fa93cec1b8d26">00048</a> <span class="preprocessor"></span><span class="preprocessor">#define PositiveBiasConfig 0x11</span>
<a name="l00049"></a><a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#aac9df902d44c45313c7145b6f2e24ed7">00049</a> <span class="preprocessor"></span><span class="preprocessor">#define NegativeBiasConfig 0x12</span>
<a name="l00050"></a><a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#acc27c13c79a5a7cd1c3469052779a2ca">00050</a> <span class="preprocessor"></span><span class="preprocessor">#define NormalOperation 0x10</span>
<a name="l00051"></a><a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#a588e30fd18c31816cde04b8e3b3adf15">00051</a> <span class="preprocessor"></span><span class="preprocessor">#define ModeRegister 0x02</span>
<a name="l00052"></a><a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#ade76e9a9487fab6bddb17d2073722cc4">00052</a> <span class="preprocessor"></span><span class="preprocessor">#define ContinuousConversion 0x00</span>
<a name="l00053"></a><a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#ac1e326f2b01d42fc81fe26463b4e84e6">00053</a> <span class="preprocessor"></span><span class="preprocessor">#define SingleConversion 0x01</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span>
<a name="l00055"></a>00055 <span class="comment">// Constructors ////////////////////////////////////////////////////////////////</span>
<a name="l00056"></a><a class="code" href="class_a_p___compass___h_m_c5843.html#a94d8caab62c0f3a2a751a8eccfe6bcc1">00056</a> <a class="code" href="class_a_p___compass___h_m_c5843.html#a94d8caab62c0f3a2a751a8eccfe6bcc1">AP_Compass_HMC5843::AP_Compass_HMC5843</a>() : orientation(0), declination(0.0)
<a name="l00057"></a>00057 {
<a name="l00058"></a>00058 <span class="comment">// mag x y z offset initialisation</span>
<a name="l00059"></a>00059 offset[0] = 0;
<a name="l00060"></a>00060 offset[1] = 0;
<a name="l00061"></a>00061 offset[2] = 0;
<a name="l00062"></a>00062
<a name="l00063"></a>00063 <span class="comment">// initialise orientation matrix</span>
<a name="l00064"></a>00064 orientation_matrix = ROTATION_NONE;
<a name="l00065"></a>00065 }
<a name="l00066"></a>00066
<a name="l00067"></a>00067 <span class="comment">// Public Methods //////////////////////////////////////////////////////////////</span>
<a name="l00068"></a><a class="code" href="class_a_p___compass___h_m_c5843.html#af32c9430d20a2eb7d1df8413870c99b6">00068</a> <span class="keywordtype">bool</span> <a class="code" href="class_a_p___compass___h_m_c5843.html#af32c9430d20a2eb7d1df8413870c99b6">AP_Compass_HMC5843::init</a>(<span class="keywordtype">int</span> initialise_wire_lib)
<a name="l00069"></a>00069 {
<a name="l00070"></a>00070 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> currentTime = <a class="code" href="test_8cpp.html#a941a22cb7e0f6429fe40f91e83ead3d9">millis</a>(); <span class="comment">// record current time</span>
<a name="l00071"></a>00071 <span class="keywordtype">int</span> numAttempts = 0;
<a name="l00072"></a>00072 <span class="keywordtype">int</span> success = 0;
<a name="l00073"></a>00073
<a name="l00074"></a>00074 <span class="keywordflow">if</span>( initialise_wire_lib != 0 )
<a name="l00075"></a>00075 Wire.begin();
<a name="l00076"></a>00076
<a name="l00077"></a>00077 delay(10);
<a name="l00078"></a>00078
<a name="l00079"></a>00079 <span class="comment">// calibration initialisation</span>
<a name="l00080"></a>00080 calibration[0] = 1.0;
<a name="l00081"></a>00081 calibration[1] = 1.0;
<a name="l00082"></a>00082 calibration[2] = 1.0;
<a name="l00083"></a>00083
<a name="l00084"></a>00084 <span class="keywordflow">while</span>( success == 0 &amp;&amp; numAttempts &lt; 5 )
<a name="l00085"></a>00085 {
<a name="l00086"></a>00086 <span class="comment">// record number of attempts at initialisation</span>
<a name="l00087"></a>00087 numAttempts++;
<a name="l00088"></a>00088
<a name="l00089"></a>00089 <span class="comment">// force positiveBias (compass should return 715 for all channels)</span>
<a name="l00090"></a>00090 Wire.beginTransmission(<a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#a0deae345f38c0e72dd027b6c2e7c38e7">COMPASS_ADDRESS</a>);
<a name="l00091"></a>00091 Wire.send(<a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#a15238b7dcf6a8be8f8f1cc2714e03497">ConfigRegA</a>);
<a name="l00092"></a>00092 Wire.send(<a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#a69f2264df9626794513fa93cec1b8d26">PositiveBiasConfig</a>);
<a name="l00093"></a>00093 <span class="keywordflow">if</span> (0 != Wire.endTransmission())
<a name="l00094"></a>00094 <span class="keywordflow">continue</span>; <span class="comment">// compass not responding on the bus</span>
<a name="l00095"></a>00095 delay(50);
<a name="l00096"></a>00096
<a name="l00097"></a>00097 <span class="comment">// set gains</span>
<a name="l00098"></a>00098 Wire.beginTransmission(<a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#a0deae345f38c0e72dd027b6c2e7c38e7">COMPASS_ADDRESS</a>);
<a name="l00099"></a>00099 Wire.send(<a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#a08deb6951571140601e7175e8333deae">ConfigRegB</a>);
<a name="l00100"></a>00100 Wire.send(<a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#aabdf9c2147724c049a9d863e05ccad74">magGain</a>);
<a name="l00101"></a>00101 Wire.endTransmission();
<a name="l00102"></a>00102 delay(10);
<a name="l00103"></a>00103
<a name="l00104"></a>00104 Wire.beginTransmission(<a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#a0deae345f38c0e72dd027b6c2e7c38e7">COMPASS_ADDRESS</a>);
<a name="l00105"></a>00105 Wire.send(<a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#a588e30fd18c31816cde04b8e3b3adf15">ModeRegister</a>);
<a name="l00106"></a>00106 Wire.send(<a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#ac1e326f2b01d42fc81fe26463b4e84e6">SingleConversion</a>);
<a name="l00107"></a>00107 Wire.endTransmission();
<a name="l00108"></a>00108 delay(10);
<a name="l00109"></a>00109
<a name="l00110"></a>00110 <span class="comment">// read values from the compass</span>
<a name="l00111"></a>00111 <a class="code" href="class_a_p___compass___h_m_c5843.html#ab60b932f53493c46e262c1f46a12bdf6">read</a>();
<a name="l00112"></a>00112 delay(10);
<a name="l00113"></a>00113
<a name="l00114"></a>00114 <span class="comment">// calibrate</span>
<a name="l00115"></a>00115 <span class="keywordflow">if</span>( abs(<a class="code" href="class_compass.html#a8324bcab8618a2a2076a511dec2cc8a0">mag_x</a>) &gt; 500 &amp;&amp; abs(<a class="code" href="class_compass.html#a8324bcab8618a2a2076a511dec2cc8a0">mag_x</a>) &lt; 1000 &amp;&amp; abs(<a class="code" href="class_compass.html#a4de5f44fab49fabf8524ea79e9d3f84a">mag_y</a>) &gt; 500 &amp;&amp; abs(<a class="code" href="class_compass.html#a4de5f44fab49fabf8524ea79e9d3f84a">mag_y</a>) &lt; 1000 &amp;&amp; abs(<a class="code" href="class_compass.html#a6c05eabd47bd8116c4823481c3ea4549">mag_z</a>) &gt; 500 &amp;&amp; abs(<a class="code" href="class_compass.html#a6c05eabd47bd8116c4823481c3ea4549">mag_z</a>) &lt; 1000)
<a name="l00116"></a>00116 {
<a name="l00117"></a>00117 calibration[0] = fabs(715.0 / <a class="code" href="class_compass.html#a8324bcab8618a2a2076a511dec2cc8a0">mag_x</a>);
<a name="l00118"></a>00118 calibration[1] = fabs(715.0 / <a class="code" href="class_compass.html#a4de5f44fab49fabf8524ea79e9d3f84a">mag_y</a>);
<a name="l00119"></a>00119 calibration[2] = fabs(715.0 / <a class="code" href="class_compass.html#a6c05eabd47bd8116c4823481c3ea4549">mag_z</a>);
<a name="l00120"></a>00120
<a name="l00121"></a>00121 <span class="comment">// mark success</span>
<a name="l00122"></a>00122 success = 1;
<a name="l00123"></a>00123 }
<a name="l00124"></a>00124
<a name="l00125"></a>00125 <span class="comment">// leave test mode</span>
<a name="l00126"></a>00126 Wire.beginTransmission(<a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#a0deae345f38c0e72dd027b6c2e7c38e7">COMPASS_ADDRESS</a>);
<a name="l00127"></a>00127 Wire.send(<a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#a15238b7dcf6a8be8f8f1cc2714e03497">ConfigRegA</a>);
<a name="l00128"></a>00128 Wire.send(<a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#acc27c13c79a5a7cd1c3469052779a2ca">NormalOperation</a>);
<a name="l00129"></a>00129 Wire.endTransmission();
<a name="l00130"></a>00130 delay(50);
<a name="l00131"></a>00131
<a name="l00132"></a>00132 Wire.beginTransmission(<a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#a0deae345f38c0e72dd027b6c2e7c38e7">COMPASS_ADDRESS</a>);
<a name="l00133"></a>00133 Wire.send(<a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#a588e30fd18c31816cde04b8e3b3adf15">ModeRegister</a>);
<a name="l00134"></a>00134 Wire.send(<a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#ade76e9a9487fab6bddb17d2073722cc4">ContinuousConversion</a>); <span class="comment">// Set continuous mode (default to 10Hz)</span>
<a name="l00135"></a>00135 Wire.endTransmission(); <span class="comment">// End transmission</span>
<a name="l00136"></a>00136 delay(50);
<a name="l00137"></a>00137 }
<a name="l00138"></a>00138 <span class="keywordflow">return</span>(success);
<a name="l00139"></a>00139 }
<a name="l00140"></a>00140
<a name="l00141"></a>00141 <span class="comment">// Read Sensor data</span>
<a name="l00142"></a><a class="code" href="class_a_p___compass___h_m_c5843.html#ab60b932f53493c46e262c1f46a12bdf6">00142</a> <span class="keywordtype">void</span> <a class="code" href="class_a_p___compass___h_m_c5843.html#ab60b932f53493c46e262c1f46a12bdf6">AP_Compass_HMC5843::read</a>()
<a name="l00143"></a>00143 {
<a name="l00144"></a>00144 <span class="keywordtype">int</span> i = 0;
<a name="l00145"></a>00145 byte buff[6];
<a name="l00146"></a>00146
<a name="l00147"></a>00147 Wire.beginTransmission(<a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#a0deae345f38c0e72dd027b6c2e7c38e7">COMPASS_ADDRESS</a>);
<a name="l00148"></a>00148 Wire.send(0x03); <span class="comment">//sends address to read from</span>
<a name="l00149"></a>00149 Wire.endTransmission(); <span class="comment">//end transmission</span>
<a name="l00150"></a>00150
<a name="l00151"></a>00151 <span class="comment">//Wire.beginTransmission(COMPASS_ADDRESS); </span>
<a name="l00152"></a>00152 Wire.requestFrom(<a class="code" href="_a_p___compass___h_m_c5843_8cpp.html#a0deae345f38c0e72dd027b6c2e7c38e7">COMPASS_ADDRESS</a>, 6); <span class="comment">// request 6 bytes from device</span>
<a name="l00153"></a>00153 <span class="keywordflow">while</span>(Wire.available())
<a name="l00154"></a>00154 {
<a name="l00155"></a>00155 buff[i] = Wire.receive(); <span class="comment">// receive one byte</span>
<a name="l00156"></a>00156 i++;
<a name="l00157"></a>00157 }
<a name="l00158"></a>00158 Wire.endTransmission(); <span class="comment">//end transmission</span>
<a name="l00159"></a>00159
<a name="l00160"></a>00160 <span class="keywordflow">if</span> (i==6) <span class="comment">// All bytes received?</span>
<a name="l00161"></a>00161 {
<a name="l00162"></a>00162 <span class="comment">// MSB byte first, then LSB, X,Y,Z</span>
<a name="l00163"></a>00163 <a class="code" href="class_compass.html#a8324bcab8618a2a2076a511dec2cc8a0">mag_x</a> = -((((int)buff[0]) &lt;&lt; 8) | buff[1]) * calibration[0]; <span class="comment">// X axis</span>
<a name="l00164"></a>00164 <a class="code" href="class_compass.html#a4de5f44fab49fabf8524ea79e9d3f84a">mag_y</a> = ((((int)buff[2]) &lt;&lt; 8) | buff[3]) * calibration[1]; <span class="comment">// Y axis</span>
<a name="l00165"></a>00165 <a class="code" href="class_compass.html#a6c05eabd47bd8116c4823481c3ea4549">mag_z</a> = -((((int)buff[4]) &lt;&lt; 8) | buff[5]) * calibration[2]; <span class="comment">// Z axis</span>
<a name="l00166"></a>00166 <a class="code" href="class_compass.html#a66419d0c87ac23bc422db0279486fd31">last_update</a> = <a class="code" href="test_8cpp.html#a941a22cb7e0f6429fe40f91e83ead3d9">millis</a>(); <span class="comment">// record time of update</span>
<a name="l00167"></a>00167 }
<a name="l00168"></a>00168 }
<a name="l00169"></a>00169
<a name="l00170"></a><a class="code" href="class_a_p___compass___h_m_c5843.html#aaef4df8c859b284d17c8a374d13e4e51">00170</a> <span class="keywordtype">void</span> <a class="code" href="class_a_p___compass___h_m_c5843.html#aaef4df8c859b284d17c8a374d13e4e51">AP_Compass_HMC5843::calculate</a>(<span class="keywordtype">float</span> roll, <span class="keywordtype">float</span> pitch)
<a name="l00171"></a>00171 {
<a name="l00172"></a>00172 <span class="keywordtype">float</span> headX;
<a name="l00173"></a>00173 <span class="keywordtype">float</span> headY;
<a name="l00174"></a>00174 <span class="keywordtype">float</span> cos_roll;
<a name="l00175"></a>00175 <span class="keywordtype">float</span> sin_roll;
<a name="l00176"></a>00176 <span class="keywordtype">float</span> cos_pitch;
<a name="l00177"></a>00177 <span class="keywordtype">float</span> sin_pitch;
<a name="l00178"></a>00178 <a class="code" href="class_vector3.html">Vector3f</a> rotmagVec;
<a name="l00179"></a>00179
<a name="l00180"></a>00180 cos_roll = cos(roll); <span class="comment">// Optimizacion, se puede sacar esto de la matriz DCM?</span>
<a name="l00181"></a>00181 sin_roll = sin(roll);
<a name="l00182"></a>00182 cos_pitch = cos(pitch);
<a name="l00183"></a>00183 sin_pitch = sin(pitch);
<a name="l00184"></a>00184
<a name="l00185"></a>00185 <span class="comment">// rotate the magnetometer values depending upon orientation</span>
<a name="l00186"></a>00186 <span class="keywordflow">if</span>( orientation == 0 )
<a name="l00187"></a>00187 rotmagVec = <a class="code" href="vector3_8h.html#af345ad77ba5e240c7ab72b4b2077e754">Vector3f</a>(<a class="code" href="class_compass.html#a8324bcab8618a2a2076a511dec2cc8a0">mag_x</a>+offset[0],<a class="code" href="class_compass.html#a4de5f44fab49fabf8524ea79e9d3f84a">mag_y</a>+offset[1],<a class="code" href="class_compass.html#a6c05eabd47bd8116c4823481c3ea4549">mag_z</a>+offset[2]);
<a name="l00188"></a>00188 <span class="keywordflow">else</span>
<a name="l00189"></a>00189 rotmagVec = orientation_matrix*<a class="code" href="vector3_8h.html#af345ad77ba5e240c7ab72b4b2077e754">Vector3f</a>(<a class="code" href="class_compass.html#a8324bcab8618a2a2076a511dec2cc8a0">mag_x</a>+offset[0],<a class="code" href="class_compass.html#a4de5f44fab49fabf8524ea79e9d3f84a">mag_y</a>+offset[1],<a class="code" href="class_compass.html#a6c05eabd47bd8116c4823481c3ea4549">mag_z</a>+offset[2]);
<a name="l00190"></a>00190
<a name="l00191"></a>00191 <span class="comment">// Tilt compensated magnetic field X component:</span>
<a name="l00192"></a>00192 headX = rotmagVec.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a>*cos_pitch+rotmagVec.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a>*sin_roll*sin_pitch+rotmagVec.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a>*cos_roll*sin_pitch;
<a name="l00193"></a>00193 <span class="comment">// Tilt compensated magnetic field Y component:</span>
<a name="l00194"></a>00194 headY = rotmagVec.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a>*cos_roll-rotmagVec.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a>*sin_roll;
<a name="l00195"></a>00195 <span class="comment">// magnetic heading</span>
<a name="l00196"></a>00196 <a class="code" href="class_compass.html#af34cf40b43e957554a48ed27b848a35f">heading</a> = atan2(-headY,headX);
<a name="l00197"></a>00197
<a name="l00198"></a>00198 <span class="comment">// Declination correction (if supplied)</span>
<a name="l00199"></a>00199 <span class="keywordflow">if</span>( declination != 0.0 )
<a name="l00200"></a>00200 {
<a name="l00201"></a>00201 <a class="code" href="class_compass.html#af34cf40b43e957554a48ed27b848a35f">heading</a> = <a class="code" href="class_compass.html#af34cf40b43e957554a48ed27b848a35f">heading</a> + declination;
<a name="l00202"></a>00202 <span class="keywordflow">if</span> (<a class="code" href="class_compass.html#af34cf40b43e957554a48ed27b848a35f">heading</a> &gt; M_PI) <span class="comment">// Angle normalization (-180 deg, 180 deg)</span>
<a name="l00203"></a>00203 <a class="code" href="class_compass.html#af34cf40b43e957554a48ed27b848a35f">heading</a> -= (2.0 * M_PI);
<a name="l00204"></a>00204 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="class_compass.html#af34cf40b43e957554a48ed27b848a35f">heading</a> &lt; -M_PI)
<a name="l00205"></a>00205 <a class="code" href="class_compass.html#af34cf40b43e957554a48ed27b848a35f">heading</a> += (2.0 * M_PI);
<a name="l00206"></a>00206 }
<a name="l00207"></a>00207
<a name="l00208"></a>00208 <span class="comment">// Optimization for external DCM use. Calculate normalized components</span>
<a name="l00209"></a>00209 <a class="code" href="class_compass.html#aafc7608bd711702f519d52afbc06dc7a">heading_x</a> = cos(<a class="code" href="class_compass.html#af34cf40b43e957554a48ed27b848a35f">heading</a>);
<a name="l00210"></a>00210 <a class="code" href="class_compass.html#a2e1554fb76b067f36d011f59e7e8dd58">heading_y</a> = sin(<a class="code" href="class_compass.html#af34cf40b43e957554a48ed27b848a35f">heading</a>);
<a name="l00211"></a>00211 }
<a name="l00212"></a>00212
<a name="l00213"></a><a class="code" href="class_a_p___compass___h_m_c5843.html#a5dafbafd496867d435168c8decc742fa">00213</a> <span class="keywordtype">void</span> <a class="code" href="class_a_p___compass___h_m_c5843.html#a5dafbafd496867d435168c8decc742fa">AP_Compass_HMC5843::set_orientation</a>(<span class="keyword">const</span> <a class="code" href="class_matrix3.html">Matrix3f</a> &amp;rotation_matrix)
<a name="l00214"></a>00214 {
<a name="l00215"></a>00215 orientation_matrix = rotation_matrix;
<a name="l00216"></a>00216 <span class="keywordflow">if</span>( orientation_matrix == <a class="code" href="_a_p___compass___h_m_c5843_8h.html#a4df2438502f1e4fcccf06122417ef115">ROTATION_NONE</a> )
<a name="l00217"></a>00217 orientation = 0;
<a name="l00218"></a>00218 <span class="keywordflow">else</span>
<a name="l00219"></a>00219 orientation = 1;
<a name="l00220"></a>00220 }
<a name="l00221"></a>00221
<a name="l00222"></a><a class="code" href="class_a_p___compass___h_m_c5843.html#a90481085e451fe3f64d46ebb401b5aaf">00222</a> <span class="keywordtype">void</span> <a class="code" href="class_a_p___compass___h_m_c5843.html#a90481085e451fe3f64d46ebb401b5aaf">AP_Compass_HMC5843::set_offsets</a>(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">int</span> z)
<a name="l00223"></a>00223 {
<a name="l00224"></a>00224 offset[0] = x;
<a name="l00225"></a>00225 offset[1] = y;
<a name="l00226"></a>00226 offset[2] = z;
<a name="l00227"></a>00227 }
<a name="l00228"></a>00228
<a name="l00229"></a><a class="code" href="class_a_p___compass___h_m_c5843.html#a2ba3fc3b5bd78a28f717c2740948d61e">00229</a> <span class="keywordtype">void</span> <a class="code" href="class_a_p___compass___h_m_c5843.html#a2ba3fc3b5bd78a28f717c2740948d61e">AP_Compass_HMC5843::set_declination</a>(<span class="keywordtype">float</span> radians)
<a name="l00230"></a>00230 {
<a name="l00231"></a>00231 declination = radians;
<a name="l00232"></a>00232 }
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:33 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,834 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HMC5843.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#define-members">Defines</a> </div>
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HMC5843.h File Reference</h1> </div>
</div>
<div class="contents">
<code>#include &quot;<a class="el" href="_compass_8h_source.html">Compass.h</a>&quot;</code><br/>
<code>#include &quot;../AP_Math/AP_Math.h&quot;</code><br/>
<div class="dynheader">
Include dependency graph for AP_Compass_HMC5843.h:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___compass___h_m_c5843_8h__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass___h_m_c5843_8h" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass___h_m_c5843_8h" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass___h_m_c5843_8h">
<area shape="rect" id="node3" href="_compass_8h.html" title="Compass.h" alt="" coords="175,83,268,112"/><area shape="rect" id="node7" href="_a_p___math_8h.html" title="../AP_Math/AP_Math.h" alt="" coords="115,160,277,189"/><area shape="rect" id="node9" href="vector2_8h.html" title="vector2.h" alt="" coords="104,315,187,344"/><area shape="rect" id="node13" href="vector3_8h.html" title="vector3.h" alt="" coords="211,315,293,344"/><area shape="rect" id="node18" href="matrix3_8h.html" title="matrix3.h" alt="" coords="233,237,316,267"/></map>
</div>
<div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___compass___h_m_c5843_8h__dep__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass___h_m_c5843_8hdep" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass___h_m_c5843_8hdep" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___compass_2_a_p___compass___h_m_c5843_8hdep">
<area shape="rect" id="node3" href="_a_p___compass_8h.html" title="Catch&#45;all header that defines all supported compass classes." alt="" coords="101,160,539,189"/><area shape="rect" id="node14" href="_a_p___compass___h_i_l_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HIL.h" alt="" coords="357,83,821,112"/><area shape="rect" id="node19" href="_a_p___compass___h_m_c5843_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HMC5843.cpp" alt="" coords="845,83,1365,112"/><area shape="rect" id="node5" href="_a_p___d_c_m___h_i_l_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.h" alt="" coords="239,237,641,267"/><area shape="rect" id="node7" href="_a_p___d_c_m_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.h" alt="" coords="13,315,389,344"/><area shape="rect" id="node11" href="_a_p___d_c_m___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.cpp" alt="" coords="413,315,832,344"/><area shape="rect" id="node9" href="_a_p___d_c_m_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.cpp" alt="" coords="5,392,397,421"/><area shape="rect" id="node17" href="_a_p___compass___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HIL.cpp" alt="" coords="563,160,1040,189"/></map>
</div>
<p><a href="_a_p___compass___h_m_c5843_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___compass___h_m_c5843.html">AP_Compass_HMC5843</a></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a4df2438502f1e4fcccf06122417ef115">ROTATION_NONE</a>&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(1, 0, 0, 0, 1, 0, 0 ,0, 1)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a7e604e9771a7b454945d01aa8c0683e8">ROTATION_YAW_45</a>&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(0.70710678, -0.70710678, 0, 0.70710678, 0.70710678, 0, 0, 0, 1)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a0b9d7e2557972b95c5a679a916a94e0e">ROTATION_YAW_90</a>&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(0, -1, 0, 1, 0, 0, 0, 0, 1)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a5c6438440432b57017fe01fd678ca957">ROTATION_YAW_135</a>&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(-0.70710678, -0.70710678, 0, 0.70710678, -0.70710678, 0, 0, 0, 1)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a5a122ed874d2cf6086912b9e866b1898">ROTATION_YAW_180</a>&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(-1, 0, 0, 0, -1, 0, 0, 0, 1)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a2a2f398ba3c0f96097649712cce61329">ROTATION_YAW_225</a>&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(-0.70710678, 0.70710678, 0, -0.70710678, -0.70710678, 0, 0, 0, 1)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a3faca3e51a129e29afc2dae55630d771">ROTATION_YAW_270</a>&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(0, 1, 0, -1, 0, 0, 0, 0, 1)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#ab5b3f4f6b27a8a12713f7f94c0b08ab4">ROTATION_YAW_315</a>&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(0.70710678, 0.70710678, 0, -0.70710678, 0.70710678, 0, 0, 0, 1)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#adcff3b2c8133dadb6aba45cba2b026fa">ROTATION_ROLL_180</a>&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(1, 0, 0, 0, -1, 0, 0, 0, -1)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a145d713092a60ae5245f7510ec4d8676">ROTATION_ROLL_180_YAW_45</a>&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(0.70710678, 0.70710678, 0, 0.70710678, -0.70710678, 0, 0, 0, -1)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a1ffe5ed8da3929481fd36bf157a1bc86">ROTATION_ROLL_180_YAW_90</a>&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(0, 1, 0, 1, 0, 0, 0, 0, -1)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#ad68e02a96a965780dfc84eed448b803d">ROTATION_ROLL_180_YAW_135</a>&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(-0.70710678, 0.70710678, 0, 0.70710678, 0.70710678, 0, 0, 0, -1)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a36ebd710a6ca9c6cd4b6aebd17b1ef50">ROTATION_PITCH_180</a>&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(-1, 0, 0, 0, 1, 0, 0, 0, -1)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#adb01c2afda2bd2316b207fc3eed9a920">ROTATION_ROLL_180_YAW_225</a>&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(-0.70710678, -0.70710678, 0, -0.70710678, 0.70710678, 0, 0, 0, -1)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a5b798aa7ce4235f581ba9ff4ecc401c2">ROTATION_ROLL_180_YAW_270</a>&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(0, -1, 0, -1, 0, 0, 0, 0, -1)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a2b3bb9bfe8e12743ec6bbbcc73d2b564">ROTATION_ROLL_180_YAW_315</a>&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(0.70710678, -0.70710678, 0, -0.70710678, -0.70710678, 0, 0, 0, -1)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#aecb68fb696735acfc11242fa2ffa2b2e">AP_COMPASS_COMPONENTS_UP_PINS_FORWARD</a>&nbsp;&nbsp;&nbsp;ROTATION_NONE</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#ad6e2a30f55918963430aebea6d96a6d6">AP_COMPASS_COMPONENTS_UP_PINS_FORWARD_RIGHT</a>&nbsp;&nbsp;&nbsp;ROTATION_YAW_45</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a25e8e548317f53addbb7dd1ddb9e7e0e">AP_COMPASS_COMPONENTS_UP_PINS_RIGHT</a>&nbsp;&nbsp;&nbsp;ROTATION_YAW_90</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a05cf7b33f5f13ceb421c73715707f81e">AP_COMPASS_COMPONENTS_UP_PINS_BACK_RIGHT</a>&nbsp;&nbsp;&nbsp;ROTATION_YAW_135</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#abe2e1c42c865208b61c72fe578144064">AP_COMPASS_COMPONENTS_UP_PINS_BACK</a>&nbsp;&nbsp;&nbsp;ROTATION_YAW_180</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#ade680db5fbfc0bf8c3fd6fc1d9a88ced">AP_COMPASS_COMPONENTS_UP_PINS_BACK_LEFT</a>&nbsp;&nbsp;&nbsp;ROTATION_YAW_225</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a49041dfe68b20a184d74279706366ac4">AP_COMPASS_COMPONENTS_UP_PINS_LEFT</a>&nbsp;&nbsp;&nbsp;ROTATION_YAW_270</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a03c6ff046975193444b044be79d1cb5e">AP_COMPASS_COMPONENTS_UP_PINS_FORWARD_LEFT</a>&nbsp;&nbsp;&nbsp;ROTATION_YAW_315</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#adcecbcee633e567e56ccd637d0654542">AP_COMPASS_COMPONENTS_DOWN_PINS_FORWARD</a>&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#afc0533871aaf8b7b340c0bfd6e4bcd4e">AP_COMPASS_COMPONENTS_DOWN_PINS_FORWARD_RIGHT</a>&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_45</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a1d50a9c38f9eb713f13c0f3e9bb58e45">AP_COMPASS_COMPONENTS_DOWN_PINS_RIGHT</a>&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_90</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a5958bccac96c255cb2aa242d84507121">AP_COMPASS_COMPONENTS_DOWN_PINS_BACK_RIGHT</a>&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_135</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a326cb734017b19efe97a317fcf6e2102">AP_COMPASS_COMPONENTS_DOWN_PINS_BACK</a>&nbsp;&nbsp;&nbsp;ROTATION_PITCH_180</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a0aa722cbdacc3940df027ea5a4158224">AP_COMPASS_COMPONENTS_DOWN_PINS_BACK_LEFT</a>&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_225</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a2f836afa9cc511f39cc7d9774712838f">AP_COMPASS_COMPONENTS_DOWN_PINS_LEFT</a>&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_270</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#aa8c6965ce41bdff050efad3906a520e0">AP_COMPASS_COMPONENTS_DOWN_PINS_FORWARD_LEFT</a>&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_315</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a8b7d9c3f1976ab63d9fd41b2ce8d9c33">AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_FORWARD</a>&nbsp;&nbsp;&nbsp;ROTATION_YAW_270</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a8d23f7ac7ae377d7ea9b5699f242eb61">AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_FORWARD_RIGHT</a>&nbsp;&nbsp;&nbsp;ROTATION_YAW_315</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a54f71e3e28c128c56f9412a52ba37867">AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_RIGHT</a>&nbsp;&nbsp;&nbsp;ROTATION_NONE</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#afe13734c86fe1d72d91a70ef7242024e">AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_BACK_RIGHT</a>&nbsp;&nbsp;&nbsp;ROTATION_YAW_45</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a2381b4f71301976061dfd7a6ae801748">AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_BACK</a>&nbsp;&nbsp;&nbsp;ROTATION_YAW_90</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a08fdaddb505aee1f0ec3dbaa83946e89">AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_BACK_LEFT</a>&nbsp;&nbsp;&nbsp;ROTATION_YAW_135</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#aff5c87a5cd3cf8a62ad79730a52f6e53">AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_LEFT</a>&nbsp;&nbsp;&nbsp;ROTATION_YAW_180</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a6992df8f3b7f41bf21f29268e83c4a78">AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_FORWARD_LEFT</a>&nbsp;&nbsp;&nbsp;ROTATION_YAW_225</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#ac853631d69420b18ea5fe3dca912656e">AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_FORWARD</a>&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_90</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#aeac9e3d4f50daac4998f1b9d304ac1c4">AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_FORWARD_RIGHT</a>&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_135</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a698237f0504c9d3c5f3a8ee6a2dff3e3">AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_RIGHT</a>&nbsp;&nbsp;&nbsp;ROTATION_PITCH_180</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#abfbc0401c1acbfd1c3cb1b332d547ac8">AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_BACK_RIGHT</a>&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_225</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a3c8cf640b5fd3d16caefa226ee3d4fc2">AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_BACK</a>&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_270</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#ac6da11ca6e64ea5b53f97526e5d8124b">AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_BACK_LEFT</a>&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_315</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#ade65c3c17495137e1c629ee73f6b0623">AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_LEFT</a>&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___compass___h_m_c5843_8h.html#a5bd15251481326faf2b4b00a3773b7f0">AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_FORWARD_LEFT</a>&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_45</td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a326cb734017b19efe97a317fcf6e2102"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_COMPONENTS_DOWN_PINS_BACK" ref="a326cb734017b19efe97a317fcf6e2102" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_COMPONENTS_DOWN_PINS_BACK&nbsp;&nbsp;&nbsp;ROTATION_PITCH_180</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00038">38</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a0aa722cbdacc3940df027ea5a4158224"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_COMPONENTS_DOWN_PINS_BACK_LEFT" ref="a0aa722cbdacc3940df027ea5a4158224" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_COMPONENTS_DOWN_PINS_BACK_LEFT&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_225</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00039">39</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a5958bccac96c255cb2aa242d84507121"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_COMPONENTS_DOWN_PINS_BACK_RIGHT" ref="a5958bccac96c255cb2aa242d84507121" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_COMPONENTS_DOWN_PINS_BACK_RIGHT&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_135</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00037">37</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="adcecbcee633e567e56ccd637d0654542"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_COMPONENTS_DOWN_PINS_FORWARD" ref="adcecbcee633e567e56ccd637d0654542" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_COMPONENTS_DOWN_PINS_FORWARD&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00034">34</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="aa8c6965ce41bdff050efad3906a520e0"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_COMPONENTS_DOWN_PINS_FORWARD_LEFT" ref="aa8c6965ce41bdff050efad3906a520e0" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_COMPONENTS_DOWN_PINS_FORWARD_LEFT&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_315</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00041">41</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="afc0533871aaf8b7b340c0bfd6e4bcd4e"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_COMPONENTS_DOWN_PINS_FORWARD_RIGHT" ref="afc0533871aaf8b7b340c0bfd6e4bcd4e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_COMPONENTS_DOWN_PINS_FORWARD_RIGHT&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_45</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00035">35</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a2f836afa9cc511f39cc7d9774712838f"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_COMPONENTS_DOWN_PINS_LEFT" ref="a2f836afa9cc511f39cc7d9774712838f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_COMPONENTS_DOWN_PINS_LEFT&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_270</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00040">40</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a1d50a9c38f9eb713f13c0f3e9bb58e45"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_COMPONENTS_DOWN_PINS_RIGHT" ref="a1d50a9c38f9eb713f13c0f3e9bb58e45" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_COMPONENTS_DOWN_PINS_RIGHT&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_90</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00036">36</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="abe2e1c42c865208b61c72fe578144064"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_COMPONENTS_UP_PINS_BACK" ref="abe2e1c42c865208b61c72fe578144064" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_COMPONENTS_UP_PINS_BACK&nbsp;&nbsp;&nbsp;ROTATION_YAW_180</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00030">30</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="ade680db5fbfc0bf8c3fd6fc1d9a88ced"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_COMPONENTS_UP_PINS_BACK_LEFT" ref="ade680db5fbfc0bf8c3fd6fc1d9a88ced" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_COMPONENTS_UP_PINS_BACK_LEFT&nbsp;&nbsp;&nbsp;ROTATION_YAW_225</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00031">31</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a05cf7b33f5f13ceb421c73715707f81e"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_COMPONENTS_UP_PINS_BACK_RIGHT" ref="a05cf7b33f5f13ceb421c73715707f81e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_COMPONENTS_UP_PINS_BACK_RIGHT&nbsp;&nbsp;&nbsp;ROTATION_YAW_135</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00029">29</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="aecb68fb696735acfc11242fa2ffa2b2e"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_COMPONENTS_UP_PINS_FORWARD" ref="aecb68fb696735acfc11242fa2ffa2b2e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_COMPONENTS_UP_PINS_FORWARD&nbsp;&nbsp;&nbsp;ROTATION_NONE</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00026">26</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a03c6ff046975193444b044be79d1cb5e"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_COMPONENTS_UP_PINS_FORWARD_LEFT" ref="a03c6ff046975193444b044be79d1cb5e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_COMPONENTS_UP_PINS_FORWARD_LEFT&nbsp;&nbsp;&nbsp;ROTATION_YAW_315</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00033">33</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="ad6e2a30f55918963430aebea6d96a6d6"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_COMPONENTS_UP_PINS_FORWARD_RIGHT" ref="ad6e2a30f55918963430aebea6d96a6d6" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_COMPONENTS_UP_PINS_FORWARD_RIGHT&nbsp;&nbsp;&nbsp;ROTATION_YAW_45</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00027">27</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a49041dfe68b20a184d74279706366ac4"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_COMPONENTS_UP_PINS_LEFT" ref="a49041dfe68b20a184d74279706366ac4" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_COMPONENTS_UP_PINS_LEFT&nbsp;&nbsp;&nbsp;ROTATION_YAW_270</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00032">32</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a25e8e548317f53addbb7dd1ddb9e7e0e"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_COMPONENTS_UP_PINS_RIGHT" ref="a25e8e548317f53addbb7dd1ddb9e7e0e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_COMPONENTS_UP_PINS_RIGHT&nbsp;&nbsp;&nbsp;ROTATION_YAW_90</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00028">28</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a3c8cf640b5fd3d16caefa226ee3d4fc2"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_BACK" ref="a3c8cf640b5fd3d16caefa226ee3d4fc2" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_BACK&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_270</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00056">56</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="ac6da11ca6e64ea5b53f97526e5d8124b"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_BACK_LEFT" ref="ac6da11ca6e64ea5b53f97526e5d8124b" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_BACK_LEFT&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_315</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00057">57</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="abfbc0401c1acbfd1c3cb1b332d547ac8"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_BACK_RIGHT" ref="abfbc0401c1acbfd1c3cb1b332d547ac8" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_BACK_RIGHT&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_225</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00055">55</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="ac853631d69420b18ea5fe3dca912656e"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_FORWARD" ref="ac853631d69420b18ea5fe3dca912656e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_FORWARD&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_90</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00052">52</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a5bd15251481326faf2b4b00a3773b7f0"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_FORWARD_LEFT" ref="a5bd15251481326faf2b4b00a3773b7f0" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_FORWARD_LEFT&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_45</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00059">59</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="aeac9e3d4f50daac4998f1b9d304ac1c4"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_FORWARD_RIGHT" ref="aeac9e3d4f50daac4998f1b9d304ac1c4" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_FORWARD_RIGHT&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180_YAW_135</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00053">53</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="ade65c3c17495137e1c629ee73f6b0623"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_LEFT" ref="ade65c3c17495137e1c629ee73f6b0623" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_LEFT&nbsp;&nbsp;&nbsp;ROTATION_ROLL_180</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00058">58</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a698237f0504c9d3c5f3a8ee6a2dff3e3"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_RIGHT" ref="a698237f0504c9d3c5f3a8ee6a2dff3e3" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_RIGHT&nbsp;&nbsp;&nbsp;ROTATION_PITCH_180</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00054">54</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a2381b4f71301976061dfd7a6ae801748"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_BACK" ref="a2381b4f71301976061dfd7a6ae801748" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_BACK&nbsp;&nbsp;&nbsp;ROTATION_YAW_90</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00048">48</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a08fdaddb505aee1f0ec3dbaa83946e89"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_BACK_LEFT" ref="a08fdaddb505aee1f0ec3dbaa83946e89" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_BACK_LEFT&nbsp;&nbsp;&nbsp;ROTATION_YAW_135</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00049">49</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="afe13734c86fe1d72d91a70ef7242024e"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_BACK_RIGHT" ref="afe13734c86fe1d72d91a70ef7242024e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_BACK_RIGHT&nbsp;&nbsp;&nbsp;ROTATION_YAW_45</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00047">47</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a8b7d9c3f1976ab63d9fd41b2ce8d9c33"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_FORWARD" ref="a8b7d9c3f1976ab63d9fd41b2ce8d9c33" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_FORWARD&nbsp;&nbsp;&nbsp;ROTATION_YAW_270</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00044">44</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a6992df8f3b7f41bf21f29268e83c4a78"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_FORWARD_LEFT" ref="a6992df8f3b7f41bf21f29268e83c4a78" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_FORWARD_LEFT&nbsp;&nbsp;&nbsp;ROTATION_YAW_225</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00051">51</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a8d23f7ac7ae377d7ea9b5699f242eb61"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_FORWARD_RIGHT" ref="a8d23f7ac7ae377d7ea9b5699f242eb61" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_FORWARD_RIGHT&nbsp;&nbsp;&nbsp;ROTATION_YAW_315</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00045">45</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="aff5c87a5cd3cf8a62ad79730a52f6e53"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_LEFT" ref="aff5c87a5cd3cf8a62ad79730a52f6e53" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_LEFT&nbsp;&nbsp;&nbsp;ROTATION_YAW_180</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00050">50</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a54f71e3e28c128c56f9412a52ba37867"></a><!-- doxytag: member="AP_Compass_HMC5843.h::AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_RIGHT" ref="a54f71e3e28c128c56f9412a52ba37867" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_RIGHT&nbsp;&nbsp;&nbsp;ROTATION_NONE</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00046">46</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a4df2438502f1e4fcccf06122417ef115"></a><!-- doxytag: member="AP_Compass_HMC5843.h::ROTATION_NONE" ref="a4df2438502f1e4fcccf06122417ef115" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ROTATION_NONE&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(1, 0, 0, 0, 1, 0, 0 ,0, 1)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00008">8</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a36ebd710a6ca9c6cd4b6aebd17b1ef50"></a><!-- doxytag: member="AP_Compass_HMC5843.h::ROTATION_PITCH_180" ref="a36ebd710a6ca9c6cd4b6aebd17b1ef50" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ROTATION_PITCH_180&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(-1, 0, 0, 0, 1, 0, 0, 0, -1)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00020">20</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="adcff3b2c8133dadb6aba45cba2b026fa"></a><!-- doxytag: member="AP_Compass_HMC5843.h::ROTATION_ROLL_180" ref="adcff3b2c8133dadb6aba45cba2b026fa" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ROTATION_ROLL_180&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(1, 0, 0, 0, -1, 0, 0, 0, -1)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00016">16</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="ad68e02a96a965780dfc84eed448b803d"></a><!-- doxytag: member="AP_Compass_HMC5843.h::ROTATION_ROLL_180_YAW_135" ref="ad68e02a96a965780dfc84eed448b803d" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ROTATION_ROLL_180_YAW_135&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(-0.70710678, 0.70710678, 0, 0.70710678, 0.70710678, 0, 0, 0, -1)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00019">19</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="adb01c2afda2bd2316b207fc3eed9a920"></a><!-- doxytag: member="AP_Compass_HMC5843.h::ROTATION_ROLL_180_YAW_225" ref="adb01c2afda2bd2316b207fc3eed9a920" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ROTATION_ROLL_180_YAW_225&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(-0.70710678, -0.70710678, 0, -0.70710678, 0.70710678, 0, 0, 0, -1)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00021">21</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a5b798aa7ce4235f581ba9ff4ecc401c2"></a><!-- doxytag: member="AP_Compass_HMC5843.h::ROTATION_ROLL_180_YAW_270" ref="a5b798aa7ce4235f581ba9ff4ecc401c2" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ROTATION_ROLL_180_YAW_270&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(0, -1, 0, -1, 0, 0, 0, 0, -1)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00022">22</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a2b3bb9bfe8e12743ec6bbbcc73d2b564"></a><!-- doxytag: member="AP_Compass_HMC5843.h::ROTATION_ROLL_180_YAW_315" ref="a2b3bb9bfe8e12743ec6bbbcc73d2b564" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ROTATION_ROLL_180_YAW_315&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(0.70710678, -0.70710678, 0, -0.70710678, -0.70710678, 0, 0, 0, -1)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00023">23</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a145d713092a60ae5245f7510ec4d8676"></a><!-- doxytag: member="AP_Compass_HMC5843.h::ROTATION_ROLL_180_YAW_45" ref="a145d713092a60ae5245f7510ec4d8676" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ROTATION_ROLL_180_YAW_45&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(0.70710678, 0.70710678, 0, 0.70710678, -0.70710678, 0, 0, 0, -1)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00017">17</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a1ffe5ed8da3929481fd36bf157a1bc86"></a><!-- doxytag: member="AP_Compass_HMC5843.h::ROTATION_ROLL_180_YAW_90" ref="a1ffe5ed8da3929481fd36bf157a1bc86" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ROTATION_ROLL_180_YAW_90&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(0, 1, 0, 1, 0, 0, 0, 0, -1)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00018">18</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a5c6438440432b57017fe01fd678ca957"></a><!-- doxytag: member="AP_Compass_HMC5843.h::ROTATION_YAW_135" ref="a5c6438440432b57017fe01fd678ca957" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ROTATION_YAW_135&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(-0.70710678, -0.70710678, 0, 0.70710678, -0.70710678, 0, 0, 0, 1)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00011">11</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a5a122ed874d2cf6086912b9e866b1898"></a><!-- doxytag: member="AP_Compass_HMC5843.h::ROTATION_YAW_180" ref="a5a122ed874d2cf6086912b9e866b1898" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ROTATION_YAW_180&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(-1, 0, 0, 0, -1, 0, 0, 0, 1)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00012">12</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a2a2f398ba3c0f96097649712cce61329"></a><!-- doxytag: member="AP_Compass_HMC5843.h::ROTATION_YAW_225" ref="a2a2f398ba3c0f96097649712cce61329" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ROTATION_YAW_225&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(-0.70710678, 0.70710678, 0, -0.70710678, -0.70710678, 0, 0, 0, 1)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00013">13</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a3faca3e51a129e29afc2dae55630d771"></a><!-- doxytag: member="AP_Compass_HMC5843.h::ROTATION_YAW_270" ref="a3faca3e51a129e29afc2dae55630d771" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ROTATION_YAW_270&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(0, 1, 0, -1, 0, 0, 0, 0, 1)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00014">14</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="ab5b3f4f6b27a8a12713f7f94c0b08ab4"></a><!-- doxytag: member="AP_Compass_HMC5843.h::ROTATION_YAW_315" ref="ab5b3f4f6b27a8a12713f7f94c0b08ab4" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ROTATION_YAW_315&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(0.70710678, 0.70710678, 0, -0.70710678, 0.70710678, 0, 0, 0, 1)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00015">15</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a7e604e9771a7b454945d01aa8c0683e8"></a><!-- doxytag: member="AP_Compass_HMC5843.h::ROTATION_YAW_45" ref="a7e604e9771a7b454945d01aa8c0683e8" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ROTATION_YAW_45&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(0.70710678, -0.70710678, 0, 0.70710678, 0.70710678, 0, 0, 0, 1)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00009">9</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
<a class="anchor" id="a0b9d7e2557972b95c5a679a916a94e0e"></a><!-- doxytag: member="AP_Compass_HMC5843.h::ROTATION_YAW_90" ref="a0b9d7e2557972b95c5a679a916a94e0e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ROTATION_YAW_90&nbsp;&nbsp;&nbsp;<a class="el" href="class_matrix3.html">Matrix3f</a>(0, -1, 0, 1, 0, 0, 0, 0, 1)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html#l00010">10</a> of file <a class="el" href="_a_p___compass___h_m_c5843_8h_source.html">AP_Compass_HMC5843.h</a>.</p>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:34 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,10 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_a_p___compass_8h.html" title="Catch&#45;all header that defines all supported compass classes." alt="" coords="101,160,539,189"/>
<area shape="rect" id="node14" href="$_a_p___compass___h_i_l_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HIL.h" alt="" coords="357,83,821,112"/>
<area shape="rect" id="node19" href="$_a_p___compass___h_m_c5843_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HMC5843.cpp" alt="" coords="845,83,1365,112"/>
<area shape="rect" id="node5" href="$_a_p___d_c_m___h_i_l_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.h" alt="" coords="239,237,641,267"/>
<area shape="rect" id="node7" href="$_a_p___d_c_m_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.h" alt="" coords="13,315,389,344"/>
<area shape="rect" id="node11" href="$_a_p___d_c_m___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.cpp" alt="" coords="413,315,832,344"/>
<area shape="rect" id="node9" href="$_a_p___d_c_m_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.cpp" alt="" coords="5,392,397,421"/>
<area shape="rect" id="node17" href="$_a_p___compass___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HIL.cpp" alt="" coords="563,160,1040,189"/>
</map>

View File

@ -0,0 +1 @@
93e44ddace248fb15ad443404ca956d4

View File

@ -0,0 +1,7 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_compass_8h.html" title="Compass.h" alt="" coords="175,83,268,112"/>
<area shape="rect" id="node7" href="$_a_p___math_8h.html" title="../AP_Math/AP_Math.h" alt="" coords="115,160,277,189"/>
<area shape="rect" id="node9" href="$vector2_8h.html" title="vector2.h" alt="" coords="104,315,187,344"/>
<area shape="rect" id="node13" href="$vector3_8h.html" title="vector3.h" alt="" coords="211,315,293,344"/>
<area shape="rect" id="node18" href="$matrix3_8h.html" title="matrix3.h" alt="" coords="233,237,316,267"/>
</map>

View File

@ -0,0 +1 @@
e9fe9c7b7584acbd8ed864a29b54a8ad

View File

@ -0,0 +1,115 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HMC5843.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_Compass/AP_Compass_HMC5843.h</h1> </div>
</div>
<div class="contents">
<a href="_a_p___compass___h_m_c5843_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef AP_Compass_HMC5843_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define AP_Compass_HMC5843_H</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &quot;<a class="code" href="_compass_8h.html">Compass.h</a>&quot;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &quot;../AP_Math/AP_Math.h&quot;</span>
<a name="l00006"></a>00006
<a name="l00007"></a>00007 <span class="comment">// Rotation matrices</span>
<a name="l00008"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a4df2438502f1e4fcccf06122417ef115">00008</a> <span class="preprocessor">#define ROTATION_NONE Matrix3f(1, 0, 0, 0, 1, 0, 0 ,0, 1)</span>
<a name="l00009"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a7e604e9771a7b454945d01aa8c0683e8">00009</a> <span class="preprocessor"></span><span class="preprocessor">#define ROTATION_YAW_45 Matrix3f(0.70710678, -0.70710678, 0, 0.70710678, 0.70710678, 0, 0, 0, 1)</span>
<a name="l00010"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a0b9d7e2557972b95c5a679a916a94e0e">00010</a> <span class="preprocessor"></span><span class="preprocessor">#define ROTATION_YAW_90 Matrix3f(0, -1, 0, 1, 0, 0, 0, 0, 1)</span>
<a name="l00011"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a5c6438440432b57017fe01fd678ca957">00011</a> <span class="preprocessor"></span><span class="preprocessor">#define ROTATION_YAW_135 Matrix3f(-0.70710678, -0.70710678, 0, 0.70710678, -0.70710678, 0, 0, 0, 1)</span>
<a name="l00012"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a5a122ed874d2cf6086912b9e866b1898">00012</a> <span class="preprocessor"></span><span class="preprocessor">#define ROTATION_YAW_180 Matrix3f(-1, 0, 0, 0, -1, 0, 0, 0, 1)</span>
<a name="l00013"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a2a2f398ba3c0f96097649712cce61329">00013</a> <span class="preprocessor"></span><span class="preprocessor">#define ROTATION_YAW_225 Matrix3f(-0.70710678, 0.70710678, 0, -0.70710678, -0.70710678, 0, 0, 0, 1)</span>
<a name="l00014"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a3faca3e51a129e29afc2dae55630d771">00014</a> <span class="preprocessor"></span><span class="preprocessor">#define ROTATION_YAW_270 Matrix3f(0, 1, 0, -1, 0, 0, 0, 0, 1)</span>
<a name="l00015"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#ab5b3f4f6b27a8a12713f7f94c0b08ab4">00015</a> <span class="preprocessor"></span><span class="preprocessor">#define ROTATION_YAW_315 Matrix3f(0.70710678, 0.70710678, 0, -0.70710678, 0.70710678, 0, 0, 0, 1)</span>
<a name="l00016"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#adcff3b2c8133dadb6aba45cba2b026fa">00016</a> <span class="preprocessor"></span><span class="preprocessor">#define ROTATION_ROLL_180 Matrix3f(1, 0, 0, 0, -1, 0, 0, 0, -1)</span>
<a name="l00017"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a145d713092a60ae5245f7510ec4d8676">00017</a> <span class="preprocessor"></span><span class="preprocessor">#define ROTATION_ROLL_180_YAW_45 Matrix3f(0.70710678, 0.70710678, 0, 0.70710678, -0.70710678, 0, 0, 0, -1)</span>
<a name="l00018"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a1ffe5ed8da3929481fd36bf157a1bc86">00018</a> <span class="preprocessor"></span><span class="preprocessor">#define ROTATION_ROLL_180_YAW_90 Matrix3f(0, 1, 0, 1, 0, 0, 0, 0, -1)</span>
<a name="l00019"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#ad68e02a96a965780dfc84eed448b803d">00019</a> <span class="preprocessor"></span><span class="preprocessor">#define ROTATION_ROLL_180_YAW_135 Matrix3f(-0.70710678, 0.70710678, 0, 0.70710678, 0.70710678, 0, 0, 0, -1)</span>
<a name="l00020"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a36ebd710a6ca9c6cd4b6aebd17b1ef50">00020</a> <span class="preprocessor"></span><span class="preprocessor">#define ROTATION_PITCH_180 Matrix3f(-1, 0, 0, 0, 1, 0, 0, 0, -1)</span>
<a name="l00021"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#adb01c2afda2bd2316b207fc3eed9a920">00021</a> <span class="preprocessor"></span><span class="preprocessor">#define ROTATION_ROLL_180_YAW_225 Matrix3f(-0.70710678, -0.70710678, 0, -0.70710678, 0.70710678, 0, 0, 0, -1)</span>
<a name="l00022"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a5b798aa7ce4235f581ba9ff4ecc401c2">00022</a> <span class="preprocessor"></span><span class="preprocessor">#define ROTATION_ROLL_180_YAW_270 Matrix3f(0, -1, 0, -1, 0, 0, 0, 0, -1)</span>
<a name="l00023"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a2b3bb9bfe8e12743ec6bbbcc73d2b564">00023</a> <span class="preprocessor"></span><span class="preprocessor">#define ROTATION_ROLL_180_YAW_315 Matrix3f(0.70710678, -0.70710678, 0, -0.70710678, -0.70710678, 0, 0, 0, -1)</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span>
<a name="l00025"></a>00025 <span class="comment">// orientations for DIYDrones magnetometer</span>
<a name="l00026"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#aecb68fb696735acfc11242fa2ffa2b2e">00026</a> <span class="preprocessor">#define AP_COMPASS_COMPONENTS_UP_PINS_FORWARD ROTATION_NONE</span>
<a name="l00027"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#ad6e2a30f55918963430aebea6d96a6d6">00027</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_COMPONENTS_UP_PINS_FORWARD_RIGHT ROTATION_YAW_45</span>
<a name="l00028"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a25e8e548317f53addbb7dd1ddb9e7e0e">00028</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_COMPONENTS_UP_PINS_RIGHT ROTATION_YAW_90</span>
<a name="l00029"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a05cf7b33f5f13ceb421c73715707f81e">00029</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_COMPONENTS_UP_PINS_BACK_RIGHT ROTATION_YAW_135</span>
<a name="l00030"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#abe2e1c42c865208b61c72fe578144064">00030</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_COMPONENTS_UP_PINS_BACK ROTATION_YAW_180</span>
<a name="l00031"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#ade680db5fbfc0bf8c3fd6fc1d9a88ced">00031</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_COMPONENTS_UP_PINS_BACK_LEFT ROTATION_YAW_225</span>
<a name="l00032"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a49041dfe68b20a184d74279706366ac4">00032</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_COMPONENTS_UP_PINS_LEFT ROTATION_YAW_270</span>
<a name="l00033"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a03c6ff046975193444b044be79d1cb5e">00033</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_COMPONENTS_UP_PINS_FORWARD_LEFT ROTATION_YAW_315</span>
<a name="l00034"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#adcecbcee633e567e56ccd637d0654542">00034</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_COMPONENTS_DOWN_PINS_FORWARD ROTATION_ROLL_180</span>
<a name="l00035"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#afc0533871aaf8b7b340c0bfd6e4bcd4e">00035</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_COMPONENTS_DOWN_PINS_FORWARD_RIGHT ROTATION_ROLL_180_YAW_45</span>
<a name="l00036"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a1d50a9c38f9eb713f13c0f3e9bb58e45">00036</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_COMPONENTS_DOWN_PINS_RIGHT ROTATION_ROLL_180_YAW_90</span>
<a name="l00037"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a5958bccac96c255cb2aa242d84507121">00037</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_COMPONENTS_DOWN_PINS_BACK_RIGHT ROTATION_ROLL_180_YAW_135</span>
<a name="l00038"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a326cb734017b19efe97a317fcf6e2102">00038</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_COMPONENTS_DOWN_PINS_BACK ROTATION_PITCH_180</span>
<a name="l00039"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a0aa722cbdacc3940df027ea5a4158224">00039</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_COMPONENTS_DOWN_PINS_BACK_LEFT ROTATION_ROLL_180_YAW_225</span>
<a name="l00040"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a2f836afa9cc511f39cc7d9774712838f">00040</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_COMPONENTS_DOWN_PINS_LEFT ROTATION_ROLL_180_YAW_270</span>
<a name="l00041"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#aa8c6965ce41bdff050efad3906a520e0">00041</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_COMPONENTS_DOWN_PINS_FORWARD_LEFT ROTATION_ROLL_180_YAW_315</span>
<a name="l00042"></a>00042 <span class="preprocessor"></span>
<a name="l00043"></a>00043 <span class="comment">// orientations for Sparkfun magnetometer</span>
<a name="l00044"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a8b7d9c3f1976ab63d9fd41b2ce8d9c33">00044</a> <span class="preprocessor">#define AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_FORWARD ROTATION_YAW_270</span>
<a name="l00045"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a8d23f7ac7ae377d7ea9b5699f242eb61">00045</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_FORWARD_RIGHT ROTATION_YAW_315</span>
<a name="l00046"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a54f71e3e28c128c56f9412a52ba37867">00046</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_RIGHT ROTATION_NONE</span>
<a name="l00047"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#afe13734c86fe1d72d91a70ef7242024e">00047</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_BACK_RIGHT ROTATION_YAW_45</span>
<a name="l00048"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a2381b4f71301976061dfd7a6ae801748">00048</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_BACK ROTATION_YAW_90</span>
<a name="l00049"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a08fdaddb505aee1f0ec3dbaa83946e89">00049</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_BACK_LEFT ROTATION_YAW_135</span>
<a name="l00050"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#aff5c87a5cd3cf8a62ad79730a52f6e53">00050</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_LEFT ROTATION_YAW_180</span>
<a name="l00051"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a6992df8f3b7f41bf21f29268e83c4a78">00051</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_FORWARD_LEFT ROTATION_YAW_225</span>
<a name="l00052"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#ac853631d69420b18ea5fe3dca912656e">00052</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_FORWARD ROTATION_ROLL_180_YAW_90</span>
<a name="l00053"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#aeac9e3d4f50daac4998f1b9d304ac1c4">00053</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_FORWARD_RIGHT ROTATION_ROLL_180_YAW_135</span>
<a name="l00054"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a698237f0504c9d3c5f3a8ee6a2dff3e3">00054</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_RIGHT ROTATION_PITCH_180</span>
<a name="l00055"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#abfbc0401c1acbfd1c3cb1b332d547ac8">00055</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_BACK_RIGHT ROTATION_ROLL_180_YAW_225</span>
<a name="l00056"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a3c8cf640b5fd3d16caefa226ee3d4fc2">00056</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_BACK ROTATION_ROLL_180_YAW_270</span>
<a name="l00057"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#ac6da11ca6e64ea5b53f97526e5d8124b">00057</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_BACK_LEFT ROTATION_ROLL_180_YAW_315</span>
<a name="l00058"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#ade65c3c17495137e1c629ee73f6b0623">00058</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_LEFT ROTATION_ROLL_180</span>
<a name="l00059"></a><a class="code" href="_a_p___compass___h_m_c5843_8h.html#a5bd15251481326faf2b4b00a3773b7f0">00059</a> <span class="preprocessor"></span><span class="preprocessor">#define AP_COMPASS_SPARKFUN_COMPONENTS_DOWN_PINS_FORWARD_LEFT ROTATION_ROLL_180_YAW_45</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span>
<a name="l00061"></a><a class="code" href="class_a_p___compass___h_m_c5843.html">00061</a> <span class="keyword">class </span><a class="code" href="class_a_p___compass___h_m_c5843.html">AP_Compass_HMC5843</a> : <span class="keyword">public</span> <a class="code" href="class_compass.html">Compass</a>
<a name="l00062"></a>00062 {
<a name="l00063"></a>00063 <span class="keyword">private</span>:
<a name="l00064"></a>00064 <span class="keywordtype">int</span> orientation;
<a name="l00065"></a>00065 <a class="code" href="class_matrix3.html">Matrix3f</a> orientation_matrix;
<a name="l00066"></a>00066 <span class="keywordtype">float</span> calibration[3];
<a name="l00067"></a>00067 <span class="keywordtype">int</span> offset[3];
<a name="l00068"></a>00068 <span class="keywordtype">float</span> declination;
<a name="l00069"></a>00069 <span class="keyword">public</span>:
<a name="l00070"></a>00070 <a class="code" href="class_a_p___compass___h_m_c5843.html#a94d8caab62c0f3a2a751a8eccfe6bcc1">AP_Compass_HMC5843</a>(); <span class="comment">// Constructor</span>
<a name="l00071"></a>00071 <span class="keywordtype">bool</span> <a class="code" href="class_a_p___compass___h_m_c5843.html#af32c9430d20a2eb7d1df8413870c99b6">init</a>(<span class="keywordtype">int</span> initialiseWireLib = 1);
<a name="l00072"></a>00072 <span class="keywordtype">void</span> <a class="code" href="class_a_p___compass___h_m_c5843.html#ab60b932f53493c46e262c1f46a12bdf6">read</a>();
<a name="l00073"></a>00073 <span class="keywordtype">void</span> <a class="code" href="class_a_p___compass___h_m_c5843.html#aaef4df8c859b284d17c8a374d13e4e51">calculate</a>(<span class="keywordtype">float</span> roll, <span class="keywordtype">float</span> pitch);
<a name="l00074"></a>00074 <span class="keywordtype">void</span> <a class="code" href="class_a_p___compass___h_m_c5843.html#a5dafbafd496867d435168c8decc742fa">set_orientation</a>(<span class="keyword">const</span> <a class="code" href="class_matrix3.html">Matrix3f</a> &amp;rotation_matrix);
<a name="l00075"></a>00075 <span class="keywordtype">void</span> <a class="code" href="class_a_p___compass___h_m_c5843.html#a90481085e451fe3f64d46ebb401b5aaf">set_offsets</a>(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">int</span> z);
<a name="l00076"></a>00076 <span class="keywordtype">void</span> <a class="code" href="class_a_p___compass___h_m_c5843.html#a2ba3fc3b5bd78a28f717c2740948d61e">set_declination</a>(<span class="keywordtype">float</span> radians);
<a name="l00077"></a>00077 };
<a name="l00078"></a>00078 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:33 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,208 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#define-members">Defines</a> </div>
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.cpp File Reference</h1> </div>
</div>
<div class="contents">
<code>#include &lt;<a class="el" href="_a_p___d_c_m_8h_source.html">AP_DCM.h</a>&gt;</code><br/>
<div class="dynheader">
Include dependency graph for AP_DCM.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___d_c_m_8cpp__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___d_c_m_2_a_p___d_c_m_8cpp" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___d_c_m_2_a_p___d_c_m_8cpp" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___d_c_m_2_a_p___d_c_m_8cpp">
<area shape="rect" id="node3" href="_a_p___d_c_m_8h.html" title="AP_DCM.h" alt="" coords="623,83,711,112"/><area shape="rect" id="node5" href="_a_p___d_c_m___h_i_l_8h.html" title="AP_DCM_HIL.h" alt="" coords="515,160,629,189"/><area shape="rect" id="node7" href="_fast_serial_8h.html" title="FastSerial.h" alt="" coords="996,392,1092,421"/><area shape="rect" id="node23" href="_a_p___math_8h.html" title="AP_Math.h" alt="" coords="343,547,433,576"/><area shape="rect" id="node38" href="_w_program_8h.html" title="WProgram.h" alt="" coords="355,392,453,421"/><area shape="rect" id="node40" href="_a_p___compass_8h.html" title="Catch&#45;all header that defines all supported compass classes." alt="" coords="232,237,349,267"/><area shape="rect" id="node56" href="_a_p___a_d_c_8h.html" title="AP_ADC.h" alt="" coords="811,392,896,421"/><area shape="rect" id="node65" href="_a_p___g_p_s_8h.html" title="Catch&#45;all header that defines all supported GPS classes." alt="" coords="1473,237,1559,267"/><area shape="rect" id="node101" href="_a_p___i_m_u_8h.html" title="AP_IMU.h" alt="" coords="601,315,684,344"/><area shape="rect" id="node17" href="_better_stream_8h.html" title="BetterStream.h" alt="" coords="1380,469,1503,499"/><area shape="rect" id="node25" href="vector2_8h.html" title="vector2.h" alt="" coords="268,701,351,731"/><area shape="rect" id="node29" href="vector3_8h.html" title="vector3.h" alt="" coords="375,701,457,731"/><area shape="rect" id="node34" href="matrix3_8h.html" title="matrix3.h" alt="" coords="347,624,429,653"/><area shape="rect" id="node42" href="_a_p___compass___h_m_c5843_8h.html" title="AP_Compass_HMC5843.h" alt="" coords="93,392,280,421"/><area shape="rect" id="node51" href="_a_p___compass___h_i_l_8h.html" title="AP_Compass_HIL.h" alt="" coords="212,315,356,344"/><area shape="rect" id="node44" href="_compass_8h.html" title="Compass.h" alt="" coords="271,469,364,499"/><area shape="rect" id="node58" href="_a_p___a_d_c___a_d_s7844_8h.html" title="AP_ADC_ADS7844.h" alt="" coords="783,469,935,499"/><area shape="rect" id="node61" href="_a_p___a_d_c___h_i_l_8h.html" title="AP_ADC_HIL.h" alt="" coords="647,469,759,499"/><area shape="rect" id="node67" href="_a_p___g_p_s___n_m_e_a_8h.html" title="AP_GPS_NMEA.h" alt="" coords="1792,392,1923,421"/><area shape="rect" id="node73" href="_a_p___g_p_s___s_i_r_f_8h.html" title="AP_GPS_SIRF.h" alt="" coords="1600,392,1717,421"/><area shape="rect" id="node76" href="_a_p___g_p_s__406_8h.html" title="AP_GPS_406.h" alt="" coords="1607,315,1721,344"/><area shape="rect" id="node79" href="_a_p___g_p_s___u_b_l_o_x_8h.html" title="AP_GPS_UBLOX.h" alt="" coords="1947,392,2080,421"/><area shape="rect" id="node82" href="_a_p___g_p_s___m_t_k_8h.html" title="AP_GPS_MTK.h" alt="" coords="1308,315,1425,344"/><area shape="rect" id="node87" href="_a_p___g_p_s___m_t_k16_8h.html" title="AP_GPS_MTK16.h" alt="" coords="1449,315,1583,344"/><area shape="rect" id="node91" href="_a_p___g_p_s___none_8h.html" title="AP_GPS_None.h" alt="" coords="1159,315,1284,344"/><area shape="rect" id="node94" href="_a_p___g_p_s___auto_8h.html" title="AP_GPS_Auto.h" alt="" coords="1012,315,1135,344"/><area shape="rect" id="node98" href="_a_p___g_p_s___h_i_l_8h.html" title="AP_GPS_HIL.h" alt="" coords="1796,315,1908,344"/><area shape="rect" id="node69" href="_g_p_s_8h.html" title="Interface definition for the various GPS drivers." alt="" coords="1532,469,1593,499"/><area shape="rect" id="node85" href="_a_p___g_p_s___m_t_k___common_8h.html" title="AP_GPS_MTK_Common.h" alt="" coords="1341,392,1525,421"/></map>
</div>
<p><a href="_a_p___d_c_m_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___d_c_m_8cpp.html#aca3c9e529eec0dcbf5ac2e4240391068">OUTPUTMODE</a>&nbsp;&nbsp;&nbsp;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___d_c_m_8cpp.html#a728f9499baea61e7df3ae70a374f2512">ToRad</a>(x)&nbsp;&nbsp;&nbsp;(x*0.01745329252)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___d_c_m_8cpp.html#a3c9d151923236c7e8ccccf86f131e550">ToDeg</a>(x)&nbsp;&nbsp;&nbsp;(x*57.2957795131)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___d_c_m_8cpp.html#a3ab9b5d54678d8d03770f19607886ed6">Kp_ROLLPITCH</a>&nbsp;&nbsp;&nbsp;0.05967</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___d_c_m_8cpp.html#a7acbbef42a2b56f585c4dafc151e3806">Ki_ROLLPITCH</a>&nbsp;&nbsp;&nbsp;0.00001278</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___d_c_m_8cpp.html#a3c59c4be08d2d06edcdc0a02369da6b6">Kp_YAW</a>&nbsp;&nbsp;&nbsp;0.8</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___d_c_m_8cpp.html#aea9dd7972c8f6c2381b1541b964b3893">Ki_YAW</a>&nbsp;&nbsp;&nbsp;0.00004</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___d_c_m_8cpp.html#a6ab736b5db0f112fd61581a440f2d3ca">SPEEDFILT</a>&nbsp;&nbsp;&nbsp;300</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___d_c_m_8cpp.html#ae4132efd8235f9b057b6b1d24272dd79">ADC_CONSTRAINT</a>&nbsp;&nbsp;&nbsp;900</td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="ae4132efd8235f9b057b6b1d24272dd79"></a><!-- doxytag: member="AP_DCM.cpp::ADC_CONSTRAINT" ref="ae4132efd8235f9b057b6b1d24272dd79" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ADC_CONSTRAINT&nbsp;&nbsp;&nbsp;900</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___d_c_m_8cpp_source.html#l00031">31</a> of file <a class="el" href="_a_p___d_c_m_8cpp_source.html">AP_DCM.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a7acbbef42a2b56f585c4dafc151e3806"></a><!-- doxytag: member="AP_DCM.cpp::Ki_ROLLPITCH" ref="a7acbbef42a2b56f585c4dafc151e3806" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define Ki_ROLLPITCH&nbsp;&nbsp;&nbsp;0.00001278</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___d_c_m_8cpp_source.html#l00026">26</a> of file <a class="el" href="_a_p___d_c_m_8cpp_source.html">AP_DCM.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="aea9dd7972c8f6c2381b1541b964b3893"></a><!-- doxytag: member="AP_DCM.cpp::Ki_YAW" ref="aea9dd7972c8f6c2381b1541b964b3893" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define Ki_YAW&nbsp;&nbsp;&nbsp;0.00004</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___d_c_m_8cpp_source.html#l00028">28</a> of file <a class="el" href="_a_p___d_c_m_8cpp_source.html">AP_DCM.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a3ab9b5d54678d8d03770f19607886ed6"></a><!-- doxytag: member="AP_DCM.cpp::Kp_ROLLPITCH" ref="a3ab9b5d54678d8d03770f19607886ed6" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define Kp_ROLLPITCH&nbsp;&nbsp;&nbsp;0.05967</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___d_c_m_8cpp_source.html#l00025">25</a> of file <a class="el" href="_a_p___d_c_m_8cpp_source.html">AP_DCM.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a3c59c4be08d2d06edcdc0a02369da6b6"></a><!-- doxytag: member="AP_DCM.cpp::Kp_YAW" ref="a3c59c4be08d2d06edcdc0a02369da6b6" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define Kp_YAW&nbsp;&nbsp;&nbsp;0.8</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___d_c_m_8cpp_source.html#l00027">27</a> of file <a class="el" href="_a_p___d_c_m_8cpp_source.html">AP_DCM.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="aca3c9e529eec0dcbf5ac2e4240391068"></a><!-- doxytag: member="AP_DCM.cpp::OUTPUTMODE" ref="aca3c9e529eec0dcbf5ac2e4240391068" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define OUTPUTMODE&nbsp;&nbsp;&nbsp;1</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___d_c_m_8cpp_source.html#l00021">21</a> of file <a class="el" href="_a_p___d_c_m_8cpp_source.html">AP_DCM.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a6ab736b5db0f112fd61581a440f2d3ca"></a><!-- doxytag: member="AP_DCM.cpp::SPEEDFILT" ref="a6ab736b5db0f112fd61581a440f2d3ca" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define SPEEDFILT&nbsp;&nbsp;&nbsp;300</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___d_c_m_8cpp_source.html#l00030">30</a> of file <a class="el" href="_a_p___d_c_m_8cpp_source.html">AP_DCM.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a3c9d151923236c7e8ccccf86f131e550"></a><!-- doxytag: member="AP_DCM.cpp::ToDeg" ref="a3c9d151923236c7e8ccccf86f131e550" args="(x)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ToDeg</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">x</td>
<td>&nbsp;)&nbsp;</td>
<td>&nbsp;&nbsp;&nbsp;(x*57.2957795131)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___d_c_m_8cpp_source.html#l00023">23</a> of file <a class="el" href="_a_p___d_c_m_8cpp_source.html">AP_DCM.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a728f9499baea61e7df3ae70a374f2512"></a><!-- doxytag: member="AP_DCM.cpp::ToRad" ref="a728f9499baea61e7df3ae70a374f2512" args="(x)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ToRad</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">x</td>
<td>&nbsp;)&nbsp;</td>
<td>&nbsp;&nbsp;&nbsp;(x*0.01745329252)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___d_c_m_8cpp_source.html#l00022">22</a> of file <a class="el" href="_a_p___d_c_m_8cpp_source.html">AP_DCM.cpp</a>.</p>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:34 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,31 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_a_p___d_c_m_8h.html" title="AP_DCM.h" alt="" coords="623,83,711,112"/>
<area shape="rect" id="node5" href="$_a_p___d_c_m___h_i_l_8h.html" title="AP_DCM_HIL.h" alt="" coords="515,160,629,189"/>
<area shape="rect" id="node7" href="$_fast_serial_8h.html" title="FastSerial.h" alt="" coords="996,392,1092,421"/>
<area shape="rect" id="node23" href="$_a_p___math_8h.html" title="AP_Math.h" alt="" coords="343,547,433,576"/>
<area shape="rect" id="node38" href="$_w_program_8h.html" title="WProgram.h" alt="" coords="355,392,453,421"/>
<area shape="rect" id="node40" href="$_a_p___compass_8h.html" title="Catch&#45;all header that defines all supported compass classes." alt="" coords="232,237,349,267"/>
<area shape="rect" id="node56" href="$_a_p___a_d_c_8h.html" title="AP_ADC.h" alt="" coords="811,392,896,421"/>
<area shape="rect" id="node65" href="$_a_p___g_p_s_8h.html" title="Catch&#45;all header that defines all supported GPS classes." alt="" coords="1473,237,1559,267"/>
<area shape="rect" id="node101" href="$_a_p___i_m_u_8h.html" title="AP_IMU.h" alt="" coords="601,315,684,344"/>
<area shape="rect" id="node17" href="$_better_stream_8h.html" title="BetterStream.h" alt="" coords="1380,469,1503,499"/>
<area shape="rect" id="node25" href="$vector2_8h.html" title="vector2.h" alt="" coords="268,701,351,731"/>
<area shape="rect" id="node29" href="$vector3_8h.html" title="vector3.h" alt="" coords="375,701,457,731"/>
<area shape="rect" id="node34" href="$matrix3_8h.html" title="matrix3.h" alt="" coords="347,624,429,653"/>
<area shape="rect" id="node42" href="$_a_p___compass___h_m_c5843_8h.html" title="AP_Compass_HMC5843.h" alt="" coords="93,392,280,421"/>
<area shape="rect" id="node51" href="$_a_p___compass___h_i_l_8h.html" title="AP_Compass_HIL.h" alt="" coords="212,315,356,344"/>
<area shape="rect" id="node44" href="$_compass_8h.html" title="Compass.h" alt="" coords="271,469,364,499"/>
<area shape="rect" id="node58" href="$_a_p___a_d_c___a_d_s7844_8h.html" title="AP_ADC_ADS7844.h" alt="" coords="783,469,935,499"/>
<area shape="rect" id="node61" href="$_a_p___a_d_c___h_i_l_8h.html" title="AP_ADC_HIL.h" alt="" coords="647,469,759,499"/>
<area shape="rect" id="node67" href="$_a_p___g_p_s___n_m_e_a_8h.html" title="AP_GPS_NMEA.h" alt="" coords="1792,392,1923,421"/>
<area shape="rect" id="node73" href="$_a_p___g_p_s___s_i_r_f_8h.html" title="AP_GPS_SIRF.h" alt="" coords="1600,392,1717,421"/>
<area shape="rect" id="node76" href="$_a_p___g_p_s__406_8h.html" title="AP_GPS_406.h" alt="" coords="1607,315,1721,344"/>
<area shape="rect" id="node79" href="$_a_p___g_p_s___u_b_l_o_x_8h.html" title="AP_GPS_UBLOX.h" alt="" coords="1947,392,2080,421"/>
<area shape="rect" id="node82" href="$_a_p___g_p_s___m_t_k_8h.html" title="AP_GPS_MTK.h" alt="" coords="1308,315,1425,344"/>
<area shape="rect" id="node87" href="$_a_p___g_p_s___m_t_k16_8h.html" title="AP_GPS_MTK16.h" alt="" coords="1449,315,1583,344"/>
<area shape="rect" id="node91" href="$_a_p___g_p_s___none_8h.html" title="AP_GPS_None.h" alt="" coords="1159,315,1284,344"/>
<area shape="rect" id="node94" href="$_a_p___g_p_s___auto_8h.html" title="AP_GPS_Auto.h" alt="" coords="1012,315,1135,344"/>
<area shape="rect" id="node98" href="$_a_p___g_p_s___h_i_l_8h.html" title="AP_GPS_HIL.h" alt="" coords="1796,315,1908,344"/>
<area shape="rect" id="node69" href="$_g_p_s_8h.html" title="Interface definition for the various GPS drivers." alt="" coords="1532,469,1593,499"/>
<area shape="rect" id="node85" href="$_a_p___g_p_s___m_t_k___common_8h.html" title="AP_GPS_MTK_Common.h" alt="" coords="1341,392,1525,421"/>
</map>

View File

@ -0,0 +1 @@
3edec70a957a697272c3ea84e2da4571

View File

@ -0,0 +1,371 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.cpp</h1> </div>
</div>
<div class="contents">
<a href="_a_p___d_c_m_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> APM_DCM_FW.cpp - DCM AHRS Library, fixed wing version, for Ardupilot Mega</span>
<a name="l00003"></a>00003 <span class="comment"> Code by Doug Weibel, Jordi Muñoz and Jose Julio. DIYDrones.com</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment"> This library works with the ArduPilot Mega and &quot;Oilpan&quot;</span>
<a name="l00006"></a>00006 <span class="comment"> </span>
<a name="l00007"></a>00007 <span class="comment"> This library is free software; you can redistribute it and/or</span>
<a name="l00008"></a>00008 <span class="comment"> modify it under the terms of the GNU Lesser General Public</span>
<a name="l00009"></a>00009 <span class="comment"> License as published by the Free Software Foundation; either</span>
<a name="l00010"></a>00010 <span class="comment"> version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00011"></a>00011 <span class="comment"></span>
<a name="l00012"></a>00012 <span class="comment"> Methods:</span>
<a name="l00013"></a>00013 <span class="comment"> update_DCM(_G_Dt) : Updates the AHRS by integrating the rotation matrix over time _G_Dt using the IMU object data</span>
<a name="l00014"></a>00014 <span class="comment"> get_gyro() : Returns gyro vector corrected for bias</span>
<a name="l00015"></a>00015 <span class="comment"> get_accel() : Returns accelerometer vector</span>
<a name="l00016"></a>00016 <span class="comment"> get_dcm_matrix() : Returns dcm matrix</span>
<a name="l00017"></a>00017 <span class="comment"></span>
<a name="l00018"></a>00018 <span class="comment">*/</span>
<a name="l00019"></a>00019 <span class="preprocessor">#include &lt;<a class="code" href="_a_p___d_c_m_8h.html">AP_DCM.h</a>&gt;</span>
<a name="l00020"></a>00020
<a name="l00021"></a><a class="code" href="_a_p___d_c_m_8cpp.html#aca3c9e529eec0dcbf5ac2e4240391068">00021</a> <span class="preprocessor">#define OUTPUTMODE 1 // This is just used for debugging, remove later</span>
<a name="l00022"></a><a class="code" href="_a_p___d_c_m_8cpp.html#a728f9499baea61e7df3ae70a374f2512">00022</a> <span class="preprocessor"></span><span class="preprocessor">#define ToRad(x) (x*0.01745329252) // *pi/180</span>
<a name="l00023"></a><a class="code" href="_a_p___d_c_m_8cpp.html#a3c9d151923236c7e8ccccf86f131e550">00023</a> <span class="preprocessor"></span><span class="preprocessor">#define ToDeg(x) (x*57.2957795131) // *180/pi</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span>
<a name="l00025"></a><a class="code" href="_a_p___d_c_m_8cpp.html#a3ab9b5d54678d8d03770f19607886ed6">00025</a> <span class="preprocessor">#define Kp_ROLLPITCH 0.05967 // .0014 * 418/9.81 Pitch&amp;Roll Drift Correction Proportional Gain</span>
<a name="l00026"></a><a class="code" href="_a_p___d_c_m_8cpp.html#a7acbbef42a2b56f585c4dafc151e3806">00026</a> <span class="preprocessor"></span><span class="preprocessor">#define Ki_ROLLPITCH 0.00001278 // 0.0000003 * 418/9.81 Pitch&amp;Roll Drift Correction Integrator Gain</span>
<a name="l00027"></a><a class="code" href="_a_p___d_c_m_8cpp.html#a3c59c4be08d2d06edcdc0a02369da6b6">00027</a> <span class="preprocessor"></span><span class="preprocessor">#define Kp_YAW 0.8 // Yaw Drift Correction Porportional Gain </span>
<a name="l00028"></a><a class="code" href="_a_p___d_c_m_8cpp.html#aea9dd7972c8f6c2381b1541b964b3893">00028</a> <span class="preprocessor"></span><span class="preprocessor">#define Ki_YAW 0.00004 // Yaw Drift CorrectionIntegrator Gain</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span>
<a name="l00030"></a><a class="code" href="_a_p___d_c_m_8cpp.html#a6ab736b5db0f112fd61581a440f2d3ca">00030</a> <span class="preprocessor">#define SPEEDFILT 300 // centimeters/second</span>
<a name="l00031"></a><a class="code" href="_a_p___d_c_m_8cpp.html#ae4132efd8235f9b057b6b1d24272dd79">00031</a> <span class="preprocessor"></span><span class="preprocessor">#define ADC_CONSTRAINT 900</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span>
<a name="l00033"></a>00033
<a name="l00034"></a>00034 <span class="keywordtype">void</span>
<a name="l00035"></a><a class="code" href="class_a_p___d_c_m.html#adc0ecb44c04652f3696e62be5eb4ebd1">00035</a> <a class="code" href="class_a_p___d_c_m.html#adc0ecb44c04652f3696e62be5eb4ebd1">AP_DCM::set_compass</a>(<a class="code" href="class_compass.html">Compass</a> *compass)
<a name="l00036"></a>00036 {
<a name="l00037"></a>00037 _compass = compass;
<a name="l00038"></a>00038 }
<a name="l00039"></a>00039
<a name="l00040"></a>00040 <span class="comment">/**************************************************/</span>
<a name="l00041"></a>00041 <span class="keywordtype">void</span>
<a name="l00042"></a><a class="code" href="class_a_p___d_c_m.html#a9188cdc31e905c85a5f14dcdb063720b">00042</a> <a class="code" href="class_a_p___d_c_m.html#a9188cdc31e905c85a5f14dcdb063720b">AP_DCM::update_DCM</a>(<span class="keywordtype">float</span> _G_Dt)
<a name="l00043"></a>00043 {
<a name="l00044"></a>00044 _gyro_vector = _imu-&gt;<a class="code" href="class_a_p___i_m_u.html#ae3d7b3a78a8720c9a7ca2c85402c7638">get_gyro</a>(); <span class="comment">// Get current values for IMU sensors</span>
<a name="l00045"></a>00045 _accel_vector = _imu-&gt;<a class="code" href="class_a_p___i_m_u.html#a6e9be9f56658410ac972d66b8985de6b">get_accel</a>(); <span class="comment">// Get current values for IMU sensors</span>
<a name="l00046"></a>00046
<a name="l00047"></a>00047 matrix_update(_G_Dt); <span class="comment">// Integrate the DCM matrix</span>
<a name="l00048"></a>00048 normalize(); <span class="comment">// Normalize the DCM matrix</span>
<a name="l00049"></a>00049 drift_correction(); <span class="comment">// Perform drift correction</span>
<a name="l00050"></a>00050
<a name="l00051"></a>00051 euler_angles(); <span class="comment">// Calculate pitch, roll, yaw for stabilization and navigation</span>
<a name="l00052"></a>00052 }
<a name="l00053"></a>00053
<a name="l00054"></a>00054 <span class="comment">/**************************************************/</span>
<a name="l00055"></a>00055
<a name="l00056"></a>00056 <span class="comment">//For Debugging</span>
<a name="l00057"></a>00057 <span class="comment">/*</span>
<a name="l00058"></a>00058 <span class="comment">void</span>
<a name="l00059"></a>00059 <span class="comment">printm(const char *l, Matrix3f &amp;m)</span>
<a name="l00060"></a>00060 <span class="comment">{ Serial.println(&quot; &quot;); Serial.println(l);</span>
<a name="l00061"></a>00061 <span class="comment"> Serial.print(m.a.x, 12); Serial.print(&quot; &quot;); Serial.print(m.a.y, 12); Serial.print(&quot; &quot;); Serial.println(m.a.z, 12);</span>
<a name="l00062"></a>00062 <span class="comment"> Serial.print(m.b.x, 12); Serial.print(&quot; &quot;); Serial.print(m.b.y, 12); Serial.print(&quot; &quot;); Serial.println(m.b.z, 12);</span>
<a name="l00063"></a>00063 <span class="comment"> Serial.print(m.c.x, 12); Serial.print(&quot; &quot;); Serial.print(m.c.y, 12); Serial.print(&quot; &quot;); Serial.println(m.c.z, 12); </span>
<a name="l00064"></a>00064 <span class="comment"> Serial.print(*(uint32_t *)&amp;(m.a.x), HEX); Serial.print(&quot; &quot;); Serial.print(*(uint32_t *)&amp;(m.a.y), HEX); Serial.print(&quot; &quot;); Serial.println(*(uint32_t *)&amp;(m.a.z), HEX);</span>
<a name="l00065"></a>00065 <span class="comment"> Serial.print(*(uint32_t *)&amp;(m.b.x), HEX); Serial.print(&quot; &quot;); Serial.print(*(uint32_t *)&amp;(m.b.y), HEX); Serial.print(&quot; &quot;); Serial.println(*(uint32_t *)&amp;(m.b.z), HEX);</span>
<a name="l00066"></a>00066 <span class="comment"> Serial.print(*(uint32_t *)&amp;(m.c.x), HEX); Serial.print(&quot; &quot;); Serial.print(*(uint32_t *)&amp;(m.c.y), HEX); Serial.print(&quot; &quot;); Serial.println(*(uint32_t *)&amp;(m.c.z), HEX);</span>
<a name="l00067"></a>00067 <span class="comment">}</span>
<a name="l00068"></a>00068 <span class="comment">*/</span>
<a name="l00069"></a>00069
<a name="l00070"></a>00070 <span class="comment">/**************************************************/</span>
<a name="l00071"></a>00071 <span class="keywordtype">void</span>
<a name="l00072"></a>00072 AP_DCM::matrix_update(<span class="keywordtype">float</span> _G_Dt)
<a name="l00073"></a>00073 {
<a name="l00074"></a>00074 <a class="code" href="class_matrix3.html">Matrix3f</a> update_matrix;
<a name="l00075"></a>00075 <a class="code" href="class_matrix3.html">Matrix3f</a> temp_matrix;
<a name="l00076"></a>00076
<a name="l00077"></a>00077 <span class="comment">//Record when you saturate any of the gyros.</span>
<a name="l00078"></a>00078 <span class="keywordflow">if</span>((fabs(_gyro_vector.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a>) &gt;= radians(300)) ||
<a name="l00079"></a>00079 (fabs(_gyro_vector.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a>) &gt;= radians(300)) ||
<a name="l00080"></a>00080 (fabs(_gyro_vector.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a>) &gt;= radians(300))){
<a name="l00081"></a>00081 <a class="code" href="class_a_p___d_c_m.html#a8ba0327e56c9d591070b93a72216041a">gyro_sat_count</a>++;
<a name="l00082"></a>00082 }
<a name="l00083"></a>00083
<a name="l00084"></a>00084 _omega_integ_corr = _gyro_vector + _omega_I; <span class="comment">// Used for _centripetal correction (theoretically better than _omega)</span>
<a name="l00085"></a>00085 _omega = _omega_integ_corr + _omega_P; <span class="comment">// Equation 16, adding proportional and integral correction terms </span>
<a name="l00086"></a>00086
<a name="l00087"></a>00087 <span class="keywordflow">if</span>(_centripetal){
<a name="l00088"></a>00088 accel_adjust(); <span class="comment">// Remove _centripetal acceleration.</span>
<a name="l00089"></a>00089 }
<a name="l00090"></a>00090
<a name="l00091"></a>00091 <span class="preprocessor"> #if OUTPUTMODE == 1 </span>
<a name="l00092"></a>00092 <span class="preprocessor"></span> update_matrix.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> = 0;
<a name="l00093"></a>00093 update_matrix.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a> = -_G_Dt * _omega.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a>; <span class="comment">// -delta Theta z</span>
<a name="l00094"></a>00094 update_matrix.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a> = _G_Dt * _omega.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a>; <span class="comment">// delta Theta y</span>
<a name="l00095"></a>00095 update_matrix.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> = _G_Dt * _omega.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a>; <span class="comment">// delta Theta z</span>
<a name="l00096"></a>00096 update_matrix.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a> = 0;
<a name="l00097"></a>00097 update_matrix.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a> = -_G_Dt * _omega.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a>; <span class="comment">// -delta Theta x</span>
<a name="l00098"></a>00098 update_matrix.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> = -_G_Dt * _omega.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a>; <span class="comment">// -delta Theta y</span>
<a name="l00099"></a>00099 update_matrix.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a> = _G_Dt * _omega.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a>; <span class="comment">// delta Theta x</span>
<a name="l00100"></a>00100 update_matrix.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a> = 0;
<a name="l00101"></a>00101 <span class="preprocessor"> #else // Uncorrected data (no drift correction) </span>
<a name="l00102"></a>00102 <span class="preprocessor"></span> update_matrix.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> = 0;
<a name="l00103"></a>00103 update_matrix.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a> = -_G_Dt * _gyro_vector.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a>;
<a name="l00104"></a>00104 update_matrix.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a> = _G_Dt * _gyro_vector.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a>;
<a name="l00105"></a>00105 update_matrix.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> = _G_Dt * _gyro_vector.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a>;
<a name="l00106"></a>00106 update_matrix.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a> = 0;
<a name="l00107"></a>00107 update_matrix.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a> = -_G_Dt * _gyro_vector.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a>;
<a name="l00108"></a>00108 update_matrix.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> = -_G_Dt * _gyro_vector.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a>;
<a name="l00109"></a>00109 update_matrix.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a> = _G_Dt * _gyro_vector.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a>;
<a name="l00110"></a>00110 update_matrix.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a> = 0;
<a name="l00111"></a>00111 <span class="preprocessor"> #endif</span>
<a name="l00112"></a>00112 <span class="preprocessor"></span>
<a name="l00113"></a>00113 temp_matrix = _dcm_matrix * update_matrix;
<a name="l00114"></a>00114 _dcm_matrix = _dcm_matrix + temp_matrix; <span class="comment">// Equation 17</span>
<a name="l00115"></a>00115
<a name="l00116"></a>00116 }
<a name="l00117"></a>00117
<a name="l00118"></a>00118
<a name="l00119"></a>00119 <span class="comment">/**************************************************/</span>
<a name="l00120"></a>00120 <span class="keywordtype">void</span>
<a name="l00121"></a>00121 AP_DCM::accel_adjust(<span class="keywordtype">void</span>)
<a name="l00122"></a>00122 {
<a name="l00123"></a>00123 <a class="code" href="class_vector3.html">Vector3f</a> veloc, temp;
<a name="l00124"></a>00124 <span class="keywordtype">float</span> vel;
<a name="l00125"></a>00125
<a name="l00126"></a>00126 veloc.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> = _gps-&gt;<a class="code" href="class_g_p_s.html#aba8ad9c8dd3aac81d0e3e2b25ef304c0" title="ground speed in cm/sec">ground_speed</a> / 100; <span class="comment">// We are working with acceleration in m/s^2 units</span>
<a name="l00127"></a>00127
<a name="l00128"></a>00128 <span class="comment">// We are working with a modified version of equation 26 as our IMU object reports acceleration in the positive axis direction as positive</span>
<a name="l00129"></a>00129
<a name="l00130"></a>00130 <span class="comment">//_accel_vector -= _omega_integ_corr % _veloc; // Equation 26 This line is giving the compiler a problem so we break it up below</span>
<a name="l00131"></a>00131 temp.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> = 0;
<a name="l00132"></a>00132 temp.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a> = _omega_integ_corr.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a> * veloc.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a>; <span class="comment">// only computing the non-zero terms</span>
<a name="l00133"></a>00133 temp.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a> = -1.0f * _omega_integ_corr.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a> * veloc.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a>; <span class="comment">// After looking at the compiler issue lets remove _veloc and simlify </span>
<a name="l00134"></a>00134
<a name="l00135"></a>00135 _accel_vector -= temp;
<a name="l00136"></a>00136 }
<a name="l00137"></a>00137
<a name="l00138"></a>00138
<a name="l00139"></a>00139 <span class="comment">/*************************************************</span>
<a name="l00140"></a>00140 <span class="comment">Direction Cosine Matrix IMU: Theory</span>
<a name="l00141"></a>00141 <span class="comment">William Premerlani and Paul Bizard</span>
<a name="l00142"></a>00142 <span class="comment"></span>
<a name="l00143"></a>00143 <span class="comment">Numerical errors will gradually reduce the orthogonality conditions expressed by equation 5 </span>
<a name="l00144"></a>00144 <span class="comment">to approximations rather than identities. In effect, the axes in the two frames of reference no </span>
<a name="l00145"></a>00145 <span class="comment">longer describe a rigid body. Fortunately, numerical error accumulates very slowly, so it is a </span>
<a name="l00146"></a>00146 <span class="comment">simple matter to stay ahead of it.</span>
<a name="l00147"></a>00147 <span class="comment">We call the process of enforcing the orthogonality conditions ÒrenormalizationÓ.</span>
<a name="l00148"></a>00148 <span class="comment">*/</span>
<a name="l00149"></a>00149 <span class="keywordtype">void</span>
<a name="l00150"></a>00150 AP_DCM::normalize(<span class="keywordtype">void</span>)
<a name="l00151"></a>00151 {
<a name="l00152"></a>00152 <span class="keywordtype">float</span> error = 0;
<a name="l00153"></a>00153 <a class="code" href="class_vector3.html">Vector3f</a> temporary[3];
<a name="l00154"></a>00154
<a name="l00155"></a>00155 <span class="keywordtype">int</span> problem = 0;
<a name="l00156"></a>00156
<a name="l00157"></a>00157 error = _dcm_matrix.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a> * _dcm_matrix.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>; <span class="comment">// eq.18</span>
<a name="l00158"></a>00158
<a name="l00159"></a>00159 temporary[0] = _dcm_matrix.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>;
<a name="l00160"></a>00160 temporary[1] = _dcm_matrix.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>;
<a name="l00161"></a>00161 temporary[0] = _dcm_matrix.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a> - (temporary[0] * (0.5f * error)); <span class="comment">// eq.19</span>
<a name="l00162"></a>00162 temporary[1] = _dcm_matrix.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a> - (temporary[1] * (0.5f * error)); <span class="comment">// eq.19</span>
<a name="l00163"></a>00163
<a name="l00164"></a>00164 temporary[2] = temporary[0] % temporary[1]; <span class="comment">// c= a x b // eq.20</span>
<a name="l00165"></a>00165
<a name="l00166"></a>00166 _dcm_matrix.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a> = renorm(temporary[0], problem);
<a name="l00167"></a>00167 _dcm_matrix.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a> = renorm(temporary[1], problem);
<a name="l00168"></a>00168 _dcm_matrix.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a> = renorm(temporary[2], problem);
<a name="l00169"></a>00169
<a name="l00170"></a>00170 <span class="keywordflow">if</span> (problem == 1) { <span class="comment">// Our solution is blowing up and we will force back to initial condition. Hope we are not upside down!</span>
<a name="l00171"></a>00171 _dcm_matrix.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> = 1.0f;
<a name="l00172"></a>00172 _dcm_matrix.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a> = 0.0f;
<a name="l00173"></a>00173 _dcm_matrix.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a> = 0.0f;
<a name="l00174"></a>00174 _dcm_matrix.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> = 0.0f;
<a name="l00175"></a>00175 _dcm_matrix.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a> = 1.0f;
<a name="l00176"></a>00176 _dcm_matrix.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a> = 0.0f;
<a name="l00177"></a>00177 _dcm_matrix.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> = 0.0f;
<a name="l00178"></a>00178 _dcm_matrix.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a> = 0.0f;
<a name="l00179"></a>00179 _dcm_matrix.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a> = 1.0f;
<a name="l00180"></a>00180 }
<a name="l00181"></a>00181 }
<a name="l00182"></a>00182
<a name="l00183"></a>00183 <span class="comment">/**************************************************/</span>
<a name="l00184"></a>00184 <a class="code" href="class_vector3.html">Vector3f</a>
<a name="l00185"></a>00185 AP_DCM::renorm(<a class="code" href="class_vector3.html">Vector3f</a> <span class="keyword">const</span> &amp;a, <span class="keywordtype">int</span> &amp;problem)
<a name="l00186"></a>00186 {
<a name="l00187"></a>00187 <span class="keywordtype">float</span> renorm;
<a name="l00188"></a>00188
<a name="l00189"></a>00189 renorm = a * a;
<a name="l00190"></a>00190
<a name="l00191"></a>00191 <span class="keywordflow">if</span> (renorm &lt; 1.5625f &amp;&amp; renorm &gt; 0.64f) { <span class="comment">// Check if we are OK to use Taylor expansion</span>
<a name="l00192"></a>00192 renorm = 0.5 * (3 - renorm); <span class="comment">// eq.21</span>
<a name="l00193"></a>00193 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (renorm &lt; 100.0f &amp;&amp; renorm &gt; 0.01f) {
<a name="l00194"></a>00194 renorm = 1.0 / sqrt(renorm);
<a name="l00195"></a>00195 <a class="code" href="class_a_p___d_c_m.html#ad724a2a16817d25dc95b16dc48f28ef4">renorm_sqrt_count</a>++;
<a name="l00196"></a>00196 } <span class="keywordflow">else</span> {
<a name="l00197"></a>00197 problem = 1;
<a name="l00198"></a>00198 <a class="code" href="class_a_p___d_c_m.html#ae518c49e92751f43af3f1b7457254e13">renorm_blowup_count</a>++;
<a name="l00199"></a>00199 }
<a name="l00200"></a>00200
<a name="l00201"></a>00201 <span class="keywordflow">return</span>(a * renorm);
<a name="l00202"></a>00202 }
<a name="l00203"></a>00203
<a name="l00204"></a>00204 <span class="comment">/**************************************************/</span>
<a name="l00205"></a>00205 <span class="keywordtype">void</span>
<a name="l00206"></a>00206 AP_DCM::drift_correction(<span class="keywordtype">void</span>)
<a name="l00207"></a>00207 {
<a name="l00208"></a>00208 <span class="comment">//Compensation the Roll, Pitch and Yaw drift. </span>
<a name="l00209"></a>00209 <span class="comment">//float mag_heading_x;</span>
<a name="l00210"></a>00210 <span class="comment">//float mag_heading_y;</span>
<a name="l00211"></a>00211 <span class="keywordtype">float</span> error_course;
<a name="l00212"></a>00212 <span class="keywordtype">float</span> accel_magnitude;
<a name="l00213"></a>00213 <span class="keywordtype">float</span> accel_weight;
<a name="l00214"></a>00214 <span class="keywordtype">float</span> integrator_magnitude;
<a name="l00215"></a>00215 <span class="comment">//static float scaled_omega_P[3];</span>
<a name="l00216"></a>00216 <span class="comment">//static float scaled_omega_I[3];</span>
<a name="l00217"></a>00217 <span class="keyword">static</span> <span class="keywordtype">bool</span> in_motion = <span class="keyword">false</span>;
<a name="l00218"></a>00218 <a class="code" href="class_matrix3.html">Matrix3f</a> rot_mat;
<a name="l00219"></a>00219
<a name="l00220"></a>00220 <span class="comment">//*****Roll and Pitch***************</span>
<a name="l00221"></a>00221
<a name="l00222"></a>00222 <span class="comment">// Calculate the magnitude of the accelerometer vector</span>
<a name="l00223"></a>00223 accel_magnitude = _accel_vector.<a class="code" href="class_vector3.html#aeae8eae4d5a0a909aa0129c53c493038">length</a>() / 9.80665f;
<a name="l00224"></a>00224
<a name="l00225"></a>00225 <span class="comment">// Dynamic weighting of accelerometer info (reliability filter)</span>
<a name="l00226"></a>00226 <span class="comment">// Weight for accelerometer info (&lt;0.5G = 0.0, 1G = 1.0 , &gt;1.5G = 0.0)</span>
<a name="l00227"></a>00227 accel_weight = constrain(1 - 2 * fabs(1 - accel_magnitude), 0, 1); <span class="comment">// </span>
<a name="l00228"></a>00228
<a name="l00229"></a>00229 <span class="comment">// We monitor the amount that the accelerometer based drift correction is deweighted for performance reporting</span>
<a name="l00230"></a>00230 _health += constrain((0.02 * (accel_weight - .5)), 0, 1);
<a name="l00231"></a>00231
<a name="l00232"></a>00232 <span class="comment">// adjust the ground of reference </span>
<a name="l00233"></a>00233 _error_roll_pitch = _dcm_matrix.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a> % _accel_vector; <span class="comment">// Equation 27 *** sign changed from prev implementation???</span>
<a name="l00234"></a>00234
<a name="l00235"></a>00235 <span class="comment">// error_roll_pitch are in Accel m/s^2 units</span>
<a name="l00236"></a>00236 <span class="comment">// Limit max error_roll_pitch to limit max omega_P and omega_I</span>
<a name="l00237"></a>00237 _error_roll_pitch.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> = constrain(_error_roll_pitch.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a>, -1.17f, 1.17f);
<a name="l00238"></a>00238 _error_roll_pitch.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a> = constrain(_error_roll_pitch.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a>, -1.17f, 1.17f);
<a name="l00239"></a>00239 _error_roll_pitch.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a> = constrain(_error_roll_pitch.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a>, -1.17f, 1.17f);
<a name="l00240"></a>00240
<a name="l00241"></a>00241 _omega_P = _error_roll_pitch * (<a class="code" href="_a_p___d_c_m_8cpp.html#a3ab9b5d54678d8d03770f19607886ed6">Kp_ROLLPITCH</a> * accel_weight);
<a name="l00242"></a>00242 _omega_I += _error_roll_pitch * (<a class="code" href="_a_p___d_c_m_8cpp.html#a7acbbef42a2b56f585c4dafc151e3806">Ki_ROLLPITCH</a> * accel_weight);
<a name="l00243"></a>00243
<a name="l00244"></a>00244
<a name="l00245"></a>00245 <span class="comment">//*****YAW***************</span>
<a name="l00246"></a>00246
<a name="l00247"></a>00247 <span class="keywordflow">if</span> (_compass) {
<a name="l00248"></a>00248 <span class="comment">// We make the gyro YAW drift correction based on compass magnetic heading</span>
<a name="l00249"></a>00249 error_course = (_dcm_matrix.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> * _compass-&gt;<a class="code" href="class_compass.html#a2e1554fb76b067f36d011f59e7e8dd58">heading_y</a>) - (_dcm_matrix.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> * _compass-&gt;<a class="code" href="class_compass.html#aafc7608bd711702f519d52afbc06dc7a">heading_x</a>); <span class="comment">// Equation 23, Calculating YAW error </span>
<a name="l00250"></a>00250
<a name="l00251"></a>00251 } <span class="keywordflow">else</span> {
<a name="l00252"></a>00252
<a name="l00253"></a>00253 <span class="comment">// Use GPS Ground course to correct yaw gyro drift</span>
<a name="l00254"></a>00254 <span class="keywordflow">if</span> (_gps-&gt;<a class="code" href="class_g_p_s.html#aba8ad9c8dd3aac81d0e3e2b25ef304c0" title="ground speed in cm/sec">ground_speed</a> &gt;= <a class="code" href="_a_p___d_c_m_8cpp.html#a6ab736b5db0f112fd61581a440f2d3ca">SPEEDFILT</a>) {
<a name="l00255"></a>00255 _course_over_ground_x = cos(<a class="code" href="_a_p___d_c_m_8cpp.html#a728f9499baea61e7df3ae70a374f2512">ToRad</a>(_gps-&gt;<a class="code" href="class_g_p_s.html#a223b8bf1d912252c15aff621c37d00e3" title="ground course in 100ths of a degree">ground_course</a>/100.0));
<a name="l00256"></a>00256 _course_over_ground_y = sin(<a class="code" href="_a_p___d_c_m_8cpp.html#a728f9499baea61e7df3ae70a374f2512">ToRad</a>(_gps-&gt;<a class="code" href="class_g_p_s.html#a223b8bf1d912252c15aff621c37d00e3" title="ground course in 100ths of a degree">ground_course</a>/100.0));
<a name="l00257"></a>00257 <span class="keywordflow">if</span>(in_motion) {
<a name="l00258"></a>00258 error_course = (_dcm_matrix.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> * _course_over_ground_y) - (_dcm_matrix.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> * _course_over_ground_x); <span class="comment">// Equation 23, Calculating YAW error</span>
<a name="l00259"></a>00259 } <span class="keywordflow">else</span> {
<a name="l00260"></a>00260 <span class="keywordtype">float</span> cos_psi_err, sin_psi_err;
<a name="l00261"></a>00261 <span class="comment">// This is the case for when we first start moving and reset the DCM so that yaw matches the gps ground course</span>
<a name="l00262"></a>00262 <span class="comment">// This is just to get a reasonable estimate faster</span>
<a name="l00263"></a>00263 <a class="code" href="class_a_p___d_c_m.html#abddbee0f81d02d51ee91f57addedc266">yaw</a> = atan2(_dcm_matrix.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a>, _dcm_matrix.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a>);
<a name="l00264"></a>00264 cos_psi_err = cos(<a class="code" href="_a_p___d_c_m_8cpp.html#a728f9499baea61e7df3ae70a374f2512">ToRad</a>(_gps-&gt;<a class="code" href="class_g_p_s.html#a223b8bf1d912252c15aff621c37d00e3" title="ground course in 100ths of a degree">ground_course</a>/100.0) - <a class="code" href="class_a_p___d_c_m.html#abddbee0f81d02d51ee91f57addedc266">yaw</a>);
<a name="l00265"></a>00265 sin_psi_err = sin(<a class="code" href="_a_p___d_c_m_8cpp.html#a728f9499baea61e7df3ae70a374f2512">ToRad</a>(_gps-&gt;<a class="code" href="class_g_p_s.html#a223b8bf1d912252c15aff621c37d00e3" title="ground course in 100ths of a degree">ground_course</a>/100.0) - <a class="code" href="class_a_p___d_c_m.html#abddbee0f81d02d51ee91f57addedc266">yaw</a>);
<a name="l00266"></a>00266 <span class="comment">// Rxx = cos psi err, Rxy = - sin psi err, Rxz = 0</span>
<a name="l00267"></a>00267 <span class="comment">// Ryx = sin psi err, Ryy = cos psi err, Ryz = 0</span>
<a name="l00268"></a>00268 <span class="comment">// Rzx = Rzy = 0, Rzz = 1</span>
<a name="l00269"></a>00269 rot_mat.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> = cos_psi_err;
<a name="l00270"></a>00270 rot_mat.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a> = - sin_psi_err;
<a name="l00271"></a>00271 rot_mat.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> = sin_psi_err;
<a name="l00272"></a>00272 rot_mat.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a> = cos_psi_err;
<a name="l00273"></a>00273 rot_mat.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a> = 0;
<a name="l00274"></a>00274 rot_mat.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a> = 0;
<a name="l00275"></a>00275 rot_mat.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> = 0;
<a name="l00276"></a>00276 rot_mat.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a> = 0;
<a name="l00277"></a>00277 rot_mat.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a> = 1.0;
<a name="l00278"></a>00278
<a name="l00279"></a>00279 _dcm_matrix = rot_mat * _dcm_matrix;
<a name="l00280"></a>00280 in_motion = <span class="keyword">true</span>;
<a name="l00281"></a>00281 error_course = 0;
<a name="l00282"></a>00282
<a name="l00283"></a>00283 }
<a name="l00284"></a>00284 } <span class="keywordflow">else</span> {
<a name="l00285"></a>00285 error_course = 0;
<a name="l00286"></a>00286 in_motion = <span class="keyword">false</span>;
<a name="l00287"></a>00287 }
<a name="l00288"></a>00288 }
<a name="l00289"></a>00289
<a name="l00290"></a>00290 _error_yaw = _dcm_matrix.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a> * error_course; <span class="comment">// Equation 24, Applys the yaw correction to the XYZ rotation of the aircraft, depeding the position.</span>
<a name="l00291"></a>00291
<a name="l00292"></a>00292 _omega_P += _error_yaw * Kp_YAW; <span class="comment">// Adding yaw correction to proportional correction vector.</span>
<a name="l00293"></a>00293 _omega_I += _error_yaw * Ki_YAW; <span class="comment">// adding yaw correction to integrator correction vector. </span>
<a name="l00294"></a>00294
<a name="l00295"></a>00295 <span class="comment">// Here we will place a limit on the integrator so that the integrator cannot ever exceed half the saturation limit of the gyros</span>
<a name="l00296"></a>00296 integrator_magnitude = _omega_I.length();
<a name="l00297"></a>00297 <span class="keywordflow">if</span> (integrator_magnitude &gt; radians(300)) {
<a name="l00298"></a>00298 _omega_I *= (0.5f * radians(300) / integrator_magnitude); <span class="comment">// Why do we have this discontinuous? EG, why the 0.5?</span>
<a name="l00299"></a>00299 }
<a name="l00300"></a>00300 <span class="comment">//Serial.print(&quot;*&quot;);</span>
<a name="l00301"></a>00301 }
<a name="l00302"></a>00302
<a name="l00303"></a>00303
<a name="l00304"></a>00304 <span class="comment">/**************************************************/</span>
<a name="l00305"></a>00305 <span class="keywordtype">void</span>
<a name="l00306"></a>00306 AP_DCM::euler_angles(<span class="keywordtype">void</span>)
<a name="l00307"></a>00307 {
<a name="l00308"></a>00308 <span class="preprocessor"> #if (OUTPUTMODE == 2) // Only accelerometer info (debugging purposes)</span>
<a name="l00309"></a>00309 <span class="preprocessor"></span> <a class="code" href="class_a_p___d_c_m.html#a9793adc8a62cbc21439aef2b19259a39">roll</a> = atan2(_accel_vector.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a>, -_accel_vector.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a>); <span class="comment">// atan2(acc_y, acc_z)</span>
<a name="l00310"></a>00310 <a class="code" href="class_a_p___d_c_m.html#a175109cd6b70bc290a7779174a88b42a">pitch</a> = asin((_accel_vector.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a>) / (<span class="keywordtype">double</span>)9.81); <span class="comment">// asin(acc_x)</span>
<a name="l00311"></a>00311 <a class="code" href="class_a_p___d_c_m.html#abddbee0f81d02d51ee91f57addedc266">yaw</a> = 0;
<a name="l00312"></a>00312 <span class="preprocessor"> #else</span>
<a name="l00313"></a>00313 <span class="preprocessor"></span> <a class="code" href="class_a_p___d_c_m.html#a175109cd6b70bc290a7779174a88b42a">pitch</a> = -asin(_dcm_matrix.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a>);
<a name="l00314"></a>00314 <a class="code" href="class_a_p___d_c_m.html#a9793adc8a62cbc21439aef2b19259a39">roll</a> = atan2(_dcm_matrix.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a>, _dcm_matrix.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a>);
<a name="l00315"></a>00315 <a class="code" href="class_a_p___d_c_m.html#abddbee0f81d02d51ee91f57addedc266">yaw</a> = atan2(_dcm_matrix.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a>, _dcm_matrix.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a>);
<a name="l00316"></a>00316 <span class="preprocessor"> #endif</span>
<a name="l00317"></a>00317 <span class="preprocessor"></span>
<a name="l00318"></a>00318 <a class="code" href="class_a_p___d_c_m.html#a0bb05c5d94979b86aca523b9d924dcda">roll_sensor</a> = degrees(<a class="code" href="class_a_p___d_c_m.html#a9793adc8a62cbc21439aef2b19259a39">roll</a>) * 100;
<a name="l00319"></a>00319 <a class="code" href="class_a_p___d_c_m.html#adf141fbe2398c902c2f1e400c265a1aa">pitch_sensor</a> = degrees(<a class="code" href="class_a_p___d_c_m.html#a175109cd6b70bc290a7779174a88b42a">pitch</a>) * 100;
<a name="l00320"></a>00320 <a class="code" href="class_a_p___d_c_m.html#a9e24af31523858a17ddbd800f35ed25b">yaw_sensor</a> = degrees(<a class="code" href="class_a_p___d_c_m.html#abddbee0f81d02d51ee91f57addedc266">yaw</a>) * 100;
<a name="l00321"></a>00321
<a name="l00322"></a>00322 <span class="keywordflow">if</span> (<a class="code" href="class_a_p___d_c_m.html#a9e24af31523858a17ddbd800f35ed25b">yaw_sensor</a> &lt; 0)
<a name="l00323"></a>00323 <a class="code" href="class_a_p___d_c_m.html#a9e24af31523858a17ddbd800f35ed25b">yaw_sensor</a> += 36000;
<a name="l00324"></a>00324 }
<a name="l00325"></a>00325
<a name="l00326"></a>00326 <span class="comment">/**************************************************/</span>
<a name="l00327"></a>00327
<a name="l00328"></a>00328 <span class="keywordtype">float</span>
<a name="l00329"></a><a class="code" href="class_a_p___d_c_m.html#a74d43cf5fd575ccdedf92eb1c2572417">00329</a> <a class="code" href="class_a_p___d_c_m.html#a74d43cf5fd575ccdedf92eb1c2572417">AP_DCM::get_health</a>(<span class="keywordtype">void</span>)
<a name="l00330"></a>00330 {
<a name="l00331"></a>00331 <span class="keywordflow">return</span> _health;
<a name="l00332"></a>00332 }
<a name="l00333"></a>00333
<a name="l00334"></a>00334
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:33 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,69 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> </div>
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.h File Reference</h1> </div>
</div>
<div class="contents">
<code>#include &quot;<a class="el" href="_a_p___d_c_m___h_i_l_8h_source.html">AP_DCM_HIL.h</a>&quot;</code><br/>
<code>#include &lt;<a class="el" href="_fast_serial_8h_source.html">FastSerial.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="_a_p___math_8h_source.html">AP_Math.h</a>&gt;</code><br/>
<code>#include &lt;inttypes.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="_w_program_8h_source.html">WProgram.h</a>&quot;</code><br/>
<code>#include &lt;<a class="el" href="_a_p___compass_8h_source.html">AP_Compass.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="_a_p___a_d_c_8h_source.html">AP_ADC.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="_a_p___g_p_s_8h_source.html">AP_GPS.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="_a_p___i_m_u_8h_source.html">AP_IMU.h</a>&gt;</code><br/>
<div class="dynheader">
Include dependency graph for AP_DCM.h:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___d_c_m_8h__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___d_c_m_2_a_p___d_c_m_8h" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___d_c_m_2_a_p___d_c_m_8h" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___d_c_m_2_a_p___d_c_m_8h">
<area shape="rect" id="node3" href="_a_p___d_c_m___h_i_l_8h.html" title="AP_DCM_HIL.h" alt="" coords="515,83,629,112"/><area shape="rect" id="node5" href="_fast_serial_8h.html" title="FastSerial.h" alt="" coords="996,315,1092,344"/><area shape="rect" id="node21" href="_a_p___math_8h.html" title="AP_Math.h" alt="" coords="343,469,433,499"/><area shape="rect" id="node36" href="_w_program_8h.html" title="WProgram.h" alt="" coords="355,315,453,344"/><area shape="rect" id="node38" href="_a_p___compass_8h.html" title="Catch&#45;all header that defines all supported compass classes." alt="" coords="232,160,349,189"/><area shape="rect" id="node54" href="_a_p___a_d_c_8h.html" title="AP_ADC.h" alt="" coords="811,315,896,344"/><area shape="rect" id="node63" href="_a_p___g_p_s_8h.html" title="Catch&#45;all header that defines all supported GPS classes." alt="" coords="1473,160,1559,189"/><area shape="rect" id="node99" href="_a_p___i_m_u_8h.html" title="AP_IMU.h" alt="" coords="601,237,684,267"/><area shape="rect" id="node15" href="_better_stream_8h.html" title="BetterStream.h" alt="" coords="1380,392,1503,421"/><area shape="rect" id="node23" href="vector2_8h.html" title="vector2.h" alt="" coords="268,624,351,653"/><area shape="rect" id="node27" href="vector3_8h.html" title="vector3.h" alt="" coords="375,624,457,653"/><area shape="rect" id="node32" href="matrix3_8h.html" title="matrix3.h" alt="" coords="347,547,429,576"/><area shape="rect" id="node40" href="_a_p___compass___h_m_c5843_8h.html" title="AP_Compass_HMC5843.h" alt="" coords="93,315,280,344"/><area shape="rect" id="node49" href="_a_p___compass___h_i_l_8h.html" title="AP_Compass_HIL.h" alt="" coords="212,237,356,267"/><area shape="rect" id="node42" href="_compass_8h.html" title="Compass.h" alt="" coords="271,392,364,421"/><area shape="rect" id="node56" href="_a_p___a_d_c___a_d_s7844_8h.html" title="AP_ADC_ADS7844.h" alt="" coords="783,392,935,421"/><area shape="rect" id="node59" href="_a_p___a_d_c___h_i_l_8h.html" title="AP_ADC_HIL.h" alt="" coords="647,392,759,421"/><area shape="rect" id="node65" href="_a_p___g_p_s___n_m_e_a_8h.html" title="AP_GPS_NMEA.h" alt="" coords="1792,315,1923,344"/><area shape="rect" id="node71" href="_a_p___g_p_s___s_i_r_f_8h.html" title="AP_GPS_SIRF.h" alt="" coords="1600,315,1717,344"/><area shape="rect" id="node74" href="_a_p___g_p_s__406_8h.html" title="AP_GPS_406.h" alt="" coords="1607,237,1721,267"/><area shape="rect" id="node77" href="_a_p___g_p_s___u_b_l_o_x_8h.html" title="AP_GPS_UBLOX.h" alt="" coords="1947,315,2080,344"/><area shape="rect" id="node80" href="_a_p___g_p_s___m_t_k_8h.html" title="AP_GPS_MTK.h" alt="" coords="1308,237,1425,267"/><area shape="rect" id="node85" href="_a_p___g_p_s___m_t_k16_8h.html" title="AP_GPS_MTK16.h" alt="" coords="1449,237,1583,267"/><area shape="rect" id="node89" href="_a_p___g_p_s___none_8h.html" title="AP_GPS_None.h" alt="" coords="1159,237,1284,267"/><area shape="rect" id="node92" href="_a_p___g_p_s___auto_8h.html" title="AP_GPS_Auto.h" alt="" coords="1012,237,1135,267"/><area shape="rect" id="node96" href="_a_p___g_p_s___h_i_l_8h.html" title="AP_GPS_HIL.h" alt="" coords="1796,237,1908,267"/><area shape="rect" id="node67" href="_g_p_s_8h.html" title="Interface definition for the various GPS drivers." alt="" coords="1532,392,1593,421"/><area shape="rect" id="node83" href="_a_p___g_p_s___m_t_k___common_8h.html" title="AP_GPS_MTK_Common.h" alt="" coords="1341,315,1525,344"/></map>
</div>
<div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___d_c_m_8h__dep__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___d_c_m_2_a_p___d_c_m_8hdep" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___d_c_m_2_a_p___d_c_m_8hdep" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___d_c_m_2_a_p___d_c_m_8hdep">
<area shape="rect" id="node3" href="_a_p___d_c_m_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.cpp" alt="" coords="5,83,397,112"/></map>
</div>
<p><a href="_a_p___d_c_m_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___d_c_m.html">AP_DCM</a></td></tr>
</table>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:34 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,3 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_a_p___d_c_m_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.cpp" alt="" coords="5,83,397,112"/>
</map>

View File

@ -0,0 +1 @@
d2480cd75567c2da4422fb8fb3cde690

View File

@ -0,0 +1,30 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_a_p___d_c_m___h_i_l_8h.html" title="AP_DCM_HIL.h" alt="" coords="515,83,629,112"/>
<area shape="rect" id="node5" href="$_fast_serial_8h.html" title="FastSerial.h" alt="" coords="996,315,1092,344"/>
<area shape="rect" id="node21" href="$_a_p___math_8h.html" title="AP_Math.h" alt="" coords="343,469,433,499"/>
<area shape="rect" id="node36" href="$_w_program_8h.html" title="WProgram.h" alt="" coords="355,315,453,344"/>
<area shape="rect" id="node38" href="$_a_p___compass_8h.html" title="Catch&#45;all header that defines all supported compass classes." alt="" coords="232,160,349,189"/>
<area shape="rect" id="node54" href="$_a_p___a_d_c_8h.html" title="AP_ADC.h" alt="" coords="811,315,896,344"/>
<area shape="rect" id="node63" href="$_a_p___g_p_s_8h.html" title="Catch&#45;all header that defines all supported GPS classes." alt="" coords="1473,160,1559,189"/>
<area shape="rect" id="node99" href="$_a_p___i_m_u_8h.html" title="AP_IMU.h" alt="" coords="601,237,684,267"/>
<area shape="rect" id="node15" href="$_better_stream_8h.html" title="BetterStream.h" alt="" coords="1380,392,1503,421"/>
<area shape="rect" id="node23" href="$vector2_8h.html" title="vector2.h" alt="" coords="268,624,351,653"/>
<area shape="rect" id="node27" href="$vector3_8h.html" title="vector3.h" alt="" coords="375,624,457,653"/>
<area shape="rect" id="node32" href="$matrix3_8h.html" title="matrix3.h" alt="" coords="347,547,429,576"/>
<area shape="rect" id="node40" href="$_a_p___compass___h_m_c5843_8h.html" title="AP_Compass_HMC5843.h" alt="" coords="93,315,280,344"/>
<area shape="rect" id="node49" href="$_a_p___compass___h_i_l_8h.html" title="AP_Compass_HIL.h" alt="" coords="212,237,356,267"/>
<area shape="rect" id="node42" href="$_compass_8h.html" title="Compass.h" alt="" coords="271,392,364,421"/>
<area shape="rect" id="node56" href="$_a_p___a_d_c___a_d_s7844_8h.html" title="AP_ADC_ADS7844.h" alt="" coords="783,392,935,421"/>
<area shape="rect" id="node59" href="$_a_p___a_d_c___h_i_l_8h.html" title="AP_ADC_HIL.h" alt="" coords="647,392,759,421"/>
<area shape="rect" id="node65" href="$_a_p___g_p_s___n_m_e_a_8h.html" title="AP_GPS_NMEA.h" alt="" coords="1792,315,1923,344"/>
<area shape="rect" id="node71" href="$_a_p___g_p_s___s_i_r_f_8h.html" title="AP_GPS_SIRF.h" alt="" coords="1600,315,1717,344"/>
<area shape="rect" id="node74" href="$_a_p___g_p_s__406_8h.html" title="AP_GPS_406.h" alt="" coords="1607,237,1721,267"/>
<area shape="rect" id="node77" href="$_a_p___g_p_s___u_b_l_o_x_8h.html" title="AP_GPS_UBLOX.h" alt="" coords="1947,315,2080,344"/>
<area shape="rect" id="node80" href="$_a_p___g_p_s___m_t_k_8h.html" title="AP_GPS_MTK.h" alt="" coords="1308,237,1425,267"/>
<area shape="rect" id="node85" href="$_a_p___g_p_s___m_t_k16_8h.html" title="AP_GPS_MTK16.h" alt="" coords="1449,237,1583,267"/>
<area shape="rect" id="node89" href="$_a_p___g_p_s___none_8h.html" title="AP_GPS_None.h" alt="" coords="1159,237,1284,267"/>
<area shape="rect" id="node92" href="$_a_p___g_p_s___auto_8h.html" title="AP_GPS_Auto.h" alt="" coords="1012,237,1135,267"/>
<area shape="rect" id="node96" href="$_a_p___g_p_s___h_i_l_8h.html" title="AP_GPS_HIL.h" alt="" coords="1796,237,1908,267"/>
<area shape="rect" id="node67" href="$_g_p_s_8h.html" title="Interface definition for the various GPS drivers." alt="" coords="1532,392,1593,421"/>
<area shape="rect" id="node83" href="$_a_p___g_p_s___m_t_k___common_8h.html" title="AP_GPS_MTK_Common.h" alt="" coords="1341,315,1525,344"/>
</map>

View File

@ -0,0 +1 @@
1b5fddbd667735da5fa8a2b3834a67fa

View File

@ -0,0 +1,145 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.h</h1> </div>
</div>
<div class="contents">
<a href="_a_p___d_c_m_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef AP_DCM_h</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define AP_DCM_h</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="comment">// teporarily include all other classes here</span>
<a name="l00005"></a>00005 <span class="comment">// since this naming is a bit off from the</span>
<a name="l00006"></a>00006 <span class="comment">// convention and the AP_DCM should be the top</span>
<a name="l00007"></a>00007 <span class="comment">// header file</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &quot;<a class="code" href="_a_p___d_c_m___h_i_l_8h.html">AP_DCM_HIL.h</a>&quot;</span>
<a name="l00009"></a>00009
<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;<a class="code" href="_fast_serial_8h.html">FastSerial.h</a>&gt;</span>
<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;<a class="code" href="_a_p___math_8h.html">AP_Math.h</a>&gt;</span>
<a name="l00012"></a><a class="code" href="class_a_p___d_c_m.html#a479079725c0a9fc59ed87a802ffa14ed">00012</a> <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;<a class="code" href="_w_program_8h.html">WProgram.h</a>&quot;</span>
<a name="l00014"></a>00014 <span class="preprocessor">#include &lt;<a class="code" href="_a_p___compass_8h.html" title="Catch-all header that defines all supported compass classes.">AP_Compass.h</a>&gt;</span>
<a name="l00015"></a>00015 <span class="preprocessor">#include &lt;<a class="code" href="_a_p___a_d_c_8h.html">AP_ADC.h</a>&gt;</span>
<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;<a class="code" href="_a_p___g_p_s_8h.html" title="Catch-all header that defines all supported GPS classes.">AP_GPS.h</a>&gt;</span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;<a class="code" href="_a_p___i_m_u_8h.html">AP_IMU.h</a>&gt;</span>
<a name="l00018"></a>00018
<a name="l00019"></a>00019
<a name="l00020"></a><a class="code" href="class_a_p___d_c_m.html">00020</a> <span class="keyword">class </span><a class="code" href="class_a_p___d_c_m.html">AP_DCM</a>
<a name="l00021"></a>00021 {
<a name="l00022"></a>00022 <span class="keyword">public</span>:
<a name="l00023"></a><a class="code" href="class_a_p___d_c_m.html#af6e7aafc6c3a5876eac31a26c37df1e8">00023</a> <span class="comment">// Constructors</span>
<a name="l00024"></a>00024 <a class="code" href="class_a_p___d_c_m.html#a479079725c0a9fc59ed87a802ffa14ed">AP_DCM</a>(<a class="code" href="class_a_p___i_m_u.html">AP_IMU</a> *imu, <a class="code" href="class_g_p_s.html" title="Abstract base class for GPS receiver drivers.">GPS</a> *gps) :
<a name="l00025"></a>00025 _imu(imu),
<a name="l00026"></a>00026 _gps(gps),
<a name="l00027"></a>00027 _compass(0),
<a name="l00028"></a>00028 _dcm_matrix(1, 0, 0,
<a name="l00029"></a>00029 0, 1, 0,
<a name="l00030"></a>00030 0, 0, 1),
<a name="l00031"></a>00031 _course_over_ground_x(0),
<a name="l00032"></a>00032 _course_over_ground_y(1)
<a name="l00033"></a>00033 {}
<a name="l00034"></a>00034
<a name="l00035"></a><a class="code" href="class_a_p___d_c_m.html#a26e4515d100903df7d801891b75cdfc2">00035</a> <a class="code" href="class_a_p___d_c_m.html#a479079725c0a9fc59ed87a802ffa14ed">AP_DCM</a>(<a class="code" href="class_a_p___i_m_u.html">AP_IMU</a> *imu, <a class="code" href="class_g_p_s.html" title="Abstract base class for GPS receiver drivers.">GPS</a> *gps, <a class="code" href="class_compass.html">Compass</a> *withCompass) :
<a name="l00036"></a><a class="code" href="class_a_p___d_c_m.html#a2c03c18b2b80fc5c9cbbd0f3205e0459">00036</a> _imu(imu),
<a name="l00037"></a><a class="code" href="class_a_p___d_c_m.html#a8472ebe5394725ce4231cec96d452988">00037</a> _gps(gps),
<a name="l00038"></a><a class="code" href="class_a_p___d_c_m.html#ae6866e8b88a8bf3bda59037cc95c2061">00038</a> _compass(withCompass),
<a name="l00039"></a>00039 _dcm_matrix(1, 0, 0,
<a name="l00040"></a>00040 0, 1, 0,
<a name="l00041"></a>00041 0, 0, 1),
<a name="l00042"></a>00042 _course_over_ground_x(0),
<a name="l00043"></a>00043 _course_over_ground_y(1)
<a name="l00044"></a>00044 {}
<a name="l00045"></a>00045
<a name="l00046"></a>00046 <span class="comment">// Accessors</span>
<a name="l00047"></a>00047 <a class="code" href="class_vector3.html">Vector3f</a> <a class="code" href="class_a_p___d_c_m.html#a26e4515d100903df7d801891b75cdfc2">get_gyro</a>(<span class="keywordtype">void</span>) {<span class="keywordflow">return</span> _omega_integ_corr; } <span class="comment">// We return the raw gyro vector corrected for bias</span>
<a name="l00048"></a><a class="code" href="class_a_p___d_c_m.html#a0bb05c5d94979b86aca523b9d924dcda">00048</a> <a class="code" href="class_vector3.html">Vector3f</a> <a class="code" href="class_a_p___d_c_m.html#a2c03c18b2b80fc5c9cbbd0f3205e0459">get_accel</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> _accel_vector; }
<a name="l00049"></a><a class="code" href="class_a_p___d_c_m.html#adf141fbe2398c902c2f1e400c265a1aa">00049</a> <a class="code" href="class_matrix3.html">Matrix3f</a> <a class="code" href="class_a_p___d_c_m.html#a8472ebe5394725ce4231cec96d452988">get_dcm_matrix</a>(<span class="keywordtype">void</span>) {<span class="keywordflow">return</span> _dcm_matrix; }
<a name="l00050"></a><a class="code" href="class_a_p___d_c_m.html#a9e24af31523858a17ddbd800f35ed25b">00050</a> <a class="code" href="class_matrix3.html">Matrix3f</a> <a class="code" href="class_a_p___d_c_m.html#ae6866e8b88a8bf3bda59037cc95c2061">get_dcm_transposed</a>(<span class="keywordtype">void</span>) {<a class="code" href="class_matrix3.html">Matrix3f</a> temp = _dcm_matrix; <span class="keywordflow">return</span> temp.<a class="code" href="class_matrix3.html#a689b1ae3ea245ef3da02ed40941e130b">transpose</a>();}
<a name="l00051"></a>00051
<a name="l00052"></a><a class="code" href="class_a_p___d_c_m.html#a9793adc8a62cbc21439aef2b19259a39">00052</a> <span class="keywordtype">void</span> <a class="code" href="class_a_p___d_c_m.html#a680fa13a3114ece0d0f3019e06d8617e">set_centripetal</a>(<span class="keywordtype">bool</span> b);
<a name="l00053"></a><a class="code" href="class_a_p___d_c_m.html#a175109cd6b70bc290a7779174a88b42a">00053</a> <span class="keywordtype">void</span> <a class="code" href="class_a_p___d_c_m.html#adc0ecb44c04652f3696e62be5eb4ebd1">set_compass</a>(<a class="code" href="class_compass.html">Compass</a> *compass);
<a name="l00054"></a><a class="code" href="class_a_p___d_c_m.html#abddbee0f81d02d51ee91f57addedc266">00054</a>
<a name="l00055"></a>00055 <span class="comment">// Methods</span>
<a name="l00056"></a><a class="code" href="class_a_p___d_c_m.html#a8ba0327e56c9d591070b93a72216041a">00056</a> <span class="keywordtype">void</span> <a class="code" href="class_a_p___d_c_m.html#a9188cdc31e905c85a5f14dcdb063720b">update_DCM</a>(<span class="keywordtype">float</span> _G_Dt);
<a name="l00057"></a><a class="code" href="class_a_p___d_c_m.html#ad724a2a16817d25dc95b16dc48f28ef4">00057</a>
<a name="l00058"></a><a class="code" href="class_a_p___d_c_m.html#ae518c49e92751f43af3f1b7457254e13">00058</a> <span class="keywordtype">float</span> <a class="code" href="class_a_p___d_c_m.html#a74d43cf5fd575ccdedf92eb1c2572417">get_health</a>(<span class="keywordtype">void</span>);
<a name="l00059"></a>00059
<a name="l00060"></a>00060 <span class="keywordtype">long</span> <a class="code" href="class_a_p___d_c_m.html#a0bb05c5d94979b86aca523b9d924dcda">roll_sensor</a>; <span class="comment">// Degrees * 100</span>
<a name="l00061"></a>00061 <span class="keywordtype">long</span> <a class="code" href="class_a_p___d_c_m.html#adf141fbe2398c902c2f1e400c265a1aa">pitch_sensor</a>; <span class="comment">// Degrees * 100</span>
<a name="l00062"></a>00062 <span class="keywordtype">long</span> <a class="code" href="class_a_p___d_c_m.html#a9e24af31523858a17ddbd800f35ed25b">yaw_sensor</a>; <span class="comment">// Degrees * 100</span>
<a name="l00063"></a>00063
<a name="l00064"></a>00064 <span class="keywordtype">float</span> <a class="code" href="class_a_p___d_c_m.html#a9793adc8a62cbc21439aef2b19259a39">roll</a>; <span class="comment">// Radians</span>
<a name="l00065"></a>00065 <span class="keywordtype">float</span> <a class="code" href="class_a_p___d_c_m.html#a175109cd6b70bc290a7779174a88b42a">pitch</a>; <span class="comment">// Radians</span>
<a name="l00066"></a>00066 <span class="keywordtype">float</span> <a class="code" href="class_a_p___d_c_m.html#abddbee0f81d02d51ee91f57addedc266">yaw</a>; <span class="comment">// Radians</span>
<a name="l00067"></a>00067
<a name="l00068"></a>00068 uint8_t <a class="code" href="class_a_p___d_c_m.html#a8ba0327e56c9d591070b93a72216041a">gyro_sat_count</a>;
<a name="l00069"></a>00069 uint8_t <a class="code" href="class_a_p___d_c_m.html#ad724a2a16817d25dc95b16dc48f28ef4">renorm_sqrt_count</a>;
<a name="l00070"></a>00070 uint8_t <a class="code" href="class_a_p___d_c_m.html#ae518c49e92751f43af3f1b7457254e13">renorm_blowup_count</a>;
<a name="l00071"></a>00071
<a name="l00072"></a>00072 <span class="keyword">private</span>:
<a name="l00073"></a>00073 <span class="comment">// Methods</span>
<a name="l00074"></a>00074 <span class="keywordtype">void</span> read_adc_raw(<span class="keywordtype">void</span>);
<a name="l00075"></a>00075 <span class="keywordtype">void</span> accel_adjust(<span class="keywordtype">void</span>);
<a name="l00076"></a>00076 <span class="keywordtype">float</span> read_adc(<span class="keywordtype">int</span> select);
<a name="l00077"></a>00077 <span class="keywordtype">void</span> matrix_update(<span class="keywordtype">float</span> _G_Dt);
<a name="l00078"></a>00078 <span class="keywordtype">void</span> normalize(<span class="keywordtype">void</span>);
<a name="l00079"></a>00079 <a class="code" href="class_vector3.html">Vector3f</a> renorm(<a class="code" href="class_vector3.html">Vector3f</a> <span class="keyword">const</span> &amp;a, <span class="keywordtype">int</span> &amp;problem);
<a name="l00080"></a>00080 <span class="keywordtype">void</span> drift_correction(<span class="keywordtype">void</span>);
<a name="l00081"></a>00081 <span class="keywordtype">void</span> euler_angles(<span class="keywordtype">void</span>);
<a name="l00082"></a>00082
<a name="l00083"></a>00083 <span class="comment">// members</span>
<a name="l00084"></a>00084 <a class="code" href="class_compass.html">Compass</a> * _compass;
<a name="l00085"></a>00085 <a class="code" href="class_g_p_s.html" title="Abstract base class for GPS receiver drivers.">GPS</a> * _gps;
<a name="l00086"></a>00086 <a class="code" href="class_a_p___i_m_u.html">AP_IMU</a> * _imu;
<a name="l00087"></a>00087
<a name="l00088"></a>00088 <a class="code" href="class_matrix3.html">Matrix3f</a> _dcm_matrix;
<a name="l00089"></a>00089
<a name="l00090"></a>00090 <a class="code" href="class_vector3.html">Vector3f</a> _accel_vector; <span class="comment">// Store the acceleration in a vector</span>
<a name="l00091"></a>00091 <a class="code" href="class_vector3.html">Vector3f</a> _gyro_vector; <span class="comment">// Store the gyros turn rate in a vector</span>
<a name="l00092"></a>00092 <a class="code" href="class_vector3.html">Vector3f</a> _omega_P; <span class="comment">// Omega Proportional correction</span>
<a name="l00093"></a>00093 <a class="code" href="class_vector3.html">Vector3f</a> _omega_I; <span class="comment">// Omega Integrator correction</span>
<a name="l00094"></a>00094 <a class="code" href="class_vector3.html">Vector3f</a> _omega_integ_corr; <span class="comment">// Partially corrected Gyro_Vector data - used for centrepetal correction </span>
<a name="l00095"></a>00095 <a class="code" href="class_vector3.html">Vector3f</a> _omega; <span class="comment">// Corrected Gyro_Vector data</span>
<a name="l00096"></a>00096 <a class="code" href="class_vector3.html">Vector3f</a> _error_roll_pitch;
<a name="l00097"></a>00097 <a class="code" href="class_vector3.html">Vector3f</a> _error_yaw;
<a name="l00098"></a>00098 <span class="keywordtype">float</span> _errorCourse;
<a name="l00099"></a>00099 <span class="keywordtype">float</span> _course_over_ground_x; <span class="comment">// Course overground X axis</span>
<a name="l00100"></a>00100 <span class="keywordtype">float</span> _course_over_ground_y; <span class="comment">// Course overground Y axis</span>
<a name="l00101"></a>00101 <span class="keywordtype">float</span> _health;
<a name="l00102"></a>00102 <span class="keywordtype">bool</span> _centripetal;
<a name="l00103"></a>00103 };
<a name="l00104"></a>00104
<a name="l00105"></a>00105 <span class="preprocessor">#endif</span>
<a name="l00106"></a>00106 <span class="preprocessor"></span>
<a name="l00107"></a>00107
<a name="l00108"></a>00108
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:33 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,96 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#define-members">Defines</a> </div>
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.cpp File Reference</h1> </div>
</div>
<div class="contents">
<code>#include &lt;<a class="el" href="_a_p___d_c_m___h_i_l_8h_source.html">AP_DCM_HIL.h</a>&gt;</code><br/>
<div class="dynheader">
Include dependency graph for AP_DCM_HIL.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___d_c_m___h_i_l_8cpp__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___d_c_m_2_a_p___d_c_m___h_i_l_8cpp" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___d_c_m_2_a_p___d_c_m___h_i_l_8cpp" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___d_c_m_2_a_p___d_c_m___h_i_l_8cpp">
<area shape="rect" id="node3" href="_a_p___d_c_m___h_i_l_8h.html" title="AP_DCM_HIL.h" alt="" coords="543,83,657,112"/><area shape="rect" id="node5" href="_fast_serial_8h.html" title="FastSerial.h" alt="" coords="947,315,1043,344"/><area shape="rect" id="node21" href="_a_p___math_8h.html" title="AP_Math.h" alt="" coords="240,469,331,499"/><area shape="rect" id="node36" href="_w_program_8h.html" title="WProgram.h" alt="" coords="388,315,487,344"/><area shape="rect" id="node38" href="_a_p___compass_8h.html" title="Catch&#45;all header that defines all supported compass classes." alt="" coords="292,160,409,189"/><area shape="rect" id="node54" href="_a_p___a_d_c_8h.html" title="AP_ADC.h" alt="" coords="655,315,740,344"/><area shape="rect" id="node63" href="_a_p___g_p_s_8h.html" title="Catch&#45;all header that defines all supported GPS classes." alt="" coords="1453,160,1539,189"/><area shape="rect" id="node99" href="_a_p___i_m_u_8h.html" title="AP_IMU.h" alt="" coords="663,237,745,267"/><area shape="rect" id="node15" href="_better_stream_8h.html" title="BetterStream.h" alt="" coords="1348,392,1471,421"/><area shape="rect" id="node23" href="vector2_8h.html" title="vector2.h" alt="" coords="165,624,248,653"/><area shape="rect" id="node27" href="vector3_8h.html" title="vector3.h" alt="" coords="272,624,355,653"/><area shape="rect" id="node32" href="matrix3_8h.html" title="matrix3.h" alt="" coords="244,547,327,576"/><area shape="rect" id="node40" href="_a_p___compass___h_m_c5843_8h.html" title="AP_Compass_HMC5843.h" alt="" coords="127,315,313,344"/><area shape="rect" id="node49" href="_a_p___compass___h_i_l_8h.html" title="AP_Compass_HIL.h" alt="" coords="279,237,423,267"/><area shape="rect" id="node42" href="_compass_8h.html" title="Compass.h" alt="" coords="239,392,332,421"/><area shape="rect" id="node56" href="_a_p___a_d_c___a_d_s7844_8h.html" title="AP_ADC_ADS7844.h" alt="" coords="612,392,764,421"/><area shape="rect" id="node59" href="_a_p___a_d_c___h_i_l_8h.html" title="AP_ADC_HIL.h" alt="" coords="788,392,900,421"/><area shape="rect" id="node65" href="_a_p___g_p_s___n_m_e_a_8h.html" title="AP_GPS_NMEA.h" alt="" coords="1691,315,1821,344"/><area shape="rect" id="node71" href="_a_p___g_p_s___s_i_r_f_8h.html" title="AP_GPS_SIRF.h" alt="" coords="1845,315,1963,344"/><area shape="rect" id="node74" href="_a_p___g_p_s__406_8h.html" title="AP_GPS_406.h" alt="" coords="1847,237,1961,267"/><area shape="rect" id="node77" href="_a_p___g_p_s___u_b_l_o_x_8h.html" title="AP_GPS_UBLOX.h" alt="" coords="1117,315,1251,344"/><area shape="rect" id="node80" href="_a_p___g_p_s___m_t_k_8h.html" title="AP_GPS_MTK.h" alt="" coords="1212,237,1329,267"/><area shape="rect" id="node85" href="_a_p___g_p_s___m_t_k16_8h.html" title="AP_GPS_MTK16.h" alt="" coords="1353,237,1487,267"/><area shape="rect" id="node89" href="_a_p___g_p_s___none_8h.html" title="AP_GPS_None.h" alt="" coords="1511,237,1636,267"/><area shape="rect" id="node92" href="_a_p___g_p_s___auto_8h.html" title="AP_GPS_Auto.h" alt="" coords="1015,237,1137,267"/><area shape="rect" id="node96" href="_a_p___g_p_s___h_i_l_8h.html" title="AP_GPS_HIL.h" alt="" coords="1660,237,1772,267"/><area shape="rect" id="node67" href="_g_p_s_8h.html" title="Interface definition for the various GPS drivers." alt="" coords="1508,392,1569,421"/><area shape="rect" id="node83" href="_a_p___g_p_s___m_t_k___common_8h.html" title="AP_GPS_MTK_Common.h" alt="" coords="1325,315,1509,344"/></map>
</div>
<p><a href="_a_p___d_c_m___h_i_l_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___d_c_m___h_i_l_8cpp.html#a728f9499baea61e7df3ae70a374f2512">ToRad</a>(x)&nbsp;&nbsp;&nbsp;(x*0.01745329252)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___d_c_m___h_i_l_8cpp.html#a3c9d151923236c7e8ccccf86f131e550">ToDeg</a>(x)&nbsp;&nbsp;&nbsp;(x*57.2957795131)</td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a3c9d151923236c7e8ccccf86f131e550"></a><!-- doxytag: member="AP_DCM_HIL.cpp::ToDeg" ref="a3c9d151923236c7e8ccccf86f131e550" args="(x)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ToDeg</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">x</td>
<td>&nbsp;)&nbsp;</td>
<td>&nbsp;&nbsp;&nbsp;(x*57.2957795131)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___d_c_m___h_i_l_8cpp_source.html#l00020">20</a> of file <a class="el" href="_a_p___d_c_m___h_i_l_8cpp_source.html">AP_DCM_HIL.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a728f9499baea61e7df3ae70a374f2512"></a><!-- doxytag: member="AP_DCM_HIL.cpp::ToRad" ref="a728f9499baea61e7df3ae70a374f2512" args="(x)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ToRad</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">x</td>
<td>&nbsp;)&nbsp;</td>
<td>&nbsp;&nbsp;&nbsp;(x*0.01745329252)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_a_p___d_c_m___h_i_l_8cpp_source.html#l00019">19</a> of file <a class="el" href="_a_p___d_c_m___h_i_l_8cpp_source.html">AP_DCM_HIL.cpp</a>.</p>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:34 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,30 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_a_p___d_c_m___h_i_l_8h.html" title="AP_DCM_HIL.h" alt="" coords="543,83,657,112"/>
<area shape="rect" id="node5" href="$_fast_serial_8h.html" title="FastSerial.h" alt="" coords="947,315,1043,344"/>
<area shape="rect" id="node21" href="$_a_p___math_8h.html" title="AP_Math.h" alt="" coords="240,469,331,499"/>
<area shape="rect" id="node36" href="$_w_program_8h.html" title="WProgram.h" alt="" coords="388,315,487,344"/>
<area shape="rect" id="node38" href="$_a_p___compass_8h.html" title="Catch&#45;all header that defines all supported compass classes." alt="" coords="292,160,409,189"/>
<area shape="rect" id="node54" href="$_a_p___a_d_c_8h.html" title="AP_ADC.h" alt="" coords="655,315,740,344"/>
<area shape="rect" id="node63" href="$_a_p___g_p_s_8h.html" title="Catch&#45;all header that defines all supported GPS classes." alt="" coords="1453,160,1539,189"/>
<area shape="rect" id="node99" href="$_a_p___i_m_u_8h.html" title="AP_IMU.h" alt="" coords="663,237,745,267"/>
<area shape="rect" id="node15" href="$_better_stream_8h.html" title="BetterStream.h" alt="" coords="1348,392,1471,421"/>
<area shape="rect" id="node23" href="$vector2_8h.html" title="vector2.h" alt="" coords="165,624,248,653"/>
<area shape="rect" id="node27" href="$vector3_8h.html" title="vector3.h" alt="" coords="272,624,355,653"/>
<area shape="rect" id="node32" href="$matrix3_8h.html" title="matrix3.h" alt="" coords="244,547,327,576"/>
<area shape="rect" id="node40" href="$_a_p___compass___h_m_c5843_8h.html" title="AP_Compass_HMC5843.h" alt="" coords="127,315,313,344"/>
<area shape="rect" id="node49" href="$_a_p___compass___h_i_l_8h.html" title="AP_Compass_HIL.h" alt="" coords="279,237,423,267"/>
<area shape="rect" id="node42" href="$_compass_8h.html" title="Compass.h" alt="" coords="239,392,332,421"/>
<area shape="rect" id="node56" href="$_a_p___a_d_c___a_d_s7844_8h.html" title="AP_ADC_ADS7844.h" alt="" coords="612,392,764,421"/>
<area shape="rect" id="node59" href="$_a_p___a_d_c___h_i_l_8h.html" title="AP_ADC_HIL.h" alt="" coords="788,392,900,421"/>
<area shape="rect" id="node65" href="$_a_p___g_p_s___n_m_e_a_8h.html" title="AP_GPS_NMEA.h" alt="" coords="1691,315,1821,344"/>
<area shape="rect" id="node71" href="$_a_p___g_p_s___s_i_r_f_8h.html" title="AP_GPS_SIRF.h" alt="" coords="1845,315,1963,344"/>
<area shape="rect" id="node74" href="$_a_p___g_p_s__406_8h.html" title="AP_GPS_406.h" alt="" coords="1847,237,1961,267"/>
<area shape="rect" id="node77" href="$_a_p___g_p_s___u_b_l_o_x_8h.html" title="AP_GPS_UBLOX.h" alt="" coords="1117,315,1251,344"/>
<area shape="rect" id="node80" href="$_a_p___g_p_s___m_t_k_8h.html" title="AP_GPS_MTK.h" alt="" coords="1212,237,1329,267"/>
<area shape="rect" id="node85" href="$_a_p___g_p_s___m_t_k16_8h.html" title="AP_GPS_MTK16.h" alt="" coords="1353,237,1487,267"/>
<area shape="rect" id="node89" href="$_a_p___g_p_s___none_8h.html" title="AP_GPS_None.h" alt="" coords="1511,237,1636,267"/>
<area shape="rect" id="node92" href="$_a_p___g_p_s___auto_8h.html" title="AP_GPS_Auto.h" alt="" coords="1015,237,1137,267"/>
<area shape="rect" id="node96" href="$_a_p___g_p_s___h_i_l_8h.html" title="AP_GPS_HIL.h" alt="" coords="1660,237,1772,267"/>
<area shape="rect" id="node67" href="$_g_p_s_8h.html" title="Interface definition for the various GPS drivers." alt="" coords="1508,392,1569,421"/>
<area shape="rect" id="node83" href="$_a_p___g_p_s___m_t_k___common_8h.html" title="AP_GPS_MTK_Common.h" alt="" coords="1325,315,1509,344"/>
</map>

View File

@ -0,0 +1 @@
9b47aac59f5ac50ef321472a58b8e057

View File

@ -0,0 +1,90 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.cpp</h1> </div>
</div>
<div class="contents">
<a href="_a_p___d_c_m___h_i_l_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> APM_DCM_HIL.cpp - DCM AHRS Library, for Ardupilot Mega, Hardware in the Loop Model</span>
<a name="l00003"></a>00003 <span class="comment"> Code by James Goppert. DIYDrones.com</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment"> This library is free software; you can redistribute it and/or</span>
<a name="l00006"></a>00006 <span class="comment"> modify it under the terms of the GNU Lesser General Public</span>
<a name="l00007"></a>00007 <span class="comment"> License as published by the Free Software Foundation; either</span>
<a name="l00008"></a>00008 <span class="comment"> version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment"> Methods:</span>
<a name="l00011"></a>00011 <span class="comment"> update_DCM(_G_Dt) : Updates the AHRS by integrating the rotation matrix over time _G_Dt using the IMU object data</span>
<a name="l00012"></a>00012 <span class="comment"> get_gyro() : Returns gyro vector corrected for bias</span>
<a name="l00013"></a>00013 <span class="comment"> get_accel() : Returns accelerometer vector</span>
<a name="l00014"></a>00014 <span class="comment"> get_dcm_matrix() : Returns dcm matrix</span>
<a name="l00015"></a>00015 <span class="comment"></span>
<a name="l00016"></a>00016 <span class="comment">*/</span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;<a class="code" href="_a_p___d_c_m___h_i_l_8h.html">AP_DCM_HIL.h</a>&gt;</span>
<a name="l00018"></a>00018
<a name="l00019"></a><a class="code" href="_a_p___d_c_m___h_i_l_8cpp.html#a728f9499baea61e7df3ae70a374f2512">00019</a> <span class="preprocessor">#define ToRad(x) (x*0.01745329252) // *pi/180</span>
<a name="l00020"></a><a class="code" href="_a_p___d_c_m___h_i_l_8cpp.html#a3c9d151923236c7e8ccccf86f131e550">00020</a> <span class="preprocessor"></span><span class="preprocessor">#define ToDeg(x) (x*57.2957795131) // *180/pi</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span>
<a name="l00022"></a>00022 <span class="comment">/**************************************************/</span>
<a name="l00023"></a>00023 <span class="keywordtype">void</span>
<a name="l00024"></a><a class="code" href="class_a_p___d_c_m___h_i_l.html#a37a3ab07ddbb929f0b9feaa929a1c8ad">00024</a> <a class="code" href="class_a_p___d_c_m___h_i_l.html#a37a3ab07ddbb929f0b9feaa929a1c8ad">AP_DCM_HIL::setHil</a>(<span class="keywordtype">float</span> _roll, <span class="keywordtype">float</span> _pitch, <span class="keywordtype">float</span> _yaw,
<a name="l00025"></a>00025 <span class="keywordtype">float</span> _rollRate, <span class="keywordtype">float</span> _pitchRate, <span class="keywordtype">float</span> _yawRate)
<a name="l00026"></a>00026 {
<a name="l00027"></a>00027 <a class="code" href="class_a_p___d_c_m___h_i_l.html#a48374fe931275819ad81c56480705856">roll</a> = _roll;
<a name="l00028"></a>00028 <a class="code" href="class_a_p___d_c_m___h_i_l.html#a943d62d6b442ae69c975228c180bdedf">pitch</a> = _pitch;
<a name="l00029"></a>00029 <a class="code" href="class_a_p___d_c_m___h_i_l.html#aa17233338e8c57385cde7eed8658aa83">yaw</a> = _yaw;
<a name="l00030"></a>00030
<a name="l00031"></a>00031 _omega_integ_corr.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> = _rollRate;
<a name="l00032"></a>00032 _omega_integ_corr.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a> = _pitchRate;
<a name="l00033"></a>00033 _omega_integ_corr.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a> = _yawRate;
<a name="l00034"></a>00034
<a name="l00035"></a>00035 <a class="code" href="class_a_p___d_c_m___h_i_l.html#abb27e978801ab981ff086967e87c197b">roll_sensor</a> =<a class="code" href="_a_p___d_c_m___h_i_l_8cpp.html#a3c9d151923236c7e8ccccf86f131e550">ToDeg</a>(<a class="code" href="class_a_p___d_c_m___h_i_l.html#a48374fe931275819ad81c56480705856">roll</a>)*100;
<a name="l00036"></a>00036 <a class="code" href="class_a_p___d_c_m___h_i_l.html#a45dc357f5c4fb707108da596e64fdb27">pitch_sensor</a> =<a class="code" href="_a_p___d_c_m___h_i_l_8cpp.html#a3c9d151923236c7e8ccccf86f131e550">ToDeg</a>(<a class="code" href="class_a_p___d_c_m___h_i_l.html#a943d62d6b442ae69c975228c180bdedf">pitch</a>)*100;
<a name="l00037"></a>00037 <a class="code" href="class_a_p___d_c_m___h_i_l.html#a430a2f9d7ba400bd6a75a6027bae4364">yaw_sensor</a> =<a class="code" href="_a_p___d_c_m___h_i_l_8cpp.html#a3c9d151923236c7e8ccccf86f131e550">ToDeg</a>(<a class="code" href="class_a_p___d_c_m___h_i_l.html#aa17233338e8c57385cde7eed8658aa83">yaw</a>)*100;
<a name="l00038"></a>00038
<a name="l00039"></a>00039 <span class="comment">// Need the standard C_body&lt;-nav dcm from navigation frame to body frame</span>
<a name="l00040"></a>00040 <span class="comment">// Strapdown Inertial Navigation Technology / Titterton/ pg. 41</span>
<a name="l00041"></a>00041 <span class="keywordtype">float</span> sRoll = sin(<a class="code" href="class_a_p___d_c_m___h_i_l.html#a48374fe931275819ad81c56480705856">roll</a>), cRoll = cos(<a class="code" href="class_a_p___d_c_m___h_i_l.html#a48374fe931275819ad81c56480705856">roll</a>);
<a name="l00042"></a>00042 <span class="keywordtype">float</span> sPitch = sin(<a class="code" href="class_a_p___d_c_m___h_i_l.html#a943d62d6b442ae69c975228c180bdedf">pitch</a>), cPitch = cos(<a class="code" href="class_a_p___d_c_m___h_i_l.html#a943d62d6b442ae69c975228c180bdedf">pitch</a>);
<a name="l00043"></a>00043 <span class="keywordtype">float</span> sYaw = sin(<a class="code" href="class_a_p___d_c_m___h_i_l.html#aa17233338e8c57385cde7eed8658aa83">yaw</a>), cYaw = cos(<a class="code" href="class_a_p___d_c_m___h_i_l.html#aa17233338e8c57385cde7eed8658aa83">yaw</a>);
<a name="l00044"></a>00044 _dcm_matrix.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> = cPitch*cYaw;
<a name="l00045"></a>00045 _dcm_matrix.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a> = cPitch*sYaw;
<a name="l00046"></a>00046 _dcm_matrix.<a class="code" href="class_matrix3.html#acd7bf3421047fa155168a9c8e5164a2b">a</a>.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a> = -sPitch;
<a name="l00047"></a>00047 _dcm_matrix.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> = -cRoll*sYaw+sRoll*sPitch*cYaw;
<a name="l00048"></a>00048 _dcm_matrix.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a> = cRoll*cYaw+sRoll*sPitch*sYaw;
<a name="l00049"></a>00049 _dcm_matrix.<a class="code" href="class_matrix3.html#ae16bed039ad87c3337f15837c33fe2fb">b</a>.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a> = sRoll*cPitch;
<a name="l00050"></a>00050 _dcm_matrix.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.<a class="code" href="class_vector3.html#a1a0f7e168c71ca798099f0ba8a444244">x</a> = sRoll*sYaw+cRoll*sPitch*cYaw;
<a name="l00051"></a>00051 _dcm_matrix.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.<a class="code" href="class_vector3.html#a561df88b28e106e337a25bb86554a569">y</a> = -sRoll*cYaw+cRoll*sPitch*sYaw;
<a name="l00052"></a>00052 _dcm_matrix.<a class="code" href="class_matrix3.html#a7efa0e7bd4c621a7fe76cd9168960b94">c</a>.<a class="code" href="class_vector3.html#ab3e7f5401dd6e951978bfa746809f74f">z</a> = cRoll*cPitch;
<a name="l00053"></a>00053 }
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:33 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,68 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> </div>
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.h File Reference</h1> </div>
</div>
<div class="contents">
<code>#include &lt;<a class="el" href="_fast_serial_8h_source.html">FastSerial.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="_a_p___math_8h_source.html">AP_Math.h</a>&gt;</code><br/>
<code>#include &lt;inttypes.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="_w_program_8h_source.html">WProgram.h</a>&quot;</code><br/>
<code>#include &lt;<a class="el" href="_a_p___compass_8h_source.html">AP_Compass.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="_a_p___a_d_c_8h_source.html">AP_ADC.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="_a_p___g_p_s_8h_source.html">AP_GPS.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="_a_p___i_m_u_8h_source.html">AP_IMU.h</a>&gt;</code><br/>
<div class="dynheader">
Include dependency graph for AP_DCM_HIL.h:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___d_c_m___h_i_l_8h__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___d_c_m_2_a_p___d_c_m___h_i_l_8h" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___d_c_m_2_a_p___d_c_m___h_i_l_8h" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___d_c_m_2_a_p___d_c_m___h_i_l_8h">
<area shape="rect" id="node3" href="_fast_serial_8h.html" title="FastSerial.h" alt="" coords="947,237,1043,267"/><area shape="rect" id="node19" href="_a_p___math_8h.html" title="AP_Math.h" alt="" coords="240,392,331,421"/><area shape="rect" id="node34" href="_w_program_8h.html" title="WProgram.h" alt="" coords="388,237,487,267"/><area shape="rect" id="node36" href="_a_p___compass_8h.html" title="Catch&#45;all header that defines all supported compass classes." alt="" coords="292,83,409,112"/><area shape="rect" id="node52" href="_a_p___a_d_c_8h.html" title="AP_ADC.h" alt="" coords="655,237,740,267"/><area shape="rect" id="node61" href="_a_p___g_p_s_8h.html" title="Catch&#45;all header that defines all supported GPS classes." alt="" coords="1453,83,1539,112"/><area shape="rect" id="node97" href="_a_p___i_m_u_8h.html" title="AP_IMU.h" alt="" coords="663,160,745,189"/><area shape="rect" id="node13" href="_better_stream_8h.html" title="BetterStream.h" alt="" coords="1348,315,1471,344"/><area shape="rect" id="node21" href="vector2_8h.html" title="vector2.h" alt="" coords="165,547,248,576"/><area shape="rect" id="node25" href="vector3_8h.html" title="vector3.h" alt="" coords="272,547,355,576"/><area shape="rect" id="node30" href="matrix3_8h.html" title="matrix3.h" alt="" coords="244,469,327,499"/><area shape="rect" id="node38" href="_a_p___compass___h_m_c5843_8h.html" title="AP_Compass_HMC5843.h" alt="" coords="127,237,313,267"/><area shape="rect" id="node47" href="_a_p___compass___h_i_l_8h.html" title="AP_Compass_HIL.h" alt="" coords="279,160,423,189"/><area shape="rect" id="node40" href="_compass_8h.html" title="Compass.h" alt="" coords="239,315,332,344"/><area shape="rect" id="node54" href="_a_p___a_d_c___a_d_s7844_8h.html" title="AP_ADC_ADS7844.h" alt="" coords="612,315,764,344"/><area shape="rect" id="node57" href="_a_p___a_d_c___h_i_l_8h.html" title="AP_ADC_HIL.h" alt="" coords="788,315,900,344"/><area shape="rect" id="node63" href="_a_p___g_p_s___n_m_e_a_8h.html" title="AP_GPS_NMEA.h" alt="" coords="1691,237,1821,267"/><area shape="rect" id="node69" href="_a_p___g_p_s___s_i_r_f_8h.html" title="AP_GPS_SIRF.h" alt="" coords="1845,237,1963,267"/><area shape="rect" id="node72" href="_a_p___g_p_s__406_8h.html" title="AP_GPS_406.h" alt="" coords="1847,160,1961,189"/><area shape="rect" id="node75" href="_a_p___g_p_s___u_b_l_o_x_8h.html" title="AP_GPS_UBLOX.h" alt="" coords="1117,237,1251,267"/><area shape="rect" id="node78" href="_a_p___g_p_s___m_t_k_8h.html" title="AP_GPS_MTK.h" alt="" coords="1212,160,1329,189"/><area shape="rect" id="node83" href="_a_p___g_p_s___m_t_k16_8h.html" title="AP_GPS_MTK16.h" alt="" coords="1353,160,1487,189"/><area shape="rect" id="node87" href="_a_p___g_p_s___none_8h.html" title="AP_GPS_None.h" alt="" coords="1511,160,1636,189"/><area shape="rect" id="node90" href="_a_p___g_p_s___auto_8h.html" title="AP_GPS_Auto.h" alt="" coords="1015,160,1137,189"/><area shape="rect" id="node94" href="_a_p___g_p_s___h_i_l_8h.html" title="AP_GPS_HIL.h" alt="" coords="1660,160,1772,189"/><area shape="rect" id="node65" href="_g_p_s_8h.html" title="Interface definition for the various GPS drivers." alt="" coords="1508,315,1569,344"/><area shape="rect" id="node81" href="_a_p___g_p_s___m_t_k___common_8h.html" title="AP_GPS_MTK_Common.h" alt="" coords="1325,237,1509,267"/></map>
</div>
<div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___d_c_m___h_i_l_8h__dep__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___d_c_m_2_a_p___d_c_m___h_i_l_8hdep" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___d_c_m_2_a_p___d_c_m___h_i_l_8hdep" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___d_c_m_2_a_p___d_c_m___h_i_l_8hdep">
<area shape="rect" id="node3" href="_a_p___d_c_m_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.h" alt="" coords="13,83,389,112"/><area shape="rect" id="node7" href="_a_p___d_c_m___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.cpp" alt="" coords="413,83,832,112"/><area shape="rect" id="node5" href="_a_p___d_c_m_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.cpp" alt="" coords="5,160,397,189"/></map>
</div>
<p><a href="_a_p___d_c_m___h_i_l_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___d_c_m___h_i_l.html">AP_DCM_HIL</a></td></tr>
</table>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:34 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,5 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_a_p___d_c_m_8h.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.h" alt="" coords="13,83,389,112"/>
<area shape="rect" id="node7" href="$_a_p___d_c_m___h_i_l_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.cpp" alt="" coords="413,83,832,112"/>
<area shape="rect" id="node5" href="$_a_p___d_c_m_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM.cpp" alt="" coords="5,160,397,189"/>
</map>

View File

@ -0,0 +1 @@
88d1f9021d294dafc41d13fb75fd2b7d

View File

@ -0,0 +1,29 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_fast_serial_8h.html" title="FastSerial.h" alt="" coords="947,237,1043,267"/>
<area shape="rect" id="node19" href="$_a_p___math_8h.html" title="AP_Math.h" alt="" coords="240,392,331,421"/>
<area shape="rect" id="node34" href="$_w_program_8h.html" title="WProgram.h" alt="" coords="388,237,487,267"/>
<area shape="rect" id="node36" href="$_a_p___compass_8h.html" title="Catch&#45;all header that defines all supported compass classes." alt="" coords="292,83,409,112"/>
<area shape="rect" id="node52" href="$_a_p___a_d_c_8h.html" title="AP_ADC.h" alt="" coords="655,237,740,267"/>
<area shape="rect" id="node61" href="$_a_p___g_p_s_8h.html" title="Catch&#45;all header that defines all supported GPS classes." alt="" coords="1453,83,1539,112"/>
<area shape="rect" id="node97" href="$_a_p___i_m_u_8h.html" title="AP_IMU.h" alt="" coords="663,160,745,189"/>
<area shape="rect" id="node13" href="$_better_stream_8h.html" title="BetterStream.h" alt="" coords="1348,315,1471,344"/>
<area shape="rect" id="node21" href="$vector2_8h.html" title="vector2.h" alt="" coords="165,547,248,576"/>
<area shape="rect" id="node25" href="$vector3_8h.html" title="vector3.h" alt="" coords="272,547,355,576"/>
<area shape="rect" id="node30" href="$matrix3_8h.html" title="matrix3.h" alt="" coords="244,469,327,499"/>
<area shape="rect" id="node38" href="$_a_p___compass___h_m_c5843_8h.html" title="AP_Compass_HMC5843.h" alt="" coords="127,237,313,267"/>
<area shape="rect" id="node47" href="$_a_p___compass___h_i_l_8h.html" title="AP_Compass_HIL.h" alt="" coords="279,160,423,189"/>
<area shape="rect" id="node40" href="$_compass_8h.html" title="Compass.h" alt="" coords="239,315,332,344"/>
<area shape="rect" id="node54" href="$_a_p___a_d_c___a_d_s7844_8h.html" title="AP_ADC_ADS7844.h" alt="" coords="612,315,764,344"/>
<area shape="rect" id="node57" href="$_a_p___a_d_c___h_i_l_8h.html" title="AP_ADC_HIL.h" alt="" coords="788,315,900,344"/>
<area shape="rect" id="node63" href="$_a_p___g_p_s___n_m_e_a_8h.html" title="AP_GPS_NMEA.h" alt="" coords="1691,237,1821,267"/>
<area shape="rect" id="node69" href="$_a_p___g_p_s___s_i_r_f_8h.html" title="AP_GPS_SIRF.h" alt="" coords="1845,237,1963,267"/>
<area shape="rect" id="node72" href="$_a_p___g_p_s__406_8h.html" title="AP_GPS_406.h" alt="" coords="1847,160,1961,189"/>
<area shape="rect" id="node75" href="$_a_p___g_p_s___u_b_l_o_x_8h.html" title="AP_GPS_UBLOX.h" alt="" coords="1117,237,1251,267"/>
<area shape="rect" id="node78" href="$_a_p___g_p_s___m_t_k_8h.html" title="AP_GPS_MTK.h" alt="" coords="1212,160,1329,189"/>
<area shape="rect" id="node83" href="$_a_p___g_p_s___m_t_k16_8h.html" title="AP_GPS_MTK16.h" alt="" coords="1353,160,1487,189"/>
<area shape="rect" id="node87" href="$_a_p___g_p_s___none_8h.html" title="AP_GPS_None.h" alt="" coords="1511,160,1636,189"/>
<area shape="rect" id="node90" href="$_a_p___g_p_s___auto_8h.html" title="AP_GPS_Auto.h" alt="" coords="1015,160,1137,189"/>
<area shape="rect" id="node94" href="$_a_p___g_p_s___h_i_l_8h.html" title="AP_GPS_HIL.h" alt="" coords="1660,160,1772,189"/>
<area shape="rect" id="node65" href="$_g_p_s_8h.html" title="Interface definition for the various GPS drivers." alt="" coords="1508,315,1569,344"/>
<area shape="rect" id="node81" href="$_a_p___g_p_s___m_t_k___common_8h.html" title="AP_GPS_MTK_Common.h" alt="" coords="1325,237,1509,267"/>
</map>

View File

@ -0,0 +1 @@
6c911939d5dd06a5dd0456e349f6aa24

View File

@ -0,0 +1,99 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_DCM/AP_DCM_HIL.h</h1> </div>
</div>
<div class="contents">
<a href="_a_p___d_c_m___h_i_l_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef AP_DCM_HIL_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define AP_DCM_HIL_H</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;<a class="code" href="_fast_serial_8h.html">FastSerial.h</a>&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &lt;<a class="code" href="_a_p___math_8h.html">AP_Math.h</a>&gt;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &quot;<a class="code" href="_w_program_8h.html">WProgram.h</a>&quot;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &lt;<a class="code" href="_a_p___compass_8h.html" title="Catch-all header that defines all supported compass classes.">AP_Compass.h</a>&gt;</span>
<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;<a class="code" href="_a_p___a_d_c_8h.html">AP_ADC.h</a>&gt;</span>
<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;<a class="code" href="_a_p___g_p_s_8h.html" title="Catch-all header that defines all supported GPS classes.">AP_GPS.h</a>&gt;</span>
<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;<a class="code" href="_a_p___i_m_u_8h.html">AP_IMU.h</a>&gt;</span>
<a name="l00012"></a>00012
<a name="l00013"></a>00013
<a name="l00014"></a><a class="code" href="class_a_p___d_c_m___h_i_l.html">00014</a> <span class="keyword">class </span><a class="code" href="class_a_p___d_c_m___h_i_l.html">AP_DCM_HIL</a>
<a name="l00015"></a>00015 {
<a name="l00016"></a>00016 <span class="keyword">public</span>:
<a name="l00017"></a>00017 <span class="comment">// Constructors</span>
<a name="l00018"></a><a class="code" href="class_a_p___d_c_m___h_i_l.html#adcc168d94ee4c5daad8681253219609a">00018</a> <a class="code" href="class_a_p___d_c_m___h_i_l.html#adcc168d94ee4c5daad8681253219609a">AP_DCM_HIL</a>() :
<a name="l00019"></a>00019 _dcm_matrix(1, 0, 0,
<a name="l00020"></a>00020 0, 1, 0,
<a name="l00021"></a>00021 0, 0, 1)
<a name="l00022"></a>00022 {}
<a name="l00023"></a>00023
<a name="l00024"></a>00024 <span class="comment">// Accessors</span>
<a name="l00025"></a><a class="code" href="class_a_p___d_c_m___h_i_l.html#abf3261982f737ec0946caab2ed936327">00025</a> <a class="code" href="class_vector3.html">Vector3f</a> <a class="code" href="class_a_p___d_c_m___h_i_l.html#abf3261982f737ec0946caab2ed936327">get_gyro</a>(<span class="keywordtype">void</span>) {<span class="keywordflow">return</span> _omega_integ_corr; }
<a name="l00026"></a><a class="code" href="class_a_p___d_c_m___h_i_l.html#a9567b157df477c3f8891452d6b3fb0e6">00026</a> <a class="code" href="class_vector3.html">Vector3f</a> <a class="code" href="class_a_p___d_c_m___h_i_l.html#a9567b157df477c3f8891452d6b3fb0e6">get_accel</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> _accel_vector; }
<a name="l00027"></a><a class="code" href="class_a_p___d_c_m___h_i_l.html#ab0411710166b19827686f0c4d7d33a4f">00027</a> <a class="code" href="class_matrix3.html">Matrix3f</a> <a class="code" href="class_a_p___d_c_m___h_i_l.html#ab0411710166b19827686f0c4d7d33a4f">get_dcm_matrix</a>(<span class="keywordtype">void</span>) {<span class="keywordflow">return</span> _dcm_matrix; }
<a name="l00028"></a><a class="code" href="class_a_p___d_c_m___h_i_l.html#a7149e1b918b2459ef63b46dea455e8bb">00028</a> <a class="code" href="class_matrix3.html">Matrix3f</a> <a class="code" href="class_a_p___d_c_m___h_i_l.html#a7149e1b918b2459ef63b46dea455e8bb">get_dcm_transposed</a>(<span class="keywordtype">void</span>) {<a class="code" href="class_matrix3.html">Matrix3f</a> temp = _dcm_matrix; <span class="keywordflow">return</span> temp.<a class="code" href="class_matrix3.html#a689b1ae3ea245ef3da02ed40941e130b">transpose</a>();}
<a name="l00029"></a>00029
<a name="l00030"></a><a class="code" href="class_a_p___d_c_m___h_i_l.html#a9d3f3cee0faa40d08dfbc4f7e43293ff">00030</a> <span class="keywordtype">void</span> <a class="code" href="class_a_p___d_c_m___h_i_l.html#a9d3f3cee0faa40d08dfbc4f7e43293ff">set_centripetal</a>(<span class="keywordtype">bool</span> b) {}
<a name="l00031"></a><a class="code" href="class_a_p___d_c_m___h_i_l.html#af47cd722907da46e227148dac7453a4f">00031</a> <span class="keywordtype">void</span> <a class="code" href="class_a_p___d_c_m___h_i_l.html#af47cd722907da46e227148dac7453a4f">set_compass</a>(<a class="code" href="class_compass.html">Compass</a> *compass) {}
<a name="l00032"></a>00032
<a name="l00033"></a>00033 <span class="comment">// Methods</span>
<a name="l00034"></a><a class="code" href="class_a_p___d_c_m___h_i_l.html#a2a21b2567dd5a7fb86a6768364d0501a">00034</a> <span class="keywordtype">void</span> <a class="code" href="class_a_p___d_c_m___h_i_l.html#a2a21b2567dd5a7fb86a6768364d0501a">update_DCM</a>(<span class="keywordtype">float</span> _G_Dt) {}
<a name="l00035"></a>00035
<a name="l00036"></a><a class="code" href="class_a_p___d_c_m___h_i_l.html#aa0fe607e5c0d012efa7b722bcd0eb22e">00036</a> <span class="keywordtype">float</span> <a class="code" href="class_a_p___d_c_m___h_i_l.html#aa0fe607e5c0d012efa7b722bcd0eb22e">get_health</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> 1.0; }
<a name="l00037"></a>00037
<a name="l00038"></a><a class="code" href="class_a_p___d_c_m___h_i_l.html#abb27e978801ab981ff086967e87c197b">00038</a> <span class="keywordtype">long</span> <a class="code" href="class_a_p___d_c_m___h_i_l.html#abb27e978801ab981ff086967e87c197b">roll_sensor</a>; <span class="comment">// Degrees * 100</span>
<a name="l00039"></a><a class="code" href="class_a_p___d_c_m___h_i_l.html#a45dc357f5c4fb707108da596e64fdb27">00039</a> <span class="keywordtype">long</span> <a class="code" href="class_a_p___d_c_m___h_i_l.html#a45dc357f5c4fb707108da596e64fdb27">pitch_sensor</a>; <span class="comment">// Degrees * 100</span>
<a name="l00040"></a><a class="code" href="class_a_p___d_c_m___h_i_l.html#a430a2f9d7ba400bd6a75a6027bae4364">00040</a> <span class="keywordtype">long</span> <a class="code" href="class_a_p___d_c_m___h_i_l.html#a430a2f9d7ba400bd6a75a6027bae4364">yaw_sensor</a>; <span class="comment">// Degrees * 100</span>
<a name="l00041"></a>00041
<a name="l00042"></a><a class="code" href="class_a_p___d_c_m___h_i_l.html#a48374fe931275819ad81c56480705856">00042</a> <span class="keywordtype">float</span> <a class="code" href="class_a_p___d_c_m___h_i_l.html#a48374fe931275819ad81c56480705856">roll</a>; <span class="comment">// Radians</span>
<a name="l00043"></a><a class="code" href="class_a_p___d_c_m___h_i_l.html#a943d62d6b442ae69c975228c180bdedf">00043</a> <span class="keywordtype">float</span> <a class="code" href="class_a_p___d_c_m___h_i_l.html#a943d62d6b442ae69c975228c180bdedf">pitch</a>; <span class="comment">// Radians</span>
<a name="l00044"></a><a class="code" href="class_a_p___d_c_m___h_i_l.html#aa17233338e8c57385cde7eed8658aa83">00044</a> <span class="keywordtype">float</span> <a class="code" href="class_a_p___d_c_m___h_i_l.html#aa17233338e8c57385cde7eed8658aa83">yaw</a>; <span class="comment">// Radians</span>
<a name="l00045"></a>00045
<a name="l00046"></a><a class="code" href="class_a_p___d_c_m___h_i_l.html#a8ccecfae76967f4e9d32260b59624f08">00046</a> uint8_t <a class="code" href="class_a_p___d_c_m___h_i_l.html#a8ccecfae76967f4e9d32260b59624f08">gyro_sat_count</a>;
<a name="l00047"></a><a class="code" href="class_a_p___d_c_m___h_i_l.html#a61d46323d0a54eedde1a6d62b12d0f07">00047</a> uint8_t <a class="code" href="class_a_p___d_c_m___h_i_l.html#a61d46323d0a54eedde1a6d62b12d0f07">renorm_sqrt_count</a>;
<a name="l00048"></a><a class="code" href="class_a_p___d_c_m___h_i_l.html#ab889e544f0fe4e31dae15f86ff3be20e">00048</a> uint8_t <a class="code" href="class_a_p___d_c_m___h_i_l.html#ab889e544f0fe4e31dae15f86ff3be20e">renorm_blowup_count</a>;
<a name="l00049"></a>00049
<a name="l00050"></a>00050 <span class="keywordtype">void</span> <a class="code" href="class_a_p___d_c_m___h_i_l.html#a37a3ab07ddbb929f0b9feaa929a1c8ad">setHil</a>(<span class="keywordtype">float</span> <a class="code" href="class_a_p___d_c_m___h_i_l.html#a48374fe931275819ad81c56480705856">roll</a>, <span class="keywordtype">float</span> <a class="code" href="class_a_p___d_c_m___h_i_l.html#a943d62d6b442ae69c975228c180bdedf">pitch</a>, <span class="keywordtype">float</span> <a class="code" href="class_a_p___d_c_m___h_i_l.html#aa17233338e8c57385cde7eed8658aa83">yaw</a>,
<a name="l00051"></a>00051 <span class="keywordtype">float</span> rollRate, <span class="keywordtype">float</span> pitchRate, <span class="keywordtype">float</span> yawRate);
<a name="l00052"></a>00052 <span class="keyword">private</span>:
<a name="l00053"></a>00053 <span class="comment">// Methods</span>
<a name="l00054"></a>00054 <a class="code" href="class_matrix3.html">Matrix3f</a> _dcm_matrix;
<a name="l00055"></a>00055 <a class="code" href="class_vector3.html">Vector3f</a> _omega_integ_corr;
<a name="l00056"></a>00056 <a class="code" href="class_vector3.html">Vector3f</a> _accel_vector;
<a name="l00057"></a>00057 };
<a name="l00058"></a>00058
<a name="l00059"></a>00059 <span class="preprocessor">#endif</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span>
<a name="l00061"></a>00061
<a name="l00062"></a>00062
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:33 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,50 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_EEPROMB/AP_EEPROMB.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_EEPROMB/AP_EEPROMB.cpp File Reference</h1> </div>
</div>
<div class="contents">
<code>#include &lt;avr/eeprom.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="_a_p___e_e_p_r_o_m_b_8h_source.html">AP_EEPROMB.h</a>&quot;</code><br/>
<div class="dynheader">
Include dependency graph for AP_EEPROMB.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___e_e_p_r_o_m_b_8cpp__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___e_e_p_r_o_m_b_2_a_p___e_e_p_r_o_m_b_8cpp" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___e_e_p_r_o_m_b_2_a_p___e_e_p_r_o_m_b_8cpp" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___e_e_p_r_o_m_b_2_a_p___e_e_p_r_o_m_b_8cpp">
<area shape="rect" id="node5" href="_a_p___e_e_p_r_o_m_b_8h.html" title="AP_EEPROMB manager." alt="" coords="243,83,363,112"/><area shape="rect" id="node7" href="_w_program_8h.html" title="WProgram.h" alt="" coords="253,160,352,189"/></map>
</div>
<p><a href="_a_p___e_e_p_r_o_m_b_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
</table>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:34 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,4 @@
<map id="G" name="G">
<area shape="rect" id="node5" href="$_a_p___e_e_p_r_o_m_b_8h.html" title="AP_EEPROMB manager." alt="" coords="243,83,363,112"/>
<area shape="rect" id="node7" href="$_w_program_8h.html" title="WProgram.h" alt="" coords="253,160,352,189"/>
</map>

View File

@ -0,0 +1 @@
1ea40a9ab0460cfee56ca7f2cbd2a1f1

View File

@ -0,0 +1,104 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_EEPROMB/AP_EEPROMB.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_EEPROMB/AP_EEPROMB.cpp</h1> </div>
</div>
<div class="contents">
<a href="_a_p___e_e_p_r_o_m_b_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> RC_Channel.cpp - Radio library for Arduino</span>
<a name="l00003"></a>00003 <span class="comment"> Code by Jason Short. DIYDrones.com</span>
<a name="l00004"></a>00004 <span class="comment"> </span>
<a name="l00005"></a>00005 <span class="comment"> This library is free software; you can redistribute it and / or</span>
<a name="l00006"></a>00006 <span class="comment"> modify it under the terms of the GNU Lesser General Public</span>
<a name="l00007"></a>00007 <span class="comment"> License as published by the Free Software Foundation; either</span>
<a name="l00008"></a>00008 <span class="comment"> version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">*/</span>
<a name="l00011"></a>00011
<a name="l00012"></a>00012 <span class="preprocessor">#include &lt;avr/eeprom.h&gt;</span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;<a class="code" href="_a_p___e_e_p_r_o_m_b_8h.html" title="AP_EEPROMB manager.">AP_EEPROMB.h</a>&quot;</span>
<a name="l00014"></a>00014
<a name="l00015"></a>00015 <span class="comment">//#include &quot;WProgram.h&quot;</span>
<a name="l00016"></a>00016
<a name="l00017"></a>00017 <span class="keywordtype">void</span>
<a name="l00018"></a><a class="code" href="class_a_p___e_e_p_r_o_m_b.html#acdb73c655cd5e5d69e22a9a15b819372">00018</a> <a class="code" href="class_a_p___e_e_p_r_o_m_b.html#acdb73c655cd5e5d69e22a9a15b819372">AP_EEPROMB::write_byte</a>(<span class="keywordtype">int</span> address, int8_t value)
<a name="l00019"></a>00019 {
<a name="l00020"></a>00020 eeprom_write_byte((uint8_t *) address, value);
<a name="l00021"></a>00021 }
<a name="l00022"></a>00022
<a name="l00023"></a>00023 <span class="keywordtype">void</span>
<a name="l00024"></a>00024 <a class="code" href="class_a_p___e_e_p_r_o_m_b.html#a76a66afde2196114cc4fc1b30faea0e7">AP_EEPROMB::write_int</a>(<span class="keywordtype">int</span> address, <span class="keywordtype">int</span> value)
<a name="l00025"></a>00025 {
<a name="l00026"></a>00026 eeprom_write_word((uint16_t *) address, value);
<a name="l00027"></a>00027 }
<a name="l00028"></a>00028
<a name="l00029"></a>00029 <span class="keywordtype">void</span>
<a name="l00030"></a>00030 <a class="code" href="class_a_p___e_e_p_r_o_m_b.html#acbc430dc9b77d0e40a89c67a50153043">AP_EEPROMB::write_long</a>(<span class="keywordtype">int</span> address, <span class="keywordtype">long</span> value)
<a name="l00031"></a>00031 {
<a name="l00032"></a>00032 eeprom_write_dword((uint32_t *) address, value);
<a name="l00033"></a>00033 }
<a name="l00034"></a>00034
<a name="l00035"></a>00035 <span class="keywordtype">void</span>
<a name="l00036"></a><a class="code" href="class_a_p___e_e_p_r_o_m_b.html#a2d9701f608bd3d49af1594e5ed33daa4">00036</a> <a class="code" href="class_a_p___e_e_p_r_o_m_b.html#a2d9701f608bd3d49af1594e5ed33daa4">AP_EEPROMB::write_float</a>(<span class="keywordtype">int</span> address, <span class="keywordtype">float</span> value)
<a name="l00037"></a>00037 {
<a name="l00038"></a>00038 _type_union.fvalue = value;
<a name="l00039"></a>00039 <a class="code" href="class_a_p___e_e_p_r_o_m_b.html#acbc430dc9b77d0e40a89c67a50153043">write_long</a>(address, _type_union.lvalue);
<a name="l00040"></a>00040 }
<a name="l00041"></a>00041
<a name="l00042"></a>00042 <span class="keywordtype">int</span>
<a name="l00043"></a><a class="code" href="class_a_p___e_e_p_r_o_m_b.html#af62dbf0e886e944c51892e7460c74f64">00043</a> <a class="code" href="class_a_p___e_e_p_r_o_m_b.html#af62dbf0e886e944c51892e7460c74f64">AP_EEPROMB::read_byte</a>(<span class="keywordtype">int</span> address)
<a name="l00044"></a>00044 {
<a name="l00045"></a>00045 <span class="keywordflow">return</span> eeprom_read_byte((<span class="keyword">const</span> uint8_t *) address);
<a name="l00046"></a>00046 }
<a name="l00047"></a>00047
<a name="l00048"></a>00048 <span class="keywordtype">int</span>
<a name="l00049"></a><a class="code" href="class_a_p___e_e_p_r_o_m_b.html#ab705d4b2d44f7d4c27bb1a382e783885">00049</a> <a class="code" href="class_a_p___e_e_p_r_o_m_b.html#ab705d4b2d44f7d4c27bb1a382e783885">AP_EEPROMB::read_int</a>(<span class="keywordtype">int</span> address)
<a name="l00050"></a>00050 {
<a name="l00051"></a>00051 <span class="keywordflow">return</span> eeprom_read_word((<span class="keyword">const</span> uint16_t *) address);
<a name="l00052"></a>00052 }
<a name="l00053"></a>00053
<a name="l00054"></a>00054 <span class="keywordtype">long</span>
<a name="l00055"></a><a class="code" href="class_a_p___e_e_p_r_o_m_b.html#a9591ef3e3cbbc974ced715d8bd7f2887">00055</a> <a class="code" href="class_a_p___e_e_p_r_o_m_b.html#a9591ef3e3cbbc974ced715d8bd7f2887">AP_EEPROMB::read_long</a>(<span class="keywordtype">int</span> address)
<a name="l00056"></a>00056 {
<a name="l00057"></a>00057 <span class="keywordflow">return</span> eeprom_read_dword((<span class="keyword">const</span> uint32_t *) address);
<a name="l00058"></a>00058 }
<a name="l00059"></a>00059
<a name="l00060"></a>00060 <span class="keywordtype">float</span>
<a name="l00061"></a><a class="code" href="class_a_p___e_e_p_r_o_m_b.html#ac868cc5ceaf3956ffb863ebbf87dc27d">00061</a> <a class="code" href="class_a_p___e_e_p_r_o_m_b.html#ac868cc5ceaf3956ffb863ebbf87dc27d">AP_EEPROMB::read_float</a>(<span class="keywordtype">int</span> address)
<a name="l00062"></a>00062 {
<a name="l00063"></a>00063 _type_union.lvalue = eeprom_read_dword((<span class="keyword">const</span> uint32_t *) address);
<a name="l00064"></a>00064 <span class="keywordflow">return</span> _type_union.fvalue;
<a name="l00065"></a>00065 }
<a name="l00066"></a>00066
<a name="l00067"></a>00067
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:33 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,70 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_EEPROMB/AP_EEPROMB.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> </div>
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_EEPROMB/AP_EEPROMB.h File Reference</h1> </div>
</div>
<div class="contents">
<p><a class="el" href="class_a_p___e_e_p_r_o_m_b.html" title="Object for reading and writing to the EEPROM.">AP_EEPROMB</a> manager.
<a href="#_details">More...</a></p>
<code>#include &quot;<a class="el" href="_w_program_8h_source.html">WProgram.h</a>&quot;</code><br/>
<div class="dynheader">
Include dependency graph for AP_EEPROMB.h:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___e_e_p_r_o_m_b_8h__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___e_e_p_r_o_m_b_2_a_p___e_e_p_r_o_m_b_8h" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___e_e_p_r_o_m_b_2_a_p___e_e_p_r_o_m_b_8h" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___e_e_p_r_o_m_b_2_a_p___e_e_p_r_o_m_b_8h">
<area shape="rect" id="node3" href="_w_program_8h.html" title="WProgram.h" alt="" coords="176,83,275,112"/></map>
</div>
<div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___e_e_p_r_o_m_b_8h__dep__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___e_e_p_r_o_m_b_2_a_p___e_e_p_r_o_m_b_8hdep" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___e_e_p_r_o_m_b_2_a_p___e_e_p_r_o_m_b_8hdep" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___e_e_p_r_o_m_b_2_a_p___e_e_p_r_o_m_b_8hdep">
<area shape="rect" id="node3" href="_a_p___e_e_p_r_o_m_b_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_EEPROMB/AP_EEPROMB.cpp" alt="" coords="5,83,461,112"/><area shape="rect" id="node5" href="_p_i_d_8h.html" title="Generic PID algorithm, with EEPROM&#45;backed storage of constants." alt="" coords="485,83,795,112"/><area shape="rect" id="node9" href="_r_c___channel_8h.html" title="RC_Channel manager, with EEPROM&#45;backed storage of constants." alt="" coords="827,83,1245,112"/><area shape="rect" id="node7" href="_p_i_d_8cpp.html" title="Generic PID algorithm, with EEPROM&#45;backed storage of constants." alt="" coords="473,160,799,189"/><area shape="rect" id="node11" href="_r_c___channel_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/RC_Channel/RC_Channel.cpp" alt="" coords="823,160,1257,189"/></map>
</div>
<p><a href="_a_p___e_e_p_r_o_m_b_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_p___e_e_p_r_o_m_b.html">AP_EEPROMB</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Object for reading and writing to the EEPROM. <a href="class_a_p___e_e_p_r_o_m_b.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">union &nbsp;</td><td class="memItemRight" valign="bottom"><b>AP_EEPROMB::type_union</b></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p><a class="el" href="class_a_p___e_e_p_r_o_m_b.html" title="Object for reading and writing to the EEPROM.">AP_EEPROMB</a> manager. </p>
<p>Definition in file <a class="el" href="_a_p___e_e_p_r_o_m_b_8h_source.html">AP_EEPROMB.h</a>.</p>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:34 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,7 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_a_p___e_e_p_r_o_m_b_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/AP_EEPROMB/AP_EEPROMB.cpp" alt="" coords="5,83,461,112"/>
<area shape="rect" id="node5" href="$_p_i_d_8h.html" title="Generic PID algorithm, with EEPROM&#45;backed storage of constants." alt="" coords="485,83,795,112"/>
<area shape="rect" id="node9" href="$_r_c___channel_8h.html" title="RC_Channel manager, with EEPROM&#45;backed storage of constants." alt="" coords="827,83,1245,112"/>
<area shape="rect" id="node7" href="$_p_i_d_8cpp.html" title="Generic PID algorithm, with EEPROM&#45;backed storage of constants." alt="" coords="473,160,799,189"/>
<area shape="rect" id="node11" href="$_r_c___channel_8cpp.html" title="/home/jgoppert/Projects/ap/libraries/RC_Channel/RC_Channel.cpp" alt="" coords="823,160,1257,189"/>
</map>

View File

@ -0,0 +1 @@
c47af1f033c66d51a8960cad06908ad3

View File

@ -0,0 +1,3 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_w_program_8h.html" title="WProgram.h" alt="" coords="176,83,275,112"/>
</map>

View File

@ -0,0 +1 @@
769b873f9c0334b86cd3ed25730ce518

View File

@ -0,0 +1,73 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_EEPROMB/AP_EEPROMB.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_EEPROMB/AP_EEPROMB.h</h1> </div>
</div>
<div class="contents">
<a href="_a_p___e_e_p_r_o_m_b_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: t -*-</span>
<a name="l00002"></a>00002
<a name="l00005"></a>00005
<a name="l00006"></a>00006 <span class="preprocessor">#ifndef AP_EEPROMB_h</span>
<a name="l00007"></a>00007 <span class="preprocessor"></span><span class="preprocessor">#define AP_EEPROMB_h</span>
<a name="l00008"></a>00008 <span class="preprocessor"></span>
<a name="l00009"></a>00009 <span class="comment">//#include &lt;stdint.h&gt;</span>
<a name="l00010"></a>00010 <span class="preprocessor">#include &quot;<a class="code" href="_w_program_8h.html">WProgram.h</a>&quot;</span>
<a name="l00011"></a>00011
<a name="l00014"></a><a class="code" href="class_a_p___e_e_p_r_o_m_b.html">00014</a> <span class="keyword">class </span><a class="code" href="class_a_p___e_e_p_r_o_m_b.html" title="Object for reading and writing to the EEPROM.">AP_EEPROMB</a>{
<a name="l00015"></a>00015 <span class="keyword">public</span>:
<a name="l00017"></a><a class="code" href="class_a_p___e_e_p_r_o_m_b.html#a0562d6e851b3c251ef35da0f0406d673">00017</a> <a class="code" href="class_a_p___e_e_p_r_o_m_b.html#a0562d6e851b3c251ef35da0f0406d673" title="Constructor.">AP_EEPROMB</a>(){}
<a name="l00018"></a>00018
<a name="l00019"></a>00019 <span class="keywordtype">int</span> <a class="code" href="class_a_p___e_e_p_r_o_m_b.html#af62dbf0e886e944c51892e7460c74f64">read_byte</a>(<span class="keywordtype">int</span> address);
<a name="l00020"></a>00020 <span class="keywordtype">int</span> <a class="code" href="class_a_p___e_e_p_r_o_m_b.html#ab705d4b2d44f7d4c27bb1a382e783885">read_int</a>(<span class="keywordtype">int</span> address);
<a name="l00021"></a>00021 <span class="keywordtype">long</span> <a class="code" href="class_a_p___e_e_p_r_o_m_b.html#a9591ef3e3cbbc974ced715d8bd7f2887">read_long</a>(<span class="keywordtype">int</span> address);
<a name="l00022"></a>00022 <span class="keywordtype">float</span> <a class="code" href="class_a_p___e_e_p_r_o_m_b.html#ac868cc5ceaf3956ffb863ebbf87dc27d">read_float</a>(<span class="keywordtype">int</span> address);
<a name="l00023"></a>00023
<a name="l00024"></a>00024 <span class="keywordtype">void</span> <a class="code" href="class_a_p___e_e_p_r_o_m_b.html#acdb73c655cd5e5d69e22a9a15b819372">write_byte</a>(<span class="keywordtype">int</span> address, int8_t value);
<a name="l00025"></a>00025 <span class="keywordtype">void</span> <a class="code" href="class_a_p___e_e_p_r_o_m_b.html#a76a66afde2196114cc4fc1b30faea0e7">write_int</a>(<span class="keywordtype">int</span> address, int16_t value);
<a name="l00026"></a>00026 <span class="keywordtype">void</span> <a class="code" href="class_a_p___e_e_p_r_o_m_b.html#acbc430dc9b77d0e40a89c67a50153043">write_long</a>(<span class="keywordtype">int</span> address, int32_t value);
<a name="l00027"></a>00027 <span class="keywordtype">void</span> <a class="code" href="class_a_p___e_e_p_r_o_m_b.html#a2d9701f608bd3d49af1594e5ed33daa4">write_float</a>(<span class="keywordtype">int</span> address, <span class="keywordtype">float</span> value);
<a name="l00028"></a>00028
<a name="l00029"></a>00029 <span class="keyword">private</span>:
<a name="l00030"></a>00030
<a name="l00031"></a>00031 <span class="keyword">union </span>type_union {
<a name="l00032"></a>00032 int8_t bytes[4];
<a name="l00033"></a>00033 <span class="keywordtype">long</span> lvalue;
<a name="l00034"></a>00034 <span class="keywordtype">int</span> ivalue;
<a name="l00035"></a>00035 <span class="keywordtype">float</span> fvalue;
<a name="l00036"></a>00036 } _type_union;
<a name="l00037"></a>00037
<a name="l00038"></a>00038 };
<a name="l00039"></a>00039
<a name="l00040"></a>00040 <span class="preprocessor">#endif </span>
<a name="l00041"></a>00041 <span class="preprocessor"></span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:33 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,69 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ArduPilot Libraries: /home/jgoppert/Projects/ap/libraries/AP_EEProm/AP_EEProm.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#var-members">Variables</a> </div>
<div class="headertitle">
<h1>/home/jgoppert/Projects/ap/libraries/AP_EEProm/AP_EEProm.cpp File Reference</h1> </div>
</div>
<div class="contents">
<code>#include &lt;<a class="el" href="_a_p___e_e_prom_8h_source.html">AP_EEProm.h</a>&gt;</code><br/>
<div class="dynheader">
Include dependency graph for AP_EEProm.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="_a_p___e_e_prom_8cpp__incl.png" border="0" usemap="#_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___e_e_prom_2_a_p___e_e_prom_8cpp" alt=""/></div>
<map name="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___e_e_prom_2_a_p___e_e_prom_8cpp" id="_2home_2jgoppert_2_projects_2ap_2libraries_2_a_p___e_e_prom_2_a_p___e_e_prom_8cpp">
<area shape="rect" id="node3" href="_a_p___e_e_prom_8h.html" title="AP_EEProm.h" alt="" coords="496,83,603,112"/><area shape="rect" id="node5" href="_a_p___common_8h.html" title="Common definitions and utility routines for the ArduPilot libraries." alt="" coords="249,160,367,189"/><area shape="rect" id="node13" href="_a_p___vector_8h.html" title="AP_Vector.h" alt="" coords="373,315,472,344"/><area shape="rect" id="node9" href="menu_8h.html" title="Simple commandline menu subsystem. &#160;The Menu class implements a simple CLI that accepts commands type..." alt="" coords="99,237,219,267"/><area shape="rect" id="node11" href="c_09_09_8h.html" title="c++.h" alt="" coords="243,237,304,267"/><area shape="rect" id="node21" href="_a_p___loop_8h.html" title="AP_Loop.h" alt="" coords="379,237,467,267"/><area shape="rect" id="node19" href="_w_program_8h.html" title="WProgram.h" alt="" coords="489,392,588,421"/></map>
</div>
<p><a href="_a_p___e_e_prom_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_a_p___e_e_prom_registry.html">AP_EEPromRegistry</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_p___e_e_prom_8cpp.html#ab9f343c688a095f2819577da1f5c8269">eepromRegistry</a> (1024)</td></tr>
</table>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="ab9f343c688a095f2819577da1f5c8269"></a><!-- doxytag: member="AP_EEProm.cpp::eepromRegistry" ref="ab9f343c688a095f2819577da1f5c8269" args="(1024)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_a_p___e_e_prom_registry.html">AP_EEPromRegistry</a> <a class="el" href="_a_p___e_e_prom_8h.html#ace5829ad43d9564a20756ac7ab33aebc">eepromRegistry</a>(1024)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The global declaration for the eepromRegistry </p>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Dec 26 2010 19:58:34 for ArduPilot Libraries by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>

View File

@ -0,0 +1,9 @@
<map id="G" name="G">
<area shape="rect" id="node3" href="$_a_p___e_e_prom_8h.html" title="AP_EEProm.h" alt="" coords="496,83,603,112"/>
<area shape="rect" id="node5" href="$_a_p___common_8h.html" title="Common definitions and utility routines for the ArduPilot libraries." alt="" coords="249,160,367,189"/>
<area shape="rect" id="node13" href="$_a_p___vector_8h.html" title="AP_Vector.h" alt="" coords="373,315,472,344"/>
<area shape="rect" id="node9" href="$menu_8h.html" title="Simple commandline menu subsystem. &#160;The Menu class implements a simple CLI that accepts commands type..." alt="" coords="99,237,219,267"/>
<area shape="rect" id="node11" href="$c_09_09_8h.html" title="c++.h" alt="" coords="243,237,304,267"/>
<area shape="rect" id="node21" href="$_a_p___loop_8h.html" title="AP_Loop.h" alt="" coords="379,237,467,267"/>
<area shape="rect" id="node19" href="$_w_program_8h.html" title="WProgram.h" alt="" coords="489,392,588,421"/>
</map>

View File

@ -0,0 +1 @@
239662af2ae93d828fa95f31558e1fec

Some files were not shown because too many files have changed in this diff Show More