Notices


Reply
Thread Tools
Posts: 451 | Thanked: 334 times | Joined on Sep 2009
#171
Originally Posted by MartinK View Post
the insane Google server farms are a bit more powerful than the N900, so getting the route may take some time, but it would still be better than never (and it may not be so bad in practice)
I've used navit routing on the N900, for quite long routes also, i.e. 100km, so not super far, but still enough, and it wasn't as bad as you'd expect. The only catch was that there was no `calculating route' or something, message displayed, so it took, I'd say 4 secs, and for that period, you thought the gadget froze.

But it can be realistically used in practice. Don't know about navit's routing libs for interfacing too, and there is the problem with OSM data you mention.

Anyhow, navit's solution, is off-the-n900 conversion and then just download to N900, that's not bad. I mean, you don't need to keep updating your maps every second.

The commercial vendors only do it let's say twice a year, and no big fuss, plus you can do it when you desire, on the PC...
 
Posts: 1,994 | Thanked: 3,342 times | Joined on Jun 2010 @ N900: Battery low. N950: torx 4 re-used once and fine; SIM port torn apart
#172
Originally Posted by MartinK View Post
But seriously, the buttons need to be distinct even in sunlight and from a distance, as in the case of car or bicycle navigation.
As all the PNGs are already (manually) generated from a SVG file, I would like to replace them directly by SVG icons in the future.
Well, yes, it is a bit against the fremantle GUI metaphor, but:

* you can easily go back to previous menu with your thumb when holding the N900 in your left hand
* in most default modes you can also access the main menu by your left thumb and navigate the map with your free right hand
* the fremantle style "back" buttons always seemed too small to me
* it is hardcoded in quite a few places
* all menu levels have the same simple and easily comprehensble structure
* it follows the ancient tradition of latin script, by adding elements in rows, from left to right, top down
Agree completely.

Originally Posted by MartinK View Post
Unfortunately, plain OSM XML data can not be used (most probably because of the xml processing overhead)
Why? I have a 137KB *.osm file (do not use anywhere yet, just downloaded to look at it). Is routing that difficult?
One possible approach:
take current coordinates;
take coordinates of destination;
generate vector of needed direction;
find the closest node (not more than 5 minutes away from current coordinates);
find the ways including this node;
for each of the ways, take this one "current" node and take the next node after it and the previous before it;
take the difference of GPS coordinates of current and next/previous node - you get two directions of the road;
of these several directions, take the one which has the direction closest to needed.
Thus, you can ask human to walk back if it seems that his destination is behind him. And no rerouting is needed because "route" is calculated incrementally.

It's no better than walking by Sun and compass, but it requires no complex algorithms, and can be done at night without moon and stars. For a pedestrian it will not be that bad; at least, it will not be a bee-line requiring to jump over fences.

Not all foot-walks are shown on a map, so no complex algorithm could give an ideal result; and this simplistic algorithm would often lead to "blind alleys" which turn out to be non-blind at all.

Of course, for driving with all traffic rules and jams, Google server is better suited. And for catching a bus.

