GnssStatusCompat

Added in 1.5.0

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

See GnssStatus.Callback.

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 getAzimuthDegrees and getAzimuth.

abstract @FloatRange(from = 0, to = 63) Float
getBasebandCn0DbHz(satelliteIndex: @IntRange(from = 0) Int)

See getCarrierFrequencyHz.

abstract @FloatRange(from = 0) Float
getCarrierFrequencyHz(satelliteIndex: @IntRange(from = 0) Int)

See getCarrierFrequencyHz.

abstract @FloatRange(from = 0, to = 63) Float
getCn0DbHz(satelliteIndex: @IntRange(from = 0) Int)

See getCn0DbHz and getSnr.

abstract Int
getConstellationType(satelliteIndex: @IntRange(from = 0) Int)

See getConstellationType.

abstract @FloatRange(from = "-90", to = 90) Float
getElevationDegrees(satelliteIndex: @IntRange(from = 0) Int)

See getElevationDegrees and getElevation.

abstract @IntRange(from = 0) Int

See getSatelliteCount and getMaxSatellites.

abstract @IntRange(from = 1, to = 200) Int
getSvid(satelliteIndex: @IntRange(from = 0) Int)

See getSvid and getPrn.

abstract Boolean
hasAlmanacData(satelliteIndex: @IntRange(from = 0) Int)

See hasAlmanacData and hasAlmanac.

abstract Boolean
hasBasebandCn0DbHz(satelliteIndex: @IntRange(from = 0) Int)

See hasBasebandCn0DbHz.

abstract Boolean
hasCarrierFrequencyHz(satelliteIndex: @IntRange(from = 0) Int)

See hasCarrierFrequencyHz.

abstract Boolean
hasEphemerisData(satelliteIndex: @IntRange(from = 0) Int)

See hasEphemerisData and hasEphemeris.

abstract Boolean
usedInFix(satelliteIndex: @IntRange(from = 0) Int)

See usedInFix and usedInFix.

java-static GnssStatusCompat
@RequiresApi(value = VERSION_CODES.N)
wrap(gnssStatus: GnssStatus)

Wraps the given GnssStatus as GnssStatusCompat.

java-static GnssStatusCompat
wrap(gpsStatus: GpsStatus)

Wraps the given GpsStatus as GnssStatusCompat.

Constants

CONSTELLATION_BEIDOU

Added in 1.5.0
const val CONSTELLATION_BEIDOU = 5: Int

Constellation type constant for Beidou.

CONSTELLATION_GALILEO

Added in 1.5.0
const val CONSTELLATION_GALILEO = 6: Int

Constellation type constant for Galileo.

CONSTELLATION_GLONASS

Added in 1.5.0
const val CONSTELLATION_GLONASS = 3: Int

Constellation type constant for Glonass.

CONSTELLATION_GPS

Added in 1.5.0
const val CONSTELLATION_GPS = 1: Int

Constellation type constant for GPS.

CONSTELLATION_IRNSS

Added in 1.5.0
const val CONSTELLATION_IRNSS = 7: Int

Constellation type constant for IRNSS.

CONSTELLATION_QZSS

Added in 1.5.0
const val CONSTELLATION_QZSS = 4: Int

Constellation type constant for QZSS.

CONSTELLATION_SBAS

Added in 1.5.0
const val CONSTELLATION_SBAS = 2: Int

Constellation type constant for SBAS.

CONSTELLATION_UNKNOWN

Added in 1.5.0
const val CONSTELLATION_UNKNOWN = 0: Int

Unknown constellation type.

Public functions

getAzimuthDegrees

Added in 1.5.0
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 getSatelliteCount - 1

getBasebandCn0DbHz

Added in 1.5.0
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 getSatelliteCount - 1

getCarrierFrequencyHz

Added in 1.5.0
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 getSatelliteCount - 1

getCn0DbHz

Added in 1.5.0
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 getSatelliteCount - 1

getConstellationType

Added in 1.5.0
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 getSatelliteCount - 1

getElevationDegrees

Added in 1.5.0
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 - 1

getSatelliteCount

Added in 1.5.0
abstract fun getSatelliteCount(): @IntRange(from = 0) Int

See getSatelliteCount and getMaxSatellites.

getSvid

Added in 1.5.0
abstract fun getSvid(satelliteIndex: @IntRange(from = 0) Int): @IntRange(from = 1, to = 200) Int

See getSvid and getPrn.

Parameters
satelliteIndex: @IntRange(from = 0) Int

A index from zero to getSatelliteCount - 1

hasAlmanacData

Added in 1.5.0
abstract fun hasAlmanacData(satelliteIndex: @IntRange(from = 0) Int): Boolean

See hasAlmanacData and hasAlmanac.

Parameters
satelliteIndex: @IntRange(from = 0) Int

A index from zero to getSatelliteCount - 1

hasBasebandCn0DbHz

Added in 1.5.0
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 getSatelliteCount - 1

hasCarrierFrequencyHz

Added in 1.5.0
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 getSatelliteCount - 1

hasEphemerisData

Added in 1.5.0
abstract fun hasEphemerisData(satelliteIndex: @IntRange(from = 0) Int): Boolean

See hasEphemerisData and hasEphemeris.

Parameters
satelliteIndex: @IntRange(from = 0) Int

A index from zero to getSatelliteCount - 1

usedInFix

Added in 1.5.0
abstract fun usedInFix(satelliteIndex: @IntRange(from = 0) Int): Boolean

See usedInFix and usedInFix.

Parameters
satelliteIndex: @IntRange(from = 0) Int

A index from zero to getSatelliteCount - 1

wrap

Added in 1.5.0
@RequiresApi(value = VERSION_CODES.N)
java-static fun wrap(gnssStatus: GnssStatus): GnssStatusCompat

Wraps the given GnssStatus as GnssStatusCompat.

wrap

Added in 1.5.0
java-static fun wrap(gpsStatus: GpsStatus): GnssStatusCompat

Wraps the given GpsStatus as GnssStatusCompat.