GnssStatus.Builder


public static final class GnssStatus.Builder
extends Object

java.lang.Object
   ↳ android.location.GnssStatus.Builder


Builder class to help create new GnssStatus instances.

Summary

Public constructors

Builder()

Public methods

GnssStatus.Builder addSatellite(int constellationType, int svid, float cn0DbHz, float elevation, float azimuth, boolean hasEphemeris, boolean hasAlmanac, boolean usedInFix, boolean hasCarrierFrequency, float carrierFrequency, boolean hasBasebandCn0DbHz, float basebandCn0DbHz, boolean hasCodeType, String codeType, boolean hasElapsedRealtimeNanos, long elapsedRealtimeNanos, boolean hasElapsedRealtimeUncertaintyNanos, double elapsedRealtimeUncertaintyNanos)

Adds a new satellite to the Builder.

GnssStatus.Builder addSatellite(int constellationType, int svid, float cn0DbHz, float elevation, float azimuth, boolean hasEphemeris, boolean hasAlmanac, boolean usedInFix, boolean hasCarrierFrequency, float carrierFrequency, boolean hasBasebandCn0DbHz, float basebandCn0DbHz)

Adds a new satellite to the Builder.

GnssStatus build()

Builds a new GnssStatus based on the satellite information in the Builder.

GnssStatus.Builder clearSatellites()

Clears all satellites in the Builder.

Inherited methods

Public constructors

Builder

Added in API level 30
public Builder ()

Public methods

addSatellite

Added in API level 30
public GnssStatus.Builder addSatellite (int constellationType, 
                int svid, 
                float cn0DbHz, 
                float elevation, 
                float azimuth, 
                boolean hasEphemeris, 
                boolean hasAlmanac, 
                boolean usedInFix, 
                boolean hasCarrierFrequency, 
                float carrierFrequency, 
                boolean hasBasebandCn0DbHz, 
                float basebandCn0DbHz, 
                boolean hasCodeType, 
                String codeType, 
                boolean hasElapsedRealtimeNanos, 
                long elapsedRealtimeNanos, 
                boolean hasElapsedRealtimeUncertaintyNanos, 
                double elapsedRealtimeUncertaintyNanos)

Adds a new satellite to the Builder.

Parameters
constellationType int: one of the CONSTELLATION_* constants.
Value is one of the following:
svid int: the space vehicle identifier.
Value is between 1 and 200 inclusive
cn0DbHz float: carrier-to-noise density at the antenna in dB-Hz.
Value is between 0.0f and 63.0f inclusive
elevation float: satellite elevation in degrees.
Value is between -90.0f and 90.0f inclusive
azimuth float: satellite azimuth in degrees.
Value is between 0.0f and 360.0f inclusive
hasEphemeris boolean: whether the satellite has ephemeris data
hasAlmanac boolean: whether the satellite has almanac data
usedInFix boolean: whether the satellite was used in the most recent location fix
hasCarrierFrequency boolean: whether carrier frequency data is available
carrierFrequency float: satellite carrier frequency in Hz.
Value is 0.0f or greater
hasBasebandCn0DbHz boolean: whether baseband carrier-to-noise density is available
basebandCn0DbHz float: baseband carrier-to-noise density in dB-Hz.
Value is between 0.0f and 63.0f inclusive
hasCodeType boolean: whether codetype is available
codeType String: the code type as defined in GnssMeasurement.getCodeType()
This value cannot be null.
Value is one of the following:
hasElapsedRealtimeNanos boolean: whether the elapsedRealtimeNanos is available
elapsedRealtimeNanos long: the elapsed real-time of this GnssStatus since system boot, in nanoseconds.
Value is 0 or greater
hasElapsedRealtimeUncertaintyNanos boolean: whether the elapsedRealTimeUncertanityNanos is available
elapsedRealtimeUncertaintyNanos double: estimate of the relative precision of the alignment of this GnssStatus timestamp, with the reported measurements in nanoseconds (68% confidence).
Value is 0.0f or greater
Returns
GnssStatus.Builder This value cannot be null.

addSatellite

Added in API level 30
public GnssStatus.Builder addSatellite (int constellationType, 
                int svid, 
                float cn0DbHz, 
                float elevation, 
                float azimuth, 
                boolean hasEphemeris, 
                boolean hasAlmanac, 
                boolean usedInFix, 
                boolean hasCarrierFrequency, 
                float carrierFrequency, 
                boolean hasBasebandCn0DbHz, 
                float basebandCn0DbHz)

Adds a new satellite to the Builder.

Parameters
constellationType int: one of the CONSTELLATION_* constants.
Value is one of the following:
svid int: the space vehicle identifier.
Value is between 1 and 200 inclusive
cn0DbHz float: carrier-to-noise density at the antenna in dB-Hz.
Value is between 0.0f and 63.0f inclusive
elevation float: satellite elevation in degrees.
Value is between -90.0f and 90.0f inclusive
azimuth float: satellite azimuth in degrees.
Value is between 0.0f and 360.0f inclusive
hasEphemeris boolean: whether the satellite has ephemeris data
hasAlmanac boolean: whether the satellite has almanac data
usedInFix boolean: whether the satellite was used in the most recent location fix
hasCarrierFrequency boolean: whether carrier frequency data is available
carrierFrequency float: satellite carrier frequency in Hz.
Value is 0.0f or greater
hasBasebandCn0DbHz boolean: whether baseband carrier-to-noise density is available
basebandCn0DbHz float: baseband carrier-to-noise density in dB-Hz.
Value is between 0.0f and 63.0f inclusive
Returns
GnssStatus.Builder This value cannot be null.

build

Added in API level 30
public GnssStatus build ()

Builds a new GnssStatus based on the satellite information in the Builder.

Returns
GnssStatus This value cannot be null.

clearSatellites

Added in API level 30
public GnssStatus.Builder clearSatellites ()

Clears all satellites in the Builder.

Returns
GnssStatus.Builder This value cannot be null.