Originally Posted by MartinK View Post
The OSM is being updated all the time, so some sort of update mechanism could be needed.
Just like for map tiles! But I can give an algorithm (human-readable and machine-breaking.
http://78.46.81.38/
1. Find a Wikipedia article about this place (suburb/street).
2. Take GPS coordinates from article and put them into "To which country belongs this location?".
3. In small XML file find the tag which includes the name of the place, and take its ID.
4. Put the ID into "Download an entire city".
You have the *.osm XML file with nodes, ways, relations, etc.

Originally Posted by MartinK View Post
It seems that both Gosmore and Routino work on N900 and could be theoretically interfaced with modRana.
Gosmore requires Diablo dependencies. Routino website www.routino.org cannot be found. I don't have patience to solve these problems right now.
Best luck to you! If you make ModRana use either of them, I will cheerfully attempt to test it.
 
eitama's Avatar
Posts: 702 | Thanked: 334 times | Joined on Feb 2010 @ Israel.
#173
Hey peeps,

Iv'e installed this app today, read the wiki and went over most of the Thread.
Modrana shows me where I am immediately, but I can't find my way to starting a navigation session.
For example, navigate from my house to my parents house.
Google maps appear, I can see where I am, move around, zoom in out, but, where do I put in my destination address and hit "Navigate"?

I tried using the "Route" option in the menu, just doesn't work.
I set the start position to me my current position, inserted some letters in the destination, press route and nothing happens, no error too.

Any ideas?
__________________
| Developer of Horizontal-Call - Call your contacts, fast! |
| Reverse SSH - access your N900 from anywhere, anytime |
| Using Samsung Galaxy S GT-i9000 and Nokia N900 |
| DonateMe - If you feel I helped you in a very good way, feel free to donate |
 
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#174
Originally Posted by Wikiwide View Post
Why? I have a 137KB *.osm file (do not use anywhere yet, just downloaded to look at it). Is routing that difficult?
This could be because how the OSM XML is formated. The nodes are ordered by id not by latitude or longitude and the id don't go in a complete sequence, so they cant be used as a list index. The nodes also have no info about which ways they are part of. Ways on the other hand have have just a sequence of node ids. There is also a lot of irrelevant information like usernames and timestamps.
I think that with this structure, all operations needed for routing, like computing distance between nodes or finding which way is a node part of would be very, very slow.

My guess is, that in the binary formats:
  • they sort the nodes and ways, so that near nodes/ways can be quickly found
  • nodes have info about which ways they are part of
  • ways have complete info about their nodes
  • every item has some global id, so you can just jump on a position in the file to get relevant data
  • all unneeded items are removed
Also, country sized extracts seem to have 100MB+, for example the whole UK has 218MB.

Originally Posted by Wikiwide View Post
One possible approach:
take current coordinates;
take coordinates of destination;
generate vector of needed direction;
find the closest node (not more than 5 minutes away from current coordinates);
find the ways including this node;
for each of the ways, take this one "current" node and take the next node after it and the previous before it;
take the difference of GPS coordinates of current and next/previous node - you get two directions of the road;
of these several directions, take the one which has the direction closest to needed.
Thus, you can ask human to walk back if it seems that his destination is behind him. And no rerouting is needed because "route" is calculated incrementally.

It's no better than walking by Sun and compass, but it requires no complex algorithms, and can be done at night without moon and stars. For a pedestrian it will not be that bad; at least, it will not be a bee-line requiring to jump over fences.

Not all foot-walks are shown on a map, so no complex algorithm could give an ideal result; and this simplistic algorithm would often lead to "blind alleys" which turn out to be non-blind at all.
If I understand this correctly:
  • find nearest node that is a part of a route
  • follow the route in both directions
  • on both ends, choose the node, that is closest to the destination
  • then this for all ways joining the segment between the chosen node and closest one
  • do this for say, 10 steps maximum
  • automatically update as the current position changes
Well, this could theoretically get you to in the direction to your destination, by any means possible. At least, it could be quite an adventure.



Originally Posted by Wikiwide View Post
Just like for map tiles! But I can give an algorithm (human-readable and machine-breaking.
http://78.46.81.38/
1. Find a Wikipedia article about this place (suburb/street).
2. Take GPS coordinates from article and put them into "To which country belongs this location?".
3. In small XML file find the tag which includes the name of the place, and take its ID.
4. Put the ID into "Download an entire city".
You have the *.osm XML file with nodes, ways, relations, etc.
Yep, this could probably automated when we have something that eats OSM data.
There also seems to be a binary OSM API for mobile devices, that accepts bounding box input and also supports diffs.

Originally Posted by Wikiwide View Post
Gosmore requires Diablo dependencies. Routino website www.routino.org cannot be found. I don't have patience to solve these problems right now.
Best luck to you! If you make ModRana use either of them, I will cheerfully attempt to test it.
There seem to be no Maemo 5 packages for either but there seem to be people who succeeded in building and running them. IMHO, without a working Maemo 5 packages there is no need to start supporting them right now, as 99% of users would not be able to actually use it.
Anyone interested in packaging Gosmore and/or Routino for Maemo 5 ?

Originally Posted by eitama View Post
Modrana shows me where I am immediately, but I can't find my way to starting a navigation session.
For example, navigate from my house to my parents house.
Google maps appear, I can see where I am, move around, zoom in out, but, where do I put in my destination address and hit "Navigate"?

I tried using the "Route" option in the menu, just doesn't work.
I set the start position to me my current position, inserted some letters in the destination, press route and nothing happens, no error too.

Any ideas?
Does point to point routing work for you ? The address routing is currently quite basic and does not find many existing addresses, but this should be improved quite soon.
To start a navigation session, you first need to successfully get a route (point to point, address to address, etc.), then go to "route" -> "Current route" -> "tools" and press the "Start navigation" button.
__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)
 

The Following User Says Thank You to MartinK For This Useful Post:
Posts: 1,994 | Thanked: 3,342 times | Joined on Jun 2010 @ N900: Battery low. N950: torx 4 re-used once and fine; SIM port torn apart
#175
Originally Posted by MartinK View Post
This could be because how the OSM XML is formated. The nodes are ordered by id not by latitude or longitude and the id don't go in a complete sequence, so they cant be used as a list index. The nodes also have no info about which ways they are part of. Ways on the other hand have have just a sequence of node ids.
I see...

Originally Posted by MartinK View Post
There is also a lot of irrelevant information like usernames and timestamps.
There are neither user-names nor timestamps. There are attributions, postcodes, speed restrictions and a lot of other information which might be irrelevant.

Originally Posted by MartinK View Post
I think that with this structure, all operations needed for routing, like computing distance between nodes or finding which way is a node part of would be very, very slow.
Well... If you have small XML file, it will not be that slow.

Originally Posted by MartinK View Post
My guess is, that in the binary formats:
  • they sort the nodes and ways, so that near nodes/ways can be quickly found
  • nodes have info about which ways they are part of
  • ways have complete info about their nodes
  • every item has some global id, so you can just jump on a position in the file to get relevant data
  • all unneeded items are removed
Then use OSM Binary Format.
Originally Posted by MartinK View Post
Also, country sized extracts seem to have 100MB+, for example the whole UK has 218MB.
Oh, I see. But nobody is going to travel through the whole UK. Most people need just one small region/city.

Originally Posted by MartinK View Post
If I understand this correctly:
  • find nearest node that is a part of a route
  • follow the route in both directions
  • on both ends, choose the node, that is closest to the destination
  • then this for all ways joining the segment between the chosen node and closest one
  • do this for say, 10 steps maximum
  • automatically update as the current position changes
Well, this could theoretically get you to in the direction to your destination, by any means possible. At least, it could be quite an adventure.
Word "route" has too ambiguous meaning. It's often used for complete zig-zag line from start to destination, and this algorithm doesn't have such a line.
  • find nearest node that is a part of a way (road, highway, footpath) - it will be "current node" (yes, it will be time-consuming to look through all this list of nodes in a loop, but you can stop at the first node-part-of-a-way which is close enough (say, not more than two meters from real position) instead of looking for the nearest one);
  • follow the way in both directions; on both ends, choose the node, that is closest to the "current node"; in fact, you don't need to do any choosing: just "current node".nextSibling() and "current node".previousSibling();
  • then this for all ways referencing this node
  • take all the next/previous nodes found in above-described steps and compare their coordinates with coordinates of "current node"; it gives vectors of directions; multiply each of this vectors (length of each vector should be equal to 1) with needed vector (beeline vector from current node to destination); the largest of the results corresponds to the best choice, and negative results correspond to vectors leading away from destination;
  • automatically update as the current position changes


Originally Posted by MartinK View Post
There also seems to be a binary OSM API for mobile devices, that accepts bounding box input and also supports diffs.
Very well, try it!

There is an application compiled for Maemo 4 and Windows CE which uses OSM Binary Protocol:
http://sourceforge.net/projects/roadmap/files/

You can have a look at its code.

EDIT: Adding a picture
Attached Images
 

Last edited by Wikiwide; 2010-09-05 at 01:48. Reason: Adding a picture
 

The Following User Says Thank You to Wikiwide For This Useful Post:
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#176
Originally Posted by Wikiwide View Post
Oh, I see. But nobody is going to travel through the whole UK. Most people need just one small region/city.
Yes, "regional" off-line routing could be a good start, as the route computation could be quite fast for a relatively small area and converting the raw OSM data for a city sized area (if the the binary API is not used) should be doable on the device without using a PC.

Originally Posted by Wikiwide View Post
There is an application compiled for Maemo 4 and Windows CE which uses OSM Binary Protocol:
http://sourceforge.net/projects/roadmap/files/

You can have a look at its code.
OK, can be interesting to see how it works with the binary data.

Originally Posted by Wikiwide View Post
EDIT: Adding a picture
So we basically just show the traveler the direction from the closest node, that is also a part of a way to one of the connected nodes, that lies in the direction to the destination ? And update this periodically.

Concerning the binary format, there seems to be some sort of an alternative developing:
just stuffing the OSM data to a sqlite database
Although this article is quite old, there seems to be some progress, as there are two programs that seem to be able to do this:
osm2sqlite - some sort of a bash script
osm4routing - a python module with parts implemented in C using the boost library
Storing the data in a database could be quite handy for updating, searching, etc.

But this is not all.

There was once routing support in modRana, but then it was still called Rana and I was not yet working on it.
It seems, that the development of Rana stopped in quite an early phase, with many features not in a complete state.
When I choose Rana as a basis for a development of a navigation system, I went through the features and fixed or disabled what appeared not to be working, including off-line routing and map rendering.
So today I took a second look on that old code and, well, it seems to actually work.
Work, as in:
  • it loads *.osm files and processes them to its own binary format
  • it does find routes between two node ids (using the A* algorithm)
  • it seems to be possible to find the nearest node id to given coordinates
  • multiple route types seem to be supported (bike,car, pedestrian,horseback, etc.)
  • it can even output a PNG that shows all points that are part of a way, all considered routes, the resulting route (this could be useful for debugging new routing algorithms)

I have not made any tests on the N900 yet, it is not integrated in the current routing code and handling of all the OSM data handling and conversion will have to be made more user-friendly. Therefore, this does not mean that off-line routing will be added tomorrow, but it is significantly closer than before.

Concerning map rendering, there seems to be a Python OSM renderer called Ceyx. It could be theoretically used in the future by modRana for generating map tiles on demand from OSM data.

And now back to coding, this post is already a bit too long.
__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)

