maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Navit GPS (and libgarmin) for os2008 (https://talk.maemo.org/showthread.php?t=18093)

lemmyslender 2009-01-28 23:35

Re: Navit GPS (and libgarmin) for os2008
 
I just added my layout to the wiki along with screenshots. I will end up tweaking the setup more, I'm sure. I hadn't even thought of adding additional text like dwould did.

gerritv -
if you are thinking about having Quit added to the first menu screen, would it make sense to have current location (for finding poi's etc near you) and/or bookmarks (for quick access as a destination) on the first screen as well? Just a thought. Maybe Town instead of one of these?

Anyone else have an opinion on this?

Also any chance of getting the hard buttons to work with the internal gui like they do with the gtk version?

gerritv 2009-01-29 03:18

Re: Navit GPS (and libgarmin) for os2008
 
The hard buttons (+ and -) will work as part of one of my (not yet in SVN) patches. The scroll pad and center button (on LH of screen) should already work. The center button is same as tapping on the screen. I did not hook up the Fullscreen button though. Personally I think Zoom +, - and FS are best done using OSD Buttons, much safer while driving.

I will try to mock up something in the next few days for the internal UI changes.
I did look into adding the N800 keyboard to Internal, but the keyboard relies on GTK which is definitely not part of GUI/Internal. Town/search is difficult for me to try because my city's OSM seems to have very little of this information.

gerritv 2009-01-29 03:28

Re: Navit GPS (and libgarmin) for os2008
 
Re performance, my guess (and it was sort of mentioned on #navit) is that reducing the number of tags you are looking to display is a good thing to do. E.g. if you are not interested in showing Stop signs on your map, then remove that item from navit.xml. These things all take time to find and render.
As a test of how busy Navit can be, set debug navit to level 1 or 2. Then send the output to a file using 2> log.file. This will likely show 80000 plus lines of output by the time the map displays, much of it Attr searches. So the advice above would seem to bear out the benefits of reducing your conf file. Other than that it will take using a tool such as Valgrind to determine code hotspots. Perhaps reducing the rate of GPS updates will help, I am just guessing on that though.

deft 2009-01-29 04:07

Re: Navit GPS (and libgarmin) for os2008
 
Quote:

Originally Posted by ernia (Post 260408)
by editing as user /home/user/.navit/navit.xml you get the same results (running navit as user) as you were editing as root /usr/share/navit/navit.xml.
you can download pre-built maps bin files here:
http://downloads.cloudmade.com/
and learn more about navit.xml here:
http://wiki.navit-project.org/index....figuring_Navit
be careful about the format of center of the map coordinates, read carefully navit.xml about that.

Awesome, its' working now. Thanks a lot, this is after about a week long struggle of trying to get locally stored maps working on this device. I should mention that I actually paid for a license for Wayfinder which has produced nothing so far (their website's a mess, no clear install process), Navit is the one actually working now.

This is especially great because I got this tablet in order to create an app for delivery order tracking & signature capture, now it looks like I actually might be able to integrate a mapping system in with that.. I'll post my progress on all that in another thread. It will start as soon as the OtterBox 2600 comes in the mail (mostly to protect it from the customers, but also the weather).

in the meantime I'll be using it for day to day address finding -- with a traditional map book as a backup, of course. ;) so thank you very much.

dwould 2009-01-29 12:58

Re: Navit GPS (and libgarmin) for os2008
 
Quote:

Re performance, my guess (and it was sort of mentioned on #navit) is that reducing the number of tags you are looking to display is a good thing to do. E.g. if you are not interested in showing Stop signs on your map, then remove that item from navit.xml. These things all take time to find and render.
As a test of how busy Navit can be, set debug navit to level 1 or 2. Then send the output to a file using 2> log.file. This will likely show 80000 plus lines of output by the time the map displays, much of it Attr searches. So the advice above would seem to bear out the benefits of reducing your conf file. Other than that it will take using a tool such as Valgrind to determine code hotspots. Perhaps reducing the rate of GPS updates will help, I am just guessing on that though.
I've tried removing a lot of the POI's that I'm not interested in. and it doesn't make a particularly notable impact on performance. My main issue is that actually whilst driving it can get quite laggy from your actual position (particularly if you drive off the planned route and it has to recalculate)
I was wondering if there are any optimizations to be had in tuning what gets rendered. I don't know how the logic figures out what it is rendering or how much to do, but if you could for instance say only render my route plus roads at most 2 removed from my route. that might help. eg less detail but just what you need.
Also I have no idea how the rendering is done, is it possible there are faster alternatives?
Basically I feel that the n810 should have enough grunt to do a smooth job, but it does not. I'm hoping that's a question of programming rather than hardware limitation.

lemmyslender 2009-01-29 13:23

Re: Navit GPS (and libgarmin) for os2008
 
gerritv-

I agree, + , - , fullscreen would be better from the osd for driving. I was really thinking that I would leave +/- on the screen, but remove the fullscreen button. I don't usually change that when driving, mostly when testing at home.

Thanks for the help with the new "text" boxes. I got it setup and working for the drive home yesterday, but dwould beat me to posting.

Navit is really getting to be usable. I think that the max speed displayed for a street is coming from the street/speed in navit.xml. I find that this is inaccurate on most of the street I regularly travel.. For instance, the main road I travel from my house to the expressway has a 40mph speed limit. It is listed as "street_1_city" from OSM which is then defined as having a 10kph limit in navit. I actually changed that to 30kph for routing purposes.

Edit

I would hope that there are enough guts in the hardware to work well. TomTom's and other GPS run similar hardware and are pretty smooth. Even my Palm TX w/ 480x320 and minimal ram worked well.

I wonder if it is just the screen resolution that is hurting us. Is it possible to use the hardware scaling features to get 400x240 instead of 800x480 (as an option perhaps)?

casper27 2009-01-29 20:06

Re: Navit GPS (and libgarmin) for os2008
 
Does anyone know how to change the default country? The GUI keeps defaulting to UK making the app crash when searching for a route by town as I do not have a map of the UK. If this is not possible does anyone know how to put is_in tags into the navit app or map so it recognises what country it is?
My previous posting was a serious one, when I downloaded the application there is a file in there called knobhead" when I open it, it is just lots of numbers and letters very strange.

lemmyslender 2009-01-29 22:41

Re: Navit GPS (and libgarmin) for os2008
 
casper

You need to set your coordinates, look for the line that reads:
<navit center="add your coordinates here"


I used google earth to center on my house and got 2 sets of numbers (latitude and longitude) in the format: DD degrees MM min SS.SSSS seconds. However Navit needs the number in DD.dddd degrees * 100 = DDdd.dd degrees.

I don't have any knobhead files in my navit directory. Maybe you should uninstall and then re-install Navit and see if that helps.

Alternately, you could scroll the map to a location near you by hand, add a bookmark for use later. The look in the bookmark file (in /home/user/.navit directory) You should see a line for your bookmark starting mg: xxxxxxxx xxxxxxxx copy this part of the line into the center.txt file overwriting the other numbers in the file.

This should start the map at that location, if not, you have a hand bookmark to use.

gerritv 2009-01-30 10:16

Re: Navit GPS (and libgarmin) for os2008
 
My understanding of the code is that you need to have an active GPS signal for the Town etc search to work. Otherwise it uses the default country from $LANG. Which might not have anything to do with the country that you are actually in. But I could be wrong of course in how I read the code :-)

Gerrit

dwould 2009-01-30 11:42

Re: Navit GPS (and libgarmin) for os2008
 
Incase anyone is interested... I found some info on using includes in the navit xml file. So I've added someinfo to the wiki about switching the OSD items with an include line which pulls them in from a separate navitOSD.xml file. I'm hoping this will make it easier for me to try out various OSD layouts and drop them in place without having to edit the file by hand.


just to make life a little easier I also decided to create a page off of my blog
http://danielwould.wordpress.com/navit-stuff/
which contains some layouts as just blocks of OSD xml with no interspersed text so that it is easy to just cut'n'paste ones into files to play with.Sadly neither the navit wiki nor my wordpress blog seem to want to let me upload xml files, or even zip files. So this seemed a workable solution so far.
At the moment I just have my original layout, Lemmyslenders generally nicer layout. And my slight tweaks on that to satisfy my need for bigger text ;-)

lemmyslender 2009-01-30 14:20

Re: Navit GPS (and libgarmin) for os2008
 
dwould thanks for the compliment. A while ago I setup several of the include statements in my navit.xml file. I got tired of scrolling back and forth on my N800 trying to find the spot I wanted to edit. Currently, I have the following include lines in my navit.xml file which is now only 52 lines long. I don't know if the order makes any difference, I just put them in where I was replacing data.

<xi:include href="/media/mmc2/maps/navit/settings/osd.xml"/>
<xi:include href="/media/mmc2/maps/navit/settings/vehicle.xml"/>
<xi:include href="/media/mmc2/maps/navit/settings/trknavspch.xml"/>
<xi:include href="/media/mmc2/maps/navit/settings/maps.xml"/>
<xi:include href="/media/mmc2/maps/navit/settings/layout.xml"/>
and in my maps.xml
<xi:include href="/media/mmc2/maps/navit/settings/poi.xml"/>
(so it does work with "nested" include statements)

This makes it easy to modify settings quickly and mostly my desire to simplify having one internal gui file and one gtk file both pointing to most of the same included files (change in an included file changes both internal and gtk setups).

If gerritv is correct and we can improve performance by removing some sections of the layout portion, setting up some includes would make it easy to quickly remove or add-in large sections at a time. In fact I may do that this weekend anyway.

bluechalk 2009-01-30 16:28

Re: Navit GPS (and libgarmin) for os2008
 
I'd like to have navit display the destination street name, so I remember where I am going. What is the variable name to use in the navit.xml file?

lemmyslender 2009-01-30 20:03

Re: Navit GPS (and libgarmin) for os2008
 
I'm not sure what the variable is if it exists, perhaps gerritv knows or can find out if it does.

The GTK version can be setup with the same osd display info. It has a feature called "Roadbook" which will show the whole route. This is available from either the menu or toolbar.

Perhaps this can be added to the internal gui menu system??? I think it'd be nice to see in there.

I'd also like to see the current street name whether or not I'm navigating somewhere.

gerritv 2009-01-30 20:04

Re: Navit GPS (and libgarmin) for os2008
 
Hi bluechalk
That is described on the wiki at http://wiki.navit-project.org. Presently the descriptions under N8x0 section but it should/will move to the general config page. (since the OSD config applies to all platforms, not just N8x0)

[edit] mmn just re-read along with lemmyslender post, not sure if destination is available..... The new code is in osd-core.c is smaller but to me not quite as obvious to modify. And I have larger challenges with the Town button pages (search etc.)

I suggest either joining on #navit or creating well worded trac entries @ http://trac.navit-project.org.

gerritv 2009-01-30 20:10

Re: Navit GPS (and libgarmin) for os2008
 
Has anyone successfully used GUI Internal with Town search to start routing?

casper27 2009-01-30 20:20

Re: Navit GPS (and libgarmin) for os2008
 
no im still working on that. I have been told it might be an issue with the open street map that im using and may have to pu is_in commands but can't find where to put these commands.

gerritv 2009-01-30 20:30

Re: Navit GPS (and libgarmin) for os2008
 
Thanks casper27
I did figure out that the country icons don't work for the N8x0. (N8x0 osso libs don't handle svg files well at all). When I add .png versions, then I get a Country icon to click on. And I can move from default GB to CA. But then I skip Town and go to Street, with nothing found there.
OSM should have boundaries for each town, they donot recommend using is_in tags expect as last resort. Things are probably better in European maps.

