Problem with GPS and BS2 from parallax
tmd13
Posts: 16
Im trying to write a code for the parallax gps in bs2, im using the demo for the gps , i got it from parallax web page. But Im having problem trying to make the boe bot going from one point to the other, only using the latitude and longitude information.
If any of you guys have a code for this purpose ill appreciate you can provide it to me.
Or at least tell me what might be the problem
If any of you guys have a code for this purpose ill appreciate you can provide it to me.
Or at least tell me what might be the problem
Comments
Using GPS latitude and longitude for navigation for a boe-bot is not very useful because of the minimum resolution of GPS which I think is about 9 feet. You'll need to use something else for navigation over short distances.
I hope you can help me
I just want you to explain me a way that whenever i check a condition from the boe bot, it should do something.
·
Have you tested your movement routines? They look like they ought to work, but there are variations from servo to servo and from boebot to boebot and a perfect 90 degree turn on one might not work quite right on another. You might have to adjust the pulse widths slightly to balance the movement of the two wheel servos.
When i say decreasing and increasing what i mean is for example
·················································· N
··················································· |
··················································· |
·····················(B)················(A)······ |·················{A· = Latitude 25.7543 N;·Longitude· 80.3755 W}
··················································· |················ {B· = Latitude 25.7543 N; Longitude··80.3759 W}
··················································· |
················W - - - - - - - - - - - - - - - - - - - - - - - - - - - - -·E
··················································· |
··················································· |
··················································· |
··················································· |
··················································· |
··················································· |
····················································S
In this case from point A to point B the only values that change is the longitude, and the position in longitude increased in the end point.
So If the position where the boe bot is is smaller that the initial position, is because is moving in the oposite way, so it shold turn 180 degrees and forwar. until he reach the point B, that is the end of the path.
You don't have positions in the form 25.7543N. You have information in the form degrees / minutes / decimal minutes or maybe tenths of seconds plus a code for compass quadrant. How do you compare two positions in that format for less than or greater than? Have you actually looked at the code for the GPS receiver to see what is provided to you? It's very important that you understand what the GPS receiver is providing and what your existing sample program is doing.
As I said before, the resolution of ordinary GPS is roughly 9 feet. That means that you will have to move your boebot 9 feet for the readings to change. That sort of works if your boebot is in the middle of a large parking lot or a large school gymnasium, but the boebot is going to have to move large distances and make large errors in the process of trying to find a particular coordinate.
As he moves closer, the number decreases, and when he is there, it is 0 (well, in theory).
I believe that "but it didn't" meant it didn't do as he wanted it to do (move in the direction of the target).
To tmd13:
Theres some problems about your idea about the movement.
Generally it is okay, but what if you boe-bot is turned 2 degrees to the left? Then it will end up a couple of cm from the target. What will the boe-bot then do? turn 90 or 180 degrees, and end up past the target again. You need to first calculate your exact direction versus the target, and then turn it appropriately, so longtitude and latitude will hit 0 at the same time (Or make some intelligent turning system that can turn it slightly to each side while driving).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The school nerd
1. Using a compass figure out how many degrees to turn from curent point to desired point.
2. Turn that many degrees.
3. Go foward untill current Location (x, y) = Desired Location (x, y)
In short GPS tells you where you are not how you are facing.
You need a compass module in conjuntion with the gps.
Post Edited (CelticLord) : 6/15/2008 2:06:37 AM GMT