My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
GPS  
How to get started using GPS with gmapcatcher
Featured
Updated Nov 1, 2009 by heldersepu

Introduction

The current implementation displays a GPS marker and can auto center the map to the GPS location.

The GPS functionality is supported using the gps daemon: http://gpsd.berlios.de .

If a GPS unit is properly installed and the gps daemon is running the GPS menu will show up in the main menu when gmapcatcher is started.

Compatible Devices

A List of compatible and tested devices is here: http://gpsd.berlios.de/hardware.html

Starting gmapcatcher with GPS

  • Start GPS daemon (bluetooth GPS): sudo gpsd -D 5 -nN /dev/rfcomm0
  • Start gmapcatcher

Installation of the GPS daemon

  • Ubuntu: sudo apt-get install python-gps
  • Windows: Download and install GPSd for Windows

Installation of bluetooth GPS

  • Run hcitool scan to find the GPS id on the form xx:xx:xx:xx:xx:xx.
  • Edit /etc/bluetooth/rfcomm.conf and add the following:
  • rfcomm0 {
      bind yes; 
      device _xx:xx:xx:xx:xx:xx_; 
      channel 1; 
      comment "BT GPS"; 
    }
  • Restart bluetooth: sudo /etc/init.d/bluetooth restart
Comment by killer3...@gmail.com, Aug 6, 2009

Most GPS devices are compatible with NMEA sentences, we can use the serial comm port or a socket to bring these sentences and parse them. I can do it but i dont know too much about phyton, so if you help me get started with phyton, just to be able to open the source of Gmapcatcher and modify i think i can help you.

Thanks...

Comment by project member heldersepu, Aug 7, 2009

A few links to get you started:

This is a starting point if you are in MS windows: http://code.google.com/p/gmapcatcher/wiki/devEnv

GMapCatcher Source documentation: http://gmapcatcher.googlecode.com/svn/doxygen/html/index.html

You should also read about GPSd: http://gpsd.berlios.de/

Please post your findings in  Issue 57 : http://code.google.com/p/gmapcatcher/issues/detail?id=57

Comment by project member cjre...@gmail.com, Sep 15, 2009

Before I buy a USB GPS device I would like to test if my GMapsCatcher installation on eeebuntu works correctly. I am attempting this with gpsfake and a NMEA log file I downloaded. The GMapsCatcher gui brings up the GPS options but does not place a marker on the map or move the map. Any ideas? The reason I wanted to test it first is that the markers option in GMApsCatcher does not work with me - the marker is so big it covers much of the UK. I haven't figures out yet how to change this in the source code...

Comment by project member heldersepu, Sep 15, 2009

Hi cjreeve,

You are entering uncharted territory, I have no idea how "gpsfake" works, I guess you could open a new issue about that.

The markers are all images (marker.png, marker_gps.png) you could edit them to something else just keep the same dimensions.

Comment by project member cjre...@gmail.com, Sep 15, 2009

Hi, talking to you enabled me to figure out my problem. It was that I was running gmapscatcher via a soft link in my path that pointed to maps.py, so gmapscatcher was looking for the images in the directory that I ran it from. Perhaps I'll add the gmapscatcher director to my path directly which should solve the problem. Cheers.

Comment by project member cjre...@gmail.com, Sep 15, 2009

Well, actually it only works if I start maps.py from the directory that images (that contains marker.png) is in. That is a bit inconvenient. Any idea if I can easily hard code the path to the image files by hand?

Comment by project member heldersepu, Sep 15, 2009

I see... You could create a shell script that launches the maps.py from the proper folder

#!/bin/bash
cd /home/me/working && python admin.py

If you still want to hard code the path to the images look in mapPixbuf.py http://code.google.com/p/gmapcatcher/source/browse/trunk/src/mapPixbuf.py

Comment by project member cjre...@gmail.com, Sep 15, 2009

Thanks, the bash idea worked for starting it from the terminal, but not from my Cairo Dock. I tried modifying the code but I think I'd need to compile it after would? I have no idea how to do that, but if you tell me maybe I'll be able to play with other things such as automatically filling in the current coords in when creating a new marker...

