GPS Example Questions

Hey,
You should try out the examples for Raspberry PI and Arduin here: http://www.seeedstudio.com/wiki/Grove_-_GPS and also try out the software http://www.seeedstudio.com/wiki/images/d/d7/SIMCom_GPS_DEMO_V1.07.zip to see if the problem is because of the module itself or because of something in the code.

We have seen problems with the modules itself before. If the problem is in the module then you should ask for a replacement from Seeed or the distributor from where you brought the GPS.

-Karan

I’m on Mac OS X so that demo program won’t work for me. Is there something for OS X that would work.

Also their Raspberry Pi demo is basically what your example code does. How is it any different? Is it really worth trying?

Hey rschmidt, sorry to hop in here; I was just looking over the . Before we send you off to test the GPS unit, are you sure you’re not entering in GPS data directly into Google maps to get the 40 mile error?

GPS puts out an NMEA string, and the data comes out in the format DDMM.MM where D is degrees, and M is minutes.

If you’re checking this position on Google Maps, you need a straight decimal degrees position (DD). More info on this is here (https://support.google.com/maps/answer/18539?hl=en)

There’s an extensive post on converting here: http://gis.stackexchange.com/questions/73282/convert-degree-minutes-to-decimal-degrees

But before we dig deeper on the problem, I just wanted to check that we’re not pumping GPRMC string data directly into google maps. Is that the case? Can you share your GPRMC string with us (I understand not wanting to because of privacy issues).

I put the the straight decimal numbers into this site: http://www.latlong.net/convert-address-to-lat-long.html, dividing by 100 first so it should be in DD.MMMMSS format. I pretty sure I’m doing this right. Do you still see a problem?

I think I still see a problem. The site you link to uses Google maps, which is going to run off Decimal Degrees.

So if you want to look up your position, you’ll need to convert DDMM.MM you get from the Seeed sensor to Decimal Degrees.

Without playing around with real numbers to double check my math (I’m not an expert in this mind you), I believe you convert DDMM.MM by the following:

Your number off the seeed sensor should look like XYZA.BC

d = ZA.BC / 60.

Your Decimal degree number, which should work in Google Maps, should be XY+d

I double checked this formula and it seems to work, using this javascript calculator: http://www.csgnetwork.com/gpscoordconv.html

You can use the third calculator (where you input DDD MM.MMMM) to calculate the DD number from the string that the sensor reports, and that should report the correct number for Google maps.

Ok, that looks right. What format is the seed sensor outputting? Seems like your project examples should talk about this.

Ok, now everything is working right. I changed the GPS example to output decimal degrees, suitable for putting into Google Maps. Attached is the code.

Hey,
Sorry for all the confusion.

Glad that it worked out for you. We’ll update the code ASAP so that it works out of the box for everyone.

-Karan

Hey rschmidt, Karan,

This is really great. Thank you for updating the code, and thanks for working through this. This is really fantastic and I think I’ll try to write a blog post about it.

rshmidt, what are you planning to do? Can you share with us?

Thanks folks!!

Hello Karan, when can I expect the update, as I still have problems to have a working GPS Example ?

Karan,

I’m implementing a lot of your python code in Elixir. So i’m going through your examples and seeing if I can make it work in Elixir. I’ve implemented the basic examples with no problem in Elixir. Next step is to write my control code to make the robot autonomous using all the sensors as input. I actually probably won’t use the GPS much right now as most of what I’ll be doing will be inside.

@pollwerk: can you update the local GoPiGo git repository and try the out the code. We just updated the examples.

@rschmidt: thanks for trying out the code and do keep us posted on your project goes.

-Karan

First I tried software/python/examples/gps bot/gps.py but this was not updated and - even when I tried - not working.

Then I looked up github and found that the file in software/python/other scripts/gps.py was updated on 10th June 2015 (today).

This I tried and its working. (Unfortunately I did not test this program before).

@Karan, thank you very much, Klaus

Hello,

Does anyone have example code of actually programming way points for the GoPiGo to follow? I’m keen to get that working.

Thanks so much!

Hey,
There are a couple of people working on GPS with the GoPiGo but I am not sure if any of them are creating a bot to follow waypoints.

There are a lot of resources available on the internet on how to create one. This should help: http://stackoverflow.com/questions/6000371/reach-a-waypoint-using-gps-compass-accelerometer-algorithm and http://dasl.mem.drexel.edu/alumni/bGreen/www.pages.drexel.edu/_weg22/gpsMagpie/gpsFixedWing.html. You might also need a compass to follow the direction towards the way-point.

Do let us know if you are able to get the project to work and if you need any more help.

-Karan

Also, you’re basically going to need to calculate azimuth between two sets of coordinates, turn to that angle, and run until your distance is 0 between your current coordinates, and the coordinates you’re aiming for.

With that in mind, if you have a compass and a GPS, the two numbers you need to know are azimuth to destination and distance to destination. And you can calculate those, in python, from two sets of GPS coordinates, using this fancy article here:

I think!

Hey, so can you tell us more about your project and what you’re working on?

I got everything up and running and my GPS.PY keeps outputting “unable to read” every second or two. The cables are switched properly. (A picture of the crossed over cable under the instruction would probably help people or even a 20 second youtube of someone crossing over the cable with a small screwdriver.) Does anyone have any experience with that unable to read message? Any clues on what to do? My build is the one that I downloaded about 10 days ago.

I am not sure but suspect that you have the wrong code (see my entry from May 23, 2015 at 8:28 pm). There I switched to GrovePI (but you need the board) and came back when rschmidt and karan had corrected the code for the GoPiGo.
Don’t spend much time but this is a possible reason. Just read through the whole thread to see similarities.
Or the GPS is broken (less realistic).
Normally it works even inside a building (not for the first steps to exclude this error cause).

I can confirm that updated GPS.PY file is outputting GPS data that looks fairly accurate. I can see 8 satellites inside of my two story stucco house in San Diego CA. Does anyone have a program that helps the gopigo navigate to waypoints? I assume you need a compass to orient the gopigo before you send it towards the next point?

I think that there are a couple of people working on the waypoint navigation but we have heard from anyone who got it to work. It would require a compass to navigate and there is some discussion on this thread too. Do let us know if you get it to work with your GoPiGo.

-Karan