public
final
class
GnssStatus
extends Object
java.lang.Object | |
↳ | android.location.GnssStatus |
This class represents the current state of the GNSS engine.
This class is used in conjunction with the GnssStatus.Callback
.
Nested classes | |
---|---|
class |
GnssStatus.Callback
Used for receiving notifications when GNSS events happen. |
Constants | |
---|---|
int |
CONSTELLATION_BEIDOU
Constellation type constant for Beidou. |
int |
CONSTELLATION_GALILEO
Constellation type constant for Galileo. |
int |
CONSTELLATION_GLONASS
Constellation type constant for Glonass. |
int |
CONSTELLATION_GPS
Constellation type constant for GPS. |
int |
CONSTELLATION_QZSS
Constellation type constant for QZSS. |
int |
CONSTELLATION_SBAS
Constellation type constant for SBAS. |
int |
CONSTELLATION_UNKNOWN
Unknown constellation type. |
Public methods | |
---|---|
float
|
getAzimuthDegrees(int satIndex)
Retrieves the azimuth the satellite at the specified index. |
float
|
getCn0DbHz(int satIndex)
Retrieves the carrier-to-noise density at the antenna of the satellite at the specified index in dB-Hz. |
int
|
getConstellationType(int satIndex)
Retrieves the constellation type of the satellite at the specified index. |
float
|
getElevationDegrees(int satIndex)
Retrieves the elevation of the satellite at the specified index. |
int
|
getSatelliteCount()
Gets the total number of satellites in satellite list. |
int
|
getSvid(int satIndex)
Gets the identification number for the satellite at the specific index. |
boolean
|
hasAlmanacData(int satIndex)
Reports whether the satellite at the specified index has almanac data. |
boolean
|
hasEphemerisData(int satIndex)
Reports whether the satellite at the specified index has ephemeris data. |
boolean
|
usedInFix(int satIndex)
Reports whether the satellite at the specified index was used in the calculation of the most recent position fix. |
Inherited methods | |
---|---|
From
class
java.lang.Object
|
int CONSTELLATION_BEIDOU
Constellation type constant for Beidou.
Constant Value: 5 (0x00000005)
int CONSTELLATION_GALILEO
Constellation type constant for Galileo.
Constant Value: 6 (0x00000006)
int CONSTELLATION_GLONASS
Constellation type constant for Glonass.
Constant Value: 3 (0x00000003)
int CONSTELLATION_GPS
Constellation type constant for GPS.
Constant Value: 1 (0x00000001)
int CONSTELLATION_QZSS
Constellation type constant for QZSS.
Constant Value: 4 (0x00000004)
int CONSTELLATION_SBAS
Constellation type constant for SBAS.
Constant Value: 2 (0x00000002)
int CONSTELLATION_UNKNOWN
Unknown constellation type.
Constant Value: 0 (0x00000000)
float getAzimuthDegrees (int satIndex)
Retrieves the azimuth the satellite at the specified index.
Parameters | |
---|---|
satIndex |
int :
the index of the satellite in the list.
|
Returns | |
---|---|
float |
float getCn0DbHz (int satIndex)
Retrieves the carrier-to-noise density at the antenna of the satellite at the specified index in dB-Hz.
Parameters | |
---|---|
satIndex |
int :
the index of the satellite in the list.
|
Returns | |
---|---|
float |
int getConstellationType (int satIndex)
Retrieves the constellation type of the satellite at the specified index.
Parameters | |
---|---|
satIndex |
int :
the index of the satellite in the list.
|
Returns | |
---|---|
int |
float getElevationDegrees (int satIndex)
Retrieves the elevation of the satellite at the specified index.
Parameters | |
---|---|
satIndex |
int :
the index of the satellite in the list.
|
Returns | |
---|---|
float |
int getSatelliteCount ()
Gets the total number of satellites in satellite list.
Returns | |
---|---|
int |
int getSvid (int satIndex)
Gets the identification number for the satellite at the specific index.
This svid is pseudo-random number for most constellations. It is FCN & OSN number for Glonass.
The distinction is made by looking at constellation field
getConstellationType(int)
Expected values are in the range of:
Parameters | |
---|---|
satIndex |
int :
the index of the satellite in the list.
|
Returns | |
---|---|
int |
boolean hasAlmanacData (int satIndex)
Reports whether the satellite at the specified index has almanac data.
Parameters | |
---|---|
satIndex |
int :
the index of the satellite in the list.
|
Returns | |
---|---|
boolean |
boolean hasEphemerisData (int satIndex)
Reports whether the satellite at the specified index has ephemeris data.
Parameters | |
---|---|
satIndex |
int :
the index of the satellite in the list.
|
Returns | |
---|---|
boolean |
boolean usedInFix (int satIndex)
Reports whether the satellite at the specified index was used in the calculation of the most recent position fix.
Parameters | |
---|---|
satIndex |
int :
the index of the satellite in the list.
|
Returns | |
---|---|
boolean |