blob: 36841ee0e6a1cb6cc776dfc3b47757287bff9bd2 [file] [log] [blame]
Wyatt Rileyed90e4d2018-02-14 08:31:33 -08001/*
2 * Copyright (C) 2018 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 */
16
17package android.hardware.gnss@1.1;
18
19import @1.0::IGnssMeasurementCallback;
20
21/** The callback interface to report measurements from the HAL. */
22interface IGnssMeasurementCallback extends @1.0::IGnssMeasurementCallback {
Sasha Kuznetsov343f95e2020-09-28 13:01:14 -070023 /**
Wyatt Rileyed90e4d2018-02-14 08:31:33 -080024 * Flags indicating the Accumulated Delta Range's states.
Sasha Kuznetsov343f95e2020-09-28 13:01:14 -070025 *
26 * See the table below for a detailed interpretation of each state. This is
27 * a continuation of the table from 1.1/IGnssMeasurementCallback.hal.
28 *
29 * +---------------------+-------------------+-----------------------------+
30 * | ADR_STATE | Time of relevance | Interpretation |
31 * +---------------------+-------------------+-----------------------------+
32 * | HALF_CYCLE_RESOLVED | ADR(t) | Half cycle ambiguity is |
33 * | | | resolved at time t. |
34 * +---------------------+-------------------+-----------------------------+
Wyatt Rileyed90e4d2018-02-14 08:31:33 -080035 */
36 enum GnssAccumulatedDeltaRangeState
37 : @1.0::IGnssMeasurementCallback.GnssAccumulatedDeltaRangeState {
38 ADR_STATE_HALF_CYCLE_RESOLVED = 1 << 3, // Carrier-phase half-cycle ambiguity resolved
39 };
40
41 /**
42 * Extends a GNSS Measurement, adding the new enum.
43 */
44 struct GnssMeasurement {
45 /**
46 * GNSS measurement information for a single satellite and frequency, as in the 1.0
47 * version of the HAL.
48 *
49 * In this version of the HAL, these fields of the
50 * @1.0::IGnssMeasurementCallback.GnssMeasurement v1_0 struct are deprecated, and
51 * are no longer used by the framework:
52 * carrierCycles
53 * carrierPhase
54 * carrierPhaseUncertainty
55 *
56 * Similar information about carrier phase signal tracking is still reported in these
57 * fields of @1.0::IGnssMeasurementCallback.GnssMeasurement v1_0:
58 * accumulatedDeltaRangeM
59 * accumulatedDeltaRangeUncertaintyM
60 */
61 @1.0::IGnssMeasurementCallback.GnssMeasurement v1_0;
62
63 /**
64 * Provides the state of Accumulated Delta Range values, including additional information
65 * beyond version 1.0 of the HAL. See GnssAccumulatedDeltaRangeState.
66 *
67 * In this (1.1) version of the HAL, this value is used by the framework, not the
68 * value provided by v1_0.accumulatedDeltaRangeState.
69 */
70 bitfield<GnssAccumulatedDeltaRangeState> accumulatedDeltaRangeState;
71 };
72
73 /**
74 * Complete set of GNSS Measurement data, same as 1.0 with additional enum in measurements.
75 */
76 struct GnssData {
77 /** The full set of satellite measurement observations. */
78 vec<GnssMeasurement> measurements;
79
80 /** The GNSS clock time reading. */
81 GnssClock clock;
82 };
83
84 /**
85 * Callback for the hal to pass a GnssData structure back to the client.
86 *
87 * @param data Contains a reading of GNSS measurements.
88 */
89 gnssMeasurementCb(GnssData data);
90};