dwould 2009-01-30 20:37

Re: Navit GPS (and libgarmin) for os2008
 
i have used town search to find places using gui_internal here in the UK, I've also started adding is_in tags to towns I care about. will see whether I'm getting it right when i try new maps.

gerritv 2009-01-30 20:57

Re: Navit GPS (and libgarmin) for os2008
 
Hi dwould
cool, of course you are in the default country, we are just in the colonies :-) I will make a build available on my blog this weekend. The navit team are very busy and so my N8x0 specific fixes are not in SVN yet. At least you guys will see the benefit in the meantime. My build will include country icons so that we can see and change the Country in Towns menu.

bluechalk 2009-01-30 23:17

Re: Navit GPS (and libgarmin) for os2008
 
I've successfully run the town search (in several northeastern states) using the CloudMade navit.bin maps at http://downloads.cloudmade.com/north...es#breadcrumbs. It works for all the cities that I have tried, except for Baltimore, MD.

But, I'm having trouble with Garmin maps using the n800 binaries at navit-project.org. I get the error
navit:map_new:invalid type 'garmin'
from
<map type="garmin" enabled="yes" data="/media/mmc1/navit/garmin/10601565.img"/>

lemmyslender 2009-01-31 00:09

Re: Navit GPS (and libgarmin) for os2008
 
gerritv

I have also successfully routed from Akron, OH to Toledo, OH using the Town interface. From my location to Toledo center. I travel frequently into Indiana, but am unable to route to towns there. I believe there are some errors on Route 80 that prevent the route from completing. I also just routed from Indianapolis to Valpariaso, IN using only the Town feature to select my position and destination. I am currently using OSM from cloudmade for Ohio and Indiana.

bluechalk
I did install the libgarmin build from earlier in the thread, but get the same error you do: invalid map type.

gerritv 2009-01-31 01:10

Re: Navit GPS (and libgarmin) for os2008
 
Thanks for letting me know that it does work. there is someone local to me that it works for as well so OSM for my area should be fine. Just have to figure out why .....

lemmyslender 2009-01-31 16:49

Re: Navit GPS (and libgarmin) for os2008
 
dwould (or anyone else) I saw you were using the announcer_toggle button in your modified osd. Do you have a speaker that shows up in that box? I just get a small question mark.

I was looking through the xpm folder and saw several gui_sound_off and gui_sound png / svg files with different sizes. Last night I was digging through the svn files and found gui_sound_off.xpm and gui_sound.xpm (svn1960). Don't know why they weren't installed on my N800. Copied them into my /home/usr/navit/xpm folder and presto a nice little speaker in my announcer_toggle box.

