GnssMeasurement Struct Reference

GnssMeasurement Struct Reference

#include < gps.h >

Data Fields

size_t  size
 
GnssMeasurementFlags   flags
 
int16_t  svid
 
GnssConstellationType   constellation
 
double  time_offset_ns
 
GnssMeasurementState   state
 
int64_t  received_sv_time_in_ns
 
int64_t  received_sv_time_uncertainty_in_ns
 
double  c_n0_dbhz
 
double  pseudorange_rate_mps
 
double  pseudorange_rate_uncertainty_mps
 
GnssAccumulatedDeltaRangeState   accumulated_delta_range_state
 
double  accumulated_delta_range_m
 
double  accumulated_delta_range_uncertainty_m
 
float  carrier_frequency_hz
 
int64_t  carrier_cycles
 
double  carrier_phase
 
double  carrier_phase_uncertainty
 
GnssMultipathIndicator   multipath_indicator
 
double  snr_db
 

Detailed Description

Represents a GNSS Measurement, it contains raw and computed information.

Independence - All signal measurement information (e.g. sv_time, pseudorange_rate, multipath_indicator) reported in this struct should be based on GNSS signal measurements only. You may not synthesize measurements by calculating or reporting expected measurements based on known or estimated position, velocity, or time.

Definition at line 1656 of file gps.h .

Field Documentation

double accumulated_delta_range_m

Accumulated delta range since the last channel reset in meters. A positive value indicates that the SV is moving away from the receiver.

The sign of the 'accumulated delta range' and its relation to the sign of 'carrier phase' is given by the equation: accumulated delta range = -k * carrier phase (where k is a constant)

This value must be populated if 'accumulated delta range state' != GPS_ADR_STATE_UNKNOWN. However, it is expected that the data is only accurate when: 'accumulated delta range state' == GPS_ADR_STATE_VALID.

Definition at line 1835 of file gps.h .

GnssAccumulatedDeltaRangeState accumulated_delta_range_state

Accumulated delta range's state. It indicates whether ADR is reset or there is a cycle slip (indicating loss of lock).

This is a mandatory value.

Definition at line 1821 of file gps.h .

double accumulated_delta_range_uncertainty_m

1-Sigma uncertainty of the accumulated delta range in meters. This value must be populated if 'accumulated delta range state' != GPS_ADR_STATE_UNKNOWN.

Definition at line 1841 of file gps.h .

double c_n0_dbhz

Carrier-to-noise density in dB-Hz, typically in the range [0, 63]. It contains the measured C/N0 value for the signal at the antenna port.

This is a mandatory value.

Definition at line 1778 of file gps.h .

int64_t carrier_cycles

The number of full carrier cycles between the satellite and the receiver. The reference frequency is given by the field 'carrier_frequency_hz'. Indications of possible cycle slips and resets in the accumulation of this value can be inferred from the accumulated_delta_range_state flags.

If the data is available, 'flags' must contain GNSS_MEASUREMENT_HAS_CARRIER_CYCLES.

Definition at line 1861 of file gps.h .

float carrier_frequency_hz

Carrier frequency at which codes and messages are modulated, it can be L1 or L2. If the field is not set, the carrier frequency is assumed to be L1.

If the data is available, 'flags' must contain GNSS_MEASUREMENT_HAS_CARRIER_FREQUENCY.

Definition at line 1850 of file gps.h .

double carrier_phase

The RF phase detected by the receiver, in the range [0.0, 1.0]. This is usually the fractional part of the complete carrier phase measurement.

The reference frequency is given by the field 'carrier_frequency_hz'. The value contains the 'carrier-phase uncertainty' in it.

If the data is available, 'flags' must contain GNSS_MEASUREMENT_HAS_CARRIER_PHASE.

Definition at line 1873 of file gps.h .

double carrier_phase_uncertainty

1-Sigma uncertainty of the carrier-phase. If the data is available, 'flags' must contain GNSS_MEASUREMENT_HAS_CARRIER_PHASE_UNCERTAINTY.

Definition at line 1880 of file gps.h .

Defines the constellation of the given SV. Value should be one of those GNSS_CONSTELLATION_* constants

Definition at line 1673 of file gps.h .

