Hi,

Since Valhlalla's routing engine is available on SFOS in offline mode, I am
working on exposing its functionality to the mapping applications. I am
focused now on bringing just-in-time navigation information via map
matching (https://github.com/valhalla/valhalla/blob/master/docs/api/
map-matching/api-reference.md). In particular, on demand, snapping the
recorded GPS positions to the road network (modes for car, bicycle,
walking) and obtaining information regarding the current position (street
name, speed limit, direction of motion). There are more data available, but
let's try with something simpler.

I looked into whether its possible to write Qt QGeoPositionInfoSource that
would offer such data. Unfortunately, QGeoPositionInfo seems to have fixed
structure and cannot be extended. So, a custom solution is needed. [I am
sure we can propose to extend it to Qt, but that would take a while to get
it on SFOS via Qt upgrade].

For the developers of the applications, I would like to write QML type that
can be used as a replacement for QML PositionSource and, in addition to
classical QML PositionSource, offer data via map matched results. So, in
addition to position property, there would be additional properties
describing current map matched results.

To make it possible, I am considering extending OSM Scout Server with D-Bus
service that would emit a signal with updated data once per
`updateInterval` of the position source. Instead of response-reply, such
approach would allow to push the data from the source to the client which
should be more efficient and allow the data reuse by different
applications.

As usual, devil is in the details. Since I haven't used D-Bus earlier in my
programs, there are several questions that I would like to ask.

* In general, does the approach via D-Bus make sense? Or am I missing
something better?

* When the map matched results are of interest, its OSM Scout Server that
will start GPS communication via Qt C++ API and will emit the signal once
per each position change. It will have to stop GPS as soon as there are no
more interested clients. So, what's the common practice in this use case?
Ask client to start/stop (set `active`)? How I am expected to shutdown GPS
access when the clients crashed?
​​
* I would like to enable automatic service start when someone tries to
access
​it via ​
D-Bus. As far as I have seen, its possible via .service file in
/usr/share/dbus-1/services. However, the server runs as nemo-owned process
and, if possible, I would prefer to keep the configuration files
​installed by RPM ​
in nemo's home.
​ This would give me an option to publish the server via store iff
systemd-service activation will be allowed in future. Is there some way to
make it?

* What's the recommended way to communicate with D-Bus in Qt C++?
D-Bus Adaptors
​ (https://doc.qt.io/qt-5/usingadaptors.html)? ​
​

*
​ Any good example compatible with LGPL3 and doing something similar to
what I am after?

B
​est wishes,


Rinigus​
_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Reply via email to