Project

General

Profile

Statistics
| Revision:

root / branches / wireless / docs / libdragonfly / html / odometry_8h-source.html @ 1578

History | View | Annotate | Download (4.81 KB)

1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3
<title>Colony: odometry.h Source File</title>
4
<link href="tabs.css" rel="stylesheet" type="text/css">
5
<link href="doxygen.css" rel="stylesheet" type="text/css">
6
</head><body>
7
<!-- Generated by Doxygen 1.5.8 -->
8
<div class="navigation" id="top">
9
  <div class="tabs">
10
    <ul>
11
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
13
      <li><a href="modules.html"><span>Modules</span></a></li>
14
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
15
      <li class="current"><a href="files.html"><span>Files</span></a></li>
16
    </ul>
17
  </div>
18
  <div class="tabs">
19
    <ul>
20
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
21
      <li><a href="globals.html"><span>Globals</span></a></li>
22
    </ul>
23
  </div>
24
<h1>odometry.h</h1><a href="odometry_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
25
<a name="l00011"></a>00011 <span class="preprocessor">#ifndef __ODOMETRY_C__</span>
26
<a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor">#define __ODOMETRY_C__</span>
27
<a name="l00013"></a>00013 <span class="preprocessor"></span>
28
<a name="l00019"></a>00019 <span class="comment">//Odometry resolution, *64 microseconds.</span>
29
<a name="l00020"></a>00020 <span class="preprocessor">#define ODOMETRY_CLK 255u </span>
30
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define TIME_SCALE 64</span>
31
<a name="l00022"></a>00022 <span class="preprocessor"></span>
32
<a name="l00023"></a>00023 <span class="comment">//Wheel = 2.613 in.  </span>
33
<a name="l00024"></a>00024 <span class="comment">//Circumference = 208.508133 mm</span>
34
<a name="l00025"></a>00025 <span class="comment">//Distance per encoder click (circumference / 1024)  = 203.621224 um.</span>
35
<a name="l00026"></a>00026 <span class="comment">//Robot width = 5.3745 in. = 136.5123 mm</span>
36
<a name="l00027"></a>00027 
37
<a name="l00028"></a>00028 <span class="preprocessor">#define ROBOT_WIDTH_UM 137000  //um</span>
38
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define CLICK_DISTANCE_UM 204 //um</span>
39
<a name="l00030"></a>00030 <span class="preprocessor"></span>
40
<a name="l00031"></a>00031 <span class="preprocessor">#define DISTANCE_SCALE 2.10526316 //Magic constant.</span>
41
<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define ANGLE_SCALE 1.12823207 //Magic constant.</span>
42
<a name="l00033"></a>00033 <span class="preprocessor"></span>
43
<a name="l00035"></a>00035 <span class="keywordtype">long</span> <a class="code" href="group__odometry.html#g31c085285b8a8c5049123640e228741a" title="Retrieve the robots estimated x position.">odometry_dx</a>(<span class="keywordtype">void</span>);
44
<a name="l00036"></a>00036 
45
<a name="l00038"></a>00038 <span class="keywordtype">long</span> <a class="code" href="group__odometry.html#g52bee31a0838e0a782758c90e4fa35df" title="Retrieve the robots estimated y position.">odometry_dy</a>(<span class="keywordtype">void</span>);
46
<a name="l00039"></a>00039 
47
<a name="l00041"></a>00041 <span class="keywordtype">double</span> <a class="code" href="group__odometry.html#g85a0a0b11d2adf53e2f88a836080d1f4" title="Retrieve the robots estimated orientation.">odometry_angle</a>(<span class="keywordtype">void</span>);
48
<a name="l00042"></a>00042 
49
<a name="l00045"></a>00045 <span class="keywordtype">void</span> <a class="code" href="group__odometry.html#g9ccb8b57330f6769afa0f68be3a6d564" title="Initialize odometry. MUST be called before the other functions work.">odometry_init</a>(<span class="keywordtype">void</span>);
50
<a name="l00046"></a>00046 
51
<a name="l00049"></a>00049 <span class="keywordtype">void</span> <a class="code" href="group__odometry.html#g778f4744dfbdb1923b51cc43f0e9ff37" title="Reset position and orientation to the origin facing the x axis.">odometry_reset</a>(<span class="keywordtype">void</span>);
52
<a name="l00050"></a>00050 
53
<a name="l00052"></a>00052 <span class="keywordtype">long</span> <a class="code" href="group__odometry.html#gc958e4b80d89acf8b61a140b49353ff7" title="Report estimated velocity [mm/s].">odometry_velocity</a>(<span class="keywordtype">void</span>);
54
<a name="l00053"></a>00053  <span class="comment">//end group</span>
55
<a name="l00055"></a>00055 
56
<a name="l00056"></a>00056 <span class="preprocessor">#endif</span>
57
</pre></div></div>
58
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Nov 20 21:51:59 2009 for Colony by&nbsp;
59
<a href="http://www.doxygen.org/index.html">
60
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
61
</body>
62
</html>