maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] modRana: a flexible GPS navigation system (https://talk.maemo.org/showthread.php?t=58861)

MartinK 2012-10-27 13:24

Re: [Announce] modRana: a flexible GPS navigation system
 
Quote:

Originally Posted by Wikiwide (Post 1285636)
Quick reply...
Small question, about updating ModRana: why does dpkg complain about not being able to delete non-empty directory "/opt/modrana/modules/googlemaps"?
Best wishes. Thank you.

IIRC, such errors are caused when an application directory contains files that were not there when the application was installed from a package. This might be somehow caused by the post-install script, that generates the *.pyc bytecode files for faster startup (as modRana can't write to /opt/modrana when started under the user account, it can't create them by itself and would need to parse all the *.py files on every startup).

Generally, it should be harmless.

As modRana stores all important data in ~/.modrana, which is not deleted if you just uninstall the package without purging it, this should fix the warnings:

Code:

apt-get remove modrana
rm -rf /opt/modrana/modules
apt-get install modrana

BTW, congratulations for winning the special prize in the coding competition ! :)

Quote:

Originally Posted by pichlo (Post 1285902)
A quick comment. Yesterday I put modRana to a bit of a test. It was the first time I used it on a motorway. Driving at just about 70 mph (110 km/h), I noticed that it was it was coping well, rotating the maps as it should, but the screen refresh was a bit jerky and there was also a bit of a lag in showing my current position. For example, it showed me crossing under a bridge when I was already a good 50 m behind. Is it related to my recent conversion from tiles to sqlite? I have never tried modRana at anything beyond 30 mph (48 km/h) before so I wouldn't know...

I did quite a few optimizations in this regard but high-speed usage is still quite demanding, as modRana has to:
  • check what tiles are visible
  • check what are in the memory cache
  • load those that aren't (from storage or from network)
    • due to the high speed, generally less tiles will be already in cache and more will have to be loaded
  • display the result
In the 1 second time window specified by the default screen refresh rate.
Also, if position shift & map rotation are enabled, it has to generally do more work as:
  • it has to figure out which tiles are covered by the rotated viewport
  • generally, more tiles are visible than without rotation, that need to be loaded & rendered
  • rotate and clip the result
All drawing is done with Cairo, which IIRC is not hardware accelerated on Fremantle.

The updates should be triggered by position update (which should occur every second) - the more demanding the current "scene" is, the more lag from position update to screen redraw you get.

What can be dome about it:
  • further optimizations
    • profiling the current implementation to see where are the bottlenecks (like time spend the in the tile storage functions for sqlite vs for files)
    • pre-loading tiles in direction of travel to memory
    • drawing larger map are than what is currently visible and shifting it until it is inside the viewport
  • lazy screen redraw
    • move just the position indicator and update the map only once it gets near the screen edge
    • this unfortunately prevent proper map rotation & position shifting support + make the map "jump" from time to time
  • QML - screen rotation should be "free" in QML, which should alleviate much of the issues with the current implementation in Cairo
    • on the other hand drawing the route polylline in QML is more difficult than in Cairo due the the item/texture implementation in QML that makes rotation & co so fast :)

BTW, you can also use:
options->Debug->Redrawing->Print redraw time to terminal to see how long the last screen redraw took. If it reports >1000 ms or if the value shows less than every second, tile loading & screen redraw is causing the lags. If not, the cause is somewhere else (N900 GPS software/hardware lag ?).

To check tile loading:
options->Debug->Tiles->tile loading status to terminal - this will print debugging info to the terminal for every tile that is loaded, including how long it took & what storage method was used.

The log might get quite verbose as a result & I'd guess you would probably not want to check it while drawing at such quite a high speed, sou you might wan't to enable: options->Debug->Loggin->Log modRana stdout to file
This should dump all the terminal output to /home/user/MyDocs/modrana_debug_logs/ :)

Well, that was a bit exhaustive. :D

MartinK 2012-10-27 13:57

Re: [Announce] modRana: a flexible GPS navigation system
 
Quote:

Originally Posted by taixzo (Post 1285908)
MartinK: would it be possible to include aeronautical charts (as for example http://www.chartbundle.com/charts/) as a map layers option?

Yep, the tile & coordinate format looks compatible. But as there seems to be quite a bunch of layers available, I'll have to hack together some sort of layer grouping so that it doesn't swamp the layer-chooser. :)

BTW, if you find any other interesting map layers, I don't mind to add them to the built-in layer config. :)


Also, it looks like modRana successfully cleared all the Maemo steps (thanks to all testers !) and is now available from Extras & Maemo Downloads ! :)

ade 2012-10-27 14:07

Re: [Announce] modRana: a flexible GPS navigation system
 
MartinK,

I was pleasantly suprised by the option to use monav offine datafiles, as I usually don't use an internet connection when I am from home.

But I was not able to make it work till now. I downloaded the data (local car data) and extracted it in the map. And I can select that data somewhere in modRana. Nevertheless, the map keeps saying "Loading..." on a green background. Changing some other settings in modRana did not help.

Any idea what I am missing to fix this?

MartinK 2012-10-27 15:31

Re: [Announce] modRana: a flexible GPS navigation system
 
Quote:

Originally Posted by ade (Post 1286333)
MartinK,

I was pleasantly suprised by the option to use monav offine datafiles, as I usually don't use an internet connection when I am from home.

But I was not able to make it work till now. I downloaded the data (local car data) and extracted it in the map. And I can select that data somewhere in modRana. Nevertheless, the map keeps saying "Loading..." on a green background. Changing some other settings in modRana did not help.

Any idea what I am missing to fix this?

Unfortunately, modRana currently uses Monav only for offline routing.

The monav-preprocessor can create data for vector Map rendering & the Monav client can use them. But there is no interface for third-party applications, such as modRana, to use this functionality.

Possible solutions:
  • extending the Monav interface to output rendered map images (as map tiles ?)
    • would probably need to be done by the creators of Monav or at least someone with more C++ knowledge than I have :)
    • the interface is based on Google's Protocol Buffer format, so returning binary image data would not be an issue
  • just using the Monav (or some other vector data) format for a different modRana compatible renderer, such as Kothic

logix76 2012-10-29 11:05

Re: [Announce] modRana: a flexible GPS navigation system
 
why qml version is not working ? Other version is ok

Latest thumb version, kp v52

thanks

Wikiwide 2012-11-01 12:12

Re: [Announce] modRana: a flexible GPS navigation system
 
1 Attachment(s)
Quote:

Originally Posted by Wikiwide (Post 1221611)
Quick message...
Generally, I don't have Internet while on the move (or consider it expensive, or it is too slow). And, I generally don't want to depend on online services to help me with something which I could have done myself. Therefore, I have made a prototype offline routing: user gives one start, one end, and many middle points, and they are turned into a "route". It requires text input for each middle point, so that the user would write the speeches for espeak - like, "turn left", "turn right", "bus stop", "train", and so on.
I would be grateful if you could integrate this into one of the next versions. Thank you.
Though, I still haven't tested the system anywhere.
Turn-by-turn navigation interface does indeed work with handmade route. But I'm not sure whether the values of distance-meters are correct here.

This is the latest version of file mod_route.py, for ModRana version 0.36.6 git:c59ca30.
A line should also be added into mod_menu.py,as line 1100, to make the GUI icon for handmade route visible:
Code:

self.addItem('route', 'Handmade', 'generic', 'set:menu:None|route:selectManyPoints')
It's not a final, polished version, I suspect; first, even though overall length of route is likely correct, the lengths of steps are most likely completely wrong; second, there should be a way, while creating a route, to edit, or even delete, middle points, in case one of them is set incorrectly.
Best wishes to all of you.
__________________
Per aspera ad astra...

MartinK 2012-11-02 18:21

Re: [Announce] modRana: a flexible GPS navigation system
 
Quote:

Originally Posted by logix76 (Post 1287012)
why qml version is not working ? Other version is ok

Latest thumb version, kp v52

thanks

I've just tested the current package on CSSU stable (nonthumb) KP 51 and it seems to work fine. Can you run:
Code:

modrana-qml
and post the output ? :)

Quote:

