GPS/40X2 control

Hi All
I am attempting to use a gps with a 40X2 to control a model boat to travel to a waypoint about 1 km away. Can anyone please help with the actual equations/formulas/ calculations I'd need to use to make this work?:)
 

hippy

Ex-Staff (retired)
I think it should generally be 'basic Pythagorus'. Assuming you have a long/lat of where you are, a long/lat of where you want to be, You can draw a triangle and determine an angle between the two points, SOHCAHTOA.

The basic trick is moving where you are to (0,0) which simply means subtracting/adding where you are to where you want to be. Working out which quadrant you're in, then adjusting the angle so it's a bearing from wherever you define 0 degree as.

The PICAXE by itself should be able to do the maths ( though not tried it ). You'll get errors in heading anyway if not taking into account wind and current and as it moves it should keep adjusting where to wanted and eventually tack to the destination. For higher accuracy the uM-FPU co-processor may prove useful.
 

Pauldesign

Senior Member
Hey Deon, is it some sort of boat buggy:)

If i fully understand your question, you may also want to automatically be notified when you reached your destination, which i'll say if you know the lat/long or waypoints of your intended destination (if not, you may use GPS visualizer, punch the name and get the coordinates or use your GPS module and any hyper terminal prog, sailed pass the place to get it lat/long coordinates then use it in your calculation as follows):

Use the lat and lon coordinates together with the cardinal points and performs a simple if test conditions; whereby upon arrival at your destination, the coordinates will be received by the GPS receiver, then perform a comparison checks if the stores values are the same as the received one.

And if that happens, you may tell the program to go a to label say Queensland and maybe display it on an LCD or light and LED and or speak using TTS synthesizer "Welcome to Queensland, you've reached your destination".

Unfortunately the heading or course or direction values logged by a GPS receiver is very erratic esp if the object is not moving or moving slowly.

The above solution doesn't do direction finding but do location finding and should work if you're traveling in straight (ponit A TO B) a line irrespective of your direction.

By combining this and Hippy's solution, you might get it to do both direction and location finding.
 

matherp

Senior Member
Deon

See

http://williams.best.vwh.net/avform.htm

for the actual formula to calculate anything to do with course and distance between two points on the earths surface

As per a previous post you would need a maths co-processor to do this on a picaxe unless you can calc them on a PC and download the answer?

Best regards

Peter
 

MPep

Senior Member
What GPS type is it? A module or a complete receiver like a Garmin?
If a Garmin, then you can use "GOTO Waypoint" function and use the APB sentences.
 
Top