Geofencing (dl2rxe)#347
Conversation
add geofence-values
geofence-function
add geofence-support
add geofence-support
add geofence-support
add geofence-support
|
hi nice idea... but after checking the code: how does the Tx is not active when checking the geoFence ? |
|
Thank you for the positive feedback. The sendNewPacket function in lora_utils.cpp is terminated after if (geofence_pause) { without actually starting the transmission. I’ve just noticed that the <> message is still being displayed; that needs to be suppressed. If you want to make any changes, feel free. |
more information
surpress TX-Message during geofence
|
maybe the validation of the Tx should not be with transmitFlag, but in the "beaconUpdate" part. right? |
|
That’s probably better for the programme logic. Then the transmission won’t be carried out in the first place. This also means the short <> message won’t be displayed. Very good. I’ve further improved the display in geofence.cpp. This displays the distances. |
|
awesome then. will try to add this soon enough! |
Hi Ricardo,
Based on your excellent tracker software, I’ve added a geofencing feature that deactivates the tracker, pauses transmission or switches it off when it’s within a defined area. I need this feature so that I don’t constantly transmit my location (even during experiments) when I’m at home anyway.
Unfortunately, I’m no programming expert and have only tried it out with a TTGO T-Beam 1.2.
If you like, you’re welcome to reuse the code or the idea. Please forgive me if I’ve done something wrong here; this is my first attempt with GitHub and the like.
For the configuration in tracker_conf.json
Definition of the circle:
geofence_latitude = 50.0; // 50.000
geofence_longitude = 10.0; // 10.000
geofence_radius = 1000 ; / 1000 m
geofence_mode = ‘inactive’;
Possible modes:
inactive: normal tracker operation
pause: if the tracker is within the circle, it does not transmit
poweroff: if the tracker is within the circle, it switches off. (Tested with TTGO v1.2). This mode can only be exited if the GPS signal is invalid or the tracker is outside the circle.
Kind regards, Micha, DL2RXE, near Berlin, Germany