PyOtherSide has been integrated to the system since 16.04
To keep display on : there is an example in Activity Tracker app, not sure if it's the most pretty.
https://github.com/ernesst/ActivityTracker/blob/master/Main.qml line 45.
Posts made by ernest
RE: Pure maps navigation port
RE: Help the community
Where do I start? What are barriers that impede UT from spreading? What should I learn in software to help the community?
Depends your area of interest and confort : community, system, porting, coding, Art etc... and you don't even need to be good or educated in that field, like me just learning by tweaking.
Python wise they are several possibilities :
- full applications : https://github.com/ernesst/ActivityTracker
- Wrapper : https://framagit.org/ernesst/MLS-for-Utouch / https://framagit.org/ernesst/gps-utouch-tracker
Python get integrated into QML via : https://github.com/thp/pyotherside
A very nice python lib would be great to integrate into Utouch : https://github.com/owncloud/pyocclient for Nextcloud/Owncloud.
Welcome in the community.
GPS tracking in Background - Trick
As you know to track your activity there is the application Activity Tracker : https://open-store.io/app/activitytracker.cwayne18
Unfortunately due to the Utouch security policy, GPS signal is not accessible when the screen is off or app is in background, that why the original developer force the screen to stay on, reducing significantly the battery life with no benefit.
Issue is tracked there : https://github.com/ubports/ubuntu-touch/issues/1067
In order to extend life of the phone for some long activities, i've made a wrapper of the test_gps command.
It requires to be launched from a terminal with it "Prevent app suspension" activated in Tweak app.
The GPS Utouch tracker is available there : https://framagit.org/ernesst/gps-utouch-tracker, still not polished yet.
Just download the folder, place it somewhere in your homefolder.
To start it, go to the folder and launch it with
It will start to track your activity, to stop it just go back to the terminal and hit the virtual key "Ctrl+c" and it will create a gpx file.
To visualize this file, you can import it in Activity Tracker.
RE: Mozilla Locations Service on Ubuntu Touch
All, in order to help, I've create a wrapper in python which scan wifi and gps position.
It's not the most userfriendly, but quite simple to use and can run in background too if the terminal is set for it.
Please test and let me know.
- Upload to MLS is done automatically when the app is closed by a Ctrl+C and phone connected to internet.
- No parallel use with Unav or Activity Tracker test has been properly done yet
- Only tested with Nexus 5, if fail with other device, please create a bug.
If anybody know how to list cells tower around the device, please let me know. So far all the ofono script doesn't allow that
Further implementation : If this script is able to run in background without disturbing user apps, would be interesting to add a on/off button in the GPS menu.
How-To : Offline Unav maps
A quick how-to on getting offline maps for Unav.
Recently i needed to update my offline map and everytime it's quit a mess to setup an OpenstreetMap local server, lost of hours lost on that. I recently found a docker instance perfect for our needs.
What we need in this how-to
- A linux computer (of-course) with disk space
- Snap of Jtiledownloader installed
- docker.io installed
- A nextcloud instance
- desktop nextcloud sync software
First of all : setting up tile server.
Not much to say, except follow the work of this great Github repository :
docker volume create openstreetmap-data
git clone https://github.com/Overv/openstreetmap-tile-server.git
What i've done :
docker volume create openstreetmap-data
download the appropriate pbf there : http://download.geofabrik.de/
docker run -v /absolute/path/to/luxembourg.osm.pbf:/data.osm.pbf -v openstreetmap-data:/var/lib/postgresql/10/main overv/openstreetmap-tile-server import
If lucky enough then
docker run -p 80:80 -v openstreetmap-data:/var/lib/postgresql/10/main -d overv/openstreetmap-tile-server run
Std output :
root@T450s:/home/ernest# docker run -v /home/ernest/Documents/texas-latest.osm.pbf:/data.osm.pbf -v openstreetmap-data:/var/lib/postgresql/10/main overv/openstreetmap-tile-server import Unable to find image 'overv/openstreetmap-tile-server:latest' locally latest: Pulling from overv/openstreetmap-tile-server 898c46f3b1a1: Pull complete 63366dfa0a50: Pull complete 041d4cd74a92: Pull complete 6e1bee0f8701: Pull complete b3d49b2dd661: Pull complete 7f7fd75ed7c3: Pull complete ee5c945e49f2: Pull complete 808e9c0fdf3b: Pull complete d780496bb933: Pull complete 52ddc01564c5: Pull complete 98df30b28f52: Pull complete 6806a290c5cc: Pull complete fe5da1ed6f5d: Pull complete c2b03f1243c3: Pull complete 892f03c6da75: Pull complete 60740ad09b89: Pull complete 510cf260d67d: Pull complete e5cf11ef9535: Pull complete 327759077133: Pull complete 29fd64d01acc: Pull complete 6529fd3cf6e4: Pull complete 7b31de690592: Pull complete 42ed3f4d774a: Pull complete 8c1ac07d887f: Pull complete 9a8a920e2d77: Pull complete e8e3c66eb441: Pull complete 8bcaa423208c: Pull complete a64871ac5a50: Pull complete Digest: sha256:f8c58ef99819eb73adfaee91401b7f23a878f29122fae285734912657f5082da Status: Downloaded newer image for overv/openstreetmap-tile-server:latest + '[' 1 -ne 1 ']' + '[' import = import ']' + CreatePostgressqlConfig + cp /etc/postgresql/10/main/postgresql.custom.conf.tmpl /etc/postgresql/10/main/postgresql.custom.conf + sudo -u postgres echo 'autovacuum = on' + cat /etc/postgresql/10/main/postgresql.custom.conf # Suggested minimal settings from # https://ircama.github.io/osm-carto-tutorials/tile-server-ubuntu/ shared_buffers = 128MB min_wal_size = 1GB max_wal_size = 2GB maintenance_work_mem = 256MB # Suggested settings from # https://github.com/openstreetmap/chef/blob/master/roles/tile.rb#L38-L45 max_connections = 250 temp_buffers = 32MB work_mem = 128MB wal_buffers = 1024kB wal_writer_delay = 500ms commit_delay = 10000 # checkpoint_segments = 60 # unrecognized in psql 10.7.1 max_wal_size = 2880MB random_page_cost = 1.1 track_activity_query_size = 16384 autovacuum_vacuum_scale_factor = 0.05 autovacuum_analyze_scale_factor = 0.02 autovacuum = on + service postgresql start * Starting PostgreSQL 10 database server ...done. + sudo -u postgres createuser renderer + sudo -u postgres createdb -E UTF8 -O renderer gis + sudo -u postgres psql -d gis -c 'CREATE EXTENSION postgis;' CREATE EXTENSION + sudo -u postgres psql -d gis -c 'CREATE EXTENSION hstore;' CREATE EXTENSION + sudo -u postgres psql -d gis -c 'ALTER TABLE geometry_columns OWNER TO renderer;' ALTER TABLE + sudo -u postgres psql -d gis -c 'ALTER TABLE spatial_ref_sys OWNER TO renderer;' ALTER TABLE + '[' '!' -f /data.osm.pbf ']' + sudo -u renderer osm2pgsql -d gis --create --slim -G --hstore --tag-transform-script /home/renderer/src/openstreetmap-carto/openstreetmap-carto.lua -C 2048 --number-processes 4 -S /home/renderer/src/openstreetmap-carto/openstreetmap-carto.style /data.osm.pbf osm2pgsql version 0.96.0 (64 bit id space) Allocating memory for dense node cache Allocating dense node cache in one big chunk Allocating memory for sparse node cache Sharing dense sparse Node-cache: cache=2048MB, maxblocks=32768*65536, allocation method=11 Mid: pgsql, cache=2048 Setting up table: planet_osm_nodes Setting up table: planet_osm_ways Setting up table: planet_osm_rels Using lua based tag processing pipeline with script /home/renderer/src/openstreetmap-carto/openstreetmap-carto.lua Using projection SRS 3857 (Spherical Mercator) Setting up table: planet_osm_point Setting up table: planet_osm_line Setting up table: planet_osm_polygon Setting up table: planet_osm_roads Reading in file: /data.osm.pbf Using PBF parser. Processing: Node(44188k 237.6k/s) Way(4610k 12.36k/s) Relation(26670 952.50/s) parse time: 587s Node stats: total(44188377), max(6434488285) in 186s Way stats: total(4610012), max(686484151) in 373s Relation stats: total(26922), max(9523915) in 28s Sorting data and creating indexes for planet_osm_point Sorting data and creating indexes for planet_osm_line Sorting data and creating indexes for planet_osm_polygon Sorting data and creating indexes for planet_osm_roads Copying planet_osm_roads to cluster by geometry finished Creating geometry index on planet_osm_roads Copying planet_osm_point to cluster by geometry finished Creating geometry index on planet_osm_point Creating osm_id index on planet_osm_roads Creating indexes on planet_osm_roads finished All indexes on planet_osm_roads created in 20s Completed planet_osm_roads Stopping table: planet_osm_nodes Stopped table: planet_osm_nodes in 0s Stopping table: planet_osm_ways Building index on table: planet_osm_ways Creating osm_id index on planet_osm_point Creating indexes on planet_osm_point finished All indexes on planet_osm_point created in 75s Completed planet_osm_point Stopping table: planet_osm_rels Building index on table: planet_osm_rels Stopped table: planet_osm_rels in 4s Copying planet_osm_line to cluster by geometry finished Creating geometry index on planet_osm_line Creating osm_id index on planet_osm_line Creating indexes on planet_osm_line finished All indexes on planet_osm_line created in 218s Completed planet_osm_line Copying planet_osm_polygon to cluster by geometry finished Creating geometry index on planet_osm_polygon Creating osm_id index on planet_osm_polygon Creating indexes on planet_osm_polygon finished All indexes on planet_osm_polygon created in 344s Completed planet_osm_polygon Stopped table: planet_osm_ways in 385s Osm2pgsql took 993s overall node cache: stored: 44188377(100.00%), storage efficiency: 57.43% (dense blocks: 3386, sparse nodes: 24604874), hit rate: 100.00% + service postgresql stop * Stopping PostgreSQL 10 database server ...done. + exit 0 root@T450s:/home/ernest# sudo docker run -p 80:80 -v openstreetmap-data:/var/lib/postgresql/10/main -d overv/openstreetmap-tile-server run
and open in your browser : http://localhost/ done you have a tile server running.
I'm not sure how long the docker instance last and may need to be regenerated each time, fine for me I'm using it every 6 month. Please see the github info, if you want to have an docker instance lasting.
Second step : downloading the tile, for that you need Jtiledownloader
See : http://unav.me/offline/ and the snap store
The configuration is pretty simple : as server enter http://localhost:80/tile. then open "slippy map chooser" you should see the map.
Then select the area of interest (defined with left click), set tile zoom level to 10,11,12,13,14,15,16,17 and click download and wait.
Third step :
transfert to the phone... this is up to you, define as the step 6 there : http://unav.me/offline/
I'm suggesting to zip the folder and extract it in the phone.
Personnally, i'm synchronizing my Jtiledownload folder archive to my nextcloud instance and then this instance to my utouch folder, it's longer but "automatic" update.
I hope it will help to reduce your data consumption
Restart from scratch
Following thise link to cleanup docker image, container and volume
RE: Updates on Mir and OTA-8 (and watch out, Edge channel users)
I'm amazed to be able to switch between edge and devel channel in 5 minutes... hop hop a small trial and bug reporting for 30 minutes then prior to sleep i switch back to devel for the next day.
I've the same feeling than when clickable got launched
RE: Updates on Mir and OTA-8 (and watch out, Edge channel users)
In case anyone is only following along here
Of course we are ! Thanks