blob: f7b7477ad0707f0d4b26cdef381c1aca980950c5 [file] [log] [blame]
Yu-Han Yangc06b5362019-10-25 14:14:35 -07001/*
2 * Copyright (C) 2019 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@2.1;
18
19import @2.0::IGnssCallback;
20
21/**
22 * This interface is required for the HAL to communicate certain information
23 * like status and location info back to the platform, the platform implements
24 * the interfaces and passes a handle to the HAL.
25 */
26interface IGnssCallback extends @2.0::IGnssCallback {
Sasha Kuznetsov768de572020-02-11 06:00:10 +000027 /**
28 * Flags for the gnssSetCapabilities callback.
29 */
30 @export(name = "", value_prefix = "GPS_CAPABILITY_")
31 enum Capabilities : @2.0::IGnssCallback.Capabilities {
32 /**
33 * GNSS supports measurement corrections
34 */
35 ANTENNA_INFO = 1 << 11,
36 };
Yu-Han Yangc06b5362019-10-25 14:14:35 -070037
Sasha Kuznetsov768de572020-02-11 06:00:10 +000038 /**
39 * Extends a GnssSvInfo, adding a basebandCN0DbHz.
40 */
Yu-Han Yangc06b5362019-10-25 14:14:35 -070041 struct GnssSvInfo {
42 /**
43 * GNSS satellite information for a single satellite and frequency.
44 */
45 @2.0::IGnssCallback.GnssSvInfo v2_0;
46
47 /**
48 * Baseband Carrier-to-noise density in dB-Hz, typically in the range [0, 63]. It contains
49 * the measured C/N0 value for the signal measured at the baseband.
50 *
51 * This is typically a few dB weaker than the value estimated for C/N0 at the antenna port,
52 * which is reported in cN0DbHz.
53 *
54 * If a signal has separate components (e.g. Pilot and Data channels) and the receiver only
55 * processes one of the components, then the reported basebandCN0DbHz reflects only the
56 * component that is processed.
57 *
58 * This value is mandatory. Like cN0DbHz, it may be reported as 0 for satellites being
59 * reported that may be searched for, but not yet tracked.
60 */
61 double basebandCN0DbHz;
62 };
63
64 /**
65 * Callback for the HAL to pass a vector of GnssSvInfo back to the client.
66 *
67 * @param svInfoList SV info list information from HAL.
68 */
69 gnssSvStatusCb_2_1(vec<GnssSvInfo> svInfoList);
70};