Line No. | Rev | Author | Line |
---|---|---|---|
1 | 6 | kaklik | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> |
||
3 | <title>Procyon AVRlib: gps.h Source File</title> |
||
4 | <link href="dox.css" rel="stylesheet" type="text/css"> |
||
5 | </head><body> |
||
6 | <!-- Generated by Doxygen 1.4.2 --> |
||
7 | <div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div> |
||
8 | <h1>gps.h</h1><a href="gps_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/*! \file gps.h \brief GPS position storage and processing library. */</span> |
||
9 | 00002 <span class="comment">//*****************************************************************************</span> |
||
10 | 00003 <span class="comment">//</span> |
||
11 | 00004 <span class="comment">// File Name : 'gps.h'</span> |
||
12 | 00005 <span class="comment">// Title : GPS position storage and processing function library</span> |
||
13 | 00006 <span class="comment">// Author : Pascal Stang - Copyright (C) 2002</span> |
||
14 | 00007 <span class="comment">// Created : 2002.08.29</span> |
||
15 | 00008 <span class="comment">// Revised : 2002.08.29</span> |
||
16 | 00009 <span class="comment">// Version : 0.1</span> |
||
17 | 00010 <span class="comment">// Target MCU : Atmel AVR Series</span> |
||
18 | 00011 <span class="comment">// Editor Tabs : 4</span> |
||
19 | 00012 <span class="comment">//</span> |
||
20 | 00013 <span class="comment">// NOTE: This code is currently below version 1.0, and therefore is considered</span> |
||
21 | 00014 <span class="comment">// to be lacking in some functionality or documentation, or may not be fully</span> |
||
22 | 00015 <span class="comment">// tested. Nonetheless, you can expect most functions to work.</span> |
||
23 | 00016 <span class="comment">//</span><span class="comment"></span> |
||
24 | 00017 <span class="comment">/// \ingroup driver_hw</span> |
||
25 | 00018 <span class="comment">/// \defgroup gps GPS Positioning and Navigation Function Library (gps.c)</span> |
||
26 | 00019 <span class="comment">/// \code #include "gps.h" \endcode</span> |
||
27 | 00020 <span class="comment">/// \par Overview</span> |
||
28 | 00021 <span class="comment">/// This library provides a generic way to store and process information</span> |
||
29 | 00022 <span class="comment">/// received from a GPS receiver. Currently the library only stores the most</span> |
||
30 | 00023 <span class="comment">/// recent set of GPS data (position, velocity, time) from a GPS receiver.</span> |
||
31 | 00024 <span class="comment">/// Future revisions will include navigation functions like calculate</span> |
||
32 | 00025 <span class="comment">/// heading/distance to a waypoint. The processing of incoming serial data</span> |
||
33 | 00026 <span class="comment">/// packets from GPS hardware is not done in this library. The libraries</span> |
||
34 | 00027 <span class="comment">/// tsip.c and nmea.c do the packet processing for Trimble Standard Interface</span> |
||
35 | 00028 <span class="comment">/// Protocol and NMEA-0813 repectively, and store the results in this library.</span> |
||
36 | 00029 <span class="comment"></span><span class="comment">//</span> |
||
37 | 00030 <span class="comment">// This code is distributed under the GNU Public License</span> |
||
38 | 00031 <span class="comment">// which can be found at http://www.gnu.org/licenses/gpl.txt</span> |
||
39 | 00032 <span class="comment">//</span> |
||
40 | 00033 <span class="comment">//*****************************************************************************</span> |
||
41 | 00034 |
||
42 | 00035 <span class="preprocessor">#ifndef GPS_H</span> |
||
43 | 00036 <span class="preprocessor"></span><span class="preprocessor">#define GPS_H</span> |
||
44 | 00037 <span class="preprocessor"></span> |
||
45 | 00038 <span class="preprocessor">#include "<a class="code" href="global_8h.html">global.h</a>"</span> |
||
46 | 00039 |
||
47 | 00040 <span class="comment">// constants/macros/typdefs</span> |
||
48 | 00041 <span class="keyword">typedef</span> <span class="keyword">union </span>union_float_u32 |
||
49 | 00042 { |
||
50 | 00043 <span class="keywordtype">float</span> f; |
||
51 | 00044 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i; |
||
52 | 00045 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> b[4]; |
||
53 | 00046 } float_u32; |
||
54 | 00047 |
||
55 | 00048 <span class="keyword">typedef</span> <span class="keyword">union </span>union_double_u64 |
||
56 | 00049 { |
||
57 | 00050 <span class="keywordtype">double</span> f; |
||
58 | 00051 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> i; |
||
59 | 00052 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> b[8]; |
||
60 | 00053 } double_u64; |
||
61 | 00054 |
||
62 | 00055 <span class="keyword">struct </span>PositionLLA |
||
63 | 00056 { |
||
64 | 00057 float_u32 lat; |
||
65 | 00058 float_u32 lon; |
||
66 | 00059 float_u32 alt; |
||
67 | 00060 float_u32 TimeOfFix; |
||
68 | 00061 u16 updates; |
||
69 | 00062 }; |
||
70 | 00063 |
||
71 | 00064 <span class="keyword">struct </span>VelocityENU |
||
72 | 00065 { |
||
73 | 00066 float_u32 east; |
||
74 | 00067 float_u32 north; |
||
75 | 00068 float_u32 up; |
||
76 | 00069 float_u32 TimeOfFix; |
||
77 | 00070 u16 updates; |
||
78 | 00071 }; |
||
79 | 00072 |
||
80 | 00073 <span class="keyword">struct </span>VelocityHS |
||
81 | 00074 { |
||
82 | 00075 float_u32 heading; |
||
83 | 00076 float_u32 speed; |
||
84 | 00077 float_u32 TimeOfFix; |
||
85 | 00078 u16 updates; |
||
86 | 00079 }; |
||
87 | 00080 |
||
88 | 00081 <span class="keyword">struct </span>PositionECEF |
||
89 | 00082 { |
||
90 | 00083 float_u32 x; |
||
91 | 00084 float_u32 y; |
||
92 | 00085 float_u32 z; |
||
93 | 00086 float_u32 TimeOfFix; |
||
94 | 00087 u16 updates; |
||
95 | 00088 }; |
||
96 | 00089 |
||
97 | 00090 <span class="keyword">struct </span>VelocityECEF |
||
98 | 00091 { |
||
99 | 00092 float_u32 x; |
||
100 | 00093 float_u32 y; |
||
101 | 00094 float_u32 z; |
||
102 | 00095 float_u32 TimeOfFix; |
||
103 | 00096 u16 updates; |
||
104 | 00097 }; |
||
105 | 00098 |
||
106 | 00099 <span class="keyword">typedef</span> <span class="keyword">struct </span>struct_GpsInfo |
||
107 | 00100 { |
||
108 | 00101 float_u32 TimeOfWeek; |
||
109 | 00102 u16 WeekNum; |
||
110 | 00103 float_u32 UtcOffset; |
||
111 | 00104 u08 numSVs; |
||
112 | 00105 |
||
113 | 00106 <span class="keyword">struct </span>PositionLLA PosLLA; |
||
114 | 00107 <span class="keyword">struct </span>PositionECEF PosECEF; |
||
115 | 00108 <span class="keyword">struct </span>VelocityECEF VelECEF; |
||
116 | 00109 <span class="keyword">struct </span>VelocityENU VelENU; |
||
117 | 00110 <span class="keyword">struct </span>VelocityHS VelHS; |
||
118 | 00111 |
||
119 | 00112 } GpsInfoType; |
||
120 | 00113 |
||
121 | 00114 <span class="comment">// functions</span> |
||
122 | 00115 <span class="keywordtype">void</span> gpsInit(<span class="keywordtype">void</span>); |
||
123 | 00116 GpsInfoType* gpsGetInfo(<span class="keywordtype">void</span>); |
||
124 | 00117 <span class="keywordtype">void</span> gpsInfoPrint(<span class="keywordtype">void</span>); |
||
125 | 00118 |
||
126 | 00119 <span class="preprocessor">#endif</span> |
||
127 | </pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Oct 29 03:41:06 2006 for Procyon AVRlib by |
||
128 | <a href="http://www.doxygen.org/index.html"> |
||
129 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address> |
||
130 | </body> |
||
131 | </html> |
Powered by WebSVN v2.8.3