gps.html 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <html><head><title>Python: module gps</title>
  3. <meta charset="utf-8">
  4. </head><body bgcolor="#f0f0f8">
  5. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
  6. <tr bgcolor="#7799ee">
  7. <td valign=bottom>&nbsp;<br>
  8. <font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>gps</strong></big></big></font></td
  9. ><td align=right valign=bottom
  10. ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/joachim/Development/INF-3910-3/GPS/gps/gps.py">/home/joachim/Development/INF-3910-3/GPS/gps/gps.py</a></font></td></tr></table>
  11. <p></p>
  12. <p>
  13. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  14. <tr bgcolor="#ee77aa">
  15. <td colspan=3 valign=bottom>&nbsp;<br>
  16. <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
  17. <tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  18. <td width="100%"><dl>
  19. <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
  20. </font></dt><dd>
  21. <dl>
  22. <dt><font face="helvetica, arial"><a href="gps.html#Data">Data</a>
  23. </font></dt><dt><font face="helvetica, arial"><a href="gps.html#Location">Location</a>
  24. </font></dt><dt><font face="helvetica, arial"><a href="gps.html#NMEA">NMEA</a>
  25. </font></dt><dt><font face="helvetica, arial"><a href="gps.html#Value">Value</a>
  26. </font></dt><dd>
  27. <dl>
  28. <dt><font face="helvetica, arial"><a href="gps.html#Course">Course</a>
  29. </font></dt><dt><font face="helvetica, arial"><a href="gps.html#Distance">Distance</a>
  30. </font></dt><dt><font face="helvetica, arial"><a href="gps.html#HDOP">HDOP</a>
  31. </font></dt><dt><font face="helvetica, arial"><a href="gps.html#Position">Position</a>
  32. </font></dt><dt><font face="helvetica, arial"><a href="gps.html#Speed">Speed</a>
  33. </font></dt></dl>
  34. </dd>
  35. </dl>
  36. </dd>
  37. </dl>
  38. <p>
  39. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  40. <tr bgcolor="#ffc8d8">
  41. <td colspan=3 valign=bottom>&nbsp;<br>
  42. <font color="#000000" face="helvetica, arial"><a name="Course">class <strong>Course</strong></a>(<a href="gps.html#Value">Value</a>)</font></td></tr>
  43. <tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
  44. <td colspan=2><tt><a href="#Value">Value</a>:&nbsp;<a href="#Course">Course</a>/direction<br>&nbsp;</tt></td></tr>
  45. <tr><td>&nbsp;</td>
  46. <td width="100%"><dl><dt>Method resolution order:</dt>
  47. <dd><a href="gps.html#Course">Course</a></dd>
  48. <dd><a href="gps.html#Value">Value</a></dd>
  49. <dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
  50. </dl>
  51. <hr>
  52. Methods defined here:<br>
  53. <dl><dt><a name="Course-__init__"><strong>__init__</strong></a>(self, v, t)</dt></dl>
  54. <hr>
  55. Methods inherited from <a href="gps.html#Value">Value</a>:<br>
  56. <dl><dt><a name="Course-__float__"><strong>__float__</strong></a>(self)</dt></dl>
  57. <dl><dt><a name="Course-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
  58. <dl><dt><a name="Course-rad"><strong>rad</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;value&nbsp;in&nbsp;radians.</tt></dd></dl>
  59. <dl><dt><a name="Course-time"><strong>time</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;measurment&nbsp;time.</tt></dd></dl>
  60. <dl><dt><a name="Course-unit"><strong>unit</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;unit</tt></dd></dl>
  61. <dl><dt><a name="Course-value"><strong>value</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;value</tt></dd></dl>
  62. <hr>
  63. Data descriptors inherited from <a href="gps.html#Value">Value</a>:<br>
  64. <dl><dt><strong>__dict__</strong></dt>
  65. <dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
  66. </dl>
  67. <dl><dt><strong>__weakref__</strong></dt>
  68. <dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
  69. </dl>
  70. </td></tr></table> <p>
  71. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  72. <tr bgcolor="#ffc8d8">
  73. <td colspan=3 valign=bottom>&nbsp;<br>
  74. <font color="#000000" face="helvetica, arial"><a name="Data">class <strong>Data</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
  75. <tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
  76. <td colspan=2><tt>Reads&nbsp;and&nbsp;stores&nbsp;data&nbsp;from&nbsp;the&nbsp;GPS<br>&nbsp;</tt></td></tr>
  77. <tr><td>&nbsp;</td>
  78. <td width="100%">Methods defined here:<br>
  79. <dl><dt><a name="Data-__init__"><strong>__init__</strong></a>(self, pins<font color="#909090">=('P3', 'P4')</font>, baud<font color="#909090">=9600</font>)</dt></dl>
  80. <dl><dt><a name="Data-get_location"><strong>get_location</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;location-data.&nbsp;Should&nbsp;be&nbsp;used&nbsp;when&nbsp;new_location&nbsp;returns&nbsp;True.</tt></dd></dl>
  81. <dl><dt><a name="Data-new_location"><strong>new_location</strong></a>(self, ttw<font color="#909090">=5</font>)</dt><dd><tt>Waits&nbsp;for&nbsp;the&nbsp;GPS&nbsp;to&nbsp;return&nbsp;data&nbsp;with&nbsp;an&nbsp;'time&nbsp;to&nbsp;wait'-interval.<br>
  82. &nbsp;<br>
  83. Returns&nbsp;True&nbsp;if&nbsp;there&nbsp;is&nbsp;a&nbsp;new&nbsp;VALID&nbsp;location.</tt></dd></dl>
  84. <hr>
  85. Data descriptors defined here:<br>
  86. <dl><dt><strong>__dict__</strong></dt>
  87. <dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
  88. </dl>
  89. <dl><dt><strong>__weakref__</strong></dt>
  90. <dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
  91. </dl>
  92. </td></tr></table> <p>
  93. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  94. <tr bgcolor="#ffc8d8">
  95. <td colspan=3 valign=bottom>&nbsp;<br>
  96. <font color="#000000" face="helvetica, arial"><a name="Distance">class <strong>Distance</strong></a>(<a href="gps.html#Value">Value</a>)</font></td></tr>
  97. <tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
  98. <td colspan=2><tt><a href="#Value">Value</a>:&nbsp;<a href="#Distance">Distance</a><br>&nbsp;</tt></td></tr>
  99. <tr><td>&nbsp;</td>
  100. <td width="100%"><dl><dt>Method resolution order:</dt>
  101. <dd><a href="gps.html#Distance">Distance</a></dd>
  102. <dd><a href="gps.html#Value">Value</a></dd>
  103. <dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
  104. </dl>
  105. <hr>
  106. Methods defined here:<br>
  107. <dl><dt><a name="Distance-__init__"><strong>__init__</strong></a>(self, v, u, t)</dt></dl>
  108. <hr>
  109. Methods inherited from <a href="gps.html#Value">Value</a>:<br>
  110. <dl><dt><a name="Distance-__float__"><strong>__float__</strong></a>(self)</dt></dl>
  111. <dl><dt><a name="Distance-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
  112. <dl><dt><a name="Distance-rad"><strong>rad</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;value&nbsp;in&nbsp;radians.</tt></dd></dl>
  113. <dl><dt><a name="Distance-time"><strong>time</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;measurment&nbsp;time.</tt></dd></dl>
  114. <dl><dt><a name="Distance-unit"><strong>unit</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;unit</tt></dd></dl>
  115. <dl><dt><a name="Distance-value"><strong>value</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;value</tt></dd></dl>
  116. <hr>
  117. Data descriptors inherited from <a href="gps.html#Value">Value</a>:<br>
  118. <dl><dt><strong>__dict__</strong></dt>
  119. <dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
  120. </dl>
  121. <dl><dt><strong>__weakref__</strong></dt>
  122. <dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
  123. </dl>
  124. </td></tr></table> <p>
  125. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  126. <tr bgcolor="#ffc8d8">
  127. <td colspan=3 valign=bottom>&nbsp;<br>
  128. <font color="#000000" face="helvetica, arial"><a name="HDOP">class <strong>HDOP</strong></a>(<a href="gps.html#Value">Value</a>)</font></td></tr>
  129. <tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
  130. <td colspan=2><tt><a href="#HDOP">HDOP</a>:&nbsp;Horizontal&nbsp;dilution&nbsp;of&nbsp;precision.<br>&nbsp;</tt></td></tr>
  131. <tr><td>&nbsp;</td>
  132. <td width="100%"><dl><dt>Method resolution order:</dt>
  133. <dd><a href="gps.html#HDOP">HDOP</a></dd>
  134. <dd><a href="gps.html#Value">Value</a></dd>
  135. <dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
  136. </dl>
  137. <hr>
  138. Methods defined here:<br>
  139. <dl><dt><a name="HDOP-__init__"><strong>__init__</strong></a>(self, v, t)</dt></dl>
  140. <dl><dt><a name="HDOP-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
  141. <dl><dt><a name="HDOP-__str__"><strong>__str__</strong></a>(self)</dt></dl>
  142. <hr>
  143. Methods inherited from <a href="gps.html#Value">Value</a>:<br>
  144. <dl><dt><a name="HDOP-__float__"><strong>__float__</strong></a>(self)</dt></dl>
  145. <dl><dt><a name="HDOP-rad"><strong>rad</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;value&nbsp;in&nbsp;radians.</tt></dd></dl>
  146. <dl><dt><a name="HDOP-time"><strong>time</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;measurment&nbsp;time.</tt></dd></dl>
  147. <dl><dt><a name="HDOP-unit"><strong>unit</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;unit</tt></dd></dl>
  148. <dl><dt><a name="HDOP-value"><strong>value</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;value</tt></dd></dl>
  149. <hr>
  150. Data descriptors inherited from <a href="gps.html#Value">Value</a>:<br>
  151. <dl><dt><strong>__dict__</strong></dt>
  152. <dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
  153. </dl>
  154. <dl><dt><strong>__weakref__</strong></dt>
  155. <dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
  156. </dl>
  157. </td></tr></table> <p>
  158. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  159. <tr bgcolor="#ffc8d8">
  160. <td colspan=3 valign=bottom>&nbsp;<br>
  161. <font color="#000000" face="helvetica, arial"><a name="Location">class <strong>Location</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
  162. <tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
  163. <td colspan=2><tt><a href="#Location">Location</a>:<br>
  164. &nbsp;&nbsp;&nbsp;&nbsp;Tries&nbsp;to&nbsp;read&nbsp;data&nbsp;received&nbsp;from&nbsp;the&nbsp;GPS.<br>
  165. &nbsp;&nbsp;&nbsp;&nbsp;Sometimes&nbsp;the&nbsp;GPS&nbsp;will&nbsp;return&nbsp;data&nbsp;for&nbsp;som<br>
  166. &nbsp;&nbsp;&nbsp;&nbsp;of&nbsp;the&nbsp;segments,&nbsp;e.g&nbsp;it&nbsp;may&nbsp;happens&nbsp;that<br>
  167. &nbsp;&nbsp;&nbsp;&nbsp;it&nbsp;wont&nbsp;receive&nbsp;the&nbsp;GPGGA-segment&nbsp;every&nbsp;time.<br>&nbsp;</tt></td></tr>
  168. <tr><td>&nbsp;</td>
  169. <td width="100%">Methods defined here:<br>
  170. <dl><dt><a name="Location-__init__"><strong>__init__</strong></a>(self)</dt></dl>
  171. <dl><dt><a name="Location-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
  172. <dl><dt><a name="Location-altitude"><strong>altitude</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;altitude</tt></dd></dl>
  173. <dl><dt><a name="Location-course"><strong>course</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;course</tt></dd></dl>
  174. <dl><dt><a name="Location-hdop"><strong>hdop</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;precision</tt></dd></dl>
  175. <dl><dt><a name="Location-height"><strong>height</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;height</tt></dd></dl>
  176. <dl><dt><a name="Location-latitude"><strong>latitude</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;latitude</tt></dd></dl>
  177. <dl><dt><a name="Location-longitude"><strong>longitude</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;longitude.</tt></dd></dl>
  178. <dl><dt><a name="Location-satellites"><strong>satellites</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;amount&nbsp;of&nbsp;satellites&nbsp;the&nbsp;GPS&nbsp;is&nbsp;connected&nbsp;to.</tt></dd></dl>
  179. <dl><dt><a name="Location-set"><strong>set</strong></a>(self, msgid, segment)</dt><dd><tt>Sets&nbsp;data&nbsp;based&nbsp;on&nbsp;the&nbsp;segment&nbsp;received<br>
  180. msgid,&nbsp;[]byte:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;segment&nbsp;type,&nbsp;e.g&nbsp;b'$GPGGA'<br>
  181. segment,&nbsp;[]byte:&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;segment&nbsp;itself</tt></dd></dl>
  182. <dl><dt><a name="Location-speed"><strong>speed</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;speed</tt></dd></dl>
  183. <dl><dt><a name="Location-valid"><strong>valid</strong></a>(self)</dt><dd><tt>Returns&nbsp;wether&nbsp;or&nbsp;not&nbsp;the&nbsp;location&nbsp;is&nbsp;valid</tt></dd></dl>
  184. <hr>
  185. Data descriptors defined here:<br>
  186. <dl><dt><strong>__dict__</strong></dt>
  187. <dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
  188. </dl>
  189. <dl><dt><strong>__weakref__</strong></dt>
  190. <dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
  191. </dl>
  192. </td></tr></table> <p>
  193. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  194. <tr bgcolor="#ffc8d8">
  195. <td colspan=3 valign=bottom>&nbsp;<br>
  196. <font color="#000000" face="helvetica, arial"><a name="NMEA">class <strong>NMEA</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
  197. <tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
  198. <td colspan=2><tt>Just&nbsp;a&nbsp;class&nbsp;to&nbsp;describe&nbsp;the&nbsp;type&nbsp;of&nbsp;the&nbsp;received&nbsp;entry.<br>
  199. We&nbsp;should&nbsp;consider&nbsp;removing&nbsp;this&nbsp;to&nbsp;save&nbsp;space.<br>&nbsp;</tt></td></tr>
  200. <tr><td>&nbsp;</td>
  201. <td width="100%">Methods defined here:<br>
  202. <dl><dt><a name="NMEA-__init__"><strong>__init__</strong></a>(self, id)</dt></dl>
  203. <hr>
  204. Data descriptors defined here:<br>
  205. <dl><dt><strong>__dict__</strong></dt>
  206. <dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
  207. </dl>
  208. <dl><dt><strong>__weakref__</strong></dt>
  209. <dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
  210. </dl>
  211. </td></tr></table> <p>
  212. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  213. <tr bgcolor="#ffc8d8">
  214. <td colspan=3 valign=bottom>&nbsp;<br>
  215. <font color="#000000" face="helvetica, arial"><a name="Position">class <strong>Position</strong></a>(<a href="gps.html#Value">Value</a>)</font></td></tr>
  216. <tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
  217. <td colspan=2><tt><a href="#Value">Value</a>:&nbsp;<a href="#Position">Position</a><br>&nbsp;</tt></td></tr>
  218. <tr><td>&nbsp;</td>
  219. <td width="100%"><dl><dt>Method resolution order:</dt>
  220. <dd><a href="gps.html#Position">Position</a></dd>
  221. <dd><a href="gps.html#Value">Value</a></dd>
  222. <dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
  223. </dl>
  224. <hr>
  225. Methods defined here:<br>
  226. <dl><dt><a name="Position-__init__"><strong>__init__</strong></a>(self, v, u, t)</dt></dl>
  227. <dl><dt><a name="Position-__sub__"><strong>__sub__</strong></a>(self, other)</dt><dd><tt>Returns&nbsp;a&nbsp;new&nbsp;position&nbsp;with&nbsp;the&nbsp;subtracted&nbsp;value</tt></dd></dl>
  228. <hr>
  229. Methods inherited from <a href="gps.html#Value">Value</a>:<br>
  230. <dl><dt><a name="Position-__float__"><strong>__float__</strong></a>(self)</dt></dl>
  231. <dl><dt><a name="Position-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
  232. <dl><dt><a name="Position-rad"><strong>rad</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;value&nbsp;in&nbsp;radians.</tt></dd></dl>
  233. <dl><dt><a name="Position-time"><strong>time</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;measurment&nbsp;time.</tt></dd></dl>
  234. <dl><dt><a name="Position-unit"><strong>unit</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;unit</tt></dd></dl>
  235. <dl><dt><a name="Position-value"><strong>value</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;value</tt></dd></dl>
  236. <hr>
  237. Data descriptors inherited from <a href="gps.html#Value">Value</a>:<br>
  238. <dl><dt><strong>__dict__</strong></dt>
  239. <dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
  240. </dl>
  241. <dl><dt><strong>__weakref__</strong></dt>
  242. <dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
  243. </dl>
  244. </td></tr></table> <p>
  245. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  246. <tr bgcolor="#ffc8d8">
  247. <td colspan=3 valign=bottom>&nbsp;<br>
  248. <font color="#000000" face="helvetica, arial"><a name="Speed">class <strong>Speed</strong></a>(<a href="gps.html#Value">Value</a>)</font></td></tr>
  249. <tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
  250. <td colspan=2><tt><a href="#Value">Value</a>:&nbsp;<a href="#Speed">Speed</a><br>&nbsp;</tt></td></tr>
  251. <tr><td>&nbsp;</td>
  252. <td width="100%"><dl><dt>Method resolution order:</dt>
  253. <dd><a href="gps.html#Speed">Speed</a></dd>
  254. <dd><a href="gps.html#Value">Value</a></dd>
  255. <dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
  256. </dl>
  257. <hr>
  258. Methods defined here:<br>
  259. <dl><dt><a name="Speed-__init__"><strong>__init__</strong></a>(self, v, u, t)</dt></dl>
  260. <dl><dt><a name="Speed-to_kmh"><strong>to_kmh</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;speed&nbsp;in&nbsp;Km/h</tt></dd></dl>
  261. <dl><dt><a name="Speed-to_knot"><strong>to_knot</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;speed&nbsp;in&nbsp;knot</tt></dd></dl>
  262. <hr>
  263. Methods inherited from <a href="gps.html#Value">Value</a>:<br>
  264. <dl><dt><a name="Speed-__float__"><strong>__float__</strong></a>(self)</dt></dl>
  265. <dl><dt><a name="Speed-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
  266. <dl><dt><a name="Speed-rad"><strong>rad</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;value&nbsp;in&nbsp;radians.</tt></dd></dl>
  267. <dl><dt><a name="Speed-time"><strong>time</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;measurment&nbsp;time.</tt></dd></dl>
  268. <dl><dt><a name="Speed-unit"><strong>unit</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;unit</tt></dd></dl>
  269. <dl><dt><a name="Speed-value"><strong>value</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;value</tt></dd></dl>
  270. <hr>
  271. Data descriptors inherited from <a href="gps.html#Value">Value</a>:<br>
  272. <dl><dt><strong>__dict__</strong></dt>
  273. <dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
  274. </dl>
  275. <dl><dt><strong>__weakref__</strong></dt>
  276. <dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
  277. </dl>
  278. </td></tr></table> <p>
  279. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  280. <tr bgcolor="#ffc8d8">
  281. <td colspan=3 valign=bottom>&nbsp;<br>
  282. <font color="#000000" face="helvetica, arial"><a name="Value">class <strong>Value</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
  283. <tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
  284. <td colspan=2><tt>Defines&nbsp;a&nbsp;value&nbsp;received&nbsp;from&nbsp;the&nbsp;GPS<br>
  285. v,&nbsp;float:&nbsp;&nbsp;&nbsp;floating&nbsp;value<br>
  286. u,&nbsp;string:&nbsp;&nbsp;unit&nbsp;(e.g&nbsp;m,&nbsp;knot&nbsp;etc)<br>
  287. t,&nbsp;tuple:&nbsp;&nbsp;&nbsp;time&nbsp;when&nbsp;measured.<br>&nbsp;</tt></td></tr>
  288. <tr><td>&nbsp;</td>
  289. <td width="100%">Methods defined here:<br>
  290. <dl><dt><a name="Value-__float__"><strong>__float__</strong></a>(self)</dt></dl>
  291. <dl><dt><a name="Value-__init__"><strong>__init__</strong></a>(self, v, u, t<font color="#909090">=(0, 0, 0.0)</font>)</dt></dl>
  292. <dl><dt><a name="Value-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
  293. <dl><dt><a name="Value-rad"><strong>rad</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;value&nbsp;in&nbsp;radians.</tt></dd></dl>
  294. <dl><dt><a name="Value-time"><strong>time</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;measurment&nbsp;time.</tt></dd></dl>
  295. <dl><dt><a name="Value-unit"><strong>unit</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;unit</tt></dd></dl>
  296. <dl><dt><a name="Value-value"><strong>value</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;value</tt></dd></dl>
  297. <hr>
  298. Data descriptors defined here:<br>
  299. <dl><dt><strong>__dict__</strong></dt>
  300. <dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
  301. </dl>
  302. <dl><dt><strong>__weakref__</strong></dt>
  303. <dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
  304. </dl>
  305. </td></tr></table></td></tr></table>
  306. </body></html>