Android-Mock-Location
Android-Mock-Location copied to clipboard
Feature - fetch GPS data from network location
I'm attempting to hook an Android OS device to a GPS 9DoF IMU that is external to the device on a wired network (USB-to-Ethernet adapter that can also charge the phone/tablet). Basically I want to feed the Android OS a mock location that is TCP pub-subbed from a network address/port. This would essentially allow a "full airplane mode" with no cellular-radio-based Assisted GPS (a battery killer) - but still providing precise location services over the hardwired data network.
I envision this mode running as a UI-less background service, with a configuration allowing an IP address and port number to be set for the GPS 9DoF IMU data, with an option to automatically use the Gateway IP from DHCP as the source, while still allowing the port to be specified. Data should ideally be a JSON format stream breaking out each data value. Since it would be providing orientation data as well 4x radio-buttons allowing the specification of "which way is up" given the current data would be needed.
The companion test bench is easy to build, a RaspberryPi Zero (Zero 2, Zero 2 W) can be put into a USB-OTG Ethernet Adapter mode, and it can run any of the services required to model data emission, or any USB-OTG ethernet adapter to a local network crossover-PC-direct can do the same.