blob: 5a60a56bdf5c7caa0a9c02b52f86d299d8f88d84 [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 {
23 /**
24 * Flags indicating the Accumulated Delta Range's states.
25 */
26 enum GnssAccumulatedDeltaRangeState
27 : @1.0::IGnssMeasurementCallback.GnssAccumulatedDeltaRangeState {
28 ADR_STATE_HALF_CYCLE_RESOLVED = 1 << 3, // Carrier-phase half-cycle ambiguity resolved
29 };
30
31 /**
32 * Extends a GNSS Measurement, adding the new enum.
33 */
34 struct GnssMeasurement {
35 /**
36 * GNSS measurement information for a single satellite and frequency, as in the 1.0
37 * version of the HAL.
38 *
39 * In this version of the HAL, these fields of the
40 * @1.0::IGnssMeasurementCallback.GnssMeasurement v1_0 struct are deprecated, and
41 * are no longer used by the framework:
42 * carrierCycles
43 * carrierPhase
44 * carrierPhaseUncertainty
45 *
46 * Similar information about carrier phase signal tracking is still reported in these
47 * fields of @1.0::IGnssMeasurementCallback.GnssMeasurement v1_0:
48 * accumulatedDeltaRangeM
49 * accumulatedDeltaRangeUncertaintyM
50 */
51 @1.0::IGnssMeasurementCallback.GnssMeasurement v1_0;
52
53 /**
54 * Provides the state of Accumulated Delta Range values, including additional information
55 * beyond version 1.0 of the HAL. See GnssAccumulatedDeltaRangeState.
56 *
57 * In this (1.1) version of the HAL, this value is used by the framework, not the
58 * value provided by v1_0.accumulatedDeltaRangeState.
59 */
60 bitfield<GnssAccumulatedDeltaRangeState> accumulatedDeltaRangeState;
61 };
62
63 /**
64 * Complete set of GNSS Measurement data, same as 1.0 with additional enum in measurements.
65 */
66 struct GnssData {
67 /** The full set of satellite measurement observations. */
68 vec<GnssMeasurement> measurements;
69
70 /** The GNSS clock time reading. */
71 GnssClock clock;
72 };
73
74 /**
75 * Callback for the hal to pass a GnssData structure back to the client.
76 *
77 * @param data Contains a reading of GNSS measurements.
78 */
79 gnssMeasurementCb(GnssData data);
80};