Notices


Reply
Thread Tools
Posts: 451 | Thanked: 334 times | Joined on Sep 2009
#921
Originally Posted by MartinK View Post
Can you check if the position is updated if you restart modRana ?
Yes, it is.
Also, try to enable "Show gpsd debug output" in Options->Debug->GPS, modRana will start printing the information it gets from gpsd to stdout.
I ran gpsd with debugging, and when it reads data from a regular socket file, created by socat, it's updated fine...

This certainly also possible - modRana already has a worker thread (in the location module that resides in modules/mod_location.py that reads position data from GPSD. The worker thread could be modified to connect to BlueNMEAs socket and parsing the NMEA sentences it provides. There is just a single stable source (BlueNMEA) without the usual quirks of standard GPS devices, the parsing should not be that difficult, at least for basic location data (latitude, longitude, elevation, speed, direction(?)).
This might speed things up for the chroot... However it thus seems the fault is with VNC, if it sends uncompressed frames, then no wonder it can't keep up while moving as it's updated continually.

I never messed with VNC, never really used it. Will try to look into it...

Anyhow, I currently see two possibilities for improvement when using VNC:

Currently, I use 24-bit color profile, to make modRana useable with the VNC viewer, otherwise the colors got distorted. Other possible viewer profiles are: 256, 64, and 8 colors, or greyscale, and black-and-white. So would it be possible to limit modRana's colors to 8 or max 64 on startup programatically? This would decrease the amount of data sent drastically?

Second, have an option in modrana to update the display only let's say every second, so that this would also decrease the data sent significantly?

This might make modRana useable under VNC?
 

The Following User Says Thank You to 白い熊 For This Useful Post:
Posts: 451 | Thanked: 334 times | Joined on Sep 2009
#922
The more I think about it, the more I think it's the continuous display updates, more than anything.

Martin, would it be possible to have an option allowing you to select how often to redraw the main window, i.e. continuous, and then once in how many seconds...?
 

The Following User Says Thank You to 白い熊 For This Useful Post:
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#923
Originally Posted by 白い熊 View Post
OK, I ran more experiments.
However, it seems that there is heavy processing going on, either on the modRana side, the GTK side, or, probably, the gpsd side, as I'd have the GPS point in modRana disappear for let's say 10 seconds at a time, then the position would update, the circle appear, then disappear again.

When it'd disappear, modRana would not react to screen taps, leading me to believe that there is some heavy processor load going on.

In fact a couple of times, modrana's window would go completely gray without displaying anything, and I had to kill modRana.
In Options->Debug->Redrawing you can enable Print redraw time to terminal. With this you can debug both how often the screen actually redraws and how long each redraw takes.

Originally Posted by 白い熊 View Post
This seemed to disapper after I disabled automatic rotation in the direction of the car movement, leading me to believe the processing load is too heavy for VNC access to X on Android.
Yep, rotation in its current unaccelerated form is unfortunately quite resource-expensive. Also modRana always redraws the complete viewport (with the exception of the simple manual map dragging method) which probably further slows down the VNC viewer that might be trying to only transfer areas that have changed, which won't work as the whole screen changes.

Also by default, when a new tile is loaded, the screen is redrawn - this might be an issue when moving too fast, eq. many new tiles are loaded all the time. this behavior can be disabled in Options->Debug->Tiles->Redraw screen once a new tile is loaded. Might help to reduce the number of redraws quite a bit.

There is also another trick used to reduce the are that needs to be redrawn:
Just update the area around the position indicator and redraw the whole screen only once it gets too close to the edge (TangoGPS works like this). This is not yet implemented in modRana.

Originally Posted by 白い熊 View Post
what I'm hoping for, it's the gpsd interaction somehow...
Yes, this is still a possibility - the location info reading thread wakes up every time GPSD has a position update. If it is feeding too many updates, the thread might be running too often, hogging resources.
You can debug this by enabling Show GPSD debug output in
Options->Debug->GPS and checking how often the a new fix is reported.

Originally Posted by 白い熊 View Post
If not, then messing with TightVNC remains the option, lowering the number of colors of TightVNC display, this is an option, as it can interface at 256 colors, there would probably have to be some filter in modRana to only use 256 colors when started in a specific way, that could lead to processing speed increase...
The whole GUI is drawn with Cairo - would have to check out if it can do this (probably can). Still might end up to be more resource intensive than no filter.

Originally Posted by 白い熊 View Post
However, cutting out gpsd might still be worth it, though the main hog is probably X VNC access...
Yes, but I'd rather first make sure this is what's really causing it as using GPSD simplifies quite a few things. Would bet its rather the frequent fullscreen redraws swamping the VNC viewer.


Originally Posted by 白い熊 View Post
Second, have an option in modrana to update the display only let's say every second, so that this would also decrease the data sent significantly?
Originally Posted by 白い熊 View Post
The more I think about it, the more I think it's the continuous display updates, more than anything.

Martin, would it be possible to have an option allowing you to select how often to redraw the main window, i.e. continuous, and then once in how many seconds...?
If Options->Debug->Tiles->Redraw screen once a new tile is loaded is disabled, the screen should actually update just about once a second. But it might be a good idea to add an option that forces a fixed global redraw interval.
__________________
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; 2011-12-19 at 16:44.
 

The Following User Says Thank You to MartinK For This Useful Post:
Posts: 451 | Thanked: 334 times | Joined on Sep 2009
#924
OK, something fishy is definitely going on...

I did uncheck the 'redraw once new tile is loaded' option, and then: it seems modrana still gets stuck, in a funny way... The cursor position, and the blue box with directions would disappear for 10-20 seconds at a time, while the underlying map, with the traced route is visible... Anyhow the cursor and blue box would flicker on for a split second, only during this time, if you'd touch the screen, I could access the menu.

It is apparent that gpsd is not the hog though, since once I'd get in the menu, I could flip through options and nothing would get stuck, though gpsd is clearly still running in the background.

Once out in the map though, it'd get stuck again.

Tried to display the tile load times in terminal, that's when I noticed some python cairo errors coming up in the terminal.

Anyhow, couldn't capture these, as my drive just ended. Said something about impossible rotation though or something.

I'll capture the full errors in the morning and post.

Could it be, that there's some python/cairo mess-up going on and due to this the display is getting stuck?
 

The Following User Says Thank You to 白い熊 For This Useful Post:
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#925
Originally Posted by 白い熊 View Post
OK, something fishy is definitely going on...

I did uncheck the 'redraw once new tile is loaded' option, and then: it seems modrana still gets stuck, in a funny way... The cursor position, and the blue box with directions would disappear for 10-20 seconds at a time, while the underlying map, with the traced route is visible... Anyhow the cursor and blue box would flicker on for a split second, only during this time, if you'd touch the screen, I could access the menu.
This behavior might be a sign of some errors halfway in the drawing process. ModRana first draws the base map layer, than map overlay and then a screen overlay. If some layers are missing, there might have been some errors while it was drawn. Can you check the stdout output ? Also, modRana can log to file, just enable it in options->Debug->Logging->Log modRana stdout to file to make modRana log to a file in .modrana folder in your home directory.

Originally Posted by 白い熊 View Post
It is apparent that gpsd is not the hog though, since once I'd get in the menu, I could flip through options and nothing would get stuck, though gpsd is clearly still running in the background.

Once out in the map though, it'd get stuck again.

Tried to display the tile load times in terminal, that's when I noticed some python cairo errors coming up in the terminal.
Interesting !
Originally Posted by 白い熊 View Post
Anyhow, couldn't capture these, as my drive just ended. Said something about impossible rotation though or something.

I'll capture the full errors in the morning and post.

Could it be, that there's some python/cairo mess-up going on and due to this the display is getting stuck?
That might very well be the case - but I have to see what errors are reported & when do they show up. Cairo in your chroot might be missing some features or might have some bugs. Still, it might be possible to find an (android) chroot specific workaround as it seems to work fine at other times.
__________________
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)
 
Posts: 440 | Thanked: 160 times | Joined on Aug 2010 @ Las Vegas, NV
#926
If I start downloading map and stop it in the middle of downloading, then download the map of the same (or say locations that will overlap with whatever map I have already downloaded) then will it download all the maps again or will it share the previous data with the new download?

I was trying to download 80Km map with all possible zoom levels, I don't seem to be able to download whole map at once (left it overnight once, result was restarted device in the morning). Maybe I will use pc for downloading maps now.
 
woody14619's Avatar
Posts: 1,455 | Thanked: 3,309 times | Joined on Dec 2009 @ Rochester, NY
#927
Some providers limit how many map tiles you can download in a set time-frame, and start blocking/banning you if you do too many too fast. Try choosing another map provider.

As to the question: Yes, if you download 10% of the tiles, they're still there. When you re-start, it will skip downloading those tiles as it hits them. At least that was true the last time I used it, to grab tiles. I cached 90% of the area I usually am in, and rarely get tile traffic because of that now.
 

The Following 2 Users Say Thank You to woody14619 For This Useful Post:
Posts: 440 | Thanked: 160 times | Joined on Aug 2010 @ Las Vegas, NV
#928
Originally Posted by woody14619 View Post
Some providers limit how many map tiles you can download in a set time-frame, and start blocking/banning you if you do too many too fast. Try choosing another map provider.

As to the question: Yes, if you download 10% of the tiles, they're still there. When you re-start, it will skip downloading those tiles as it hits them. At least that was true the last time I used it, to grab tiles. I cached 90% of the area I usually am in, and rarely get tile traffic because of that now.
At first I tried google map without any success (not a single tile was downloaded), later downloaded openstreet map (or whatever it is called). My calculation was I would have to download about 200Mbs based on what I already had downloaded but I haven't reached beyond about 10Mbs of downloads. 12Mbps wifi but downloads are very slow, maybe lots of computation or maybe openstreet limits the download speed a lot.
 
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#929
Originally Posted by woody14619 View Post
As to the question: Yes, if you download 10% of the tiles, they're still there. When you re-start, it will skip downloading those tiles as it hits them. At least that was true the last time I used it, to grab tiles. I cached 90% of the area I usually am in, and rarely get tile traffic because of that now.
Yep, modRana skips downloading of tiles it already has.

Originally Posted by Joseph9560 View Post
12Mbps wifi but downloads are very slow, maybe lots of computation or maybe openstreet limits the download speed a lot.
Some on the high zoomlevel tiles (zl 15+) might not be actually stored on the server but the server generates them on-demand, as storing them all would consume a huge amount of storage. This might be (much) slower than just sending pre-generated tiles it has in storage.
__________________
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,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#930
Request for comments - modRana roadmap
While designing the new Qt/QML based GUI for modRana I wrote a roadmap.

The roadmap currently contains mostly GUI related stuff but status of other items (offline routing/map rendering, voice output localization, offline POI catalogs, etc.) should show up eventually. I will update the status of the items as the work progresses.

So, what you you think ?
Have a better design proposal ? Is there something missing or not clear enough ? Don't hesitate and tell me! Or even just edit the wiki article itself(but please add your nick to your edits so I don't miss them & can react).

Also, modRana now has its own Maemo wiki page.
__________________
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 7 Users Say Thank You to MartinK For This Useful Post:
Reply

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


 
Forum Jump


All times are GMT. The time now is 10:02.