osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.67k stars 1.02k forks source link

Feature Request: Send routing information over Bluetooth LE (BLE) #16892

Open euphi opened 1 year ago

euphi commented 1 year ago

🚀Send routing information over BLE

Description

It would be very helpful to show routing information on external device. BLE is ideal for this. Osmand should offer a BLE service that publishes routing information.

I'm creating my own bicycle computer and was looking if any navigation app already offers such a possibilty. I found that the komoot app offers such a possibility (see https://www.komoot.de/b2b/connect or https://docs.google.com/document/d/1iYgV4lDKG8LdCuYwzTXpt3FLO_kaoJGGWzai8yehv6g ) and would really appreciate if something like this could be added to osmand.

Describe the solution you'd like

The Komoot solutions lacks some feature, so what I wish is:

To be discussed:

Describe alternatives you've considered

For now I use komoot, which however has several drawbacks compared to osmand:

If you're interested, here are links to the C++ code to receive komoot information and show it on a display with ESP32-S3 (Arduino / lvgl). I would be happy to adapt it to a osmand BLE solution :-D (and promise to provide also simple example code for Arduino-ESP32 )

BLE:

UI:

Nav-Icons (roundabouts still missing):

Zirochkabila commented 1 year ago

@euphi Duplicate https://github.com/osmandapp/OsmAnd/issues/15459?

euphi commented 1 year ago

@Zirochkabila no, direction of information flow is opposite in #15459.

Also, there is no need to have "fixed" connections/pairing for my proposal.

Zirochkabila commented 1 year ago

@euphi Agree

euphi commented 1 year ago

Photo of how navigation on external device looks like IMG20230406075242-cropped

Radiokot commented 1 year ago

For those interested in this functionality: you can check out my implementation of step-by-step directions broadcasting to a BLE device using a companion app and AIDL interface: https://github.com/Radiokot/osmand-display-app https://github.com/Radiokot/osmand-display-app/blob/main/app/src/main/java/ua/com/radiokot/osmanddisplay/features/broadcasting/logic/DirectionsBroadcastingService.kt I also used it for a bike navigation display 🙂 image

euphi commented 1 year ago

So the Osmand AIDL interface could be used for an extra app that provides information via BLE. However, to make the feature useful more information must be provided on AIDL.

Note: Heading and bearing could be useful to indicate on some kind of compass, if the external BLE devices uses an inertial sensor).

Nice to have:

u0nel commented 1 year ago

you can already call get_info, which returns the current and destination location, the eta, the time left, something called "time_distance_left", the name of the next two turns, the distances to them, the turn type and the turn angle

Radiokot commented 1 year ago

you can already call get_info

Unfortunately, the command is only available as an intent, it is impossible to use from a service. Having it in the AIDL interface would be great.

u0nel commented 1 year ago

I added some more more information to the navigation updates in my fork: https://github.com/u0nel/OsmAnd It now returns the distance, the turntype and streetname for the next two turns, the time and distance left for the full navigation and the current speed.