Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Positioning with Mr. Watson's code (http://www.chiefdelphi.com/forums/showthread.php?t=34457)

Zalumaskov 11-02-2005 21:57

Positioning with Mr. Watson's code
 
I am basically trying to get the robot to keep note of its own (x,y) position then later go to a set (x,y).

To do the first part I think I must get some trig functions imported to do what
//pos_x += sin_int(heading) * dist;
//pos_y += cos_int(heading) * dist;
are supposed to do in robot_position()

Now to go to get to a set (x,y) I guess I must complete cmd_goto_waypoint(void). Can anyone help me with that? I lack PID knowledge.

RbtGal1351 12-02-2005 22:56

Re: Positioning with Mr. Watson's code
 
Quote:

Originally Posted by Zalumaskov
I am basically trying to get the robot to keep note of its own (x,y) position then later go to a set (x,y).

To do the first part I think I must get some trig functions imported to do what
//pos_x += sin_int(heading) * dist;
//pos_y += cos_int(heading) * dist;
are supposed to do in robot_position()

Now to go to get to a set (x,y) I guess I must complete cmd_goto_waypoint(void). Can anyone help me with that? I lack PID knowledge.

im doing the same thing; for the sine table:
i took the angles (in degrees) and took every 8, calculated the sine (in excel, btw). then i took the sines, multiplied by 256 and rouded to the nearest whole number. then we put them into a table (array) in the code. then interpolate for the values in between the factors of 8.
(we calculated in excel, you're only off by 2-3% max)

~Stephanie
Team 1351


All times are GMT -5. The time now is 23:55.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi