Ribbit-Network / ribbit-network-frog-software

The software for the Ribbit Network Frog Sensor
https://www.ribbitnetwork.org/
MIT License
9 stars 8 forks source link

Integrate Wi-Fi & Cellular Location Based Service (LBS) #9

Open beriberikix opened 1 year ago

beriberikix commented 1 year ago

https://en.wikipedia.org/wiki/Location-based_service https://en.wikipedia.org/wiki/Wi-Fi_positioning_system

This proposal is to add software support for Wi-Fi based location and Cellular based location once we have Cellular Frogs. Using Location Based Services (LBS) is extremely common in mobile applications (Google Maps uses it famously) to provide location information when there isn't a GPS signal. While Frogs are typically stationary, adding support for LBS will help when there isn't great GPS reception in an area or temporary issues due to weather. It's also useful during software development since a developer is typically indoors and a GPS fix could take 45 seconds or more - or never complete.

There are many paid options (usually from a Cellular modem vendor like Nordic and Qualcomm) but there are free services and even free datasets. One service with a free tier that I've used in the past is https://unwiredlabs.com/. Another to consider is Mozilla's MLS since it's free and open source, so we could host it ourselves.

One area of concern is around Privacy so we should make sure we understand the implications of using a third-party service and make sure whatever we implement complies with our privacy stance. A self-hosted solution like MLS/Mozilla Ichnaea could be the best way to achieve this.

Note: this is not about adding Assisted GPS, which speeds up time to first fix. Mobile apps also use LBS as an enhancement but is more complicated to design/implement. This proposal simply adds the ability to get location when there isn't a good source.

damz commented 1 year ago

We also probably want to allow users to just provide the location data themselves, given that most sensors are stationary.

(Note that Mozilla only provides data downloads for cellular networks, which would require a GSM modem.)

keenanjohnson commented 1 year ago

It's definitely an interesting idea! Balena actually implements a wifi based location service already for our SBC based Frogs.

The problem with these services is that although they will provide a mostly accurate lat / long. that fits within our 1 km spatial resolution desire (https://github.com/Ribbit-Network/ribbit-network-frog-sensor/issues/41), they typically don't provide any accurate source of alt. (GPS does this).

We've been told previously that the ability to fairly precisely locate the altitude of the sensors will likely be important for future analysis (although we currently don't do anything with that info today).

keenanjohnson commented 1 year ago

It's possible we could run a compensation algorithm using the barometer to try and derive the alt. that way and use location-based services and the baro alt. instead of GPS, but the reliability and accuracy of both options would need to be validated.

beriberikix commented 1 year ago

Makes sense! I wonder if it's still better to have data with coarse or potentially incorrect location data? If we annotated that in the database, data scientist could filter or otherwise treat those readings differently. Not sure it's worth it, though!

beriberikix commented 1 year ago

I do like @damz suggestion to provide a user-supplied location, which a LBS library could re-use.