Last edited by MartinK; 2010-09-05 at 21:55.
 

The Following 3 Users Say Thank You to MartinK For This Useful Post:
Posts: 1,341 | Thanked: 708 times | Joined on Feb 2010
#177
I tried to use modRana this weekend, but wasn't succesful at all. Did use Maporama then. But I see modRana's GUI with big buttons has potential.

First, when buttons are touched on the touch screen, nothing indicates you have succesfully touched a button. I guess it is a GUI library issue, but a major lag of usability. Just creating a route, putting start and end addresses there and then pressing the "route"-button....nothing seems to happen or indicate you have successfully touched the button, until after few seconds it returns to an empty map.

Support for portrait screen would be nice. I use Maporama in portrait mode and the map rotating to the direction I am going, so I will see more road ahead in the map. In landscape mode, I would see less.

Could it be possible to get modRana to use same map tiles on local directory as Maporama is using? So one could download map tiles with either program and both programs could use them?




When going to Menu/route/Current_route, it does show the start and the end addresses. Show on map returns to an empty map again. Tools/start_navigation/first_step returns to an empty map.

Logging the track works though.

Isn't there a way to mark your current position on the map somehow with some dot?

This (and also Maporama) misses a feature where the map can be zoomed without showing a more accurate map. When driving (a car) one cannot see the small font which is on the map. Somekind of pixel doubling or tripling or similar would be useful.

