Using GPS to set bot "boundaries"
I am guessing this should be a simple question to some... Can I use GPS on my bot to keep it within certain boundaries? Say I have a plot of land.... say 100 acres. The property would be an odd shape (not a square). It can be within 30' of the boundaries, so it doesn't have to be exact, just to keep it from leaving the property.
Can this be done simple enough?
Thanks,
Joe
Can this be done simple enough?
Thanks,
Joe
Comments
Since extreme accuracy is not critical here, I don't see why a GPS wouldn't work. I would tackle it this way:
- take your GPS and walk to each "point" on the property where you would draw connecting boundary lines (e.g. if your property is trapezoid shaped, go to each point of the trapezoid)
- once at the "point" walk about 10'-20' towards the approximate center of the property (this is your "buffer" zone to account for the relative lack of accuracy in the GPS)
- mark the waypoint in your GPS
- once you have done all the points of the property, copy down the long/lat of each point for reference later
Connect a GPS to your Stamp (see link to article below on connecting and interpreting GPS data in a Stamp).
Now the tricky part -- you will need to do some basic trig in your program to interpret long/lat along the virtual "line" between any two points to see if you've crossed the boundary (since you have an irregular shape).
You could also consider establishing a rectangular bounding box within the property for the 'bot -- this wouldn't be as cool as following the property line, but it would certainly make the geometry and code very simple (as simple as: 'bot long. needs to be greater than west long. and less than east long.) In fact, it might be a good test to get all the basic working correctly, THEN upgrade your code to handle irregular bounds.
Interfacing a Garmin with a Stamp:
www.parallax.com/dl/docs/cols/nv/vol4/col/nv103.pdf
Parallax also sells a standalone GPS module to use with any microcontroller:
www.parallax.com/detail.asp?product_id=28146
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
Regards,
Joe