GnssClockBuilder

public final class GnssClockBuilder
extends Object

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


Builder for GnssClock.

Summary

Public constructors

GnssClockBuilder()

Public methods

GnssClock build()
GnssClockBuilder setBiasNanos(double input)

Sets sub-nanosecond difference between hardware clock inside the GNSS receiver and the true GNSS time since 0000Z, January 6, 1980, in nanoseconds.

GnssClockBuilder setBiasUncertaintyNanos(double input)

Sets the 1-sigma bias uncertainty of the time bias in nanoseconds.

GnssClockBuilder setDriftNanosPerSecond(double input)

Sets the clock's drift in nanoseconds per second.

GnssClockBuilder setDriftUncertaintyNanosPerSecond(double input)

Sets the clock's 1-sigma drift uncertainty in nanoseconds per second.

GnssClockBuilder setFullBiasNanos(long input)

Sets the difference between hardware clock (setTimeNanos(long)) inside the GNSS receiver and the true GNSS time since 0000Z, January 6, 1980, in nanoseconds.

GnssClockBuilder setHardwareClockDiscontinuityCount(int input)

Sets the count of hardware clock discontinuities.

GnssClockBuilder setLeapSecond(int input)

Sets the leap second associated with the clock's time.

GnssClockBuilder setTimeNanos(long input)

Sets the clock's time.

GnssClockBuilder setTimeUncertaintyNanos(double input)

Sets the 1-sigma uncertainty of the clock's time.

Inherited methods

From class java.lang.Object

Public constructors

GnssClockBuilder

GnssClockBuilder ()

Public methods

build

GnssClock build ()

Returns
GnssClock

setBiasNanos

GnssClockBuilder setBiasNanos (double input)

Sets sub-nanosecond difference between hardware clock inside the GNSS receiver and the true GNSS time since 0000Z, January 6, 1980, in nanoseconds.

See the description of how this field is used in setFullBiasNanos(long).

Parameters
input double: the sub-nanosecond time bias of the GNSS receiver

Returns
GnssClockBuilder

setBiasUncertaintyNanos

GnssClockBuilder setBiasUncertaintyNanos (double input)

Sets the 1-sigma bias uncertainty of the time bias in nanoseconds.

See the description of how this field is used in setFullBiasNanos(long).

Parameters
input double: the clock's 1-sigma bias uncertainty, in nanoseconds

Returns
GnssClockBuilder

setDriftNanosPerSecond

GnssClockBuilder setDriftNanosPerSecond (double input)

Sets the clock's drift in nanoseconds per second.

See GnssClock.getDriftNanosPerSecond() to understand what is expected.

Parameters
input double: The clock's time drift, in nanoseconds per second

Returns
GnssClockBuilder

setDriftUncertaintyNanosPerSecond

GnssClockBuilder setDriftUncertaintyNanosPerSecond (double input)

Sets the clock's 1-sigma drift uncertainty in nanoseconds per second.

Parameters
input double: the clock's 1-sigma drift uncertainty, in nanoseconds per second

Returns
GnssClockBuilder

setFullBiasNanos

GnssClockBuilder setFullBiasNanos (long input)

Sets the difference between hardware clock (setTimeNanos(long)) inside the GNSS receiver and the true GNSS time since 0000Z, January 6, 1980, in nanoseconds.

See GnssClock.getFullBiasNanos() to understand what is expected.

Parameters
input long: the time bias of the GNSS receiver in nanoseconds

Returns
GnssClockBuilder

setHardwareClockDiscontinuityCount

GnssClockBuilder setHardwareClockDiscontinuityCount (int input)

Sets the count of hardware clock discontinuities.

See GnssClock.getHardwareClockDiscontinuityCount() to understand what is expected.

Parameters
input int: the number of times the hardware clock has had a discontinuity

Returns
GnssClockBuilder

setLeapSecond

GnssClockBuilder setLeapSecond (int input)

Sets the leap second associated with the clock's time.

Parameters
input int: the leap second associated with the clock's time

Returns
GnssClockBuilder

setTimeNanos

GnssClockBuilder setTimeNanos (long input)

Sets the clock's time.

Parameters
input long: the GNSS receiver's internal hardware clock value in nanoseconds

Returns
GnssClockBuilder

setTimeUncertaintyNanos

GnssClockBuilder setTimeUncertaintyNanos (double input)

Sets the 1-sigma uncertainty of the clock's time.

Parameters
input double: the clock's time 1-sigma uncertainty, in nanoseconds

Returns
GnssClockBuilder