
Mapping for TP2
Dependencies: ISR_Mini-explorer mbed
Fork of GoToPointWithAngle by
Revision 9:b7138acdf4ac, committed 2017-03-27
- Comitter:
- geotsam
- Date:
- Mon Mar 27 16:26:41 2017 +0000
- Parent:
- 8:109314be5b68
- Child:
- 10:a7fd80e79e80
- Commit message:
- added target_angle in the function
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Mar 27 16:20:29 2017 +0000 +++ b/main.cpp Mon Mar 27 16:26:41 2017 +0000 @@ -5,8 +5,7 @@ Timer t; float dist(float robot_x, float robot_y, float target_x, float target_y); - -int goToPointWithAngle(float target_x, float target_y, int theta); +int goToPointWithAngle(float target_x, float target_y, float target_angle, int theta); float alpha; //angle error float rho; //distance from target @@ -58,7 +57,7 @@ return sqrt(pow(target_y-robot_y,2) + pow(target_x-robot_x,2)); } -int goToPointWithAngle(float target_x, float target_y, int theta) { +int goToPointWithAngle(float target_x, float target_y, float target_angle, int theta) { do { pc.printf("\n\n\r entered while");