A set of flags indicating the validity of the fields in this data structure.

Definition at line 1661 of file gps.h .

GnssMultipathIndicator multipath_indicator

An enumeration that indicates the 'multipath' state of the event.

The multipath Indicator is intended to report the presence of overlapping signals that manifest as distorted correlation peaks.

  • if there is a distorted correlation peak shape, report that multipath is GNSS_MULTIPATH_INDICATOR_PRESENT.
  • if there is not a distorted correlation peak shape, report GNSS_MULTIPATH_INDICATOR_NOT_PRESENT
  • if signals are too weak to discern this information, report GNSS_MULTIPATH_INDICATOR_UNKNOWN

Example: when doing the standardized overlapping Multipath Performance test (3GPP TS 34.171) the Multipath indicator should report GNSS_MULTIPATH_INDICATOR_PRESENT for those signals that are tracked, and contain multipath, and GNSS_MULTIPATH_INDICATOR_NOT_PRESENT for those signals that are tracked and do not contain multipath.

Definition at line 1901 of file gps.h .

double pseudorange_rate_mps

Pseudorange rate at the timestamp in m/s. The correction of a given Pseudorange Rate value includes corrections for receiver and satellite clock frequency errors. Ensure that this field is independent (see comment at top of GnssMeasurement struct.)

It is mandatory to provide the 'uncorrected' 'pseudorange rate', and provide GpsClock 's 'drift' field as well (When providing the uncorrected pseudorange rate, do not apply the corrections described above.)

The value includes the 'pseudorange rate uncertainty' in it. A positive 'uncorrected' value indicates that the SV is moving away from the receiver.

The sign of the 'uncorrected' 'pseudorange rate' and its relation to the sign of 'doppler shift' is given by the equation: pseudorange rate = -k * doppler shift (where k is a constant)

This should be the most accurate pseudorange rate available, based on fresh signal measurements from this channel.

It is mandatory that this value be provided at typical carrier phase PRR quality (few cm/sec per second of uncertainty, or better) - when signals are sufficiently strong & stable, e.g. signals from a GPS simulator at >= 35 dB-Hz.

Definition at line 1805 of file gps.h .

double pseudorange_rate_uncertainty_mps

1-Sigma uncertainty of the pseudorange_rate_mps. The uncertainty is represented as an absolute (single sided) value.

This is a mandatory value.

Definition at line 1813 of file gps.h .

int64_t received_sv_time_in_ns

The received GNSS Time-of-Week at the measurement time, in nanoseconds. Ensure that this field is independent (see comment at top of GnssMeasurement struct.)

For GPS & QZSS, this is: Received GPS Time-of-Week at the measurement time, in nanoseconds. The value is relative to the beginning of the current GPS week.

Given the highest sync state that can be achieved, per each satellite, valid range for this field can be: Searching : [ 0 ] : GNSS_MEASUREMENT_STATE_UNKNOWN C/A code lock : [ 0 1ms ] : GNSS_MEASUREMENT_STATE_CODE_LOCK is set Bit sync : [ 0 20ms ] : GNSS_MEASUREMENT_STATE_BIT_SYNC is set Subframe sync : [ 0 6s ] : GNSS_MEASUREMENT_STATE_SUBFRAME_SYNC is set TOW decoded : [ 0 1week ] : GNSS_MEASUREMENT_STATE_TOW_DECODED is set

Note well: if there is any ambiguity in integer millisecond, GNSS_MEASUREMENT_STATE_MSEC_AMBIGUOUS should be set accordingly, in the 'state' field.

This value must be populated if 'state' != GNSS_MEASUREMENT_STATE_UNKNOWN.

For Glonass, this is: Received Glonass time of day, at the measurement time in nanoseconds.

Given the highest sync state that can be achieved, per each satellite, valid range for this field can be: Searching : [ 0 ] : GNSS_MEASUREMENT_STATE_UNKNOWN C/A code lock : [ 0 1ms ] : GNSS_MEASUREMENT_STATE_CODE_LOCK is set Symbol sync : [ 0 10ms ] : GNSS_MEASUREMENT_STATE_SYMBOL_SYNC is set Bit sync : [ 0 20ms ] : GNSS_MEASUREMENT_STATE_BIT_SYNC is set String sync : [ 0 2s ] : GNSS_MEASUREMENT_STATE_GLO_STRING_SYNC is set Time of day : [ 0 1day ] : GNSS_MEASUREMENT_STATE_GLO_TOD_DECODED is set

