hello..i need help in a MATLAB code..how can a ship move away from an obstacle under the sea..i am able to move ship till the obstacle but it should move away from it at some point i.e. a curve like shape at the end..plzz help me out..
If the ships coordinates are (x1,y1) and the obstacles coordinates are (x2,y2)
Then the distance between the ship and obstacle is sqrt((x1-x2)^2 +(y1-y2)^2)
At a suitable distance the ship must stop or change direction