GnssStatusCompat
abstract class GnssStatusCompat
GnssStatus representation that works across all Android versions. See GnssStatus and GpsStatus.
Note: When used to wrap GpsStatus, the best performance can be obtained by using a monotonically increasing satelliteIndex parameter (for instance, by using a loop from 0 to getSatelliteCount). Random access is supported but performance may suffer.
Summary
Nested types |
|---|
abstract class GnssStatusCompat.CallbackSee |
Constants |
|
|---|---|
const Int |
Constellation type constant for Beidou. |
const Int |
Constellation type constant for Galileo. |
const Int |
Constellation type constant for Glonass. |
const Int |
Constellation type constant for GPS. |
const Int |
Constellation type constant for IRNSS. |
const Int |
Constellation type constant for QZSS. |
const Int |
Constellation type constant for SBAS. |
const Int |
Unknown constellation type. |
Public functions |
|
|---|---|
abstract @FloatRange(from = 0, to = 360) Float |
getAzimuthDegrees(satelliteIndex: @IntRange(from = 0) Int)See |
abstract @FloatRange(from = 0, to = 63) Float |
getBasebandCn0DbHz(satelliteIndex: @IntRange(from = 0) Int) |
abstract @FloatRange(from = 0) Float |
getCarrierFrequencyHz(satelliteIndex: @IntRange(from = 0) Int) |
abstract @FloatRange(from = 0, to = 63) Float |
getCn0DbHz(satelliteIndex: @IntRange(from = 0) Int)See |
abstract Int |
getConstellationType(satelliteIndex: @IntRange(from = 0) Int)See |
abstract @FloatRange(from = "-90", to = 90) Float |
getElevationDegrees(satelliteIndex: @IntRange(from = 0) Int)See |
abstract @IntRange(from = 0) Int |
See |
abstract @IntRange(from = 1, to = 200) Int |
|
abstract Boolean |
hasAlmanacData(satelliteIndex: @IntRange(from = 0) Int)See |
abstract Boolean |
hasBasebandCn0DbHz(satelliteIndex: @IntRange(from = 0) Int)See |
abstract Boolean |
hasCarrierFrequencyHz(satelliteIndex: @IntRange(from = 0) Int) |
abstract Boolean |
hasEphemerisData(satelliteIndex: @IntRange(from = 0) Int)See |
abstract Boolean |
|
java-static GnssStatusCompat |
@RequiresApi(value = VERSION_CODES.N)Wraps the given |
java-static GnssStatusCompat |
Wraps the given |
Constants
CONSTELLATION_BEIDOU
const val CONSTELLATION_BEIDOU = 5: Int
Constellation type constant for Beidou.
CONSTELLATION_GALILEO
const val CONSTELLATION_GALILEO = 6: Int
Constellation type constant for Galileo.
CONSTELLATION_GLONASS
const val CONSTELLATION_GLONASS = 3: Int
Constellation type constant for Glonass.
CONSTELLATION_GPS
const val CONSTELLATION_GPS = 1: Int
Constellation type constant for GPS.
CONSTELLATION_IRNSS
const val CONSTELLATION_IRNSS = 7: Int
Constellation type constant for IRNSS.
CONSTELLATION_QZSS
const val CONSTELLATION_QZSS = 4: Int
Constellation type constant for QZSS.
CONSTELLATION_SBAS
const val CONSTELLATION_SBAS = 2: Int
Constellation type constant for SBAS.
CONSTELLATION_UNKNOWN
const val CONSTELLATION_UNKNOWN = 0: Int
Unknown constellation type.
Public functions
getAzimuthDegrees
abstract fun getAzimuthDegrees(satelliteIndex: @IntRange(from = 0) Int): @FloatRange(from = 0, to = 360) Float
See getAzimuthDegrees and getAzimuth.
| Parameters | |
|---|---|
satelliteIndex: @IntRange(from = 0) Int |
A index from zero to |
getBasebandCn0DbHz
abstract fun getBasebandCn0DbHz(satelliteIndex: @IntRange(from = 0) Int): @FloatRange(from = 0, to = 63) Float
See getCarrierFrequencyHz. Behavior is undefined if hasCarrierFrequencyHz returns false.
| Parameters | |
|---|---|
satelliteIndex: @IntRange(from = 0) Int |
A index from zero to |
getCarrierFrequencyHz
abstract fun getCarrierFrequencyHz(satelliteIndex: @IntRange(from = 0) Int): @FloatRange(from = 0) Float
See getCarrierFrequencyHz. Behavior is undefined if hasCarrierFrequencyHz returns false.
| Parameters | |
|---|---|
satelliteIndex: @IntRange(from = 0) Int |
A index from zero to |
getCn0DbHz
abstract fun getCn0DbHz(satelliteIndex: @IntRange(from = 0) Int): @FloatRange(from = 0, to = 63) Float
See getCn0DbHz and getSnr.
| Parameters | |
|---|---|
satelliteIndex: @IntRange(from = 0) Int |
A index from zero to |
getConstellationType
abstract fun getConstellationType(satelliteIndex: @IntRange(from = 0) Int): Int
See getConstellationType. Will always return a value for the GPS constellation below Android N.
| Parameters | |
|---|---|
satelliteIndex: @IntRange(from = 0) Int |
A index from zero to |
getElevationDegrees
abstract fun getElevationDegrees(satelliteIndex: @IntRange(from = 0) Int): @FloatRange(from = "-90", to = 90) Float
See getElevationDegrees and getElevation.
| Parameters | |
|---|---|
satelliteIndex: @IntRange(from = 0) Int |
A index from zero to |
getSatelliteCount
abstract fun getSatelliteCount(): @IntRange(from = 0) Int
See getSatelliteCount and getMaxSatellites.
getSvid
abstract fun getSvid(satelliteIndex: @IntRange(from = 0) Int): @IntRange(from = 1, to = 200) Int
| Parameters | |
|---|---|
satelliteIndex: @IntRange(from = 0) Int |
A index from zero to |
hasAlmanacData
abstract fun hasAlmanacData(satelliteIndex: @IntRange(from = 0) Int): Boolean
See hasAlmanacData and hasAlmanac.
| Parameters | |
|---|---|
satelliteIndex: @IntRange(from = 0) Int |
A index from zero to |
hasBasebandCn0DbHz
abstract fun hasBasebandCn0DbHz(satelliteIndex: @IntRange(from = 0) Int): Boolean
See hasBasebandCn0DbHz. This will always return false prior to Android R.
| Parameters | |
|---|---|
satelliteIndex: @IntRange(from = 0) Int |
A index from zero to |
hasCarrierFrequencyHz
abstract fun hasCarrierFrequencyHz(satelliteIndex: @IntRange(from = 0) Int): Boolean
See hasCarrierFrequencyHz. This will always return false prior to Android O.
| Parameters | |
|---|---|
satelliteIndex: @IntRange(from = 0) Int |
A index from zero to |
hasEphemerisData
abstract fun hasEphemerisData(satelliteIndex: @IntRange(from = 0) Int): Boolean
See hasEphemerisData and hasEphemeris.
| Parameters | |
|---|---|
satelliteIndex: @IntRange(from = 0) Int |
A index from zero to |
usedInFix
abstract fun usedInFix(satelliteIndex: @IntRange(from = 0) Int): Boolean
| Parameters | |
|---|---|
satelliteIndex: @IntRange(from = 0) Int |
A index from zero to |
wrap
@RequiresApi(value = VERSION_CODES.N)
java-static fun wrap(gnssStatus: GnssStatus): GnssStatusCompat
Wraps the given GnssStatus as GnssStatusCompat.
wrap
java-static fun wrap(gpsStatus: GpsStatus): GnssStatusCompat
Wraps the given GpsStatus as GnssStatusCompat.