# Print output for @column tags ?>
public
final
class
GnssStatus
extends Object
java.lang.Object | |
↳ | android.location.GnssStatus |
This class represents the current state of the GNSS engine and is used in conjunction with
GnssStatus.Callback
.
Nested classes | |
---|---|
class |
GnssStatus.Builder
Builder class to help create new GnssStatus instances. |
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_IRNSS
Constellation type constant for IRNSS. |
int |
CONSTELLATION_QZSS
Constellation type constant for QZSS. |
int |
CONSTELLATION_SBAS
Constellation type constant for SBAS. |
int |
CONSTELLATION_UNKNOWN
Unknown constellation type. |
Public methods | |
---|---|
boolean
|
equals(Object o)
Indicates whether some other object is "equal to" this one. |
float
|
getAzimuthDegrees(int satelliteIndex)
Retrieves the azimuth the satellite at the specified index. |
float
|
getBasebandCn0DbHz(int satelliteIndex)
Retrieves the baseband carrier-to-noise density of the satellite at the specified index in dB-Hz. |
float
|
getCarrierFrequencyHz(int satelliteIndex)
Gets the carrier frequency of the signal tracked. |
float
|
getCn0DbHz(int satelliteIndex)
Retrieves the carrier-to-noise density at the antenna of the satellite at the specified index in dB-Hz. |
int
|
getConstellationType(int satelliteIndex)
Retrieves the constellation type of the satellite at the specified index. |
float
|
getElevationDegrees(int satelliteIndex)
Retrieves the elevation of the satellite at the specified index. |
int
|
getSatelliteCount()
Gets the total number of satellites in satellite list. |
int
|
getSvid(int satelliteIndex)
Gets the identification number for the satellite at the specific index. |
boolean
|
hasAlmanacData(int satelliteIndex)
Reports whether the satellite at the specified index has almanac data. |
boolean
|
hasBasebandCn0DbHz(int satelliteIndex)
Reports whether a valid |
boolean
|
hasCarrierFrequencyHz(int satelliteIndex)
Reports whether a valid |
boolean
|
hasEphemerisData(int satelliteIndex)
Reports whether the satellite at the specified index has ephemeris data. |
int
|
hashCode()
Returns a hash code value for the object. |
boolean
|
usedInFix(int satelliteIndex)
Reports whether the satellite at the specified index was used in the calculation of the most recent position fix. |
Inherited methods | |
---|---|
public static final int CONSTELLATION_BEIDOU
Constellation type constant for Beidou.
Constant Value: 5 (0x00000005)
public static final int CONSTELLATION_GALILEO
Constellation type constant for Galileo.
Constant Value: 6 (0x00000006)
public static final int CONSTELLATION_GLONASS
Constellation type constant for Glonass.
Constant Value: 3 (0x00000003)
public static final int CONSTELLATION_GPS
Constellation type constant for GPS.
Constant Value: 1 (0x00000001)
public static final int CONSTELLATION_IRNSS
Constellation type constant for IRNSS.
Constant Value: 7 (0x00000007)
public static final int CONSTELLATION_QZSS
Constellation type constant for QZSS.
Constant Value: 4 (0x00000004)
public static final int CONSTELLATION_SBAS
Constellation type constant for SBAS.
Constant Value: 2 (0x00000002)
public static final int CONSTELLATION_UNKNOWN
Unknown constellation type.
Constant Value: 0 (0x00000000)
public boolean equals (Object o)
Indicates whether some other object is "equal to" this one.
The equals
method implements an equivalence relation
on non-null object references:
x
, x.equals(x)
should return
true
.
x
and y
, x.equals(y)
should return true
if and only if
y.equals(x)
returns true
.
x
, y
, and z
, if
x.equals(y)
returns true
and
y.equals(z)
returns true
, then
x.equals(z)
should return true
.
x
and y
, multiple invocations of
x.equals(y)
consistently return true
or consistently return false
, provided no
information used in equals
comparisons on the
objects is modified.
x
,
x.equals(null)
should return false
.
The equals
method for class Object
implements
the most discriminating possible equivalence relation on objects;
that is, for any non-null reference values x
and
y
, this method returns true
if and only
if x
and y
refer to the same object
(x == y
has the value true
).
Note that it is generally necessary to override the hashCode
method whenever this method is overridden, so as to maintain the
general contract for the hashCode
method, which states
that equal objects must have equal hash codes.
Parameters | |
---|---|
o |
Object : the reference object with which to compare. |
Returns | |
---|---|
boolean |
true if this object is the same as the obj
argument; false otherwise. |
public float getAzimuthDegrees (int satelliteIndex)
Retrieves the azimuth the satellite at the specified index.
Parameters | |
---|---|
satelliteIndex |
int : An index from zero to getSatelliteCount() - 1
Value is 0 or greater |
Returns | |
---|---|
float |
Value is between 0 and 360 inclusive |
public float getBasebandCn0DbHz (int satelliteIndex)
Retrieves the baseband carrier-to-noise density of the satellite at the specified index in dB-Hz.
Parameters | |
---|---|
satelliteIndex |
int : An index from zero to getSatelliteCount() - 1
Value is 0 or greater |
Returns | |
---|---|
float |
Value is between 0 and 63 inclusive |
public float getCarrierFrequencyHz (int satelliteIndex)
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 | |
---|---|
satelliteIndex |
int : An index from zero to getSatelliteCount() - 1
Value is 0 or greater |
Returns | |
---|---|
float |
Value is 0 or greater |
public float getCn0DbHz (int satelliteIndex)
Retrieves the carrier-to-noise density at the antenna of the satellite at the specified index in dB-Hz.
Parameters | |
---|---|
satelliteIndex |
int : An index from zero to getSatelliteCount() - 1
Value is 0 or greater |
Returns | |
---|---|
float |
Value is between 0 and 63 inclusive |
public int getConstellationType (int satelliteIndex)
Retrieves the constellation type of the satellite at the specified index.
Parameters | |
---|---|
satelliteIndex |
int : An index from zero to getSatelliteCount() - 1
Value is 0 or greater |
Returns | |
---|---|
int |
Value is CONSTELLATION_UNKNOWN , CONSTELLATION_GPS , CONSTELLATION_SBAS , CONSTELLATION_GLONASS , CONSTELLATION_QZSS , CONSTELLATION_BEIDOU , CONSTELLATION_GALILEO , or CONSTELLATION_IRNSS |
public float getElevationDegrees (int satelliteIndex)
Retrieves the elevation of the satellite at the specified index.
Parameters | |
---|---|
satelliteIndex |
int : An index from zero to getSatelliteCount() - 1
Value is 0 or greater |
Returns | |
---|---|
float |
Value is between -90 and 90 inclusive |
public int getSatelliteCount ()
Gets the total number of satellites in satellite list.
Returns | |
---|---|
int |
Value is 0 or greater |
public int getSvid (int satelliteIndex)
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 | |
---|---|
satelliteIndex |
int : An index from zero to getSatelliteCount() - 1
Value is 0 or greater |
Returns | |
---|---|
int |
Value is between 1 and 200 inclusive |
public boolean hasAlmanacData (int satelliteIndex)
Reports whether the satellite at the specified index has almanac data.
Parameters | |
---|---|
satelliteIndex |
int : An index from zero to getSatelliteCount() - 1
Value is 0 or greater |
Returns | |
---|---|
boolean |
public boolean hasBasebandCn0DbHz (int satelliteIndex)
Reports whether a valid getBasebandCn0DbHz(int)
is available.
Parameters | |
---|---|
satelliteIndex |
int : An index from zero to getSatelliteCount() - 1
Value is 0 or greater |
Returns | |
---|---|
boolean |
public boolean hasCarrierFrequencyHz (int satelliteIndex)
Reports whether a valid getCarrierFrequencyHz(int)
is available.
Parameters | |
---|---|
satelliteIndex |
int : An index from zero to getSatelliteCount() - 1
Value is 0 or greater |
Returns | |
---|---|
boolean |
public boolean hasEphemerisData (int satelliteIndex)
Reports whether the satellite at the specified index has ephemeris data.
Parameters | |
---|---|
satelliteIndex |
int : An index from zero to getSatelliteCount() - 1
Value is 0 or greater |
Returns | |
---|---|
boolean |
public int hashCode ()
Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
HashMap
.
The general contract of hashCode
is:
hashCode
method
must consistently return the same integer, provided no information
used in equals
comparisons on the object is modified.
This integer need not remain consistent from one execution of an
application to another execution of the same application.
equals(Object)
method, then calling the hashCode
method on each of
the two objects must produce the same integer result.
equals(java.lang.Object)
method, then calling the hashCode
method on each of the
two objects must produce distinct integer results. However, the
programmer should be aware that producing distinct integer results
for unequal objects may improve the performance of hash tables.
As much as is reasonably practical, the hashCode method defined by
class Object
does return distinct integers for distinct
objects. (This is typically implemented by converting the internal
address of the object into an integer, but this implementation
technique is not required by the
Java™ programming language.)
Returns | |
---|---|
int |
a hash code value for this object. |
public boolean usedInFix (int satelliteIndex)
Reports whether the satellite at the specified index was used in the calculation of the most recent position fix.
Parameters | |
---|---|
satelliteIndex |
int : An index from zero to getSatelliteCount() - 1
Value is 0 or greater |
Returns | |
---|---|
boolean |