1 /*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
17 package android.hardware.gnss@1.0;
19 /** The callback interface to report measurements from the HAL. */
20 interface IGnssMeasurementCallback {
21 /**
22 * Flags to indicate what fields in GnssClock are valid.
23 */
24 @export(name="", value_prefix="GNSS_CLOCK_")
25 enum GnssClockFlags : uint16_t {
26 /** A valid 'leap second' is stored in the data structure. */
27 HAS_LEAP_SECOND = 1 << 0,
28 /** A valid 'time uncertainty' is stored in the data structure. */
29 HAS_TIME_UNCERTAINTY = 1 << 1,
30 /** A valid 'full bias' is stored in the data structure. */
31 HAS_FULL_BIAS = 1 << 2,
32 /** A valid 'bias' is stored in the data structure. */
33 HAS_BIAS = 1 << 3,
34 /** A valid 'bias uncertainty' is stored in the data structure. */
35 HAS_BIAS_UNCERTAINTY = 1 << 4,
36 /** A valid 'drift' is stored in the data structure. */
37 HAS_DRIFT = 1 << 5,
38 /** A valid 'drift uncertainty' is stored in the data structure. */
39 HAS_DRIFT_UNCERTAINTY = 1 << 6
40 };
42 /**
43 * Flags to indicate what fields in GnssMeasurement are valid.
44 */
45 @export(name="", value_prefix="GNSS_MEASUREMENT_")
46 enum GnssMeasurementFlags : uint32_t {
47 /** A valid 'snr' is stored in the data structure. */
48 HAS_SNR = 1 << 0,
49 /** A valid 'carrier frequency' is stored in the data structure. */
50 HAS_CARRIER_FREQUENCY = 1 << 9,
51 /** A valid 'carrier cycles' is stored in the data structure. */
52 HAS_CARRIER_CYCLES = 1 << 10,
53 /** A valid 'carrier phase' is stored in the data structure. */
54 HAS_CARRIER_PHASE = 1 << 11,
55 /** A valid 'carrier phase uncertainty' is stored in the data structure. */
56 HAS_CARRIER_PHASE_UNCERTAINTY = 1 << 12,
57 /** A valid automatic gain control is stored in the data structure. */
58 HAS_AUTOMATIC_GAIN_CONTROL = 1 << 13
59 };
61 /**
62 * Enumeration of available values for the GNSS Measurement's multipath
63 * indicator.
64 */
65 @export(name="", value_prefix="GNSS_MULTIPATH_")
66 enum GnssMultipathIndicator : uint8_t {
67 /** The indicator is not available or unknown. */
68 INDICATOR_UNKNOWN = 0,
69 /** The measurement is indicated to be affected by multipath. */
70 INDICATOR_PRESENT = 1,
71 /** The measurement is indicated to be not affected by multipath. */
72 INDICATIOR_NOT_PRESENT = 2
73 };
75 /**
76 * Flags indicating the GNSS measurement state.
77 *
78 * The expected behavior here is for GNSS HAL to set all the flags that applies.
79 * For example, if the state for a satellite is only C/A code locked and bit
80 * synchronized, and there is still millisecond ambiguity, the state must be
81 * set as:
82 *
83 * STATE_CODE_LOCK | STATE_BIT_SYNC | STATE_MSEC_AMBIGUOUS
84 *
85 * If GNSS is still searching for a satellite, the corresponding state must be
86 * set to STATE_UNKNOWN(0).
87 */
88 @export(name="", value_prefix="GNSS_MEASUREMENT_")
89 enum GnssMeasurementState : uint32_t {
90 STATE_UNKNOWN = 0,
91 STATE_CODE_LOCK = 1 << 0,
92 STATE_BIT_SYNC = 1 << 1,
93 STATE_SUBFRAME_SYNC = 1 << 2,
94 STATE_TOW_DECODED = 1 << 3,
95 STATE_MSEC_AMBIGUOUS = 1 << 4,
96 STATE_SYMBOL_SYNC = 1 << 5,
97 STATE_GLO_STRING_SYNC = 1 << 6,
98 STATE_GLO_TOD_DECODED = 1 << 7,
99 STATE_BDS_D2_BIT_SYNC = 1 << 8,
100 STATE_BDS_D2_SUBFRAME_SYNC = 1 << 9,
101 STATE_GAL_E1BC_CODE_LOCK = 1 << 10,
102 STATE_GAL_E1C_2ND_CODE_LOCK = 1 << 11,
103 STATE_GAL_E1B_PAGE_SYNC = 1 << 12,
104 STATE_SBAS_SYNC = 1 << 13,
105 STATE_TOW_KNOWN = 1 << 14,
106 STATE_GLO_TOD_KNOWN = 1 << 15,
107 };
109 /**
110 * Flags indicating the Accumulated Delta Range's states.
111 */
112 @export(name="", value_prefix="GNSS_")
113 enum GnssAccumulatedDeltaRangeState : uint16_t {
114 ADR_STATE_UNKNOWN = 0,
115 ADR_STATE_VALID = 1 << 0,
116 ADR_STATE_RESET = 1 << 1,
117 ADR_STATE_CYCLE_SLIP = 1 << 2,
118 };
120 /**
121 * Represents an estimate of the GNSS clock time.
122 */
123 struct GnssClock {
124 /**
125 * A set of flags indicating the validity of the fields in this data
126 * structure.
127 *
128 * Fields for which there is no corresponding flag must be filled in
129 * with a valid value. For convenience, these are marked as mandatory.
130 *
131 * Others fields may have invalid information in them, if not marked as
132 * valid by the corresponding bit in gnssClockFlags.
133 */
134 bitfield<GnssClockFlags> gnssClockFlags;
136 /**
137 * Leap second data.
138 * The sign of the value is defined by the following equation:
139 * utcTimeNs = timeNs - (fullBiasNs + biasNs) - leapSecond *
140 * 1,000,000,000
141 *
142 * If this data is available, gnssClockFlags must contain
143 * HAS_LEAP_SECOND.
144 */
145 int16_t leapSecond;
147 /**
148 * The GNSS receiver internal clock value. This is the local hardware clock
149 * value.
150 *
151 * For local hardware clock, this value is expected to be monotonically
152 * increasing while the hardware clock remains powered on. (For the case of a
153 * HW clock that is not continuously on, see the
154 * hwClockDiscontinuityCount field). The receiver's estimate of GNSS time
155 * can be derived by subtracting the sum of fullBiasNs and biasNs (when
156 * available) from this value.
157 *
158 * This GNSS time must be the best estimate of current GNSS time
159 * that GNSS receiver can achieve.
160 *
161 * Sub-nanosecond accuracy can be provided by means of the 'biasNs' field.
162 * The value contains the timeUncertaintyNs in it.
163 *
164 * This value is mandatory.
165 */
166 int64_t timeNs;
168 /**
169 * 1-Sigma uncertainty associated with the clock's time in nanoseconds.
170 * The uncertainty is represented as an absolute (single sided) value.
171 *
172 * If the data is available, gnssClockFlags must contain
173 * HAS_TIME_UNCERTAINTY. Ths value is ideally zero, as the time
174 * 'latched' by timeNs is defined as the reference clock vs. which all
175 * other times (and corresponding uncertainties) are measured.
176 */
177 double timeUncertaintyNs;
179 /**
180 * The difference between hardware clock ('time' field) inside GNSS receiver
181 * and the true GPS time since 0000Z, January 6, 1980, in nanoseconds.
182 *
183 * The sign of the value is defined by the following equation:
184 * local estimate of GPS time = timeNs - (fullBiasNs + biasNs)
185 *
186 * If receiver has computed time for a non-GPS constellation, the time offset of
187 * that constellation versus GPS time must be applied to fill this value.
188 *
189 * The error estimate for the sum of this and the biasNs is the biasUncertaintyNs.
190 *
191 * If the data is available gnssClockFlags must contain HAS_FULL_BIAS.
192 *
193 * This value is mandatory if the receiver has estimated GPS time.
194 */
195 int64_t fullBiasNs;
197 /**
198 * Sub-nanosecond bias - used with fullBiasNS, see fullBiasNs for details.
199 *
200 * The error estimate for the sum of this and the fullBiasNs is the
201 * biasUncertaintyNs.
202 *
203 * If the data is available gnssClockFlags must contain HAS_BIAS.
204 *
205 * This value is mandatory if the receiver has estimated GPS time.
206 */
207 double biasNs;
209 /**
210 * 1-Sigma uncertainty associated with the local estimate of GNSS time (clock
211 * bias) in nanoseconds. The uncertainty is represented as an absolute
212 * (single sided) value.
213 *
214 * The caller is responsible for using this uncertainty (it can be very
215 * large before the GPS time has been fully resolved.)
216 *
217 * If the data is available gnssClockFlags must contain HAS_BIAS_UNCERTAINTY.
218 *
219 * This value is mandatory if the receiver has estimated GPS time.
220 */
221 double biasUncertaintyNs;
223 /**
224 * The clock's drift in nanoseconds (per second).
225 *
226 * A positive value means that the frequency is higher than the nominal
227 * frequency, and that the (fullBiasNs + biasNs) is growing more positive
228 * over time.
229 *
230 * If the data is available gnssClockFlags must contain HAS_DRIFT.
231 *
232 * This value is mandatory if the receiver has estimated GPS time.
233 */
234 double driftNsps;
236 /**
237 * 1-Sigma uncertainty associated with the clock's drift in nanoseconds (per
238 * second).
239 * The uncertainty is represented as an absolute (single sided) value.
240 *
241 * If the data is available gnssClockFlags must contain HAS_DRIFT_UNCERTAINTY.
242 *
243 * This value is mandatory if the receiver has estimated GPS time.
244 */
245 double driftUncertaintyNsps;
247 /**
248 * This field must be incremented, when there are discontinuities in the
249 * hardware clock.
250 *
251 * A "discontinuity" is meant to cover the case of a switch from one source
252 * of clock to another. A single free-running crystal oscillator (XO)
253 * will generally not have any discontinuities, and this can be set and
254 * left at 0.
255 *
256 * If, however, the timeNs value (HW clock) is derived from a composite of
257 * sources, that is not as smooth as a typical XO, or is otherwise stopped &
258 * restarted, then this value shall be incremented each time a discontinuity
259 * occurs. (E.g. this value can start at zero at device boot-up and
260 * increment each time there is a change in clock continuity. In the
261 * unlikely event that this value reaches full scale, rollover (not
262 * clamping) is required, such that this value continues to change, during
263 * subsequent discontinuity events.)
264 *
265 * While this number stays the same, between GnssClock reports, it can be
266 * safely assumed that the timeNs value has been running continuously, e.g.
267 * derived from a single, high quality clock (XO like, or better, that is
268 * typically used during continuous GNSS signal sampling.)
269 *
270 * It is expected, esp. during periods where there are few GNSS signals
271 * available, that the HW clock be discontinuity-free as long as possible,
272 * as this avoids the need to use (waste) a GNSS measurement to fully
273 * re-solve for the GNSS clock bias and drift, when using the accompanying
274 * measurements, from consecutive GnssData reports.
275 *
276 * This value is mandatory.
277 */
278 uint32_t hwClockDiscontinuityCount;
280 };
282 /**
283 * Represents a GNSS Measurement, it contains raw and computed information.
284 *
285 * All signal measurement information (e.g. svTime,
286 * pseudorangeRate, multipathIndicator) reported in this struct must be
287 * based on GNSS signal measurements only. You must not synthesize measurements
288 * by calculating or reporting expected measurements based on known or estimated
289 * position, velocity, or time.
290 */
291 struct GnssMeasurement{
292 /**
293 * A set of flags indicating the validity of the fields in this data
294 * structure.
295 *
296 * Fields for which there is no corresponding flag must be filled in
297 * with a valid value. For convenience, these are marked as mandatory.
298 *
299 * Others fields may have invalid information in them, if not marked as
300 * valid by the corresponding bit in flags.
301 */
302 bitfield<GnssMeasurementFlags> flags;
304 /**
305 * Satellite vehicle ID number, as defined in GnssSvInfo::svid
306 *
307 * This value is mandatory.
308 */
309 int16_t svid;
311 /**
312 * Defines the constellation of the given SV.
313 *
314 * This value is mandatory.
315 */
316 GnssConstellationType constellation;
318 /**
319 * Time offset at which the measurement was taken in nanoseconds.
320 * The reference receiver's time is specified by GnssData::clock::timeNs.
321 *
322 * The sign of timeOffsetNs is given by the following equation:
323 * measurement time = GnssClock::timeNs + timeOffsetNs
324 *
325 * It provides an individual time-stamp for the measurement, and allows
326 * sub-nanosecond accuracy. It may be zero if all measurements are
327 * aligned to a common time.
328 *
329 * This value is mandatory.
330 */
331 double timeOffsetNs;
333 /**
334 * Per satellite sync state. It represents the current sync state for the
335 * associated satellite.
336 * Based on the sync state, the 'received GNSS tow' field must be interpreted
337 * accordingly.
338 *
339 * This value is mandatory.
340 */
341 bitfield<GnssMeasurementState> state;
343 /**
344 * The received GNSS Time-of-Week at the measurement time, in nanoseconds.
345 * For GNSS & QZSS, this is the received GNSS Time-of-Week at the
346 * measurement time, in nanoseconds. The value is relative to the
347 * beginning of the current GNSS week.
348 *
349 * Given the highest sync state that can be achieved, per each satellite,
350 * valid range for this field can be:
351 * Searching : [ 0 ] : STATE_UNKNOWN
352 * C/A code lock : [ 0 1ms ] : STATE_CODE_LOCK set
353 * Bit sync : [ 0 20ms ] : STATE_BIT_SYNC set
354 * Subframe sync : [ 0 6s ] : STATE_SUBFRAME_SYNC set
355 * TOW decoded : [ 0 1week ] : STATE_TOW_DECODED set
356 * TOW Known : [ 0 1week ] : STATE_TOW_KNOWN set
357 *
358 * Note: TOW Known refers to the case where TOW is possibly not decoded
359 * over the air but has been determined from other sources. If TOW
360 * decoded is set then TOW Known must also be set.
361 *
362 * Note: If there is any ambiguity in integer millisecond,
363 * GNSS_MEASUREMENT_STATE_MSEC_AMBIGUOUS must be set accordingly, in the
364 * 'state' field.
365 *
366 * This value must be populated if 'state' != STATE_UNKNOWN.
367 *
368 * For Glonass, this is the received Glonass time of day, at the
369 * measurement time in nanoseconds.
370 *
371 * Given the highest sync state that can be achieved, per each satellite,
372 * valid range for this field can be:
373 * Searching : [ 0 ] : STATE_UNKNOWN set
374 * C/A code lock : [ 0 1ms ] : STATE_CODE_LOCK set
375 * Symbol sync : [ 0 10ms ] : STATE_SYMBOL_SYNC set
376 * Bit sync : [ 0 20ms ] : STATE_BIT_SYNC set
377 * String sync : [ 0 2s ] : STATE_GLO_STRING_SYNC set
378 * Time of day decoded : [ 0 1day ] : STATE_GLO_TOD_DECODED set
379 * Time of day known : [ 0 1day ] : STATE_GLO_TOD_KNOWN set
380 *
381 * Note: Time of day known refers to the case where it is possibly not
382 * decoded over the air but has been determined from other sources. If
383 * Time of day decoded is set then Time of day known must also be set.
384 *
385 * For Beidou, this is the received Beidou time of week,
386 * at the measurement time in nanoseconds.
387 *
388 * Given the highest sync state that can be achieved, per each satellite,
389 * valid range for this field can be:
390 * Searching : [ 0 ] : STATE_UNKNOWN set.
391 * C/A code lock : [ 0 1ms ] : STATE_CODE_LOCK set.
392 * Bit sync (D2) : [ 0 2ms ] : STATE_BDS_D2_BIT_SYNC set.
393 * Bit sync (D1) : [ 0 20ms ] : STATE_BIT_SYNC set.
394 * Subframe (D2) : [ 0 0.6s ] : STATE_BDS_D2_SUBFRAME_SYNC set.
395 * Subframe (D1) : [ 0 6s ] : STATE_SUBFRAME_SYNC set.
396 * Time of week decoded : [ 0 1week ] : STATE_TOW_DECODED set.
397 * Time of week known : [ 0 1week ] : STATE_TOW_KNOWN set
398 *
399 * Note: TOW Known refers to the case where TOW is possibly not decoded
400 * over the air but has been determined from other sources. If TOW
401 * decoded is set then TOW Known must also be set.
402 *
403 * For Galileo, this is the received Galileo time of week,
404 * at the measurement time in nanoseconds.
405 *
406 * E1BC code lock : [ 0 4ms ] : STATE_GAL_E1BC_CODE_LOCK set.
407 * E1C 2nd code lock : [ 0 100ms] : STATE_GAL_E1C_2ND_CODE_LOCK set.
408 * E1B page : [ 0 2s ] : STATE_GAL_E1B_PAGE_SYNC set.
409 * Time of week decoded : [ 0 1week] : STATE_TOW_DECODED is set.
410 * Time of week known : [ 0 1week] : STATE_TOW_KNOWN set
411 *
412 * Note: TOW Known refers to the case where TOW is possibly not decoded
413 * over the air but has been determined from other sources. If TOW
414 * decoded is set then TOW Known must also be set.
415 *
416 * For SBAS, this is received SBAS time, at the measurement time in
417 * nanoseconds.
418 *
419 * Given the highest sync state that can be achieved, per each satellite,
420 * valid range for this field can be:
421 * Searching : [ 0 ] : STATE_UNKNOWN
422 * C/A code lock: [ 0 1ms ] : STATE_CODE_LOCK is set
423 * Symbol sync : [ 0 2ms ] : STATE_SYMBOL_SYNC is set
424 * Message : [ 0 1s ] : STATE_SBAS_SYNC is set
425 */
426 int64_t receivedSvTimeInNs;
428 /**
429 * 1-Sigma uncertainty of the Received GNSS Time-of-Week in nanoseconds.
430 *
431 * This value must be populated if 'state' != STATE_UNKNOWN.
432 */
433 int64_t receivedSvTimeUncertaintyInNs;
435 /**
436 * Carrier-to-noise density in dB-Hz, typically in the range [0, 63].
437 * It contains the measured C/N0 value for the signal at the antenna port.
438 *
439 * This value is mandatory.
440 */
441 double cN0DbHz;
443 /**
444 * Pseudorange rate at the timestamp in m/s. The correction of a given
445 * Pseudorange Rate value includes corrections for receiver and satellite
446 * clock frequency errors. Ensure that this field is independent (see
447 * comment at top of GnssMeasurement struct.)
448 *
449 * It is mandatory to provide the 'uncorrected' 'pseudorange rate', and
450 * provide GnssClock's 'drift' field as well. When providing the
451 * uncorrected pseudorange rate, do not apply the corrections described above.)
452 *
453 * The value includes the 'pseudorange rate uncertainty' in it.
454 * A positive 'uncorrected' value indicates that the SV is moving away from
455 * the receiver.
456 *
457 * The sign of the 'uncorrected' 'pseudorange rate' and its relation to the
458 * sign of 'doppler shift' is given by the equation:
459 * pseudorange rate = -k * doppler shift (where k is a constant)
460 *
461 * This must be the most accurate pseudorange rate available, based on
462 * fresh signal measurements from this channel.
463 *
464 * It is mandatory that this value be provided at typical carrier phase PRR
465 * quality (few cm/sec per second of uncertainty, or better) - when signals
466 * are sufficiently strong & stable, e.g. signals from a GNSS simulator at >=
467 * 35 dB-Hz.
468 */
469 double pseudorangeRateMps;
471 /**
472 * 1-Sigma uncertainty of the pseudorangeRateMps.
473 * The uncertainty is represented as an absolute (single sided) value.
474 *
475 * This value is mandatory.
476 */
477 double pseudorangeRateUncertaintyMps;
479 /**
480 * Accumulated delta range's state. It indicates whether ADR is reset or
481 * there is a cycle slip(indicating loss of lock).
482 *
483 * This value is mandatory.
484 */
485 bitfield<GnssAccumulatedDeltaRangeState> accumulatedDeltaRangeState;
487 /**
488 * Accumulated delta range since the last channel reset in meters.
489 * A positive value indicates that the SV is moving away from the receiver.
490 *
491 * The sign of the 'accumulated delta range' and its relation to the sign of
492 * 'carrier phase' is given by the equation:
493 * accumulated delta range = -k * carrier phase (where k is a constant)
494 *
495 * This value must be populated if 'accumulated delta range state' !=
496 * ADR_STATE_UNKNOWN.
497 * However, it is expected that the data is only accurate when:
498 * 'accumulated delta range state' == ADR_STATE_VALID.
499 */
500 double accumulatedDeltaRangeM;
502 /**
503 * 1-Sigma uncertainty of the accumulated delta range in meters.
504 * This value must be populated if 'accumulated delta range state' !=
505 * ADR_STATE_UNKNOWN.
506 */
507 double accumulatedDeltaRangeUncertaintyM;
509 /**
510 * Carrier frequency of the signal tracked, for example it can be the
511 * GPS central frequency for L1 = 1575.45 MHz, or L2 = 1227.60 MHz, L5 =
512 * 1176.45 MHz, varying GLO channels, etc. If the field is not set, it
513 * is the primary common use central frequency, e.g. L1 = 1575.45 MHz
514 * for GPS.
515 *
516 * For an L1, L5 receiver tracking a satellite on L1 and L5 at the same
517 * time, two raw measurement structs must be reported for this same
518 * satellite, in one of the measurement structs, all the values related
519 * to L1 must be filled, and in the other all of the values related to
520 * L5 must be filled.
521 *
522 * If the data is available, gnssMeasurementFlags must contain
523 * HAS_CARRIER_FREQUENCY.
524 */
525 float carrierFrequencyHz;
527 /**
528 * The number of full carrier cycles between the satellite and the
529 * receiver. The reference frequency is given by the field
530 * 'carrierFrequencyHz'. Indications of possible cycle slips and
531 * resets in the accumulation of this value can be inferred from the
532 * accumulatedDeltaRangeState flags.
533 *
534 * If the data is available, gnssMeasurementFlags must contain
535 * HAS_CARRIER_CYCLES.
536 */
537 int64_t carrierCycles;
539 /**
540 * The RF phase detected by the receiver, in the range [0.0, 1.0].
541 * This is usually the fractional part of the complete carrier phase
542 * measurement.
543 *
544 * The reference frequency is given by the field 'carrierFrequencyHz'.
545 * The value contains the 'carrier-phase uncertainty' in it.
546 *
547 * If the data is available, gnssMeasurementFlags must contain
548 * HAS_CARRIER_PHASE.
549 */
550 double carrierPhase;
552 /**
553 * 1-Sigma uncertainty of the carrier-phase.
554 * If the data is available, gnssMeasurementFlags must contain
555 * HAS_CARRIER_PHASE_UNCERTAINTY.
556 */
557 double carrierPhaseUncertainty;
559 /**
560 * An enumeration that indicates the 'multipath' state of the event.
561 *
562 * The multipath Indicator is intended to report the presence of overlapping
563 * signals that manifest as distorted correlation peaks.
564 *
565 * - if there is a distorted correlation peak shape, report that multipath
566 * is MULTIPATH_INDICATOR_PRESENT.
567 * - if there is no distorted correlation peak shape, report
568 * MULTIPATH_INDICATOR_NOT_PRESENT
569 * - if signals are too weak to discern this information, report
570 * MULTIPATH_INDICATOR_UNKNOWN
571 *
572 * Example: when doing the standardized overlapping Multipath Performance
573 * test (3GPP TS 34.171) the Multipath indicator must report
574 * MULTIPATH_INDICATOR_PRESENT for those signals that are tracked, and
575 * contain multipath, and MULTIPATH_INDICATOR_NOT_PRESENT for those
576 * signals that are tracked and do not contain multipath.
577 */
578 GnssMultipathIndicator multipathIndicator;
580 /**
581 * Signal-to-noise ratio at correlator output in dB.
582 * If the data is available, GnssMeasurementFlags must contain HAS_SNR.
583 * This is the power ratio of the "correlation peak height above the
584 * observed noise floor" to "the noise RMS".
585 */
586 double snrDb;
588 /**
589 * Automatic gain control (AGC) level. AGC acts as a variable gain
590 * amplifier adjusting the power of the incoming signal. The AGC level
591 * may be used to indicate potential interference. When AGC is at a
592 * nominal level, this value must be set as 0. Higher gain (and/or lower
593 * input power) must be output as a positive number. Hence in cases of
594 * strong jamming, in the band of this signal, this value must go more
595 * negative.
596 *
597 * Note: Different hardware designs (e.g. antenna, pre-amplification, or
598 * other RF HW components) may also affect the typical output of of this
599 * value on any given hardware design in an open sky test - the
600 * important aspect of this output is that changes in this value are
601 * indicative of changes on input signal power in the frequency band for
602 * this measurement.
603 */
604 double agcLevelDb;
605 };
607 /**
608 * Represents a reading of GNSS measurements. For devices where GnssSystemInfo's
609 * yearOfHw is set to 2016+, it is mandatory that these be provided, on
610 * request, when the GNSS receiver is searching/tracking signals.
611 *
612 * - Reporting of GNSS constellation measurements is mandatory.
613 * - Reporting of all tracked constellations are encouraged.
614 */
615 struct GnssData {
616 /** Number of GnssMeasurement elements. */
617 uint32_t measurementCount;
619 /** The array of measurements. */
620 GnssMeasurement[GnssMax:SVS_COUNT] measurements;
622 /** The GNSS clock time reading. */
623 GnssClock clock;
624 };
626 /**
627 * Callback for the hal to pass a GnssData structure back to the client.
628 *
629 * @param data Contains a reading of GNSS measurements.
630 */
631 GnssMeasurementCb(GnssData data);
632 };