Btw, I got gpsfake working. I just had a bad log file. It was great watching the GPS marker tracing someone's journey. I've ordered a USB sat nav dongle and can't wait to get lost in India where I'm heading. I hope GMapCatcher continues to envolve - I love it. Thanks helder!

Comment by project member heldersepu, Sep 15, 2009

I'm not familiar with the Cairo Dock, but it should let you add a "shortcut" to the bash script.

No need to recompile in python, just change the code and run it that's all. I guess that at some point we should create a Linux installer

gpsfake working! That is very kool.

Comment by project member cjre...@gmail.com, Sep 22, 2009

Hello again helder,

First to let you know I got it all working - I had just made a typo in the path. I also got my eeebuntu working with a CVGI-B07 dongle and gpsd, but it wasn't easy. I had to use the -b option for gpsd otherwise it crashes the dongle, which it did, and had to use some SiRF software to reset it.

I have another problem with gmapcatcher. Please tell me if I should file a bug report: If I try to download any new maps, gmapcatcher downloads satellite images instead! This started happening on roughly 18 Sept. I tried a fresh install and temporarily moved .googlemaps so that it would be re-created but this did not help. I wonder if it is a change made by maps.google.com? Whether I choose to download maps or satellite images they all download from http://kmh[0-3].google.com/... Any ideas?

I could choose to use streetmaps instead I guess, the only problem is that they don't look as great and when I return to google mode and force them to update they don't update with googlemaps but with streetmaps. Because I can't figure out the system of how the tiles are saved I have no way of seperating my streetmap tiles from my google ones. I expect I'll have the same problem separating my satellite images from my maps. Any suggestion here?

Cheers, Chris.

Comment by project member heldersepu, Sep 22, 2009

Good that you have the GPS working!

Please fill in as many bugs as you find, it will be much better to keep them documented in the issues than here.

Comment by Alok.Pra...@gmail.com, Nov 14, 2009

An added feature to put rectangle selection or curve selection to download the maps will be nice.Its little awkward to add height and width.

Comment by tjoolfoo, Jun 15, 2010

Was there a follow up of Alok.Prasad7 issue? I wish for the same; To be more specific, I want to have the map of my country to the maximum zoom possible on a single image (e.g .png). The download option download the map into tiles...^^. Also the export option can only download the map at smaller zoom capacity...

Comment by esom...@gmail.com, Jul 1, 2010

Hi, what about n900 maemo, how is internal gps device called(under /dev i assume).

Comment by esom...@gmail.com, Jul 2, 2010

Hey, how about make it to read from gpx logs dumps, instead of gpsd, and it doesnt show me a position for coords in offline, which is bad.

Comment by ObiDanKi...@googlemail.com, Jul 2, 2010

Yo dude, i was wondering from watching network traffic why there is significant uploading taking place when downloading batch style? Is it to do with the out-packets requesting the relevant data? And the fact that each piece (or tile) requires a request? Is there anyway to slimline this perhaps? It appears to currently be about a 1/3 ratio of upload/download in that for 1.5Gb downloaded ive uploaded 500Mb's. Might be an area worth further investigation? Or is just to do with the way the google servers are structured? Cheers and keep up the good work man!! - Danildinho.

Comment by esom...@gmail.com, Jul 6, 2010

Ok, about n900 comes bit clear, here how to read device: http://wiki.maemo.org/PyMaemo/Using_Location_API#Complete_example About GMapcatcher not clear, cos we need offline app, but when it says: "can't search in offline mode and would you want to go online?" Really gives me a heartburn, please say something!

Comment by project member heldersepu, Jul 6, 2010

I guess that "n900 maemo" is a mobile device, currently we only get the GPS data from GPSD, please open a new issue to discuss this

Comment by TuxI...@gmail.com, Jul 6, 2010

I have been evaluating methods to gps navigation for hiking. The google terrain tiles are fabulous. Taking them offline, critical. Data space fraction of googleearth database. I have my gps unit on the way. I'll report back with what I am able to make of it. I am interested in a feature I have not seen mentioned.

Will GMapcatcher be giving us some kind of tracking that we can manage, as far as drawing tracks on the map by gps? a simpler approach to like feature in google earth where user could input albeit minimal data about points on the track.

I'll be using this app. Its such a great start, I cant wait to see how it evolves. Thanks to the developers/contributors.

