How to determine SNR for specific GNSS satellite/constellation in Android 7.0?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to determine SNR for specific GNSS satellite/constellation in Android 7.0?

Sean Barbeau
Hi all,
I'm in the process of updating GPSTest (https://github.com/barbeau/gpstest), an open-source app that I maintain, to support the new GnssStatus and GnssMeasurement callbacks available in Android 7.0 Nougat.

In Android 6.0 and lower, using the GPSStatus.Listener you were able to get SNR, Elevation, Azimuth, and ephemeris/almanac/usedInFix info from the GpsStatus object.  In GPSTest this info is visualized in a list and sky (compass) format.

In Android 7.0, GnssStatus largely replaces GPSStatus - all the same information is available, with the exception of SNR.  SNR is available from a separate callback in GnssMeasurement updates.

However, it's not clear to me how to connect the SNR information from the GnssMeasurement callbacks to the elevation, azimuth, and ephemeris/almanac/usedInFix info in the GnssStatus callback.  Satellite ID and constellation type is available from GnssStatus, but GnssMeasurement only provides satellite ID.  Without constellation type in GnssMeasurement, satellite ID alone isn't sufficient to identify a satellite - from GnssStatus.getSvid():

The distinction is made by looking at constellation field getConstellationType(int).  Expected values are in the range of:
  • GPS: 1-32
  • SBAS: 120-151, 183-192
  • GLONASS: One of: OSN, or FCN+100
    • 1-24 as the orbital slot number (OSN) (preferred, if known)
    • 93-106 as the frequency channel number (FCN) (-7 to +6) plus 100. i.e. encode FCN of -7 as 93, 0 as 100, and +6 as 106
  • QZSS: 193-200
  • Galileo: 1-36
  • Beidou: 1-37
So a satellite ID of 1 could refer to a GPS, GLONASS, Galileo, or Beidou satellite.  And, because GPS and GLONASS, for example, can both be visible to a device at the same time, you could potentially get two GnssMeasurements with svid=1.

There seems to be some implicit information of constellation type encoded via GnssMeasurement.getState(), as there are states that reference Galileo, GLONASS, and Beidou, but other states just reference a generic "GNSS".  So it doesn't seem like this is enough information to get a constellation type for a GnssMeasurement, and therefore you can't unambiguously link a GnssMeasurement to a GnssStatus.

Am I missing something?  Is there another way to tell constellation type of a GnssMeasurement?  Or another way to get an SNR to link to a GnssStatus update?

Any info is appreciated!

Thanks,
Sean

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

How to determine SNR for specific GNSS satellite/constellation in Android 7.0?

Sean Barbeau
So apparently I can't read documentation - there is indeed a GnssMeasurement.getConstellationType().  So that solves the problem!

Sean

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to determine SNR for specific GNSS satellite/constellation in Android 7.0?

Sean Barbeau
To close the loop on this old thread (sorry, I thought I posted this back in 2016) - in Android 7.0 and higher, you should be using C/N0 instead of SNR for signal quality information.  C/N0 is exposed within the GnssStatus object:
https://developer.android.com/reference/android/location/GnssStatus.html#getCn0DbHz(int)

Sean

On Saturday, October 8, 2016 at 7:00:34 PM UTC-4, Sean Barbeau wrote:
So apparently I can't read documentation - there is indeed a GnssMeasurement.getConstellationType().  So that solves the problem!

Sean

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.