[Edit: I looked the first post again. I just cannot get any indication of the GPS position on the map, although it centers the map correctly where I am. Routes just do not show on the map. I wonder what I've done so those features do not work.
Where in the filesystem does modRana keep its persistent configuration data? Gconf?]

[Edit2: I meant ofcourse Mappero, not Maporama]

Last edited by zimon; 2010-09-06 at 00:48.
 
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#178
Originally Posted by zimon View Post
I tried to use modRana this weekend, but wasn't succesful at all. Did use Maporama then. But I see modRana's GUI with big buttons has potential.

First, when buttons are touched on the touch screen, nothing indicates you have succesfully touched a button. I guess it is a GUI library issue, but a major lag of usability.
Good point, now I even remember somebody already asking me about this I added a feature request ticket for this so it wont be hopefully forgotten again.
BTW, the whole GUI is custom made and actually drawn by a single cairo widget

Originally Posted by zimon View Post
Just creating a route, putting start and end addresses there and then pressing the "route"-button....nothing seems to happen or indicate you have successfully touched the button, until after few seconds it returns to an empty map.
You mean that the screen is solid black and there are not even any error tiles ? This could mean that there is (again ) a bug in the drawing pipeline.

Originally Posted by zimon View Post
Support for portrait screen would be nice. I use Maporama in portrait mode and the map rotating to the direction I am going, so I will see more road ahead in the map. In landscape mode, I would see less.
Portrait mode + automatic rotation is currently in the works, it should be in the next version.

