GnssStatusBuilder
  public
  
  final
  
  class
  GnssStatusBuilder
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | com.google.android.things.userdriver.location.GnssStatusBuilder | 
Builder for GnssStatus, which contains information about satellites that were detected.
Summary
| Constants | |
|---|---|
| int | GNSS_SV_FLAGS_HAS_ALMANAC_DATAFlag to indicate that the satellite at a specific index has almanac data. | 
| int | GNSS_SV_FLAGS_HAS_CARRIER_FREQUENCYFlag to indicate that the satellite at a specific index has valid carrier frequency data. | 
| int | GNSS_SV_FLAGS_HAS_EPHEMERIS_DATAFlag to indicate that the satellite at a specific index has ephemeris data. | 
| int | GNSS_SV_FLAGS_NONENo flags. | 
| int | GNSS_SV_FLAGS_USED_IN_FIXFlag to indicate that the satellite at a specific index was used in the calculation of the most recent position fix. | 
| Public constructors | |
|---|---|
| 
      GnssStatusBuilder(int satelliteCount)
      Constructor. | |
| Public methods | |
|---|---|
| 
        
        
        
        
        
        GnssStatus | 
      build()
      Build a GnssStatus from the set data. | 
| 
        
        
        
        
        
        GnssStatusBuilder | 
      setAzimuth(int satelliteIndex, float azimuth)
      Sets the azimuth of one satellite. | 
| 
        
        
        
        
        
        GnssStatusBuilder | 
      setCarrierFrequency(int satelliteIndex, float carrierFrequency)
      Sets the carrier frequency of one satellite. | 
| 
        
        
        
        
        
        GnssStatusBuilder | 
      setCn0DbHz(int satelliteIndex, float cn0Db)
      Sets the carrier-to-noise density for one satellite. | 
| 
        
        
        
        
        
        GnssStatusBuilder | 
      setConstellation(int satelliteIndex, int constellation)
      Sets the constellation for one satellite. | 
| 
        
        
        
        
        
        GnssStatusBuilder | 
      setElevation(int satelliteIndex, float elevation)
      Sets the elevation of one satellite. | 
| 
        
        
        
        
        
        GnssStatusBuilder | 
      setFlags(int satelliteIndex, int flags)
      Sets the flags for one satellite. | 
| 
        
        
        
        
        
        GnssStatusBuilder | 
      setSvid(int satelliteIndex, int svid)
      Sets the identification number for one satellite. | 
| Inherited methods | |
|---|---|
|  From
class 
  
    java.lang.Object
  
 | |
Constants
GNSS_SV_FLAGS_HAS_ALMANAC_DATA
int GNSS_SV_FLAGS_HAS_ALMANAC_DATA
Flag to indicate that the satellite at a specific index has almanac data.
Constant Value: 2 (0x00000002)
GNSS_SV_FLAGS_HAS_CARRIER_FREQUENCY
int GNSS_SV_FLAGS_HAS_CARRIER_FREQUENCY
Flag to indicate that the satellite at a specific index has valid carrier frequency data.
Constant Value: 8 (0x00000008)
GNSS_SV_FLAGS_HAS_EPHEMERIS_DATA
int GNSS_SV_FLAGS_HAS_EPHEMERIS_DATA
Flag to indicate that the satellite at a specific index has ephemeris data.
Constant Value: 1 (0x00000001)
GNSS_SV_FLAGS_NONE
int GNSS_SV_FLAGS_NONE
No flags.
Constant Value: 0 (0x00000000)
GNSS_SV_FLAGS_USED_IN_FIX
int GNSS_SV_FLAGS_USED_IN_FIX
Flag to indicate that the satellite at a specific index was used in the calculation of the most recent position fix.
Constant Value: 4 (0x00000004)
Public constructors
GnssStatusBuilder
GnssStatusBuilder (int satelliteCount)
Constructor.
| Parameters | |
|---|---|
| satelliteCount | int: the number of satellites this status contains data from | 
Public methods
build
GnssStatus build ()
Build a GnssStatus from the set data.
| Returns | |
|---|---|
| GnssStatus | A new GnssStatus with the parameters set for this builder. | 
setAzimuth
GnssStatusBuilder setAzimuth (int satelliteIndex, float azimuth)
Sets the azimuth of one satellite.
| Parameters | |
|---|---|
| satelliteIndex | int: the index of the satellite to set the azimuth of | 
| azimuth | float: the azimuth to set for that satellite, in degrees | 
| Returns | |
|---|---|
| GnssStatusBuilder | |
setCarrierFrequency
GnssStatusBuilder setCarrierFrequency (int satelliteIndex, float carrierFrequency)
Sets the carrier frequency of one satellite.
| Parameters | |
|---|---|
| satelliteIndex | int: the index of the satellite to set the carrier frequency of | 
| carrierFrequency | float: the carrier frequency to set for that satellite, in Hz | 
| Returns | |
|---|---|
| GnssStatusBuilder | |
setCn0DbHz
GnssStatusBuilder setCn0DbHz (int satelliteIndex, float cn0Db)
Sets the carrier-to-noise density for one satellite.
| Parameters | |
|---|---|
| satelliteIndex | int: the index of the satellite to set the carrier-to-noise density of | 
| cn0Db | float: the carrier-to-noise density at the antenna to set for that satellite, in
        dB-Hz | 
| Returns | |
|---|---|
| GnssStatusBuilder | |
setConstellation
GnssStatusBuilder setConstellation (int satelliteIndex, int constellation)
Sets the constellation for one satellite.
| Parameters | |
|---|---|
| satelliteIndex | int: the index of the satellite to set the constellation of | 
| constellation | int: the constellation of that satellite. Use constellations from
 
 GnssStatus | 
| Returns | |
|---|---|
| GnssStatusBuilder | |
setElevation
GnssStatusBuilder setElevation (int satelliteIndex, float elevation)
Sets the elevation of one satellite.
| Parameters | |
|---|---|
| satelliteIndex | int: the index of the satellite to set the elevation of | 
| elevation | float: the elevation to set for that satellite, in degrees | 
| Returns | |
|---|---|
| GnssStatusBuilder | |
setFlags
GnssStatusBuilder setFlags (int satelliteIndex, int flags)
Sets the flags for one satellite.
| Parameters | |
|---|---|
| satelliteIndex | int: the index of the satellite to set the flags of | 
| flags | int: a bitmask of GNSS_SV_FLAGS_* flags describing the satellite's data | 
| Returns | |
|---|---|
| GnssStatusBuilder | |
setSvid
GnssStatusBuilder setSvid (int satelliteIndex, int svid)
Sets the identification number for one satellite.
| Parameters | |
|---|---|
| satelliteIndex | int: the index of the satellite to set the identification number of | 
| svid | int: the identification number of that satellite | 
| Returns | |
|---|---|
| GnssStatusBuilder | |