Comment by esom...@gmail.com, Jul 10, 2010

heidersepu, thanks for reply. ye it's talk.maemo.org place for n900 discussion. Imho if app would suck mapping features from non-free oziExplorer, plus it has live gps, our foss future would become sooner.

Comment by ObiDanKi...@googlemail.com, Oct 19, 2010

I have recently bought a gps dongle and thought i'd try out the gps function on you dudes program. Sadly it doesn't seem to work.

I've got the dongle and gpsd working fine and outputting data which can then be piped into other programs xgps or for example tangogps to attain a gps fix and other relevant data.

The problem could appear in my humble opinion to be in the code that your program uses to 'grab' the raw data...process it and convert it into something meaningful ala a gps icon on the screen. I know this must be fairly easy to do (haha well not that easy otherwise i would of been able to fix it:P) as when you mouse over any point on the map using gmapcatcher it shows the long and lat at the bottom of the screen. All we need is the ability read these variables from the required data stream (i.e gpsd) and to then link it somehow with the code in your program, to then display a marker at this constantly refreshing long/lat. Here is the code i get when trying to click on gps on the main menu setting/ perhaps it might be of some use to you guys.

Im running 10.04 on a samsung n130 netbook.

Cheers guys =)

I've edited out computer name as its one less integer out on the wire so to speak ;)

Dan

Exception in thread Thread-60: Traceback (most recent call last):

File "/usr/lib/python2.6/threading.py", line 532, in bootstrap_inner
self.run()
File "/home//Tools/GMap75/gmapcatcher/mapGPS.py", line 85, in run
self.event.wait(self.interval)
File "/usr/lib/python2.6/threading.py", line 395, in wait
self.cond.wait(timeout)
File "/usr/lib/python2.6/threading.py", line 248, in wait
endtime = time() + timeout
TypeError?: unsupported operand type(s) for +: 'float' and 'str'

Comment by ObiDanKi...@googlemail.com, Oct 19, 2010

P.s my Gps dongle is a usb jobbit and is located at /dev/ttyUSB0. Is this path different in you dudes code and needs changing maybe?

Cheers again,

Dan

Comment by ObiDanKi...@googlemail.com, Oct 19, 2010

P.p.s being that all this shizzle is open source, is it not a viable solution just to check out the source code of say tangogps and borrow their working gps code?

;)

Comment by project member Mark111...@gmail.com, Oct 19, 2010

No-one's stopping you, Dan :-D

I've noticed that to develop the gps integration, you would need good gps signals + internet connection in 1 place

for some coding assistance, you could look at the patch I wrote at http://code.google.com/p/gmapcatcher/issues/detail?id=77

Comment by ObiDanKi...@googlemail.com, Oct 20, 2010

This is true dude, have you tried asking the tangogps dude if he minds if you borrow/use his gps functionality man? It's open-source and that i know, but still respect where respect is due and all that right. If you lot joined forces you'd have a super-mega advanced piece of sat-nav, capable of using an array of different map sources and downloading specific and fairly large amounts of map-data. Would be mega-good man.

The only thing that really f*cks me off is, all you sound people developing this really cool gear for free, because your cool peeps, and then what happens is some unscrupulous little parasites decide they can profit off someone elses work so they grab it change the code minutely and start selling it for £20 or whatever as a saleable program. I suppose its just people with different mind-sets and all that man. But fair-doos for sticking with it and contributing to something good man.

Why would you need internet connectability dude? Gpsd reports back to /dev/ttyUSB0 every second with raw gps data variables that are named longtitude and latitude (among others) if there was a way for your code to fetch/link/pipe to these specific variables, and then display the co-ords as a marker on your map, you'd have a viable gps solution maybe? I don't know the ins and outs because sadly i am but a young jedi when it comes to the ability to program, but theoretically it sounds alright i think. Once this link has been achieved all sorts of raw nmea sentence data could be used to implement different functions in your map, anazlying the gpsd manual page shows all the possibilities. =P. Once this is functional you could have bluetooth shades with little screens inside and gps satellite imagery of your position from above. Sounds futuristic man, but perhaps we are but one link away ;)

- Dan

Comment by project member Mark111...@gmail.com, Oct 20, 2010

Hi Dan,

So that programming hints one may look up, Internet connectivity one often needs; this way much improved may one's productivity be :-D