Just wondering if I should uninstall/re-install and if I may be missing other things as well.

gerritv 2009-01-31 17:16

Re: Navit GPS (and libgarmin) for os2008
 
Hi
I posted a file of pre-built icons on my blog. That is a place holder until they get built in the SVN builds. Presently the nav and flag icons are svg, which N800 doesn't like to scale.
And once I build my temp release (will post on blog), you will ge tto see large improvement in menu speed due to implementing trac 284.

with flag icons in place, you can see your default country. And if that default is wrong, you can fix it. [edit] mnnm there are issues with that approach, adding an additional locale is more complex...

Gerrit

stangri 2009-01-31 20:39

Re: Navit GPS (and libgarmin) for os2008
 
Which maps are you guys using? Could you please confirm wherever I can use the maps purchased for Garmin Mobile XT with Navit GPS?
thanks!

gerritv 2009-02-01 04:55

Re: Navit GPS (and libgarmin) for os2008
 
Hi
Generally we use maps from OSM although Garmin format ones can be used, except those that are locked. And that means locked even if you have the key. There were/are Garmin Metro Guide files that are not locked, those probably work, but those do not support routing (even with Garmin devices).

The Navit wiki has further details.

dwould 2009-02-01 15:58

Re: Navit GPS (and libgarmin) for os2008
 
Hi,
I just tried Gerrit's fix for menu performance. and WOW it makes a huge difference to the speed at which the menus work.
Thank you Gerrit!

