mls: Specifiy radio type for individual towers
So i was wondering why my location was several 100km off when driving around but sometimes very accurate when i had bad reception (and hence the modem downgraded from 4G to 3G or 2G). Turns out we need to feed the radioType
of the cell tower when on 4G:
Mozilla's API has a per tower radioType
field¹. Without that filled in it will assume GSM and hence ignore the provided data in case of 4G with a locationAreaCode > 65535² and just fallback to GeoIP.
This changes the request from
{"radioType":"gsm","cellTowers":[{"cellId":45622821,"mobileCountryCode":262,"mobileNetworkCode":3,"locationAreaCode":47260}]}
to
{"radioType":"gsm","cellTowers":[{"cellId":45622821,"mobileCountryCode":262,"mobileNetworkCode":3,"locationAreaCode":47260,"radioType":"lte"}]}
and the returned result then matches the cell tower data from ³.
- https://ichnaea.readthedocs.io/en/latest/api/geolocate.html#cell-tower-fields
- See https://developers.google.com/maps/documentation/geolocation/overview#calculating_cell_id
- https://location.services.mozilla.com/downloads
Fixes 5d15b65e