anbox-platform-sdk  1.23.0
Anbox Platform SDK API documentation
GnssClock Struct Reference

#include <types.h>

+ Collaboration diagram for GnssClock:

Public Attributes

int64_t time_ns
 
int64_t full_bias_ns
 
double bias_ns
 
double bias_uncertainty_ns
 
double drift_nsps
 
double drift_uncertainty_nsps
 
uint32_t hw_clock_discontinuity_count
 
GnssClockFlags flags
 

Detailed Description

Represents an estimate of the GPS clock time.

Definition at line 983 of file types.h.

Member Data Documentation

◆ bias_ns

double GnssClock::bias_ns

Sub-nanosecond bias. The error estimate for the sum of this and the full_bias_ns is the bias_uncertainty_ns

If the data is available 'flags' must contain GNSS_CLOCK_HAS_BIAS. If GPS has computed a position fix. This value is mandatory if the receiver has estimated GPS time.

Definition at line 1031 of file types.h.

◆ bias_uncertainty_ns

double GnssClock::bias_uncertainty_ns

1-Sigma uncertainty associated with the local estimate of GPS time (clock bias) in nanoseconds. The uncertainty is represented as an absolute (single sided) value.

If the data is available 'flags' must contain GNSS_CLOCK_HAS_BIAS_UNCERTAINTY. This value is mandatory if the receiver has estimated GPS time.

Definition at line 1042 of file types.h.

◆ drift_nsps

double GnssClock::drift_nsps

The clock's drift in nanoseconds (per second).

A positive value means that the frequency is higher than the nominal frequency, and that the (full_bias_ns + bias_ns) is growing more positive over time.

The value contains the 'drift uncertainty' in it. If the data is available 'flags' must contain GNSS_CLOCK_HAS_DRIFT.

This value is mandatory if the receiver has estimated GNSS time

Definition at line 1056 of file types.h.

◆ drift_uncertainty_nsps

double GnssClock::drift_uncertainty_nsps

1-Sigma uncertainty associated with the clock's drift in nanoseconds (per second). The uncertainty is represented as an absolute (single sided) value.

If the data is available 'flags' must contain GNSS_CLOCK_HAS_DRIFT_UNCERTAINTY. If GPS has computed a position fix this field is mandatory and must be populated.

Definition at line 1066 of file types.h.

◆ flags

GnssClockFlags GnssClock::flags

Flags to indicate what fields in GnssClock are valid.

Definition at line 1102 of file types.h.

◆ full_bias_ns

int64_t GnssClock::full_bias_ns

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

The sign of the value is defined by the following equation: local estimate of GPS time = time_ns - (full_bias_ns + bias_ns)

This value is mandatory 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 error estimate for the sum of this and the bias_ns is the bias_uncertainty_ns, and the caller is responsible for using this uncertainty (it can be very large before the GPS time has been solved for.) If the data is available 'flags' must contain GNSS_CLOCK_HAS_FULL_BIAS.

Definition at line 1020 of file types.h.

◆ hw_clock_discontinuity_count

uint32_t GnssClock::hw_clock_discontinuity_count

When there are any discontinuities in the HW clock, this field is mandatory.

A "discontinuity" is meant to cover the case of a switch from one source of clock to another. A single free-running crystal oscillator (XO) should generally not have any discontinuities, and this can be set and left at 0.

If, however, the time_ns value (HW clock) is derived from a composite of sources, that is not as smooth as a typical XO, or is otherwise stopped & restarted, then this value shall be incremented each time a discontinuity occurs. (E.g. this value may start at zero at device boot-up and increment each time there is a change in clock continuity. In the unlikely event that this value reaches full scale, rollover (not clamping) is required, such that this value continues to change, during subsequent discontinuity events.)

While this number stays the same, between GnssClock reports, it can be safely assumed that the time_ns value has been running continuously, e.g. derived from a single, high quality clock (XO like, or better, that's typically used during continuous GNSS signal sampling.)

It is expected, esp. during periods where there are few GNSS signals available, that the HW clock be discontinuity-free as long as possible, as this avoids the need to use (waste) a GNSS measurement to fully re-solve for the GPS clock bias and drift, when using the accompanying measurements, from consecutive GnssData reports.

Definition at line 1097 of file types.h.

◆ time_ns

int64_t GnssClock::time_ns

The GNSS receiver internal clock value. This is the local hardware clock value.

For local hardware clock, this value is expected to be monotonically increasing while the hardware clock remains power on. (For the case of a HW clock that is not continuously on, see the hw_clock_discontinuity_count field). The receiver's estimate of GPS time can be derived by substracting the sum of full_bias_ns and bias_ns (when available) from this value.

This GPS time is expected to be the best estimate of current GPS time that GNSS receiver can achieve.

Sub-nanosecond accuracy can be provided by means of the 'bias_ns' field. The value contains the 'time uncertainty' in it.

This field is mandatory.

Definition at line 1003 of file types.h.


The documentation for this struct was generated from the following file: