CIDCO-dev / Poseidon

Hydrographic surveying platform operating system
MIT License
10 stars 10 forks source link

Geofencing #382

Open glabmoris opened 4 months ago

glabmoris commented 4 months ago

Add a geofence feature to enforce specific zones to acquire data to avoid collecting illegal data

jomad-gst commented 1 month ago

I have a preliminary Geofence implemented in https://github.com/jomad-gst/Poseidon/tree/geofence

jomad-gst commented 1 month ago

Some questions that needs to be answered at some point:

  1. How does the Geofence interact with existing logging methods? The speed logging currently always attempt to start logging when the speed is fast enough, this could interfere with a geofence and they would be stuck in a loop turning on and off. What happens if the logging mode is manual and the logging is manually turned on while outside the Geofence? Maybe the simplest solution is to have another logging mode. Atleast the interaction should be well defined.
  2. Do we need some dependency to parse wkt and test for "point in polygon"? The current implementation provides a naive simple implementation. The naive approach is fine for most usecases I think.
glabmoris commented 1 month ago

My two cents is that in retrospective, speed-based logging appears to cause more issues than anything. It was originally specified as a "We might need it" option that was never used and ultimately was dropped as part of another CSB project. I personally would find geofencing to be much more effective at preventing disk space issues by several orders of magnitude.

Thus:

  1. I would remove speed-based logging. Nobody uses it, and it's a recurring pain.
  2. Naive is fine for now. There's much more to gain than to lose at this point.

What do you think ?

Jonasmadsen commented 3 weeks ago

Makes sense , I think I have a working version now, on the branch https://github.com/jomad-gst/Poseidon/tree/geofence if you create a feature branch for it I will make a pull request to it, or you can just copy my code into a new branch in your repository.

Feel free to edit the code and use just the parts that you find useful.