OSDN Git Service

lejos_NXJ_win32_0_5_0beta.zip
[nxt-jsp/lejos_nxj.git] / nxtOSEK / lejos_nxj / docs / apidocs / lejos / navigation / Pilot.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <!--NewPage-->
3 <HTML>
4 <HEAD>
5 <!-- Generated by javadoc (build 1.5.0_09) on Tue Jan 08 20:46:01 GMT 2008 -->
6 <TITLE>
7 Pilot (leJOS NXT API documentation)
8 </TITLE>
9
10 <META NAME="keywords" CONTENT="lejos.navigation.Pilot class">
11
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
13
14 <SCRIPT type="text/javascript">
15 function windowTitle()
16 {
17     parent.document.title="Pilot (leJOS NXT API documentation)";
18 }
19 </SCRIPT>
20 <NOSCRIPT>
21 </NOSCRIPT>
22
23 </HEAD>
24
25 <BODY BGCOLOR="white" onload="windowTitle();">
26
27
28 <!-- ========= START OF TOP NAVBAR ======= -->
29 <A NAME="navbar_top"><!-- --></A>
30 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
31 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
32 <TR>
33 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
34 <A NAME="navbar_top_firstrow"><!-- --></A>
35 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
36   <TR ALIGN="center" VALIGN="top">
37   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
38   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
39   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
40   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
41   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
42   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
43   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
44   </TR>
45 </TABLE>
46 </TD>
47 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
48 </EM>
49 </TD>
50 </TR>
51
52 <TR>
53 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
54 &nbsp;<A HREF="../../lejos/navigation/Navigator.html" title="interface in lejos.navigation"><B>PREV CLASS</B></A>&nbsp;
55 &nbsp;<A HREF="../../lejos/navigation/TachoNavigator.html" title="class in lejos.navigation"><B>NEXT CLASS</B></A></FONT></TD>
56 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57   <A HREF="../../index.html?lejos/navigation/Pilot.html" target="_top"><B>FRAMES</B></A>  &nbsp;
58 &nbsp;<A HREF="Pilot.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
59 &nbsp;<SCRIPT type="text/javascript">
60   <!--
61   if(window==top) {
62     document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
63   }
64   //-->
65 </SCRIPT>
66 <NOSCRIPT>
67   <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
68 </NOSCRIPT>
69
70
71 </FONT></TD>
72 </TR>
73 <TR>
74 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
75   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
76 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
77 DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
78 </TR>
79 </TABLE>
80 <A NAME="skip-navbar_top"></A>
81 <!-- ========= END OF TOP NAVBAR ========= -->
82
83 <HR>
84 <!-- ======== START OF CLASS DATA ======== -->
85 <H2>
86 <FONT SIZE="-1">
87 lejos.navigation</FONT>
88 <BR>
89 Class Pilot</H2>
90 <PRE>
91 <A HREF="../../java/lang/Object.html" title="class in java.lang">java.lang.Object</A>
92   <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>lejos.navigation.Pilot</B>
93 </PRE>
94 <DL>
95 <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../lejos/navigation/CompassPilot.html" title="class in lejos.navigation">CompassPilot</A></DD>
96 </DL>
97 <HR>
98 <DL>
99 <DT><PRE>public class <B>Pilot</B><DT>extends <A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A></DL>
100 </PRE>
101
102 <P>
103 The Pilot class is a software abstraction of the Pilot mechanism of a NXT robot. It contains methods to control robot movents: travel forward or backward in a straight line or a circular path or rotate to a new direction.  <br>
104  Note: this class will only work with two independently controlled Pilot motors to steer differentially, so it can rotate within its own footprint (i.e. turn on one spot).<br>
105  It can be used with robots that have reversed motor design: the robot moves in the direction opposite to the the dirction of motor rotation.
106  Uses the Motor class, which regulates motor speed using the NXT motor's built in tachometer. <br>
107  Some methods optionally return immediately so the thread that called the method can monitor sensors and call stop() if necessary.  <br>  
108  Uses the smoothAcceleration  property of Motors to improve motor symchronication
109   Example:<p>
110  <code><pre>
111         Pilot pilot = new Pilot(2.1f,4.4f,Motor.A, Motor.C,true);
112    pilot.setSpeed(720);// 2 RPM
113         pilot.travel(12);
114         pilot.rotate(-90);
115         pilot.travel(-12,true);
116         while(pilot.isMoving())Thread.yield();
117         pilot.rotate(-90);
118         pilot.rotateTo(270);
119         pilot.steer(-50,180,true);
120         while(pilot.isMoving())Thread.yield();
121         pilot.steer(100);
122         try{Thread.sleep(1000);}
123    catch(InterruptedException e){}
124         pilot.stop();
125  </pre></code>
126 <P>
127
128 <P>
129 <HR>
130
131 <P>
132 <!-- =========== FIELD SUMMARY =========== -->
133
134 <A NAME="field_summary"><!-- --></A>
135 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
136 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
137 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
138 <B>Field Summary</B></FONT></TH>
139 </TR>
140 <TR BGCOLOR="white" CLASS="TableRowColor">
141 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
142 <CODE>&nbsp;float</CODE></FONT></TD>
143 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#_degPerDistance">_degPerDistance</A></B></CODE>
144
145 <BR>
146 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;motor degrees per unit of travel</TD>
147 </TR>
148 <TR BGCOLOR="white" CLASS="TableRowColor">
149 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
150 <CODE>protected &nbsp;<A HREF="../../lejos/nxt/Motor.html" title="class in lejos.nxt">Motor</A></CODE></FONT></TD>
151 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#_left">_left</A></B></CODE>
152
153 <BR>
154 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;left motor</TD>
155 </TR>
156 <TR BGCOLOR="white" CLASS="TableRowColor">
157 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
158 <CODE>protected &nbsp;<A HREF="../../lejos/nxt/Motor.html" title="class in lejos.nxt">Motor</A></CODE></FONT></TD>
159 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#_right">_right</A></B></CODE>
160
161 <BR>
162 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;right motor</TD>
163 </TR>
164 <TR BGCOLOR="white" CLASS="TableRowColor">
165 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
166 <CODE>protected &nbsp;int</CODE></FONT></TD>
167 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#_speed">_speed</A></B></CODE>
168
169 <BR>
170 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;motor speed  degrees per second.</TD>
171 </TR>
172 <TR BGCOLOR="white" CLASS="TableRowColor">
173 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
174 <CODE>&nbsp;float</CODE></FONT></TD>
175 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#_trackWidth">_trackWidth</A></B></CODE>
176
177 <BR>
178 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;distance between wheels - used in steer()</TD>
179 </TR>
180 <TR BGCOLOR="white" CLASS="TableRowColor">
181 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
182 <CODE>&nbsp;float</CODE></FONT></TD>
183 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#_wheelDiameter">_wheelDiameter</A></B></CODE>
184
185 <BR>
186 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;diameter of tires</TD>
187 </TR>
188 </TABLE>
189 &nbsp;
190 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
191
192 <A NAME="constructor_summary"><!-- --></A>
193 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
194 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
195 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
196 <B>Constructor Summary</B></FONT></TH>
197 </TR>
198 <TR BGCOLOR="white" CLASS="TableRowColor">
199 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#Pilot(float, float, lejos.nxt.Motor, lejos.nxt.Motor)">Pilot</A></B>(float&nbsp;wheelDiameter,
200       float&nbsp;trackWidth,
201       <A HREF="../../lejos/nxt/Motor.html" title="class in lejos.nxt">Motor</A>&nbsp;leftMotor,
202       <A HREF="../../lejos/nxt/Motor.html" title="class in lejos.nxt">Motor</A>&nbsp;rightMotor)</CODE>
203
204 <BR>
205 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Allocates a Pilot object, and sets the physical parameters of the NXT robot.</TD>
206 </TR>
207 <TR BGCOLOR="white" CLASS="TableRowColor">
208 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#Pilot(float, float, lejos.nxt.Motor, lejos.nxt.Motor, boolean)">Pilot</A></B>(float&nbsp;wheelDiameter,
209       float&nbsp;trackWidth,
210       <A HREF="../../lejos/nxt/Motor.html" title="class in lejos.nxt">Motor</A>&nbsp;leftMotor,
211       <A HREF="../../lejos/nxt/Motor.html" title="class in lejos.nxt">Motor</A>&nbsp;rightMotor,
212       boolean&nbsp;reverse)</CODE>
213
214 <BR>
215 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Allocates a Pilot object, and sets the physical parameters of the NXT robot.</TD>
216 </TR>
217 </TABLE>
218 &nbsp;
219 <!-- ========== METHOD SUMMARY =========== -->
220
221 <A NAME="method_summary"><!-- --></A>
222 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
223 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
224 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
225 <B>Method Summary</B></FONT></TH>
226 </TR>
227 <TR BGCOLOR="white" CLASS="TableRowColor">
228 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
229 <CODE>&nbsp;void</CODE></FONT></TD>
230 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#backward()">backward</A></B>()</CODE>
231
232 <BR>
233 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the NXT robot backward until stop() is called.</TD>
234 </TR>
235 <TR BGCOLOR="white" CLASS="TableRowColor">
236 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
237 <CODE>&nbsp;void</CODE></FONT></TD>
238 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#forward()">forward</A></B>()</CODE>
239
240 <BR>
241 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the NXT robot forward until stop() is called.</TD>
242 </TR>
243 <TR BGCOLOR="white" CLASS="TableRowColor">
244 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
245 <CODE>&nbsp;int</CODE></FONT></TD>
246 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#getAngle()">getAngle</A></B>()</CODE>
247
248 <BR>
249 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;returns the angle of rotation of the robot since last call to reset of tacho count;</TD>
250 </TR>
251 <TR BGCOLOR="white" CLASS="TableRowColor">
252 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
253 <CODE>&nbsp;<A HREF="../../lejos/nxt/Motor.html" title="class in lejos.nxt">Motor</A></CODE></FONT></TD>
254 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#getLeft()">getLeft</A></B>()</CODE>
255
256 <BR>
257 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;returns left motor</TD>
258 </TR>
259 <TR BGCOLOR="white" CLASS="TableRowColor">
260 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
261 <CODE>&nbsp;int</CODE></FONT></TD>
262 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#getLeftActualSpeed()">getLeftActualSpeed</A></B>()</CODE>
263
264 <BR>
265 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;returns actual speed of left motor in degrees per second; a negative value if motor is rotating backwards  <br>
266  Updated avery 100 ms.</TD>
267 </TR>
268 <TR BGCOLOR="white" CLASS="TableRowColor">
269 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
270 <CODE>&nbsp;int</CODE></FONT></TD>
271 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#getLeftCount()">getLeftCount</A></B>()</CODE>
272
273 <BR>
274 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;returns tachoCount of left motor; Positive value means motor has moved the robot forward;</TD>
275 </TR>
276 <TR BGCOLOR="white" CLASS="TableRowColor">
277 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
278 <CODE>&nbsp;<A HREF="../../lejos/nxt/Motor.html" title="class in lejos.nxt">Motor</A></CODE></FONT></TD>
279 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#getRight()">getRight</A></B>()</CODE>
280
281 <BR>
282 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;returns right motor</TD>
283 </TR>
284 <TR BGCOLOR="white" CLASS="TableRowColor">
285 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
286 <CODE>&nbsp;int</CODE></FONT></TD>
287 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#getRightActualSpeed()">getRightActualSpeed</A></B>()</CODE>
288
289 <BR>
290 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;returns actual speed of right motor in deg/sec;  a negative value if motor is rotating backwards.</TD>
291 </TR>
292 <TR BGCOLOR="white" CLASS="TableRowColor">
293 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
294 <CODE>&nbsp;int</CODE></FONT></TD>
295 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#getRightCount()">getRightCount</A></B>()</CODE>
296
297 <BR>
298 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;returns tachoCount of the right motor; Positive value means motor has moved the robot forward;</TD>
299 </TR>
300 <TR BGCOLOR="white" CLASS="TableRowColor">
301 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
302 <CODE>&nbsp;int</CODE></FONT></TD>
303 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#getSpeed()">getSpeed</A></B>()</CODE>
304
305 <BR>
306 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return current speed setting</TD>
307 </TR>
308 <TR BGCOLOR="white" CLASS="TableRowColor">
309 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
310 <CODE>&nbsp;float</CODE></FONT></TD>
311 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#getTravelDistance()">getTravelDistance</A></B>()</CODE>
312
313 <BR>
314 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;returns distance taveled since last reset of tacho count</TD>
315 </TR>
316 <TR BGCOLOR="white" CLASS="TableRowColor">
317 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
318 <CODE>&nbsp;float</CODE></FONT></TD>
319 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#getTurnRatio()">getTurnRatio</A></B>()</CODE>
320
321 <BR>
322 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return ratatio of Motor revolutions per 360 degree rotation of the robot</TD>
323 </TR>
324 <TR BGCOLOR="white" CLASS="TableRowColor">
325 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
326 <CODE>&nbsp;boolean</CODE></FONT></TD>
327 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#isMoving()">isMoving</A></B>()</CODE>
328
329 <BR>
330 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;returns true iff the NXT robot is moving</TD>
331 </TR>
332 <TR BGCOLOR="white" CLASS="TableRowColor">
333 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
334 <CODE>&nbsp;void</CODE></FONT></TD>
335 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#regulateSpeed(boolean)">regulateSpeed</A></B>(boolean&nbsp;yes)</CODE>
336
337 <BR>
338 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets motor speed regulation   on = true (default) or off = false; <br>
339 Allows steer() method to be called by (for example)
340 a line tracker or compass navigator so direction control is from sensor inputs</TD>
341 </TR>
342 <TR BGCOLOR="white" CLASS="TableRowColor">
343 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
344 <CODE>&nbsp;void</CODE></FONT></TD>
345 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#resetTachoCount()">resetTachoCount</A></B>()</CODE>
346
347 <BR>
348 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resets tacho count for both motors</TD>
349 </TR>
350 <TR BGCOLOR="white" CLASS="TableRowColor">
351 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
352 <CODE>&nbsp;void</CODE></FONT></TD>
353 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#rotate(int)">rotate</A></B>(int&nbsp;angle)</CODE>
354
355 <BR>
356 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Rotates the  NXT robot through a specific angle; Rotates left if angle is positive, right if negative,
357  Returns when angle is reached.</TD>
358 </TR>
359 <TR BGCOLOR="white" CLASS="TableRowColor">
360 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
361 <CODE>&nbsp;void</CODE></FONT></TD>
362 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#rotate(int, boolean)">rotate</A></B>(int&nbsp;angle,
363        boolean&nbsp;immediateReturn)</CODE>
364
365 <BR>
366 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Rotates the  NXT robot through a specific angle; Rotates left if angle is positive, right if negative;
367  Returns immediately  iff immediateReturn is true.</TD>
368 </TR>
369 <TR BGCOLOR="white" CLASS="TableRowColor">
370 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
371 <CODE>&nbsp;void</CODE></FONT></TD>
372 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#setSpeed(int)">setSpeed</A></B>(int&nbsp;speed)</CODE>
373
374 <BR>
375 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets speed of both motors,  degrees/sec; also sets retulate speed true</TD>
376 </TR>
377 <TR BGCOLOR="white" CLASS="TableRowColor">
378 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
379 <CODE>&nbsp;void</CODE></FONT></TD>
380 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#steer(int)">steer</A></B>(int&nbsp;turnRate)</CODE>
381
382 <BR>
383 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the NXT robot in a circular path at a specific turn rate.</TD>
384 </TR>
385 <TR BGCOLOR="white" CLASS="TableRowColor">
386 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
387 <CODE>&nbsp;void</CODE></FONT></TD>
388 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#steer(int, int)">steer</A></B>(int&nbsp;turnRate,
389       int&nbsp;angle)</CODE>
390
391 <BR>
392 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the NXT robot in a circular path through a specific angle; <br>
393  Negative turnRate means center of turning circle is on right side of the robot; <br>
394  Range of turnRate values : -200 : 200 ; 
395  Robot will stop when total rotation equals angle.</TD>
396 </TR>
397 <TR BGCOLOR="white" CLASS="TableRowColor">
398 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
399 <CODE>&nbsp;void</CODE></FONT></TD>
400 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#steer(int, int, boolean)">steer</A></B>(int&nbsp;turnRate,
401       int&nbsp;angle,
402       boolean&nbsp;immediateReturn)</CODE>
403
404 <BR>
405 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the NXT robot in a circular path, and stops when the direction it is facing has changed by a specific angle;  <br>
406  Returns immediately if immediateReturn is true.</TD>
407 </TR>
408 <TR BGCOLOR="white" CLASS="TableRowColor">
409 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
410 <CODE>&nbsp;void</CODE></FONT></TD>
411 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#stop()">stop</A></B>()</CODE>
412
413 <BR>
414 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stops the NXT robot</TD>
415 </TR>
416 <TR BGCOLOR="white" CLASS="TableRowColor">
417 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
418 <CODE>&nbsp;void</CODE></FONT></TD>
419 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#travel(float)">travel</A></B>(float&nbsp;distance)</CODE>
420
421 <BR>
422 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the NXT robot a specific distance;<br>
423  A positive distance causes forward motion;  negative distance  moves backward.</TD>
424 </TR>
425 <TR BGCOLOR="white" CLASS="TableRowColor">
426 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
427 <CODE>&nbsp;void</CODE></FONT></TD>
428 <TD><CODE><B><A HREF="../../lejos/navigation/Pilot.html#travel(float, boolean)">travel</A></B>(float&nbsp;distance,
429        boolean&nbsp;immediateReturn)</CODE>
430
431 <BR>
432 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the NXT robot a specific distance; if immediateReturn is true, method returns immediately.</TD>
433 </TR>
434 </TABLE>
435 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
436 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
437 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
438 <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A></B></TH>
439 </TR>
440 <TR BGCOLOR="white" CLASS="TableRowColor">
441 <TD><CODE><A HREF="../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A></CODE></TD>
442 </TR>
443 </TABLE>
444 &nbsp;
445 <P>
446
447 <!-- ============ FIELD DETAIL =========== -->
448
449 <A NAME="field_detail"><!-- --></A>
450 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
451 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
452 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
453 <B>Field Detail</B></FONT></TH>
454 </TR>
455 </TABLE>
456
457 <A NAME="_left"><!-- --></A><H3>
458 _left</H3>
459 <PRE>
460 protected <A HREF="../../lejos/nxt/Motor.html" title="class in lejos.nxt">Motor</A> <B>_left</B></PRE>
461 <DL>
462 <DD>left motor
463 <P>
464 <DL>
465 </DL>
466 </DL>
467 <HR>
468
469 <A NAME="_right"><!-- --></A><H3>
470 _right</H3>
471 <PRE>
472 protected <A HREF="../../lejos/nxt/Motor.html" title="class in lejos.nxt">Motor</A> <B>_right</B></PRE>
473 <DL>
474 <DD>right motor
475 <P>
476 <DL>
477 </DL>
478 </DL>
479 <HR>
480
481 <A NAME="_degPerDistance"><!-- --></A><H3>
482 _degPerDistance</H3>
483 <PRE>
484 public final float <B>_degPerDistance</B></PRE>
485 <DL>
486 <DD>motor degrees per unit of travel
487 <P>
488 <DL>
489 </DL>
490 </DL>
491 <HR>
492
493 <A NAME="_speed"><!-- --></A><H3>
494 _speed</H3>
495 <PRE>
496 protected int <B>_speed</B></PRE>
497 <DL>
498 <DD>motor speed  degrees per second. Used by all methods that cause movememt
499 <P>
500 <DL>
501 </DL>
502 </DL>
503 <HR>
504
505 <A NAME="_trackWidth"><!-- --></A><H3>
506 _trackWidth</H3>
507 <PRE>
508 public final float <B>_trackWidth</B></PRE>
509 <DL>
510 <DD>distance between wheels - used in steer()
511 <P>
512 <DL>
513 </DL>
514 </DL>
515 <HR>
516
517 <A NAME="_wheelDiameter"><!-- --></A><H3>
518 _wheelDiameter</H3>
519 <PRE>
520 public final float <B>_wheelDiameter</B></PRE>
521 <DL>
522 <DD>diameter of tires
523 <P>
524 <DL>
525 </DL>
526 </DL>
527
528 <!-- ========= CONSTRUCTOR DETAIL ======== -->
529
530 <A NAME="constructor_detail"><!-- --></A>
531 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
532 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
533 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
534 <B>Constructor Detail</B></FONT></TH>
535 </TR>
536 </TABLE>
537
538 <A NAME="Pilot(float, float, lejos.nxt.Motor, lejos.nxt.Motor)"><!-- --></A><H3>
539 Pilot</H3>
540 <PRE>
541 public <B>Pilot</B>(float&nbsp;wheelDiameter,
542              float&nbsp;trackWidth,
543              <A HREF="../../lejos/nxt/Motor.html" title="class in lejos.nxt">Motor</A>&nbsp;leftMotor,
544              <A HREF="../../lejos/nxt/Motor.html" title="class in lejos.nxt">Motor</A>&nbsp;rightMotor)</PRE>
545 <DL>
546 <DD>Allocates a Pilot object, and sets the physical parameters of the NXT robot. <br>
547   Assumes  Motor.forward() causes the robot to move forward);
548 <P>
549 <DL>
550 <DT><B>Parameters:</B><DD><CODE>wheelDiameter</CODE> - Diameter of the tire, in any convenient units.  (The diameter in mm is usually printed on the tire).<DD><CODE>trackWidth</CODE> - Distance between center of right tire and center of left tire, in same units as wheelDiameter</DL>
551 </DL>
552 <HR>
553
554 <A NAME="Pilot(float, float, lejos.nxt.Motor, lejos.nxt.Motor, boolean)"><!-- --></A><H3>
555 Pilot</H3>
556 <PRE>
557 public <B>Pilot</B>(float&nbsp;wheelDiameter,
558              float&nbsp;trackWidth,
559              <A HREF="../../lejos/nxt/Motor.html" title="class in lejos.nxt">Motor</A>&nbsp;leftMotor,
560              <A HREF="../../lejos/nxt/Motor.html" title="class in lejos.nxt">Motor</A>&nbsp;rightMotor,
561              boolean&nbsp;reverse)</PRE>
562 <DL>
563 <DD>Allocates a Pilot object, and sets the physical parameters of the NXT robot. <br>
564 <P>
565 <DL>
566 <DT><B>Parameters:</B><DD><CODE>wheelDiameter</CODE> - Diameter of the tire, in any convenient units.  (The diameter in mm is usually printed on the tire).<DD><CODE>trackWidth</CODE> - Distance between center of right tire and center of left tire, in the same units as wheelDiameter<DD><CODE>reverse</CODE> - if true, the NXT robot moves forward when the motors are running backward.</DL>
567 </DL>
568
569 <!-- ============ METHOD DETAIL ========== -->
570
571 <A NAME="method_detail"><!-- --></A>
572 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
573 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
574 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
575 <B>Method Detail</B></FONT></TH>
576 </TR>
577 </TABLE>
578
579 <A NAME="getLeft()"><!-- --></A><H3>
580 getLeft</H3>
581 <PRE>
582 public <A HREF="../../lejos/nxt/Motor.html" title="class in lejos.nxt">Motor</A> <B>getLeft</B>()</PRE>
583 <DL>
584 <DD>returns left motor
585 <P>
586 <DD><DL>
587
588 <DT><B>Returns:</B><DD>left motor</DL>
589 </DD>
590 </DL>
591 <HR>
592
593 <A NAME="getRight()"><!-- --></A><H3>
594 getRight</H3>
595 <PRE>
596 public <A HREF="../../lejos/nxt/Motor.html" title="class in lejos.nxt">Motor</A> <B>getRight</B>()</PRE>
597 <DL>
598 <DD>returns right motor
599 <P>
600 <DD><DL>
601
602 <DT><B>Returns:</B><DD>right motor</DL>
603 </DD>
604 </DL>
605 <HR>
606
607 <A NAME="getLeftCount()"><!-- --></A><H3>
608 getLeftCount</H3>
609 <PRE>
610 public int <B>getLeftCount</B>()</PRE>
611 <DL>
612 <DD>returns tachoCount of left motor; Positive value means motor has moved the robot forward;
613 <P>
614 <DD><DL>
615 </DL>
616 </DD>
617 </DL>
618 <HR>
619
620 <A NAME="getRightCount()"><!-- --></A><H3>
621 getRightCount</H3>
622 <PRE>
623 public int <B>getRightCount</B>()</PRE>
624 <DL>
625 <DD>returns tachoCount of the right motor; Positive value means motor has moved the robot forward;
626 <P>
627 <DD><DL>
628 </DL>
629 </DD>
630 </DL>
631 <HR>
632
633 <A NAME="getLeftActualSpeed()"><!-- --></A><H3>
634 getLeftActualSpeed</H3>
635 <PRE>
636 public int <B>getLeftActualSpeed</B>()</PRE>
637 <DL>
638 <DD>returns actual speed of left motor in degrees per second; a negative value if motor is rotating backwards  <br>
639  Updated avery 100 ms.
640 <P>
641 <DD><DL>
642 </DL>
643 </DD>
644 </DL>
645 <HR>
646
647 <A NAME="getRightActualSpeed()"><!-- --></A><H3>
648 getRightActualSpeed</H3>
649 <PRE>
650 public int <B>getRightActualSpeed</B>()</PRE>
651 <DL>
652 <DD>returns actual speed of right motor in deg/sec;  a negative value if motor is rotating backwards. <br>
653   Updated avery 100 ms.
654 <P>
655 <DD><DL>
656 </DL>
657 </DD>
658 </DL>
659 <HR>
660
661 <A NAME="getTurnRatio()"><!-- --></A><H3>
662 getTurnRatio</H3>
663 <PRE>
664 public float <B>getTurnRatio</B>()</PRE>
665 <DL>
666 <DD>return ratatio of Motor revolutions per 360 degree rotation of the robot
667 <P>
668 <DD><DL>
669 </DL>
670 </DD>
671 </DL>
672 <HR>
673
674 <A NAME="getSpeed()"><!-- --></A><H3>
675 getSpeed</H3>
676 <PRE>
677 public int <B>getSpeed</B>()</PRE>
678 <DL>
679 <DD>return current speed setting
680 <P>
681 <DD><DL>
682
683 <DT><B>Returns:</B><DD>current speed</DL>
684 </DD>
685 </DL>
686 <HR>
687
688 <A NAME="setSpeed(int)"><!-- --></A><H3>
689 setSpeed</H3>
690 <PRE>
691 public void <B>setSpeed</B>(int&nbsp;speed)</PRE>
692 <DL>
693 <DD>Sets speed of both motors,  degrees/sec; also sets retulate speed true
694 <P>
695 <DD><DL>
696 </DL>
697 </DD>
698 </DL>
699 <HR>
700
701 <A NAME="forward()"><!-- --></A><H3>
702 forward</H3>
703 <PRE>
704 public void <B>forward</B>()</PRE>
705 <DL>
706 <DD>Moves the NXT robot forward until stop() is called.
707 <P>
708 <DD><DL>
709 </DL>
710 </DD>
711 </DL>
712 <HR>
713
714 <A NAME="backward()"><!-- --></A><H3>
715 backward</H3>
716 <PRE>
717 public void <B>backward</B>()</PRE>
718 <DL>
719 <DD>Moves the NXT robot backward until stop() is called.
720 <P>
721 <DD><DL>
722 </DL>
723 </DD>
724 </DL>
725 <HR>
726
727 <A NAME="rotate(int)"><!-- --></A><H3>
728 rotate</H3>
729 <PRE>
730 public void <B>rotate</B>(int&nbsp;angle)</PRE>
731 <DL>
732 <DD>Rotates the  NXT robot through a specific angle; Rotates left if angle is positive, right if negative,
733  Returns when angle is reached.
734  Wheels turn in opposite directions producing a  zero radius turn.
735 <P>
736 <DD><DL>
737 <DT><B>Parameters:</B><DD><CODE>angle</CODE> - degrees. Positive angle rotates to the left (clockwise); negative to the right. <br>Requires correct values for wheel diameter and track width.</DL>
738 </DD>
739 </DL>
740 <HR>
741
742 <A NAME="rotate(int, boolean)"><!-- --></A><H3>
743 rotate</H3>
744 <PRE>
745 public void <B>rotate</B>(int&nbsp;angle,
746                    boolean&nbsp;immediateReturn)</PRE>
747 <DL>
748 <DD>Rotates the  NXT robot through a specific angle; Rotates left if angle is positive, right if negative;
749  Returns immediately  iff immediateReturn is true.
750  Wheels turn in opposite directions producing a  zero radius turn.
751 <P>
752 <DD><DL>
753 <DT><B>Parameters:</B><DD><CODE>angle</CODE> - degrees. Positive angle rotates to the left; negative to the right. <br>Requires correct values for wheel diameter and track width.<DD><CODE>immediateReturn</CODE> - if true this method returns immediately</DL>
754 </DD>
755 </DL>
756 <HR>
757
758 <A NAME="getAngle()"><!-- --></A><H3>
759 getAngle</H3>
760 <PRE>
761 public int <B>getAngle</B>()</PRE>
762 <DL>
763 <DD>returns the angle of rotation of the robot since last call to reset of tacho count;
764 <P>
765 <DD><DL>
766 </DL>
767 </DD>
768 </DL>
769 <HR>
770
771 <A NAME="stop()"><!-- --></A><H3>
772 stop</H3>
773 <PRE>
774 public void <B>stop</B>()</PRE>
775 <DL>
776 <DD>Stops the NXT robot
777 <P>
778 <DD><DL>
779 </DL>
780 </DD>
781 </DL>
782 <HR>
783
784 <A NAME="isMoving()"><!-- --></A><H3>
785 isMoving</H3>
786 <PRE>
787 public boolean <B>isMoving</B>()</PRE>
788 <DL>
789 <DD>returns true iff the NXT robot is moving
790 <P>
791 <DD><DL>
792 </DL>
793 </DD>
794 </DL>
795 <HR>
796
797 <A NAME="resetTachoCount()"><!-- --></A><H3>
798 resetTachoCount</H3>
799 <PRE>
800 public void <B>resetTachoCount</B>()</PRE>
801 <DL>
802 <DD>resets tacho count for both motors
803 <P>
804 <DD><DL>
805 </DL>
806 </DD>
807 </DL>
808 <HR>
809
810 <A NAME="getTravelDistance()"><!-- --></A><H3>
811 getTravelDistance</H3>
812 <PRE>
813 public float <B>getTravelDistance</B>()</PRE>
814 <DL>
815 <DD>returns distance taveled since last reset of tacho count
816 <P>
817 <DD><DL>
818 </DL>
819 </DD>
820 </DL>
821 <HR>
822
823 <A NAME="travel(float)"><!-- --></A><H3>
824 travel</H3>
825 <PRE>
826 public void <B>travel</B>(float&nbsp;distance)</PRE>
827 <DL>
828 <DD>Moves the NXT robot a specific distance;<br>
829  A positive distance causes forward motion;  negative distance  moves backward.
830 <P>
831 <DD><DL>
832 <DT><B>Parameters:</B><DD><CODE>distance</CODE> - of robot movement. Unit of measure for distance must be same as wheelDiameter and trackWidth</DL>
833 </DD>
834 </DL>
835 <HR>
836
837 <A NAME="travel(float, boolean)"><!-- --></A><H3>
838 travel</H3>
839 <PRE>
840 public void <B>travel</B>(float&nbsp;distance,
841                    boolean&nbsp;immediateReturn)</PRE>
842 <DL>
843 <DD>Moves the NXT robot a specific distance; if immediateReturn is true, method returns immediately. <br>
844  A positive distance causes forward motion; negative distance moves backward.
845 <P>
846 <DD><DL>
847 <DT><B>Parameters:</B><DD><CODE>immediateReturn</CODE> - If true, method returns immediately, and robot stops after traveling the distance.  If false, method returns immediately.</DL>
848 </DD>
849 </DL>
850 <HR>
851
852 <A NAME="steer(int)"><!-- --></A><H3>
853 steer</H3>
854 <PRE>
855 public void <B>steer</B>(int&nbsp;turnRate)</PRE>
856 <DL>
857 <DD>Moves the NXT robot in a circular path at a specific turn rate. <br>
858  The center of the turning circle is on the right side of the robot iff parameter turnRate is negative;  <br>
859  turnRate values are between -200 and +200;
860 <P>
861 <DD><DL>
862 <DT><B>Parameters:</B><DD><CODE>turnRate</CODE> - If positive, the left wheel is on the inside of the turn.  If negative, the left wheel is on the outside.
863  This parameter determines the ratio of inner wheel speed to outer wheel speed (as a percent). <br>
864  <I>Formula:</i>    ratio  =  100 - abs(turnRate). When the ratio is negative, the outer and inner wheels rotate in opposite directions.<br>
865  Examples: <UL><LI> steer(25)-> inner wheel turns at 75% of the speed of the outer wheel <br>
866            <li>steer(100) -> inner wheel stops.<br>
867                          <li>steer(200) -> means that the inner wheel turns at the same speed as the outer wheel - a zero radius turn. <br></UL></DL>
868 </DD>
869 </DL>
870 <HR>
871
872 <A NAME="steer(int, int)"><!-- --></A><H3>
873 steer</H3>
874 <PRE>
875 public void <B>steer</B>(int&nbsp;turnRate,
876                   int&nbsp;angle)</PRE>
877 <DL>
878 <DD>Moves the NXT robot in a circular path through a specific angle; <br>
879  Negative turnRate means center of turning circle is on right side of the robot; <br>
880  Range of turnRate values : -200 : 200 ; 
881  Robot will stop when total rotation equals angle. If angle is negative, robot will move travel backwards.
882 <P>
883 <DD><DL>
884 <DT><B>Parameters:</B><DD><CODE>turnRate</CODE> - If positive, the left wheel is on the inside of the turn.  If negative, the left wheel is on the outside.
885  This parameter determines the ratio of inner wheel speed to outer wheel speed (as a percent). <br><DD><CODE>angle</CODE> - the angle through which the robot will rotate and then stop. If negative, robot traces the turning circle backwards.</DL>
886 </DD>
887 </DL>
888 <HR>
889
890 <A NAME="steer(int, int, boolean)"><!-- --></A><H3>
891 steer</H3>
892 <PRE>
893 public void <B>steer</B>(int&nbsp;turnRate,
894                   int&nbsp;angle,
895                   boolean&nbsp;immediateReturn)</PRE>
896 <DL>
897 <DD>Moves the NXT robot in a circular path, and stops when the direction it is facing has changed by a specific angle;  <br>
898  Returns immediately if immediateReturn is true.  The robot will stop automatically when the turm is complete. 
899  The center of the turning circle is on right side of the robot iff parameter turnRate is negative  <br>
900  turnRate values are between -200 and +200;
901 <P>
902 <DD><DL>
903 <DT><B>Parameters:</B><DD><CODE>turnRate</CODE> - If positive, the left wheel is on the inside of the turn.  If negative, the left wheel is on the outside.
904  This parameter determines the ratio of inner wheel speed to outer wheel speed (as a percent). <br><DD><CODE>angle</CODE> - the angle through which the robot will rotate and then stop. If negative, robot traces the turning circle backwards.<DD><CODE>immediateReturn</CODE> - iff true, method returns immedediately.</DL>
905 </DD>
906 </DL>
907 <HR>
908
909 <A NAME="regulateSpeed(boolean)"><!-- --></A><H3>
910 regulateSpeed</H3>
911 <PRE>
912 public void <B>regulateSpeed</B>(boolean&nbsp;yes)</PRE>
913 <DL>
914 <DD>Sets motor speed regulation   on = true (default) or off = false; <br>
915 Allows steer() method to be called by (for example)
916 a line tracker or compass navigator so direction control is from sensor inputs
917 <P>
918 <DD><DL>
919 </DL>
920 </DD>
921 </DL>
922 <!-- ========= END OF CLASS DATA ========= -->
923 <HR>
924
925
926 <!-- ======= START OF BOTTOM NAVBAR ====== -->
927 <A NAME="navbar_bottom"><!-- --></A>
928 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
929 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
930 <TR>
931 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
932 <A NAME="navbar_bottom_firstrow"><!-- --></A>
933 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
934   <TR ALIGN="center" VALIGN="top">
935   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
936   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
937   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
938   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
939   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
940   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
941   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
942   </TR>
943 </TABLE>
944 </TD>
945 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
946 </EM>
947 </TD>
948 </TR>
949
950 <TR>
951 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
952 &nbsp;<A HREF="../../lejos/navigation/Navigator.html" title="interface in lejos.navigation"><B>PREV CLASS</B></A>&nbsp;
953 &nbsp;<A HREF="../../lejos/navigation/TachoNavigator.html" title="class in lejos.navigation"><B>NEXT CLASS</B></A></FONT></TD>
954 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
955   <A HREF="../../index.html?lejos/navigation/Pilot.html" target="_top"><B>FRAMES</B></A>  &nbsp;
956 &nbsp;<A HREF="Pilot.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
957 &nbsp;<SCRIPT type="text/javascript">
958   <!--
959   if(window==top) {
960     document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
961   }
962   //-->
963 </SCRIPT>
964 <NOSCRIPT>
965   <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
966 </NOSCRIPT>
967
968
969 </FONT></TD>
970 </TR>
971 <TR>
972 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
973   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
974 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
975 DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
976 </TR>
977 </TABLE>
978 <A NAME="skip-navbar_bottom"></A>
979 <!-- ======== END OF BOTTOM NAVBAR ======= -->
980
981 <HR>
982
983 </BODY>
984 </HTML>