Comment by project member Mark111...@gmail.com, Oct 20, 2010

As for people making a commercial product from the code, well the principle is that providing they respect the terms of the gplv2, they're allowed to; the hope is that a truly profitable product would lead to enhanced prospects for the programmers of the free software too; besides there's nothing stopping us from developing some kind of commercial parallel product of our own, although I'd say £20 for a map caching program may be optimistic, it would be optimistic for windows 7 starter the way it looks to me :-D

Comment by project member Mark111...@gmail.com, Oct 20, 2010

As for borrowing code from tangogps, the normal principle is similarly that providing you respect the terms of their provision of the code – that could involve compatibility when their terms are different from gplv2, although it usually simply needs attribution when chunks of code are lifted directly – you are allowed to borrow from their code freely; No real need for permission, even for the sake of good manners, unless you were for instance forking the project when you would check as they would possibly deplore the fragmentation; besides it's usually unclear precisely who could give permission / the original author of the relevant code may no longer be a contributor to the project / etc

You may notice that the code in the patch is in fact borrowed from gpsd-clients, rather than tangogps, although it's a matter for you who you borrow from :-)

Comment by ObiDanKi...@googlemail.com, Oct 24, 2010

I see. Ulterior motives abound ;).

Comment by ObiDanKi...@googlemail.com, Oct 24, 2010

It does make sense though i spose.

Comment by ObiDanKi...@googlemail.com, Oct 24, 2010

It would appear then, that perhaps i was somewhat mistaken as to the primary motivations for this project? In which case i retract my words of encouragement for they are not needed. And could perhaps instead be perceived to be, flattery. Although i did indeed intend them as encouragement. ;)

Comment by ObiDanKi...@googlemail.com, Oct 24, 2010

Know though that my fundamental belief is that all humans are equals. ;)

Comment by project member Mark111...@gmail.com, Oct 25, 2010

All humans need food, shelter, warmth, rarely available for free – these truths are even more self-evident :-)

Comment by robert.f...@gmail.com, Jun 23, 2011

I have found a solution for a problem that I saw posted somewhere but cant seem to find now. Any way I will put the solution here.

I am using a BU-353 USB GPS and windows vista. Running gpsd seemed to work, gmapcatcher showed the gps options but no marker appeared on the map. I found that if you open a terminal with cygwin as administrator (right click on cygwin icon, choose run as admin), then start gpsd in this cygwin window (gpsd -b -N -D 2 /dev/com? ) The problem was fixed, and GPS is working great in gmapcatcher.

PS to find the com port number in vista control panel -> system -> device manager Click on ports the gps is the device that says Prolific USB ... the com port number is in brackets at the end of this line.

Comment by robert.f...@gmail.com, Jun 23, 2011

Further to the above comment. Sometimes if you have restarted gpsd or run another program that connects to your GPS, the problem comes back. If you close all GPS programs then go to the device manager-> ports right click on the Prolific USB... device, choose disable then enable, then restart gpsd and gmapcatcher it starts working again.

Comment by Joeying....@gmail.com, Feb 8, 2012

Could u send me the source code of GPS in Android platform, by the way, i am using adobe flash builder to do it. 447587646@qq.com Thanks advanced

Comment by reincoup...@gmail.com, Feb 11, 2013

Iam getting errors running mapcatcher: sh-3.00# mapcatcher Exception in thread Thread-5: Traceback (most recent call last):

File "/usr/lib/python2.7/threading.py", line 551, in bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/dist-packages/gmapcatcher/mapGPS.py", line 117, in run
self.gps_session.next()
File "/usr/local/lib/python2.7/dist-packages/gmapcatcher/gps/gps.py", line 311, in next
if self.read() == -1:
File "/usr/local/lib/python2.7/dist-packages/gmapcatcher/gps/gps.py", line 302, in read
self.oldstyle_shim()
File "/usr/local/lib/python2.7/dist-packages/gmapcatcher/gps/gps.py", line 267, in oldstyle_shim
self.fix.time = isotime(self.utc.encode("ascii"))
AttributeError?: 'float' object has no attribute 'encode' ...and the gps does not work although gpsd is happily producing data...


Sign in to add a comment
Powered by Google Project Hosting