Inspired by this I had a thought and compiled navit with -O2 in the CFLAGS (basically switch on all the compiler optimisations) Now my feeling is that this has done wonders for the performance I'm seeing. Though I've not yet had a chance to use it in anger, I was able to set a route and move the map about, zoom in/out etc much more responsively than I felt I had before.

I shall switch back now to regular version and see if I can quantify a difference, or see if it's just me being optimistic. Anyone else care to try compiling with optimisations and see what they think... Gerrit?

lemmyslender 2009-02-01 18:51

Re: Navit GPS (and libgarmin) for os2008
 
I don't have a compiler setup or particularly have time to learn (and include the diffs) right now, but I'd love to give it a try and give feedback.

dwould 2009-02-01 19:16

Re: Navit GPS (and libgarmin) for os2008
 
Ok here is a deb compiled with Gerrits' changes and the optimisation flag set.
I'm still not sure if the optimisation flag is having an effect. Comparing against a regular build without Gerrits change is a massive difference in overall responsiveness, but that maybe purely Gerrits change. I've not had time to recompile without optimisation to compare just that difference.

Anyhow here you go : http://demigoth.org/files/navit.tar.gz

I tried to attach it here, but it's too big for the file limits. So it's hosted on my server, for want of a better file sharing option.

gerritv 2009-02-02 01:07

Re: Navit GPS (and libgarmin) for os2008
 
Hi dwould,
I think the benefit is additive!!!
Simple way to do this is is add CFLAGS="-O2" to the ./configure line (along with the other necessary params), then 'make clean all' or build the .deb file. This replaces the defaults CFLAGS="-g -O2"
(I forget how -g and -O2 interact, I vaguely remember -g reducing the optimization but that was from my 1990's Unix work...)

Gerrit

dwould 2009-02-02 11:21

Re: Navit GPS (and libgarmin) for os2008
 
Has anyone had a chance to try out optimised version on the road? I was really hoping to give it a whirl today to see if it does a better job of keeping up. Unfortunately the UK is incapacitated by a very small amount of snow. ;-) So no driving for me.

lemmyslender 2009-02-02 12:48

Re: Navit GPS (and libgarmin) for os2008
 
dwould,

Tried it this morning, maybe a little snappier on routing. Still a little behind while driving (using follow=3) 50-75% cpu usage spikes. Very similar to current svn.

Menu is still slow to load each screen, however very quick between screens once loaded. Slow to load again next time menu is accessed. Is this the same kind response you are seeing?

Doesn't appear to exit cleanly if using the close "x" in window mode. I thought one of gerritv's fixes addressed that.

