Reach Waypoint Using GPS / Compass / Accelerometer - Algorithm?

I currently have a robot with some sensors like GPS, accelerometer and compass. What I would like to do is my robot in order to reach the GPS coordinate that I enter. I was wondering if there is any algorithm that already exists. I don’t need a source code that doesn’t make sense, just a procedure for my robot to do this so that I can understand what I’m doing ... At this point, imagine that I can access the GPS coordinate every time, so no the need for Kalman filters. I know this is unrealistic, but I would like to program it step by step, and Kalman is the next step.

If anyone has an idea ...

+3
source share
4 answers

To get a bearing (positive angle east of north) between two lat-long points, use:

bearing=mod(atan2(sin(lon2-lon1)*cos(lat2),(lat1)*sin(lat2)-sin(lat1)*cos(lat2)*cos(lon2-lon1)),2*pi)

Note - angles should probably be in radians depending on your math package.

But for small distances, you can simply calculate how many meters in one degree lat and long in your position, and then consider them as flat X, Y coordinates.

For typical 45-degree latitudes, this is about 111.122 km / degree lat, 78.847 km / degree bosom.

+1
source

1) Orient your robot towards your destination.

2) Move forward until the distance between you and your destination increases, where you should return to 1)

3) ... ( ), , .

0

Location. BearingTo , , .

0

, , .., :

http://www.movable-type.co.uk/scripts/latlong.html

, , . -, , :

(lat1)*sin(lat2)

:

cos(lat1)*sin(lat2)

, ...

0

All Articles