GnssStatusCompat
public 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 |
|---|
public abstract class GnssStatusCompat.CallbackSee |
Constants |
|
|---|---|
static final int |
Constellation type constant for Beidou. |
static final int |
Constellation type constant for Galileo. |
static final int |
Constellation type constant for Glonass. |
static final int |
Constellation type constant for GPS. |
static final int |
Constellation type constant for IRNSS. |
static final int |
Constellation type constant for QZSS. |
static final int |
Constellation type constant for SBAS. |
static final int |
Unknown constellation type. |
Public methods |
|
|---|---|
abstract @FloatRange(from = 0, to = 360) float |
getAzimuthDegrees(@IntRange(from = 0) int satelliteIndex)See |
abstract @FloatRange(from = 0, to = 63) float |
getBasebandCn0DbHz(@IntRange(from = 0) int satelliteIndex) |
abstract @FloatRange(from = 0) float |
getCarrierFrequencyHz(@IntRange(from = 0) int satelliteIndex) |
abstract @FloatRange(from = 0, to = 63) float |
getCn0DbHz(@IntRange(from = 0) int satelliteIndex)See |
abstract int |
getConstellationType(@IntRange(from = 0) int satelliteIndex)See |
abstract @FloatRange(from = "-90", to = 90) float |
getElevationDegrees(@IntRange(from = 0) int satelliteIndex)See |
abstract @IntRange(from = 0) int |
See |
abstract @IntRange(from = 1, to = 200) int |
|
abstract boolean |
hasAlmanacData(@IntRange(from = 0) int satelliteIndex)See |
abstract boolean |
hasBasebandCn0DbHz(@IntRange(from = 0) int satelliteIndex)See |
abstract boolean |
hasCarrierFrequencyHz(@IntRange(from = 0) int satelliteIndex) |
abstract boolean |
hasEphemerisData(@IntRange(from = 0) int satelliteIndex)See |
abstract boolean |
|
static @NonNull GnssStatusCompat |
@RequiresApi(value = VERSION_CODES.N)Wraps the given |
static @NonNull GnssStatusCompat |
Wraps the given |
Constants
CONSTELLATION_BEIDOU
public static final int CONSTELLATION_BEIDOU = 5
Constellation type constant for Beidou.
CONSTELLATION_GALILEO
public static final int CONSTELLATION_GALILEO = 6
Constellation type constant for Galileo.
CONSTELLATION_GLONASS
public static final int CONSTELLATION_GLONASS = 3
Constellation type constant for Glonass.
CONSTELLATION_GPS
public static final int CONSTELLATION_GPS = 1
Constellation type constant for GPS.
CONSTELLATION_IRNSS
public static final int CONSTELLATION_IRNSS = 7
Constellation type constant for IRNSS.
CONSTELLATION_QZSS
public static final int CONSTELLATION_QZSS = 4
Constellation type constant for QZSS.
CONSTELLATION_SBAS
public static final int CONSTELLATION_SBAS = 2
Constellation type constant for SBAS.
CONSTELLATION_UNKNOWN
public static final int CONSTELLATION_UNKNOWN = 0
Unknown constellation type.
Public methods
getAzimuthDegrees
public abstract @FloatRange(from = 0, to = 360) float getAzimuthDegrees(@IntRange(from = 0) int satelliteIndex)
See getAzimuthDegrees and getAzimuth.
| Parameters | |
|---|---|
@IntRange(from = 0) int satelliteIndex |
A index from zero to |
getBasebandCn0DbHz
public abstract @FloatRange(from = 0, to = 63) float getBasebandCn0DbHz(@IntRange(from = 0) int satelliteIndex)
See getCarrierFrequencyHz. Behavior is undefined if hasCarrierFrequencyHz returns false.
| Parameters | |
|---|---|
@IntRange(from = 0) int satelliteIndex |
A index from zero to |
getCarrierFrequencyHz
public abstract @FloatRange(from = 0) float getCarrierFrequencyHz(@IntRange(from = 0) int satelliteIndex)
See getCarrierFrequencyHz. Behavior is undefined if hasCarrierFrequencyHz returns false.
| Parameters | |
|---|---|
@IntRange(from = 0) int satelliteIndex |
A index from zero to |
getCn0DbHz
public abstract @FloatRange(from = 0, to = 63) float getCn0DbHz(@IntRange(from = 0) int satelliteIndex)
See getCn0DbHz and getSnr.
| Parameters | |
|---|---|
@IntRange(from = 0) int satelliteIndex |
A index from zero to |
getConstellationType
public abstract int getConstellationType(@IntRange(from = 0) int satelliteIndex)
See getConstellationType. Will always return a value for the GPS constellation below Android N.
| Parameters | |
|---|---|
@IntRange(from = 0) int satelliteIndex |
A index from zero to |
getElevationDegrees
public abstract @FloatRange(from = "-90", to = 90) float getElevationDegrees(@IntRange(from = 0) int satelliteIndex)
See getElevationDegrees and getElevation.
| Parameters | |
|---|---|
@IntRange(from = 0) int satelliteIndex |
A index from zero to |
getSatelliteCount
public abstract @IntRange(from = 0) int getSatelliteCount()
See getSatelliteCount and getMaxSatellites.
getSvid
public abstract @IntRange(from = 1, to = 200) int getSvid(@IntRange(from = 0) int satelliteIndex)
| Parameters | |
|---|---|
@IntRange(from = 0) int satelliteIndex |
A index from zero to |
hasAlmanacData
public abstract boolean hasAlmanacData(@IntRange(from = 0) int satelliteIndex)
See hasAlmanacData and hasAlmanac.
| Parameters | |
|---|---|
@IntRange(from = 0) int satelliteIndex |
A index from zero to |
hasBasebandCn0DbHz
public abstract boolean hasBasebandCn0DbHz(@IntRange(from = 0) int satelliteIndex)
See hasBasebandCn0DbHz. This will always return false prior to Android R.
| Parameters | |
|---|---|
@IntRange(from = 0) int satelliteIndex |
A index from zero to |
hasCarrierFrequencyHz
public abstract boolean hasCarrierFrequencyHz(@IntRange(from = 0) int satelliteIndex)
See hasCarrierFrequencyHz. This will always return false prior to Android O.
| Parameters | |
|---|---|
@IntRange(from = 0) int satelliteIndex |
A index from zero to |
hasEphemerisData
public abstract boolean hasEphemerisData(@IntRange(from = 0) int satelliteIndex)
See hasEphemerisData and hasEphemeris.
| Parameters | |
|---|---|
@IntRange(from = 0) int satelliteIndex |
A index from zero to |
usedInFix
public abstract boolean usedInFix(@IntRange(from = 0) int satelliteIndex)
| Parameters | |
|---|---|
@IntRange(from = 0) int satelliteIndex |
A index from zero to |
wrap
@RequiresApi(value = VERSION_CODES.N)
public static @NonNull GnssStatusCompat wrap(@NonNull GnssStatus gnssStatus)
Wraps the given GnssStatus as GnssStatusCompat.