gpstest icon indicating copy to clipboard operation
gpstest copied to clipboard

hasGnssAntennaInfo() returns bad data and is deprecated

Open barbeau opened this issue 4 years ago • 6 comments

Describe the bug Related to https://github.com/barbeau/gpstest/issues/488 - it appears that even if hasGnssAntennaInfo() (https://developer.android.com/reference/android/location/GnssCapabilities#hasGnssAntennaInfo()) returns true the GnssAntennaInfo always returns bad data on existing Android 11 devices (it's not just isolated to the Pixel 5 in https://github.com/barbeau/gpstest/issues/483) and we should just stop reporting data from it (or at least filter out the known bad data). EDIT - Pixel 5 is fixed, so output isn't always bad - we need to filter it.

For Android S and higher, it will be replaced with https://developer.android.com/reference/android/location/GnssCapabilities#hasAntennaInfo(), which we should use instead.

To Reproduce Steps to reproduce the behavior:

  1. Report data to GPSTest Device Database

Expected behavior Actual number of antennas and CF values for antennas should be reported

Observed behavior All existing Android 11 devices always show 2 antennas supported and "L1, L2", which is wrong. Presumably hasGnssAntennaInfo() is returning true when it should be returning false Seems like Google recognizes this and has deprecated the API accordingly.

App, Device and Android version:

See columns AF and AG for "Number GNSS antennas" and "GNSS antenna CFs" - you will see that all Android 11 devices that are reporting these values are reporting "2" and "L1, L2" respectively, which are incorrect

barbeau avatar Jun 03 '21 18:06 barbeau

I opened a new issue at https://issuetracker.google.com/issues/190197760 for "GnssAntennaInfo returns wrong values on all Android 11 devices".

barbeau avatar Jun 04 '21 16:06 barbeau

Thank you!!

vkbellis avatar Jun 07 '21 16:06 vkbellis

Looks like this is fixed on the Pixel 5 RQ3A.210605.005 update that rolled out today - hasGnssAntennaInfo() now reports false instead of true, and the GnssAntennaInfo data isn't populated.

So this is better than before, in that bad data isn't reported, but we still don't have valid antenna data.

barbeau avatar Jun 07 '21 22:06 barbeau

I couldn't find a better place to write ... image 3.9.12 vs 3.9.13 The results are different ...

KovalevArtem avatar Aug 16 '21 13:08 KovalevArtem

@KovalevArtem Interesting! Always feel free to open a new issue for something like this.

What are the GNSS hardware model name and Android versions for these two records?

These values can change depending on what satellites you have in view at the moment when you submit the data, or the firmware could have changed the carrier frequencies in the GnssStatus API for a given signal (e.g., a bug fix). See https://barbeau.medium.com/crowdsourcing-gnss-capabilities-of-android-devices-d4228645cf25 for a more detailed description of both cases. If the GNSS hardware model name and Android version didn't change (i.e., you didn't get a phone firmware update), then it's probably the former case. Nothing changed in GPSTest that would impact the mapping of the raw carrier frequency from the GnssStatus API to the labels you see here.

barbeau avatar Aug 16 '21 15:08 barbeau

@KovalevArtem If you could provide screenshots of the Status screen for both versions, you'll be able to see the raw data where the supported GNSS CFs is coming from (i.e., the list of available satellites).

EDIT - This was discussed and is resolved in https://github.com/barbeau/gpstest/issues/545.

barbeau avatar Aug 16 '21 15:08 barbeau