Hi, I've started working on a "just for fun" project involving an autonomous vehicle using a GPS receiver (Garmin GPS35) and one or more PICs. The goal is to give the PIC a destination and then have it monitor the vehicle's displacement through the GPS receiver and then correct it's heading in real-time. The vehicle being a solar powered boat it will be rather slow... My problem is the following. "Domestic" GPS receivers (as opposed to dynamic GPS or military GPS) have a granularity of approximately 30-50 feet. The boat may take anywhere from 10 seconds to a minute to travel that distance depending on winds, currents and so on. The GPS needs a displacement in order to find a heading, so even in the best of conditions the PIC will only get the boat's heading every 10 seconds or so. So the PIC's sample/calculate/correct refresh rate can be anything between 0.1Hz and 0.016Hz. Many things can happen during that rather long period, the boat could get turned around by a wave, it could hit something and deviate etc... Under these conditions, I'm afraid the PIC's corrections will always be erroneous and it will either end up in a sort of feedback loop zigzagging (overshooting) or taking a very long time to correct small heading discrepancies instead of keeping a straight line. Is there any way you can think of to shorten the sample period to let's say 1 second without adding too much expensive hardware (gyroscopes, accelerometers and such) ? Perhaps some kind of linear regression algorithm or a PID loop? TH thorswil@videotron.ca -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu