Quote:
Originally Posted by charlie1218
XY and y arent in meters feet or inches, but in lattitude and longitude. I have a lookup table, but need to know how to create a code that say okay you have (x,Y) and (m,n) subtract those and then drag a value from the trig lookup table. Its the only way this can be done. I have no idea what blocks to use b.c as i said, i have never ever programmed before.
|
Yes, I know GPS outputs in Lat/Lon, but somwehere you need to start thinking in units of distance, even if they are hundred-thousandths of a degree.
How to program it? I can't* give you a direct & complete answer, but here are some things to try.
1. How do you determine the direction the robot will move? Somehow, you need to have a way of determining which direction the robot is "facing" right now, and which way it needs to face before it starts moving.
2. How do you determine distance moved? Needs to be fairly accurate, because GPS isn't. +/- 10 feet on a good day.
3. Do you need to deal with obstructions? If so, that's a problem an order of magnitude or two larger. Beyond the scope here.
OK, once you know 1 and 2, you find where you are, then where you want to be.
Then command the robot to turn until you're facing the right direction. Then move the robot about half the distance and stop. Last, re-check the direction & distance, and repeat until you reach the goal. If the distance is less than some minimum, say 40 feet, just go to the goal.
Do you need help in figuring out how to turn the robot, or make it go a certain distance?
Don
*Won't