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 | getCarrierFrequencyHz(int satIndex) Gets the carrier frequency of the signal tracked. |
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 | hasCarrierFrequencyHz(int satIndex) Reports whether |
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 | |
---|---|
![]() java.lang.Object |
added in API level 24
int CONSTELLATION_BEIDOU
Constellation type constant for Beidou.
Constant Value: 5 (0x00000005)
added in API level 24
int CONSTELLATION_GALILEO
Constellation type constant for Galileo.
Constant Value: 6 (0x00000006)
added in API level 24
int CONSTELLATION_GLONASS
Constellation type constant for Glonass.
Constant Value: 3 (0x00000003)
added in API level 24
int CONSTELLATION_GPS
Constellation type constant for GPS.
Constant Value: 1 (0x00000001)
added in API level 24
int CONSTELLATION_QZSS
Constellation type constant for QZSS.
Constant Value: 4 (0x00000004)
added in API level 24
int CONSTELLATION_SBAS
Constellation type constant for SBAS.
Constant Value: 2 (0x00000002)
added in API level 24
int CONSTELLATION_UNKNOWN
Unknown constellation type.
Constant Value: 0 (0x00000000)
added in API level 24
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 |
added in API level 26
float getCarrierFrequencyHz (int satIndex)
Gets the carrier frequency of the signal tracked.
For example it can be the GPS central frequency for L1 = 1575.45 MHz, or L2 = 1227.60 MHz, L5 = 1176.45 MHz, varying GLO channels, etc. If the field is not set, it is the primary common use central frequency, e.g. L1 = 1575.45 MHz for GPS. For an L1, L5 receiver tracking a satellite on L1 and L5 at the same time, two measurements will be reported for this same satellite, in one all the values related to L1 will be filled, and in the other all of the values related to L5 will be filled.
The value is only available if hasCarrierFrequencyHz(int)
is true
.
Parameters | |
---|---|
satIndex | int : the index of the satellite in the list. |
Returns | |
---|---|
float | the carrier frequency of the signal tracked in Hz. |
added in API level 24
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 |
added in API level 24
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 |
added in API level 24
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 |
added in API level 24
int getSatelliteCount ()
Gets the total number of satellites in satellite list.
Returns | |
---|---|
int |
added in API level 24
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:
GPS: 1-32
SBAS: 120-151, 183-192
GLONASS: One of: OSN, or FCN+100
1-24 as the orbital slot number (OSN) (preferred, if known)
93-106 as the frequency channel number (FCN) (-7 to +6) plus 100. i.e. encode FCN of -7 as 93, 0 as 100, and +6 as 106
QZSS: 193-200
Galileo: 1-36
Beidou: 1-37
Parameters | |
---|---|
satIndex | int : the index of the satellite in the list. |
Returns | |
---|---|
int |
added in API level 24
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 |
added in API level 26
boolean hasCarrierFrequencyHz (int satIndex)
Reports whether getCarrierFrequencyHz(int)
is available (i.e. carrier frequency is available for the satellite at the specified index).
Parameters | |
---|---|
satIndex | int : the index of the satellite in the list. |
Returns | |
---|---|
boolean |
added in API level 24
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 |
added in API level 24
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 |
尚无评论!