Shop OBEX P1 Docs P2 Docs Learn Events
GPS Navigation — Parallax Forums

GPS Navigation

HatemHatem Posts: 20
edited 2008-02-01 01:32 in BASIC Stamp
Hello Everyone, I got the Parallax GPS module and was wondering if it is possible to have the Boe-Bot navigate using GPS data? If so, can you please provide me with a simple code that i could use for simple navigation. Thank you very much.

Comments

  • FranklinFranklin Posts: 4,747
    edited 2008-01-26 05:34
    That's what it's all about, experiment and learn. Start by getting the data out of the GPS and deciding what it is you will need to navigate with. Then you can write some code to use those values to direct the boe-bot. Remember GPS is best outside and the resolution is something like +-5 meters, quite large in relation to the bot.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • HatemHatem Posts: 20
    edited 2008-01-26 05:49
    Thanks Stephen, I will start by using the code provided from Parallax website and go from there. I will post another comment with my progress.
  • skatjskatj Posts: 88
    edited 2008-01-27 06:14
    Hey, I'm working on a similiar project and since so far I've only been asking for help on these forums, I figured I'd contribute. I don't know the actual code to do this, but I do know the concept so I'll explain that to you.

    Although the actual process is a lot more complicated, but I'll explain it in much more simpler terms. I'm not an expert so if your a pro be gentle!

    1. First you have to define where you want to go. Usually this is set into your program (they are known as waypoints).
    2. Next, you have to define where you start off at. You can get this information from your GPS receiver.
    3. Those two points, where you want to be and where you are, can be represented as vectors, which are in x,y format (latitude, longitude), so if you subtract where you are from where you want to be, you'll get a third vector, which connects those two points.
    4. Next, you have to figure out the angle, so you'll use the inverse tangent function to get the angle of this vector.
    5. Fifth, you compare this angle with your current bearing (which is given by the GPS receiver) and use the resulting difference to do calculations for your actual actuation (motors, servos, etc).
    6. Then, you keep running this loop until you hit the waypoint.

    There's alot of nuances, such as the fact that you're in the western hemisphere (if you're in the US), taking into account the angles relative to north, clockwise or counterclockwise, etc, but this is the general idea. There could be another way to do it, but this is just how I was taught.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-01-29 16:18
    Bear in mind, GPS doesn’t have fine resolution to be used in an indoor environment. It is intended for outdoor use on a larger scale. Depending on the number of satellites the accuracy could be +/- several yards so you wouldn’t be able to use it to navigate from room to room. However it could be used to navigate around a football field or something in a larger scale. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • HatemHatem Posts: 20
    edited 2008-02-01 00:44
    I have three questions about my Boe-Bot project.
    1) If I have all the sixteen pins in use (GPS, Bluetooth, Infrared sensors, and the Ping sensor) how many batteries do I need. I currently have one Boe-boost battery attached.
    2) I replaced the original BS2 chip with the BS2px24 and my Boe-Bot was acting funny. I am not very good with this so any information would greatly help. I thought I need it the most advanced chip with this project because of all the modules I have connected and running at the same time.
    3) If I want to use the GPS module to navigate, do I need to have the RAW pin pulled high or low.
    ·
    Thank you very much for all the help and information provided.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-02-01 01:32
    1) The Board of Education has its own regulator for the I/O devices. It should do just fine. The main battery issue is how fast they're drained. The GPS and Bluetooth interfaces are probably the most power hungry after the motors. Add up the requirements that are published in the documentation. There are different capacity AA rechargable cells. The largest (capacity wise) are 2300 to 2500 mAh. They will provide about 2500 mA for one hour or 250mA for 10 hours. Usually they provide less current at high drains, so they may provide only 2000 to 2300 mA over one hour.

    2) The BS2px is faster than the BS2 and the various timing constants like the Baud constants are different. Make sure you've adjusted them or you won't be able to communicate with the GPS or Bluetooth adapters.

    3) Read the GPS documentation. The RAW pin causes the GPS adapter to provide its data in very different formats.
Sign In or Register to comment.