For Beidou, this is: Received Beidou time of week, at the measurement time in nanoseconds.

Given the highest sync state that can be achieved, per each satellite, valid range for this field can be: Searching : [ 0 ] : GNSS_MEASUREMENT_STATE_UNKNOWN C/A code lock: [ 0 1ms ] : GNSS_MEASUREMENT_STATE_CODE_LOCK is set Bit sync (D2): [ 0 2ms ] : GNSS_MEASUREMENT_STATE_BDS_D2_BIT_SYNC is set Bit sync (D1): [ 0 20ms ] : GNSS_MEASUREMENT_STATE_BIT_SYNC is set Subframe (D2): [ 0 0.6s ] : GNSS_MEASUREMENT_STATE_BDS_D2_SUBFRAME_SYNC is set Subframe (D1): [ 0 6s ] : GNSS_MEASUREMENT_STATE_SUBFRAME_SYNC is set Time of week : [ 0 1week ] : GNSS_MEASUREMENT_STATE_TOW_DECODED is set

For Galileo, this is: Received Galileo time of week, at the measurement time in nanoseconds.

E1BC code lock : [ 0 4ms ] : GNSS_MEASUREMENT_STATE_GAL_E1BC_CODE_LOCK is set E1C 2nd code lock: [ 0 100ms ] : GNSS_MEASUREMENT_STATE_GAL_E1C_2ND_CODE_LOCK is set

E1B page : [ 0 2s ] : GNSS_MEASUREMENT_STATE_GAL_E1B_PAGE_SYNC is set Time of week: [ 0 1week ] : GNSS_MEASUREMENT_STATE_TOW_DECODED is set

For SBAS, this is: Received SBAS time, at the measurement time in nanoseconds.

Given the highest sync state that can be achieved, per each satellite, valid range for this field can be: Searching : [ 0 ] : GNSS_MEASUREMENT_STATE_UNKNOWN C/A code lock: [ 0 1ms ] : GNSS_MEASUREMENT_STATE_CODE_LOCK is set Symbol sync : [ 0 2ms ] : GNSS_MEASUREMENT_STATE_SYMBOL_SYNC is set Message : [ 0 1s ] : GNSS_MEASUREMENT_STATE_SBAS_SYNC is set

Definition at line 1763 of file gps.h .

int64_t received_sv_time_uncertainty_in_ns

1-Sigma uncertainty of the Received GPS Time-of-Week in nanoseconds.

This value must be populated if 'state' != GPS_MEASUREMENT_STATE_UNKNOWN.

Definition at line 1770 of file gps.h .

size_t size

set to sizeof(GpsMeasurement)

Definition at line 1658 of file gps.h .

double snr_db

Signal-to-noise ratio at correlator output in dB. If the data is available, 'flags' must contain GNSS_MEASUREMENT_HAS_SNR. This is the power ratio of the "correlation peak height above the observed noise floor" to "the noise RMS".

Definition at line 1909 of file gps.h .

Per satellite sync state. It represents the current sync state for the associated satellite. Based on the sync state, the 'received GPS tow' field should be interpreted accordingly.

This is a mandatory value.

Definition at line 1694 of file gps.h .

int16_t svid

Satellite vehicle ID number, as defined in GnssSvInfo::svid This is a mandatory value.

Definition at line 1667 of file gps.h .

double time_offset_ns

Time offset at which the measurement was taken in nanoseconds. The reference receiver's time is specified by GpsData::clock::time_ns and should be interpreted in the same way as indicated by GpsClock::type .

The sign of time_offset_ns is given by the following equation: measurement time = GpsClock::time_ns + time_offset_ns

It provides an individual time-stamp for the measurement, and allows sub-nanosecond accuracy. This is a mandatory value.

Definition at line 1686 of file gps.h .


The documentation for this struct was generated from the following file:
  • hardware/libhardware/include/hardware/ gps.h