Navigate to a given point using the OGM and virtual forces

Dependencies:   ISR_Mini-explorer mbed

Fork of VirtualForces by Georgios Tsamis

Revision:
9:b7138acdf4ac
Parent:
8:109314be5b68
Child:
10:a7fd80e79e80
--- 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");