Gpsdrive with Openstreetmap

This article is outdated. They changed something that prevents Mapnik from working :-(

Will review when I have more time...

Want an open source navigation system, using open source maps? Read on!

Install the software:

sudo aptitude install postgresql postgresql-client postgresql-contrib postgresql-8.4-postgis
sudo aptitude install osm2pgsql gpsdrive

Change the password of the Postgres user (optional):

sudo -u postgres -i
psql postgres
ALTER USER postgres WITH ENCRYPTED PASSWORD 'new_password';
\q
rm .psql_history
exit

Add the following to /etc/sysctl.conf:

kernel.shmmax = 268435456

Change the following lines in /etc/postgresql/8.4/main/postgresql.conf:

shared_buffers = 128MB
checkpoint_segments = 20
maintenance_work_mem = 256MB
autovacuum = off

In Kubuntu 10.04 and later, it may be necessary to uncomment the latter 3 lines (remove the hash sign # from the beginning of the line).

Reboot for the shared memory settings (shmmax) to take effect. Check with:

sysctl -a | grep shmmax

Create the GIS database and change its owner (to you).

sudo -u postgres -i
   createuser your_username
   createdb -O your_username gis
   createlang plpgsql gis
   psql -d gis -f /usr/share/postgresql/8.4/contrib/_int.sql
   psql -d gis -f /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql
   psql -d gis
      ALTER TABLE geometry_columns OWNER TO your_username;
      ALTER TABLE spatial_ref_sys OWNER TO your_username;
      \q
   exit

Then you need to define the reference coordinate system by downloading:

http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/900913.sql

and execute it using:

psql -d gis -f 900913.sql

Now download a map from http://wiki.openstreetmap.org/index.php/Planet.osm and import it into the database using the following command:

osm2pgsql planet-nl-090221.osm.gz

Note that you need at least 1Gb of free RAM for this. If you have less, or if the command fails to allocate enough space, then use the -s option, and, if needed, the -C option. Then, however, you will need lots of disk space. In my case 6Gb was not enough, and that was just the map of the Netherlands... From the help info:

-s|--slim Store temporary data in the database. This greatly reduces the RAM usage but is much slower.
-C|--cache Only for slim mode: Use upto this many MB for caching nodes. Default is 800.

Start and quit gpsdrive, just in order to create its configuration directory. Then use the following commands to create a waypoint file if it does not exist and remove a config file before running gpsdrive in order to enable mapnik mode:

touch ~/.gpsdrive/way.txt
rm ~/.gpsdrive/osm.xml

Start gpsdrive. Enable mapnik mode and position mode. Click on the map to move it. Use the horizontal slider or Shift-LeftMB/Shift-RightMB to zoom in/out. When using gpsdrive for the first time, the cursor may be at a spot somewhere off the map. If this is the case, zoom out until you see a map and zoom into it.

Setting up the GPS device

If it is a USB device, its path will be something like /dev/ttyUSB0. If it is Bluetooth, make sure you have bluez-utils installed:

aptitude install bluez-utils

Then use the following command to find the address of your Bluetooth GPS device:

hcitool scan

Then connect it to /dev/rfcomm0:

rfcomm connect /dev/rfcomm0 xx:xx:xx:xx:xx:xx

Replace the x'es by the address of your GPS device. Test it using:

cat /dev/rfcomm0

You should see some coordinates passing by. Press Ctrl-C to quit. Now start gpsd:

gpsd /dev/rfcomm0

If you start gpsdrive now, it should find the GPS device.

References:

 

I’ve been surfing online more

I’ve been surfing online more than three hours today, yet I never found any interesting article like yours. It’s pretty worth enough for me. In my opinion, if all webmasters and bloggers made good content as you did, the web will be a lot more useful than ever before. www.leesappliancerepair.com I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article.

I have bookmarked your site,

I have bookmarked your site, the articles are path superior to anything other comparative websites.. a debt of gratitude is in order for an awesome web journal! Darel Lynwood Long

Much obliged to you for

Much obliged to you for peopling get the data they require. Incredible stuff not surprisingly. Keep up the considerable work!!! Questions to ask your boyfriend

https://www.9597.tw/

eliza

Your content is nothing short of brilliant in many ways. I think this is engaging and eye-opening material. Thank you so much for caring about your content and your readers. upload to instagram from mac

Much obliged for another

Much obliged for another superb post. Where else would anybody be able to get that sort of information in such a perfect method for composing? cost of clearing a container

Excellent .. Amazing .. I’ll

Excellent .. Amazing .. I’ll bookmark your blog and take the feeds also…I’m happy to find so many useful info here in the post, we need work out more techniques in this regard, thanks for sharing. seo company for small business

I was taking a gander at some

I was taking a gander at some of your posts on this site and I imagine this site is truly enlightening! Keep setting up.. address

Extraordinary things you've

Extraordinary things you've generally imparted to us. Simply continue written work this sort of posts.The time which was squandered in going for educational cost now it can be utilized for studies.Thanks gta5cash.net

I truly delighted in perusing

I truly delighted in perusing this post, huge fan. Keep doing awesome me when would you be able to distribute more articles or where would I be able to peruse more on the subject? The Magic of Making Up

I can"t envision

I can"t envision concentrating sufficiently long to research; significantly less compose this sort of article. You"ve beaten yourself with this material. This is awesome substance. damp proof membrane

This is an awesome post. I

This is an awesome post. I like this topic.This site has heaps of advantage.I discovered numerous fascinating things from this site. It helps me in numerous ways.Thanks for posting this once more. Benefits of Cucumbers

Positive site, where did u

Positive site, where did u think of the data on this posting? I'm satisfied I found it however, sick be inquiring soon to figure out what extra posts you incorporate. Hero Instinct

This is an incredible post. I

This is an incredible post. I like this topic.This site has heaps of advantage.I discovered numerous fascinating things from this site. It helps me in numerous ways.Thanks for posting this once more. blog

What a material of

What a material of un-ambiguity and preserveness of valuable familiarity on the topic of unpredicted feelings. 먹튀

I am constantly stunned by

I am constantly stunned by the measure of data accessible on this subject. What you exhibited was very much explored and eloquent so as to get your stand on this crosswise over to every one of your perusers. learn more

This web journal site is

This web journal site is really cool! How was it made ! Get The latest Gaming

Awesome things you've

Awesome things you've generally imparted to us. Simply continue composition this sort of posts.The time which was squandered in going for educational cost now it can be utilized for studies.Thanks it development outsourcing

I adore this online journal!!

I adore this online journal!! The glimmer up the top is wonderful!! car detailing orlando

Much thanks to you for the

Much thanks to you for the redesign, extremely pleasant site.. Palm Coast, FL

It is basic that we read blog

It is basic that we read blog entry precisely. I am now done it and find this post is truly astounding. AWOL Academy Inc

This article was composed by

This article was composed by a genuine speculation essayist. I concur a hefty portion of the with the strong focuses made by the essayist. I'll be back. portable ice makers

I think this is a standout

I think this is a standout amongst the most critical data for me. What's more, i'm happy perusing your article. Be that as it may, ought to comment on some broad things, The site style is flawless, the articles is truly awesome : D. Great job, here's to you turn picture into canvas print cheap

tariq

What a good blog you have here. Please update it more often. This topics is my interest. Thank you. . . http://entertainingbli28.mee.nu

internet

Easily, the article is actually the best topic on this registry related issue. I fit in with your conclusions and will eagerly look forward to your next updates. Just saying thanks will not just be sufficient, for the fantasti c lucidity in your writing. I will instantly grab your rss feed to stay informed of any updates.

internet

Easily, the article is actually the best topic on this registry related issue. I fit in with your conclusions and will eagerly look forward to your next updates. Just saying thanks will not just be sufficient, for the fantasti c lucidity in your writing. I will instantly grab your rss feed to stay informed of any updates.

Much thanks to you for the

Much thanks to you for the redesign, extremely pleasant site.. read more

Brilliantly composed article,

Brilliantly composed article, if just all bloggers offered the same substance as you, the web would be a far superior spot.. continue reading

Much thanks to you for the

Much thanks to you for the redesign, extremely pleasant site.. website design

Awesome post, and incredible

Awesome post, and incredible site. A debt of gratitude is in order for the data! The Author Incubator

I as of late ran over your

I as of late ran over your online journal and have been perusing along. I thought I would leave my first remark. I don't realize what to say with the exception of that I have delighted in perusing. Pleasant website. I will continue going by this web journal all the time. The Author Incubator

Much thanks to you for the

Much thanks to you for the redesign, extremely pleasant site.. More info

I got what you mean , a debt

I got what you mean , a debt of gratitude is in order for posting .Woh I am cheerful to discover this site through google. http://adobecs.aedsoftware.info/adobe-creative-suite-cs6.html

I might want to thank you for

I might want to thank you for the endeavors you have made in composing this article. I am trusting the same best work from you later on also.. home depot fence installation cost

Awesome post, and

Awesome post, and extraordinary site. A debt of gratitude is in order for the data! Hosting

Much thanks to you for the

Much thanks to you for the redesign, extremely pleasant site.. Hundred Palms

Much thanks to you for

Much thanks to you for setting aside an ideal opportunity to distribute this data extremely helpful! low cost printers

Much thanks to you for the

Much thanks to you for the redesign, extremely pleasant site.. Clash of Clans Hack Online

Much thanks to you for the

Much thanks to you for the redesign, extremely pleasant site.. temporary protection

Truly an extraordinary

Truly an extraordinary expansion. I have perused this wonderful post. A debt of gratitude is in order for sharing data about it. I truly like that. Much obliged so part for your meet. ALQUILER CARROS BOGOTA

That is the phenomenal

That is the phenomenal mentality, in any case is simply not make each sence at all proclaiming about that mather. For all intents and purposes any strategy an abundance of thanks notwithstanding i had attempt to advance your own particular article into delicius by and by it is evidently a situation utilizing your data locales would you be able to please recheck the thought. much appreciated yet again. cheap print

domino qiu qiu online

Internet is one of human needs. In my opinion, no one can life without internet even just a day. domino qiu qiu online

phuket idc

One of the most annoying moment is loading. phuket idc

Merely a smiling visitant

Merely a smiling visitant here to share the love (:, btw outstanding style. Sex Positions

Much thanks to you for the

Much thanks to you for the redesign, extremely pleasant site.. info

A debt of gratitude is in

A debt of gratitude is in order for the significant data and bits of knowledge you have so given here... Click Here

I think this is a standout

I think this is a standout amongst the most critical data for me. Furthermore, i"m happy perusing your article. In any case, ought to comment on some broad things, The site style is impeccable, the articles is truly awesome : D. Great job, here"s to you continue reading

"Boredom is a killer—which is

"Boredom is a killer—which is why a cure for boredom can be a lifesaver. The truth is, portable Bluetooth speakers have been the handheld solution to elevate the moment, whether at the beach, the middle of a party, or a lazy afternoon at home for years now—and your brand can get in on that excitement. Right now—with C2BPromo.com, you can put you logo on a wide array of Promotional Bluetooth Speakers, in all different shapes and sizes, from waterproof to resilient wood—with models coming in at 6-7 dollars all the way up to high-end luxury designs. Multiple surfaces on almost every customized Bluetooth speaker can showcase your logo—so no matter which way it’s turned, your name is always center staged." Logo Speakers

I have bookmarked your online

I have bookmarked your online journal, the articles are path superior to anything other comparable web journals.. a debt of gratitude is in order for an extraordinary online journal! curso marketing digital

This is a great inspiring

This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information... Hero Instinct