Originally Posted by Wikiwide (Post 1288542)
This is the latest version of file mod_route.py, for ModRana version 0.36.6 git:c59ca30.
A line should also be added into mod_menu.py,as line 1100, to make the GUI icon for handmade route visible:
Code:

self.addItem('route', 'Handmade', 'generic', 'set:menu:None|route:selectManyPoints')
It's not a final, polished version, I suspect; first, even though overall length of route is likely correct, the lengths of steps are most likely completely wrong; second, there should be a way, while creating a route, to edit, or even delete, middle points, in case one of them is set incorrectly.
Best wishes to all of you.
__________________
Per aspera ad astra...

Thanks ! I've merged it locally and it looks fine. :) I like how the routing buttons are hidden once the "routing" so that the don't block the map. I think I'll probably do something like this globally:
  • once a route is found, show only a "current route" button
  • when clicking current route, show two buttons: "info" & "edit"
  • "info" shows the route info screen
  • "edit" shows the routing buttons
What do you think ? :)

Wikiwide 2012-11-03 01:39

Re: [Announce] modRana: a flexible GPS navigation system
 
Quote:

Originally Posted by MartinK (Post 1289103)
Thanks ! I've merged it locally and it looks fine. :) I like how the routing buttons are hidden once the "routing" so that the don't block the map. I think I'll probably do something like this globally:
  • once a route is found, show only a "current route" button
  • when clicking current route, show two buttons: "info" & "edit"
  • "info" shows the route info screen
  • "edit" shows the routing buttons
What do you think ? :)

Thank you. I like the idea, of minimalist interface and easy access to editing a route. Programming the editing of a route will not be easy, I expect - I don't know for sure.
And, several lines from mod_route.py, connected to creating the route from points, should be moved to way.py as a function (akin to fromMonav... and fromGoogle...) so that mod_route.py would not have to import geo. And while length of the whole route is calculated correctly, distance between two steps is right now calculated incorrectly (taken from options, like, announcing distance). Just listing the inconsistencies I remember in my own code.
Best wishes.
__________________
Per aspera ad astra...

Wikiwide 2012-11-05 01:33

Re: [Announce] modRana: a flexible GPS navigation system
 
1 Attachment(s)
Quote:

Originally Posted by Wikiwide (Post 1289237)
Quote:

Originally Posted by MartinK (Post 1289103)
Thanks ! I've merged it locally and it looks fine. :) I like how the routing buttons are hidden once the "routing" so that the don't block the map. I think I'll probably do something like this globally:
  • once a route is found, show only a "current route" button
  • when clicking current route, show two buttons: "info" & "edit"
  • "info" shows the route info screen
  • "edit" shows the routing buttons
What do you think ? :)

Thank you. I like the idea, of minimalist interface and easy access to editing a route. Programming the editing of a route will not be easy, I expect - I don't know for sure.
And, several lines from mod_route.py, connected to creating the route from points, should be moved to way.py as a function (akin to fromMonav... and fromGoogle...) so that mod_route.py would not have to import geo. And while length of the whole route is calculated correctly, distance between two steps is right now calculated incorrectly (taken from options, like, announcing distance). Just listing the inconsistencies I remember in my own code.
Best wishes.
__________________
Per aspera ad astra...

I looked up ModRana on github, and this merge was not here. Oh, well... The distance between two steps, and therefore distance-from-start, are now calculated correctly. This latest version of mod_route.py is attached.
__________________
Per aspera ad astra...

MartinK 2012-11-05 01:39

Re: [Announce] modRana: a flexible GPS navigation system
 
Quote:

Originally Posted by Wikiwide (Post 1290281)
I looked up ModRana on github, and this merge was not here.

I'm doing the routing menu modification at once with merging your changes - I've changed quite a lot in the end, so I'll push it once it works again. :)

I normally try to push as often as possible, so this is something of an exception. :)

Quote:

Originally Posted by Wikiwide (Post 1290281)
Oh, well... The distance between two steps, and therefore distance-from-start, are now calculated correctly. This latest version of mod_route.py is attached.
__________________
Per aspera ad astra...

Thanks, I'll add it in. :)


All times are GMT. The time now is 09:54.

vBulletin® Version 3.8.8