Autonomous GPS RObot
Hello guys,
This is Mitesh and Sajveev here from Chicago, working on our GPS robot!
Need some expertise from you guys, we are completely stuck at GPS programming, Untill so far I have used the manual for BS2 module and have designed Servo motors and Ultrasonic sensor.
Both parts of the robot works fine, servos are going back and forth according to the coding and ultrasonic sensor is sending out signal of 33 Khz frequency.
The resolution of the Ultrasonic sensor is 1.5 feet, so it would detect any obstacles and avoids it, now comes the part where we are lost.
We are also using GPS that should read the signal from satellite and find the co-ordinates where the robot is standing at first! We used the program given with the GPS to know how would that work, but how should we create out final point where the robot should go by itself. By the way the resolution for the GPS is 7.5 feet that means the every 7.5 feet the co-ordinates changes by 0.1 fractional minutes.
" border="0">
This is Mitesh and Sajveev here from Chicago, working on our GPS robot!
Need some expertise from you guys, we are completely stuck at GPS programming, Untill so far I have used the manual for BS2 module and have designed Servo motors and Ultrasonic sensor.
Both parts of the robot works fine, servos are going back and forth according to the coding and ultrasonic sensor is sending out signal of 33 Khz frequency.
The resolution of the Ultrasonic sensor is 1.5 feet, so it would detect any obstacles and avoids it, now comes the part where we are lost.
We are also using GPS that should read the signal from satellite and find the co-ordinates where the robot is standing at first! We used the program given with the GPS to know how would that work, but how should we create out final point where the robot should go by itself. By the way the resolution for the GPS is 7.5 feet that means the every 7.5 feet the co-ordinates changes by 0.1 fractional minutes.
" border="0">
Comments
Rich H
In the future please confine posts on a subject to one forum. As of yesterday you had posted this subject in three forums and cross posting is not allowed. I have removed the message from the Completed Projects Forum. Thank you for your understanding. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
50 72 6F 6A 65 63 74 20 53 69 74 65
·
Ron aka sailman58
I think that you are asking how to get the destination coordinates.· The technique would depend on your mission.· I plot a course in Google Earth and use the Google Earth coordinates to lay out the intermediate and final way points.· The way points are manually entered into the program.· This method requires fine tuning once you are at the location where you intend to run.
I've seen others carry their robot around (or just the GPS unit from the robot) and use the GPS generated Latitude and Longitude to program the way points into the microcontroller.
Once you have the destination programmed and the present location from the GPS unit, then you must calculate a heading (atan2 function) to the·waypoint and use your compass to navigate to the destination.· Of course you should be updating the heading with every new GPS reading.
The 3 knots·varies·between different·GPS units.··For example,·one unit that I used last year did not update at all under 7 knots.· It just repeated the last good Course Over·Ground.
···· Rick Brooks
Is that because BS2 can not deal with floating numbers?
Sorry about the issue of crossposting.
Thank you
Yeah, but there are ways around that. Attached is some code used for a GPS UAV, there is some sacrifice in resolution but that was acceptable for my use which required coverage for a large area. For your use you can probably make some changes to increase the resolution if you sacrifice the area that it will cover.
Rich H
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Servo Boss, a 12 channel servo tester kit from Gadget Gangster.
then the BS2 can call user function loaded to the yM-FPU to calculate whatever you need. By the way on the yM-FPU web site there is a very good example of user functions related to GPS calculation...
jm.
jm.
WG9FO,
I looked at your code and seems almost same whar we have been trying for.
I wanted to ask you something that when you created the waypoints why did you put your minutes like this:
LatD01 CON 47 'Lat/Long entered in degrees then decimal degrees
LatM01 CON 9474
LongD01 CON 122
LongM01 CON 2000
Does that just to convert it from floating numbers to the integers.I mean when you use your GPS and it would show you that you are standing at 46.3 56.9 38.9 and all we are concerned is about the last part of that which is 38.9, so should I just multiply that with 10 and make it an interger number so it can work with BS2 module.?
Looking forward to here from you.
The above code converts the the degrees, minutes, decimal minutes format of the GPS into degrees and decimal degrees for use in the program. This results in a resolution of .0001 degrees or about 40 ft. Unless the area you are working in crosses a degree boundary all the math can be done on just the decimal portion which is word sized. Each coordinate will have 4 numbers - Longitude degrees, Longitude decimal degrees, Latitude degrees and Latitude decimal degrees. You can discard the whole degrees portion if it won't change for the course you will run.
The Longitude decimal degrees is X and the Latitude decimal degrees is Y in the Cartesian coordinate system. This makes it easy to use ATN and HYP to find direction and distance to any other point on the grid.
Rich H
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Servo Boss, a 12 channel servo tester kit from Gadget Gangster.
The co-ordinates of the waypoints of my robot are,
Latitude: 041 56 36.5 N
Longitude: 067 41 28.9 W
You said that the resolution of your code is 40 feet but in my case the GPS chages its values at every 7.5 feet and it changes to the change of 0.1 in seconds column that is the last value in above co-ordinates.
How can I use these values to put in the BS2 module like you did by creating a waypoint like
LatD01 CON 47 'Lat/Long entered in degrees then decimal degrees
LatM01 CON 9474
LongD01 CON 122
LongM01 CON 2000
? please guide me thorugh
Here is my first way point Its co-ordinates are:
Point 1
latitude:41.944528 (41_56_40.3)
longitude:87.689111 (87_41_20.8)
In the bracket I have the deg, min, seconds) and the other values are the decimal values:
Now how do I put these values in the code:
LatD01 CON 41 'Lat/Long entered in degrees then decimal degrees
LatM01 CON 944528
LongD01 CON 87
LongM01 CON 689111
?
This would be my last question?
Rich H
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Servo Boss, a 12 channel servo tester kit from Gadget Gangster.
Okay first, the Basic Stamps can only have up to word size variables so the decimal portion of your latitude must be shortened to 9445. That is why the resolution using this program is only about 40 feet. It has nothing to do with the sensitivity of your GPS but the size of the variable we have to work with.
I would rewrite the program to better suit your purpose. You could get by with only using the decimal minutes portion of the GPS output.
You would need to convert your waypoints into degrees, minutes, decimal minutes - but we only use the decimal minutes portion.
LatM01 = 672
LongM01 = 345
This is actually easier than the way I had it and it uses less memory space but your operation area is limited. Looks like it should work well for anywhere on the school grounds though.
Rich H
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Servo Boss, a 12 channel servo tester kit from Gadget Gangster.
It is untested.
Rich H
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Servo Boss, a 12 channel servo tester kit from Gadget Gangster.
I'm working on the same project as mitesh22, using the same parallax GPS module but another microprocessor programmed in c++ (Arduino). Im using a library written for arduino for my GPS module (http://arduiniana.org/libraries/TinyGPS/) wich provides, longtitude, latitude, date, time, course and speed in order to receive and process the data i want.
I'm currenty writing a program in visual c++ which will be able to process an XML file from google earth, where the waypoints of my course will be saved, establish serial communication and send those coordinates (waypoints) to the microcontroller.
My main concern is the GPS modules accuracy. The manual says that there is a +-5 meters accuracy but when I entered the longtitude and latitude i first received from the module in google earth, i found out that there must be a higher deviation than 5 meters from those coordinates and my actual position.
Mitesh22 does the coordinates you receive from the module match your actual position? What your accuracy approximately?
I don't know if this devation comes from the library, but i can't sit and write myself a library that process the NMEA strings due to time and programming skills limitation.
Do you guys know in what speed should i be moving in order to avoid to use a compass and just use the GPS modules heading ?
As for the accuracy, are you indoors? My GPS will work indoors especially if near a window but when comparing with Google Earth, it can be quite a bit off. You could test it by taking it outside where it can get as many satellites locked as possible and note the readings (and # of sats) near an identifiable landmark, make sure your GPS is using the WGS84 datum. Then go away and come back to the same place later and note the reading again - the more times the better.
With this information you will be able to determine how well your GPS is doing. Compare the accuracy against # of satellites. If you are getting good repeatable results and it still doesn't line up with Google Earth you could just plan on offsetting all your waypoints accordingly. If your results still show a large deviation, it might be a problem with your GPS or the way it is mounted or something to do with the environment you are using it in.
Rich H
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Servo Boss, a 12 channel servo tester kit from Gadget Gangster.
I've noticed that when i left it work for a while, the stats got more accurate.
I'm guessing this is a result of locking more sats ? No sure though, as the library doesnt say the number of the satelites.
Whats WGS84 datum ?
Another thing. Do you guys think I could avoid to use a compass and use trigonometry to lead my vehicle to the correct heading?
My vehicle is a small tank with caterpillars, which means it can rotate (change direction) without moving.
My starting point is A and i want to reach point B. I start moving towards a random point, lets say C.
I can find the length of the sides of triangle BCD using the Pythagorean theorem and calculate the angle 'u' using the law of cosines.
http://en.wikipedia.org/wiki/Trigonometry
I know that my heading is from A to C and that i need to turn my vehicle by 'u' degrees in order to have the right heading and reach my waypoint.
Post Edited (blankk) : 9/30/2009 11:01:00 AM GMT
The problem is that i cant find out how much time it takes for my vehicle to rotate 360 degrees. Like i said my vehicle has caterpillars and it can rotate without moving. The time for a 360 degrees rotation depends on the surface my vehicle moves on.
I'm gonna buy a compass after all.