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)

lsolano 2011-08-02 19:58

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

Originally Posted by JonWW (Post 1062959)
You had a file of 4740 bytes and not a directory, that is why you couldn't cd into it. If it was a directory you sould have had a read out something like:
Code:

drw-r--rw-    1 root    root        4096 Jul 25 11:46 .modrana

I'm ashamed that I have not seen it was a file :o

JonWW 2011-08-02 20:03

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

Originally Posted by lsolano (Post 1062962)
I'm ashamed that I have not seen it was a file :o

We've all done it, nothing to be ashamed of.

More to the point, what was in the file and how did it get there?

MartinK 2011-08-03 12:05

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

Originally Posted by JonWW (Post 1062965)
We've all done it, nothing to be ashamed of.

More to the point, what was in the file and how did it get there?

Now I think I know how it got there:
Code:

# migrate options.bin
if [ -w  /opt/modrana/data/options.bin ];then
  echo "migrating options.bin"
  mv /opt/modrana/data/options.bin /home/user/.modrana
fi

(excerpt from the postinst script)

Notice how there is no / after .modrana ? :D

Well, still better than the bumblebee disaster. :)

I'll release a version with updated postinst shortly (and add a fix that fixes all those .modrana files). :)

petur 2011-08-03 12:22

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

Originally Posted by MartinK (Post 1063384)
Well, still better than the bumblebee disaster. :)

Wow... that must have hurt a lot....

白い熊 2011-08-03 15:55

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

Originally Posted by MartinK (Post 1063384)
Well, still better than the bumblebee disaster. :)

Woah... Epic!

Bleeding edge really bleeding for someone right now :O)

beermad 2011-08-03 17:57

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

Originally Posted by MartinK (Post 1061671)
Well, I'm not really a database architect - I basically just thought quite a long time about how to make an universal schema and asked a friend who works with databases a bit. :) Well, like this, the lookup and store databases are independent - so when the lookup one is corrupted, it should be possible to regenerate it just form the stores.

Yeah - say we have x=1 y=2 and z=17 -> 1217, also x=1,y=21,z=7 -> 1217 ...
A hash with separators might work though: 1,2,17 vs 1,21,7 - would something like this be usable ?

Also, would it be possible to maintain backward compatibility by adding this new indexes and still storing the old info ? Converting all the existing database files users might already have would be quite a headache and also some developers might be already working on supporting the format in its current form (IIRC the CloudGPS developer, maybe also some others).

There is a version filed in the schema, so it would be possible to do something like this:
  • 1 = current version
  • 2 = old info + new indexes
  • 3 = just new indexes

I think your proposed versioning makes sense. As long as we add any new columns after the existing columns so that if anybody's already using the schema and doing "select(*)" we won't break their code.

Your idea of a hash-like index using separators seems a good idea. My only other thought was to force each of the x,y,z elements to a fixed length (perhaps by adding 1000000 to each, depending on what the biggest number each one could possibly be). But your method makes it more compact.

Then for version 2, your lookup table could be:
Code:

CREATE TABLE tiles (z INTEGER, x INTEGER, y INTEGER, store_filename STRING, extension varchar(10), unix_epoch_timestamp INTEGER, store_tilenumber INTEGER, lookup STRING, PRIMARY KEY(lookup));
CREATE TABLE version (v integer);
CREATE INDEX oldindex on tiles (z,x,y);

For version 3, drop the z,x,y and extension columns as well as the oldindex index.

Version 2 of the tile store could be:
Code:

CREATE TABLE tiles (z INTEGER, x INTEGER, y INTEGER, tile BLOB, extension VARCHAR(10), unix_epoch_timestamp INTEGER, id INTEGER AUTO INCREMENT, PRIMARY KEY(id));
CREATE TABLE version (v integer);
CREATE INDEX oldindex on tiles (z,x,y);

For version 3, drop the oldindex index. You could keep the x,y,z columns in this table for regenerating the lookup table as you mentioned. You could shrink the lookup table a bit more for version 3 by also dropping the epoch_timestamp from it. That would introduce a slight overhead when checking for updated tiles as it would need to be retrieved from the store rather than the lookup. I'm not sure which way would give the best balance of benefits.

So you'd insert the tile in the store first, then retrieve the value of the id column to populate the store_tilenumber column in the lookup table.

don_falcone 2011-08-03 18:20

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

Originally Posted by MartinK (Post 1061646)
This was for legacy reasons - Rana, the modRana predecessor was developed for the Neo FreeRunner, where everything run under root. :D So it didn't matter where they were stored.


Well, I've just sent V0.27-2 to the autobuilder, that does just this :)
check out the updated data storage article for details about the new paths.
In short:
  • map data - nothing changes, still MyDocs/.maps
  • POI- nothing changes, still MyDocs/.maps
  • tracklogs are now stored in MyDocs/tracklogs, old tracklogs should be migrated there automatically
  • configuration files are now in ~/.modrana


OK, I'll change it to reload the directory once it is listed from the GUI.


I'm looking at this right now. :)

May i strongly suggest not using MyDocs and using dirs located directly under $HOME instead? MyDocs is exportable / mountable, so for example if you have connected your N900 via USB to a laptop maybe for copying some files over, you would not be able to use modRana (or any other SW that does this) at the same time and would have to choose between using the SW or copying files.

slender 2011-08-03 19:55

Re: [Announce] modRana: a flexible GPS navigation system
 
1 Attachment(s)
Had error message when tried to upgrade modrana install. Look attachment.

x-lette 2011-08-03 20:00

Re: [Announce] modRana: a flexible GPS navigation system
 
Hi, I really like this app very much and most of it I like the downloading function. But what I'm currently missing is a layer for public transport. I guess for most countrys these data exist but I don't know whether there is one map that covers all i.e. globe. But if it was possible in any way to add a layer for public transport this would be amazing. Travelling to foreign countries is made much easier if one can use a map with highlighted transportation. Maybe you can have a look at maep which offers this layer but sadly lacks downloading ability.

Another question (I guess this is already answered but I didn't find): Is there an easy way to download all needed tiles for an area externally and afterwards just throw them into correct folder on N900? downloading a bunch of some 20k tiles at once is quite hard. My N900 gets quite hot when using 3G-connection that intense.

petur 2011-08-03 20:09

Re: [Announce] modRana: a flexible GPS navigation system
 
There are other interesting layers too: rain radar, traffic jams,...


All times are GMT. The time now is 12:13.

vBulletin® Version 3.8.8