Originally Posted by zimon View Post
Could it be possible to get modRana to use same map tiles on local directory as Maporama is using? So one could download map tiles with either program and both programs could use them?
Do you mean Mappero ? The only Maporama navigation software I could find is for Symbian.
ModRana shares the tile folder with Mappero since a few versions ago.


Originally Posted by zimon View Post
When going to Menu/route/Current_route, it does show the start and the end addresses. Show on map returns to an empty map again. Tools/start_navigation/first_step returns to an empty map.

Logging the track works though.

Isn't there a way to mark your current position on the map somehow with some dot?

This (and also Maporama) misses a feature where the map can be zoomed without showing a more accurate map. When driving (a car) one cannot see the small font which is on the map. Somekind of pixel doubling or tripling or similar would be useful.
I'we seen this kind of zoom in TangoGPS. Well then, another ticket for the steadily growing heap

Originally Posted by zimon View Post
[Edit: I looked the first post again. I just cannot get any indication of the GPS position on the map, although it centers the map correctly where I am. Routes just do not show on the map. I wonder what I've done so those features do not work.
Where in the filesystem does modRana keep its persistent configuration data? Gconf?]
This definitely seems to be a drawing pipeline issue, something probably goes wrong before the map layer and information overlay are drawn, so they never show up.
You can try to run modrana from terminal, there can be some error output.

Persistent configuration data is stored in
/opt/modrana/data/options.bin
It is basically a python dictionary stored using the marshal module.

BTW, some drawing errors in the past were caused by corrupted persistent configs
Try to delete/move that file, it might fix your issue
__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)

Last edited by MartinK; 2010-09-06 at 00:29. Reason: fix typo
 

The Following 2 Users Say Thank You to MartinK For This Useful Post:
Posts: 1,341 | Thanked: 708 times | Joined on Feb 2010
#179
Originally Posted by MartinK View Post
Persistent configuration data is stored in
/opt/modrana/data/options.bin
It is basically a python dictionary stored using the marshal module.

BTW, some drawing errors in the past were caused by corrupted persistent configs
Try to delete/move that file, it might fix your issue
Thanks, it did fix it.

(I meant ofcourse Mappero, not Maporama in my previous post.)

Last edited by zimon; 2010-09-06 at 01:08.
 
Posts: 433 | Thanked: 274 times | Joined on Jan 2010
#180
I second the request for "pixel doubling" zoom to allow easier reading of street names whilst on the move. My eys aint great, and this would make life a lot easier while walking through an unfamiliar city.
__________________
n900: "with power comes responsibility".

If you buy a niche, highly modifiable smartphone and proceed to mess it up by blindly screwing around, don't just blame the phone, also blame yourelf.
 
Reply

Tags
bada rox, martin_rocks, modrana, navigation, openstreetmap, the best, wehasgps


 
Forum Jump


All times are GMT. The time now is 01:37.