Skip to content

Most visited

Recently visited

navigation

GnssStatusBuilder

GnssStatusBuilder

public final class GnssStatusBuilder
extends Object

java.lang.Object
   ↳ com.google.android.things.userdriver.location.GnssStatusBuilder


Builder for GnssStatus.

Summary

Constants

int GNSS_SV_FLAGS_HAS_ALMANAC_DATA

Flag to indicate that the satellite at a specific index has almanac data.

int GNSS_SV_FLAGS_HAS_CARRIER_FREQUENCY

Flag to indicate that the satellite at a specific index has valid carrier frequency data.

int GNSS_SV_FLAGS_HAS_EPHEMERIS_DATA

Flag to indicate that the satellite at a specific index has ephemeris data.

int GNSS_SV_FLAGS_NONE

No flags.

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.

Public constructors

GnssStatusBuilder(int satelliteCount)

Constructor.

Public methods

GnssStatus build()

Build a GnssStatus from the set data.

GnssStatusBuilder setAzimuth(int satelliteIndex, float azimuth)

Set the azimuth of one satellite.

GnssStatusBuilder setCarrierFrequency(int satelliteIndex, float carrierFrequency)

Set the carrier frequency of one satellite.

GnssStatusBuilder setCn0DbHz(int satelliteIndex, float cn0Db)

Set the carrier-to-noise density for one satellite.

GnssStatusBuilder setConstellation(int satelliteIndex, int constellation)

Set the constellation for one satellite.

GnssStatusBuilder setElevation(int satelliteIndex, float elevation)

Set the elevation of one satellite.

GnssStatusBuilder setFlags(int satelliteIndex, int flags)

Set the flags for one satellite.

GnssStatusBuilder setSvid(int satelliteIndex, int svid)

Set 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)

Set the azimuth of one satellite.

Parameters
satelliteIndex int: The index of the satellite to set the azimuth of.
azimuth float: The azimuth of that staellite, in degrees.
Returns
GnssStatusBuilder

setCarrierFrequency

GnssStatusBuilder setCarrierFrequency (int satelliteIndex, 
                float carrierFrequency)

Set 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 of that staellite, in Hz.
Returns
GnssStatusBuilder

setCn0DbHz

GnssStatusBuilder setCn0DbHz (int satelliteIndex, 
                float cn0Db)

Set 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 of that satellite, in dB-Hz.
Returns
GnssStatusBuilder

setConstellation

GnssStatusBuilder setConstellation (int satelliteIndex, 
                int constellation)

Set 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)

Set the elevation of one satellite.

Parameters
satelliteIndex int: The index of the satellite to set the elevation of.
elevation float: The elevation of that staellite, in degrees.
Returns
GnssStatusBuilder

setFlags

GnssStatusBuilder setFlags (int satelliteIndex, 
                int flags)

Set 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)

Set 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
This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience. (April 2018 — Developer Survey)