GnssClock

2017-7-31 6:44:28 来源: Gnsser 发布人:

GnssClock

public final class GnssClock 
extends Object implements Parcelable

java.lang.Object
   ↳android.location.GnssClock



A class containing a GPS clock timestamp.

It represents a measurement of the GPS receiver's clock.

Summary


Inherited constants

 From interface android.os.Parcelable

Fields

public static finalCreator<GnssClock>CREATOR


Public methods

intdescribeContents()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

doublegetBiasNanos()

Gets the clock's sub-nanosecond bias.

doublegetBiasUncertaintyNanos()

Gets the clock's Bias Uncertainty (1-Sigma) in nanoseconds.

doublegetDriftNanosPerSecond()

Gets the clock's Drift in nanoseconds per second.

doublegetDriftUncertaintyNanosPerSecond()

Gets the clock's Drift Uncertainty (1-Sigma) in nanoseconds per second.

longgetFullBiasNanos()

Gets the difference between hardware clock (getTimeNanos()) inside GPS receiver and the true GPS time since 0000Z, January 6, 1980, in nanoseconds.

intgetHardwareClockDiscontinuityCount()

Gets count of hardware clock discontinuities.

intgetLeapSecond()

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

longgetTimeNanos()

Gets the GNSS receiver internal hardware clock value in nanoseconds.

doublegetTimeUncertaintyNanos()

Gets the clock's time Uncertainty (1-Sigma) in nanoseconds.

booleanhasBiasNanos()

Returns true if getBiasNanos() is available, false otherwise.

booleanhasBiasUncertaintyNanos()

Returns true if getBiasUncertaintyNanos() is available, false otherwise.

booleanhasDriftNanosPerSecond()

Returns true if getDriftNanosPerSecond() is available, false otherwise.

booleanhasDriftUncertaintyNanosPerSecond()

Returns true if getDriftUncertaintyNanosPerSecond() is available, false otherwise.

booleanhasFullBiasNanos()

Returns true if getFullBiasNanos() is available, false otherwise.

booleanhasLeapSecond()

Returns true if getLeapSecond() is available, false otherwise.

booleanhasTimeUncertaintyNanos()

Returns true if getTimeUncertaintyNanos() is available, false otherwise.

StringtoString()

Returns a string representation of the object.

voidwriteToParcel(Parcel parcel, int flags)

Flatten this object in to a Parcel.

Inherited methods


 From class java.lang.Object
 From interface android.os.Parcelable

Fields


CREATOR

added in API level 24

Creator<GnssClock> CREATOR



Public methods


describeContents

added in API level 24

