biotinker / LibreTasks

An updated form of Omnidroid
Apache License 2.0
82 stars 22 forks source link

"GPS or GSM/Location-SPEED" additional root event (feature request) #208

Open toxtox opened 7 years ago

toxtox commented 7 years ago

Currently LibreTasks has a root event called "GPS Location Changed". Therefore it should be theoretically possible to calculate the speed based on GPS or GSM-cell-ids and to add an root event called "GPS or GSM/Location-SPEED" or similar?

use case example: Most of the day I do not need bluetooth and therefore bluetooth is switched off. When I drive by car I have to enable bluetooth manually and somethimes I forget it to enable.

Would it be possible to switch on bluetooth at a defined driving speed for example 30km/h or faster? And switching it off again if speed is lower then for example 25km/h after a delay of 15minutes?

My GPS is normally disabled, too and as an alternative I use the less precise GSM location by cell id ( https://github.com/n76/Local-GSM-Backend/blob/HEAD/README.md ).

Theroretically the speed calculation should work with GSM-cell-id-locations in the same way as with GPS, but I suppose that the speed calculation can only give you a decent speed result after a few kilometers.

But switching on bluetooth automatically after a few kilometers would be much better for me then forgetting it completely.