GnssStatusCompat
abstract class GnssStatusCompat
kotlin.Any | |
↳ | androidx.core.location.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 classes | |
---|---|
abstract |
See |
Constants | |
---|---|
static Int |
Constellation type constant for Beidou. |
static Int |
Constellation type constant for Galileo. |
static Int |
Constellation type constant for Glonass. |
static Int |
Constellation type constant for GPS. |
static Int |
Constellation type constant for IRNSS. |
static Int |
Constellation type constant for QZSS. |
static Int |
Constellation type constant for SBAS. |
static Int |
Unknown constellation type. |
Public methods | |
---|---|
abstract Float |
getAzimuthDegrees(@IntRange(0) satelliteIndex: Int) See |
abstract Float |
getBasebandCn0DbHz(@IntRange(0) satelliteIndex: Int) |
abstract Float |
getCarrierFrequencyHz(@IntRange(0) satelliteIndex: Int) |
abstract Float |
getCn0DbHz(@IntRange(0) satelliteIndex: Int) |
abstract Int |
getConstellationType(@IntRange(0) satelliteIndex: Int) |
abstract Float |
getElevationDegrees(@IntRange(0) satelliteIndex: Int) See |
abstract Int |
See |
abstract Int | |
abstract Boolean |
hasAlmanacData(@IntRange(0) satelliteIndex: Int) See |
abstract Boolean |
hasBasebandCn0DbHz(@IntRange(0) satelliteIndex: Int) |
abstract Boolean |
hasCarrierFrequencyHz(@IntRange(0) satelliteIndex: Int) |
abstract Boolean |
hasEphemerisData(@IntRange(0) satelliteIndex: Int) See |
abstract Boolean | |
open static GnssStatusCompat |
wrap(@NonNull gnssStatus: GnssStatus) Wraps the given |
open static GnssStatusCompat |
Wraps the given |
Constants
CONSTELLATION_BEIDOU
static val CONSTELLATION_BEIDOU: Int
Constellation type constant for Beidou.
Value: GnssStatus.CONSTELLATION_BEIDOU
CONSTELLATION_GALILEO
static val CONSTELLATION_GALILEO: Int
Constellation type constant for Galileo.
Value: GnssStatus.CONSTELLATION_GALILEO
CONSTELLATION_GLONASS
static val CONSTELLATION_GLONASS: Int
Constellation type constant for Glonass.
Value: GnssStatus.CONSTELLATION_GLONASS
CONSTELLATION_GPS
static val CONSTELLATION_GPS: Int
Constellation type constant for GPS.
Value: GnssStatus.CONSTELLATION_GPS
CONSTELLATION_IRNSS
static val CONSTELLATION_IRNSS: Int
Constellation type constant for IRNSS.
Value: GnssStatus.CONSTELLATION_IRNSS
CONSTELLATION_QZSS
static val CONSTELLATION_QZSS: Int
Constellation type constant for QZSS.
Value: GnssStatus.CONSTELLATION_QZSS
CONSTELLATION_SBAS
static val CONSTELLATION_SBAS: Int
Constellation type constant for SBAS.
Value: GnssStatus.CONSTELLATION_SBAS
CONSTELLATION_UNKNOWN
static val CONSTELLATION_UNKNOWN: Int
Unknown constellation type.
Value: GnssStatus.CONSTELLATION_UNKNOWN
Public methods
getAzimuthDegrees
@FloatRange(0, 360) abstract fun getAzimuthDegrees(@IntRange(0) satelliteIndex: Int): Float
See GnssStatus#getAzimuthDegrees(int)
and GpsSatellite#getAzimuth()
.
Parameters | |
---|---|
satelliteIndex |
Int: A index from zero to getSatelliteCount() - 1 |
getBasebandCn0DbHz
@FloatRange(0, 63) abstract fun getBasebandCn0DbHz(@IntRange(0) satelliteIndex: Int): Float
See GnssStatus#getCarrierFrequencyHz(int)
. Behavior is undefined if hasCarrierFrequencyHz(int)
returns false.
Parameters | |
---|---|
satelliteIndex |
Int: A index from zero to getSatelliteCount() - 1 |
getCarrierFrequencyHz
@FloatRange(0) abstract fun getCarrierFrequencyHz(@IntRange(0) satelliteIndex: Int): Float
See GnssStatus#getCarrierFrequencyHz(int)
. Behavior is undefined if hasCarrierFrequencyHz(int)
returns false.
Parameters | |
---|---|
satelliteIndex |
Int: A index from zero to getSatelliteCount() - 1 |
getCn0DbHz
@FloatRange(0, 63) abstract fun getCn0DbHz(@IntRange(0) satelliteIndex: Int): Float
See GnssStatus#getCn0DbHz(int)
and GpsSatellite#getSnr()
.
Parameters | |
---|---|
satelliteIndex |
Int: A index from zero to getSatelliteCount() - 1 |
getConstellationType
abstract fun getConstellationType(@IntRange(0) satelliteIndex: Int): Int
See GnssStatus#getConstellationType(int)
. Will always return a value for the GPS constellation below Android N.
Parameters | |
---|---|
satelliteIndex |
Int: A index from zero to getSatelliteCount() - 1 |
getElevationDegrees
@FloatRange(-90, 90) abstract fun getElevationDegrees(@IntRange(0) satelliteIndex: Int): Float
See GnssStatus#getElevationDegrees(int)
and GpsSatellite#getElevation()
.
Parameters | |
---|---|
satelliteIndex |
Int: A index from zero to getSatelliteCount() - 1 |
getSatelliteCount
@IntRange(0) abstract fun getSatelliteCount(): Int
See GnssStatus#getSatelliteCount()
and GpsStatus#getMaxSatellites()
.
getSvid
@IntRange(1, 200) abstract fun getSvid(@IntRange(0) satelliteIndex: Int): Int
See GnssStatus#getSvid(int)
and GpsSatellite#getPrn()
.
Parameters | |
---|---|
satelliteIndex |
Int: A index from zero to getSatelliteCount() - 1 |
hasAlmanacData
abstract fun hasAlmanacData(@IntRange(0) satelliteIndex: Int)