int describeContents ()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file decodeor in the output of writeToParcel(Parcel, int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.


Returns
inta bitmask indicating the set of special object types marshaled by this Parcelable object instance.


getBiasNanos

added in API level 24

double getBiasNanos ()

Gets the clock's sub-nanosecond bias.

See the decodeion of how this field is part of converting from hardware clock time, to GPS time, in getFullBiasNanos().

The error estimate for the sum of this field and getFullBiasNanos() is getBiasUncertaintyNanos().

The value is only available if hasBiasNanos() is true.


Returns
double

getBiasUncertaintyNanos

added in API level 24

double getBiasUncertaintyNanos ()

Gets the clock's Bias Uncertainty (1-Sigma) in nanoseconds.

See the decodeion of how this field provides the error estimate in the conversion from hardware clock time, to GPS time, in getFullBiasNanos().

The value is only available if hasBiasUncertaintyNanos() is true.


Returns
double

getDriftNanosPerSecond

added in API level 24

double getDriftNanosPerSecond ()

Gets the clock's Drift in nanoseconds per second.

A positive value indicates that the frequency is higher than the nominal (e.g. GPS master clock) frequency. The error estimate for this reported drift isgetDriftUncertaintyNanosPerSecond().

The value is only available if hasDriftNanosPerSecond() is true.


Returns
double

getDriftUncertaintyNanosPerSecond

added in API level 24

double getDriftUncertaintyNanosPerSecond ()

Gets the clock's Drift Uncertainty (1-Sigma) in nanoseconds per second.

The value is only available if hasDriftUncertaintyNanosPerSecond() is true.


Returns
double

getFullBiasNanos

added in API level 24

long getFullBiasNanos ()

Gets the difference between hardware clock (getTimeNanos()) inside GPS receiver and the true GPS time since 0000Z, January 6, 1980, in nanoseconds.

This value is available if the receiver has estimated GPS time. If the computed time is for a non-GPS constellation, the time offset of that constellation to GPS has to be applied to fill this value. The value is only available if hasFullBiasNanos() is true.

The error estimate for the sum of this field and getBiasNanos() is getBiasUncertaintyNanos().

The sign of the value is defined by the following equation:

     local estimate of GPS time = TimeNanos - (FullBiasNanos + BiasNanos)



Returns
long

getHardwareClockDiscontinuityCount

added in API level 24

int getHardwareClockDiscontinuityCount ()

Gets count of hardware clock discontinuities.

When this value stays the same, vs. a value in a previously reported GnssClock, it can be safely assumed that the TimeNanos value has been derived from a clock that has been running continuously - e.g. a single continuously powered crystal oscillator, and thus the (FullBiasNanos + BiasNanos)offset can be modelled with traditional clock bias & drift models.

Each time this value changes, vs. the value in a previously reported GnssClock, that suggests the hardware clock may have experienced a discontinuity (e.g. a power cycle or other anomaly), so that any assumptions about modelling a smoothly changing (FullBiasNanos + BiasNanos) offset, and a smoothly growing (TimeNanos) between this and the previously reported GnssClock, should be reset.


Returns
int

getLeapSecond

added in API level 24

int getLeapSecond ()

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

The sign of the value is defined by the following equation:

     UtcTimeNanos = TimeNanos - (FullBiasNanos + BiasNanos) - LeapSecond * 1,000,000,000

The value is only available if hasLeapSecond() is true.


Returns
int

getTimeNanos

added in API level 24

long getTimeNanos ()

Gets the GNSS receiver internal hardware clock value in nanoseconds.

This value is expected to be monotonically increasing while the hardware clock remains powered on. For the case of a hardware clock that is not continuously on, see the getHardwareClockDiscontinuityCount() field. The GPS time can be derived by subtracting the sum of getFullBiasNanos()and getBiasNanos() (when they are available) from this value. Sub-nanosecond accuracy can be provided by means of getBiasNanos().

The error estimate for this value (if applicable) is getTimeUncertaintyNanos().


Returns
long

getTimeUncertaintyNanos

added in API level 24

double getTimeUncertaintyNanos ()

Gets the clock's time Uncertainty (1-Sigma) in nanoseconds.

The uncertainty is represented as an absolute (single sided) value.

The value is only available if hasTimeUncertaintyNanos() is true.

This value is often effectively zero (it is the reference clock by which all other times and time uncertainties are measured), and thus this field may often be 0, or not provided.


Returns
double

hasBiasNanos

added in API level 24

boolean hasBiasNanos ()

Returns true if getBiasNanos() is available, false otherwise.


Returns
boolean

hasBiasUncertaintyNanos

added in API level 24

boolean hasBiasUncertaintyNanos ()

Returns true if getBiasUncertaintyNanos() is available, false otherwise.


Returns
boolean

hasDriftNanosPerSecond

added in API level 24

boolean hasDriftNanosPerSecond ()

Returns true if getDriftNanosPerSecond() is available, false otherwise.


Returns
boolean

hasDriftUncertaintyNanosPerSecond

added in API level 24

boolean hasDriftUncertaintyNanosPerSecond ()

Returns true if getDriftUncertaintyNanosPerSecond() is available, false otherwise.


Returns
boolean

hasFullBiasNanos

added in API level 24

boolean hasFullBiasNanos ()

Returns true if getFullBiasNanos() is available, false otherwise.


Returns
boolean

hasLeapSecond

added in API level 24

boolean hasLeapSecond ()

Returns true if getLeapSecond() is available, false otherwise.


Returns
boolean

hasTimeUncertaintyNanos

added in API level 24

boolean hasTimeUncertaintyNanos ()

Returns true if getTimeUncertaintyNanos() is available, false otherwise.


Returns
boolean

toString

added in API level 24

String toString ()

Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 



Returns
Stringa string representation of the object.


writeToParcel

added in API level 24

void writeToParcel (Parcel parcel, 
                int flags)

Flatten this object in to a Parcel.


Parameters
parcelParcel: The Parcel in which the object should be written.


flagsint: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.


阅读次数: 2613

下一篇: 一种基于Android内核层实现高精度卫星导航定位方法 X技术网
上一篇: GnssMeasurementsEvent

尚无评论!

返回上一页面