ardupilot/libraries/doc/html/class_compass.html

326 lines
16 KiB
HTML

<!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: Compass Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- 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="pages.html"><span>Related&nbsp;Pages</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> </div>
<div class="headertitle">
<h1>Compass Class Reference</h1> </div>
</div>
<div class="contents">
<!-- doxytag: class="Compass" -->
<p><code>#include &lt;<a class="el" href="_compass_8h_source.html">Compass.h</a>&gt;</code></p>
<p>Inherited by <a class="el" href="class_a_p___compass___h_i_l.html">AP_Compass_HIL</a>, and <a class="el" href="class_a_p___compass___h_m_c5843.html">AP_Compass_HMC5843</a>.</p>
<p><a href="class_compass-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_compass.html#a6de4eb3c975bd7757885a6661cf1a79e">init</a> (int initialise_wire_lib=1)=0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_compass.html#a270aff91583d79826f27f09d64072be8">read</a> ()=0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_compass.html#a922be89b146a3712699f8506a298d8f2">calculate</a> (float roll, float pitch)=0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_compass.html#a9c7556a20a579b2f47a67d1b3d67331c">set_orientation</a> (const <a class="el" href="class_matrix3.html">Matrix3f</a> &amp;rotation_matrix)=0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_compass.html#ad806fb3a6cfe66ab41098705252f8989">set_offsets</a> (int x, int y, int z)=0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_compass.html#a7fb27fec44c834a4073dc84da445827d">set_declination</a> (float radians)=0</td></tr>
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_compass.html#a8324bcab8618a2a2076a511dec2cc8a0">mag_x</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_compass.html#a4de5f44fab49fabf8524ea79e9d3f84a">mag_y</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_compass.html#a6c05eabd47bd8116c4823481c3ea4549">mag_z</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_compass.html#af34cf40b43e957554a48ed27b848a35f">heading</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_compass.html#aafc7608bd711702f519d52afbc06dc7a">heading_x</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_compass.html#a2e1554fb76b067f36d011f59e7e8dd58">heading_y</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_compass.html#a66419d0c87ac23bc422db0279486fd31">last_update</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Definition at line <a class="el" href="_compass_8h_source.html#l00007">7</a> of file <a class="el" href="_compass_8h_source.html">Compass.h</a>.</p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a922be89b146a3712699f8506a298d8f2"></a><!-- doxytag: member="Compass::calculate" ref="a922be89b146a3712699f8506a298d8f2" args="(float roll, float pitch)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void Compass::calculate </td>
<td>(</td>
<td class="paramtype">float&nbsp;</td>
<td class="paramname"> <em>roll</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&nbsp;</td>
<td class="paramname"> <em>pitch</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Implemented in <a class="el" href="class_a_p___compass___h_i_l.html#a755d7409dedf3e903225b36fbf16e622">AP_Compass_HIL</a>, and <a class="el" href="class_a_p___compass___h_m_c5843.html#aaef4df8c859b284d17c8a374d13e4e51">AP_Compass_HMC5843</a>.</p>
</div>
</div>
<a class="anchor" id="a6de4eb3c975bd7757885a6661cf1a79e"></a><!-- doxytag: member="Compass::init" ref="a6de4eb3c975bd7757885a6661cf1a79e" args="(int initialise_wire_lib=1)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual bool Compass::init </td>
<td>(</td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>initialise_wire_lib</em> = <code>1</code></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Implemented in <a class="el" href="class_a_p___compass___h_i_l.html#aefa72efcf8536c3696a25de69f1731c7">AP_Compass_HIL</a>, and <a class="el" href="class_a_p___compass___h_m_c5843.html#af32c9430d20a2eb7d1df8413870c99b6">AP_Compass_HMC5843</a>.</p>
</div>
</div>
<a class="anchor" id="a270aff91583d79826f27f09d64072be8"></a><!-- doxytag: member="Compass::read" ref="a270aff91583d79826f27f09d64072be8" args="()=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void Compass::read </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Implemented in <a class="el" href="class_a_p___compass___h_i_l.html#ac8d183edcd14cf5ee56895c498ebf02a">AP_Compass_HIL</a>, and <a class="el" href="class_a_p___compass___h_m_c5843.html#ab60b932f53493c46e262c1f46a12bdf6">AP_Compass_HMC5843</a>.</p>
</div>
</div>
<a class="anchor" id="a7fb27fec44c834a4073dc84da445827d"></a><!-- doxytag: member="Compass::set_declination" ref="a7fb27fec44c834a4073dc84da445827d" args="(float radians)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void Compass::set_declination </td>
<td>(</td>
<td class="paramtype">float&nbsp;</td>
<td class="paramname"> <em>radians</em></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Implemented in <a class="el" href="class_a_p___compass___h_i_l.html#a4b4d22637d14bd5585aa8d2d5e32ea43">AP_Compass_HIL</a>, and <a class="el" href="class_a_p___compass___h_m_c5843.html#a2ba3fc3b5bd78a28f717c2740948d61e">AP_Compass_HMC5843</a>.</p>
</div>
</div>
<a class="anchor" id="ad806fb3a6cfe66ab41098705252f8989"></a><!-- doxytag: member="Compass::set_offsets" ref="ad806fb3a6cfe66ab41098705252f8989" args="(int x, int y, int z)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void Compass::set_offsets </td>
<td>(</td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>y</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>z</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Implemented in <a class="el" href="class_a_p___compass___h_i_l.html#a1fb0fcecfa08549ea1ca9d0cf9f7eb14">AP_Compass_HIL</a>, and <a class="el" href="class_a_p___compass___h_m_c5843.html#a90481085e451fe3f64d46ebb401b5aaf">AP_Compass_HMC5843</a>.</p>
</div>
</div>
<a class="anchor" id="a9c7556a20a579b2f47a67d1b3d67331c"></a><!-- doxytag: member="Compass::set_orientation" ref="a9c7556a20a579b2f47a67d1b3d67331c" args="(const Matrix3f &amp;rotation_matrix)=0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void Compass::set_orientation </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_matrix3.html">Matrix3f</a> &amp;&nbsp;</td>
<td class="paramname"> <em>rotation_matrix</em></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Implemented in <a class="el" href="class_a_p___compass___h_i_l.html#aae23c67a982d566e2f538509799ee277">AP_Compass_HIL</a>, and <a class="el" href="class_a_p___compass___h_m_c5843.html#a5dafbafd496867d435168c8decc742fa">AP_Compass_HMC5843</a>.</p>
</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="af34cf40b43e957554a48ed27b848a35f"></a><!-- doxytag: member="Compass::heading" ref="af34cf40b43e957554a48ed27b848a35f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">float <a class="el" href="class_compass.html#af34cf40b43e957554a48ed27b848a35f">Compass::heading</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_compass_8h_source.html#l00013">13</a> of file <a class="el" href="_compass_8h_source.html">Compass.h</a>.</p>
</div>
</div>
<a class="anchor" id="aafc7608bd711702f519d52afbc06dc7a"></a><!-- doxytag: member="Compass::heading_x" ref="aafc7608bd711702f519d52afbc06dc7a" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">float <a class="el" href="class_compass.html#aafc7608bd711702f519d52afbc06dc7a">Compass::heading_x</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_compass_8h_source.html#l00014">14</a> of file <a class="el" href="_compass_8h_source.html">Compass.h</a>.</p>
</div>
</div>
<a class="anchor" id="a2e1554fb76b067f36d011f59e7e8dd58"></a><!-- doxytag: member="Compass::heading_y" ref="a2e1554fb76b067f36d011f59e7e8dd58" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">float <a class="el" href="class_compass.html#a2e1554fb76b067f36d011f59e7e8dd58">Compass::heading_y</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_compass_8h_source.html#l00015">15</a> of file <a class="el" href="_compass_8h_source.html">Compass.h</a>.</p>
</div>
</div>
<a class="anchor" id="a66419d0c87ac23bc422db0279486fd31"></a><!-- doxytag: member="Compass::last_update" ref="a66419d0c87ac23bc422db0279486fd31" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned long <a class="el" href="class_compass.html#a66419d0c87ac23bc422db0279486fd31">Compass::last_update</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_compass_8h_source.html#l00016">16</a> of file <a class="el" href="_compass_8h_source.html">Compass.h</a>.</p>
</div>
</div>
<a class="anchor" id="a8324bcab8618a2a2076a511dec2cc8a0"></a><!-- doxytag: member="Compass::mag_x" ref="a8324bcab8618a2a2076a511dec2cc8a0" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="class_compass.html#a8324bcab8618a2a2076a511dec2cc8a0">Compass::mag_x</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_compass_8h_source.html#l00010">10</a> of file <a class="el" href="_compass_8h_source.html">Compass.h</a>.</p>
</div>
</div>
<a class="anchor" id="a4de5f44fab49fabf8524ea79e9d3f84a"></a><!-- doxytag: member="Compass::mag_y" ref="a4de5f44fab49fabf8524ea79e9d3f84a" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="class_compass.html#a4de5f44fab49fabf8524ea79e9d3f84a">Compass::mag_y</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_compass_8h_source.html#l00011">11</a> of file <a class="el" href="_compass_8h_source.html">Compass.h</a>.</p>
</div>
</div>
<a class="anchor" id="a6c05eabd47bd8116c4823481c3ea4549"></a><!-- doxytag: member="Compass::mag_z" ref="a6c05eabd47bd8116c4823481c3ea4549" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="class_compass.html#a6c05eabd47bd8116c4823481c3ea4549">Compass::mag_z</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_compass_8h_source.html#l00012">12</a> of file <a class="el" href="_compass_8h_source.html">Compass.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_compass_8h_source.html">Compass.h</a></li>
</ul>
</div>
<hr class="footer"/><address class="footer"><small>
Generated for ArduPilot Libraries by&nbsp;<a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.png" alt="doxygen"/></a></small></address>
</body>
</html>