I uninstalled / re-installed using your package (checked /usr/share/navit to be sure uninstall was complete.

dwould 2009-02-02 13:30

Re: Navit GPS (and libgarmin) for os2008
 
Hi Lemmyslender,
interesting I find the menu very fast to load screens now, first time and everytime.

what is the effect of higher numbers in follow? I assumed it was 1=on anything else off.

As far as exiting cleanly I may not of picked up gerritv's fix for that, don't know if it made it into svn.

Another thing I did, which may or may not be relevant was remove all the debug entries in the config. but I wouldn't of thought that would make much difference.

lemmyslender 2009-02-02 13:46

Re: Navit GPS (and libgarmin) for os2008
 
dwould,

I saw somewhere, this thread perhaps? that using higher numbers for follow would make it more usable on the n8x0. I find that using 1, the screen stays centered better, smoother movement, but takes longer to update reroutes, longer delay getting into menu, zooming, etc. Using 3, the position icon "moves" down the screen 3 times, then is updated to current position (complete screen redraw), roughly 2-3 seconds. This makes the response time a little quicker, I think. I did try 10, but felt that was maybe too long and didn't improve response times any.

Tapping on the screen takes 3-4 seconds for the menu to appear. Tapping action takes another 3-4 seconds for the menu to change. Tapping the house icon is almost instantaneous going back to the main menu. Tapping action again takes another 3-4 seconds.

Good/Bad/Overly optimistic?

dwould 2009-02-02 13:58

Re: Navit GPS (and libgarmin) for os2008
 
Ok, I don't have a gps fix right now, so I'm trying without any routing etc etc. But with no fix, I get instant menu response. I'll stick it by a window and see if I get a signal so I can plot a route and see what that does to the responsiveness. I might also double check I put the *right* version on my server...

lemmyslender 2009-02-02 14:35

Re: Navit GPS (and libgarmin) for os2008
 
I get the same responsiveness with and without a signal. Thanks for checking.

dwould 2009-02-02 19:05

Re: Navit GPS (and libgarmin) for os2008
 
did some more investigation. It seems that getting a gps fix hits my performance of the first menu load, back to a couple of seconds. I tried using the demo 'vehicle' and it didn't take this hit. So something in the interaction with real GPS is having an impact beyond just the redrawing of the screen for updated location etc. I am wondering if my n810 with built in gps gives a different performance profile to an 800 with bluetooth gps.

I've tried to wrap my head around what goes on in the gpsd vehicle code and I think I understand it. looks reasonably sensible. the gpsd calls it's callback method with new data. And we only read/set it if it's changed since our last read. Then separately something else calls another callback which returns the last held value for which ever attribute it wants.
don't know why that would be any slower than what the demo vehicle does. unless just having the gpsd itself has a significant performance hit.

Think I might switch debug statements on to see if it shows up any odd patterns.

On a completely separate note, I've added some info to my blog page about setting up the blue 'route' line to be thin and on top of the road rather than fat and underneath it. The wiki does allude to this option and I figured someone might be interested: http://danielwould.wordpress.com/navit-stuff/
I thought about updating the wiki with this information, just to highlight it, but I'm not sure where it would really sit.

lemmyslender 2009-02-02 21:23

Re: Navit GPS (and libgarmin) for os2008
 
dwould-

I apologize. In my tinkering, I had changed my icon size (icon_xs,_s,_l) to a non-standard value (60) as I was experimenting last week with changing them. Too big / too little. The default values appear to be 60,60,70 in the standard navit.xml.

Long story short, I just changed the size value to 48. WOW! Great response time on this. I guess as long as we use one of the pre-scaled values it works great. Nearly instantaneously. 8,16,32,48,96 for the record.

Sorry for any extra work I caused you.

dwould/gerritv any hints on how to compile this? I'm on Ubunutu 8.04, installed the SDK w/ scratchbox. Maemopad example compiles properly. Downloaded navit svn files. Added gerritv's debian folder to navit directory, and maemo.compile. How to proceed? I get a variety of errors from there. Any tricks I'm missing?

dwould 2009-02-02 21:33

Re: Navit GPS (and libgarmin) for os2008
 
Ahha! that would do it. Yes Gerrits fix was to prefer the pre-scaled images. to save the cost of rendering svgs to side. So if there isn't a pre-scaled icon you don't get the benefit.

As far as compiling goes, I largely followed the instructions Gerrit added to the navit wiki : http://wiki.navit-project.org/index....t_on_n770/n800

That said at this point I've re-installed my whole scratchbox environment at least once! ;-)
what sort of problems are you having?

gerritv 2009-02-03 00:24

Re: Navit GPS (and libgarmin) for os2008
 
Hi
Post your output to pastebin.com and put a link here. There are warnings that you can ignore and then there are ones that you can't :-).
autogen and configure should produce no errors, just lots of commentary output. Basically it is:
export SBOX_DEFAULT_AUTOMAKE=1.9
./autogen.sh && ./configure <lots of options> && make in the top level directory. Once you have done this once, then you can do the .deb build.

I will try tonight to update the wiki and my blog with current info on compiling, pre-requisites, running gpsd on Ubuntu so you can test within Scratchbox etc. before I forget the stuff.


All times are GMT. The time now is 22:16.

vBulletin® Version 3.8.8