Sasha Kuznetsov | 845f6d5 | 2019-12-04 12:17:50 -0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package android.hardware.gnss@2.1; |
| 18 | |
| 19 | import @2.0::IGnssConfiguration; |
| 20 | import @2.0::GnssConstellationType; |
| 21 | |
| 22 | /** |
| 23 | * Extended interface for GNSS Configuration support. |
| 24 | */ |
| 25 | interface IGnssConfiguration extends @2.0::IGnssConfiguration { |
| 26 | /** |
| 27 | * Represents a blacklisted source, updating the GnssConstellationType to 2.0, which supports |
| 28 | * IRNSS. |
| 29 | */ |
| 30 | struct BlacklistedSource { |
| 31 | /** |
| 32 | * Defines the constellation of the given satellite(s). |
| 33 | */ |
| 34 | GnssConstellationType constellation; |
| 35 | |
| 36 | /** |
| 37 | * Satellite (space vehicle) ID number, as defined in GnssSvInfo::svid |
| 38 | * |
| 39 | * Or 0 to blacklist all svid's for the specified constellation |
| 40 | */ |
| 41 | int16_t svid; |
| 42 | }; |
| 43 | |
| 44 | /** |
| 45 | * Injects a vector of BlacklistedSource(s) which the HAL must not use to calculate the |
| 46 | * GNSS location output. |
| 47 | * |
| 48 | * The superset of all satellite sources provided, including wildcards, in the latest call |
| 49 | * to this method, is the set of satellites sources that must not be used in calculating |
| 50 | * location. |
| 51 | * |
| 52 | * All measurements from the specified satellites, across frequency bands, are blacklisted |
| 53 | * together. |
| 54 | * |
| 55 | * If this method is never called after the IGnssConfiguration.hal connection is made on boot, |
| 56 | * or is called with an empty vector, then no satellites are to be blacklisted as a result of |
| 57 | * this API. |
| 58 | * |
| 59 | * This blacklist must be considered as an additional source of which satellites |
| 60 | * should not be trusted for location on top of existing sources of similar information |
| 61 | * such as satellite broadcast health being unhealthy and measurement outlier removal. |
| 62 | * |
| 63 | * @param blacklist The BlacklistedSource(s) of satellites the HAL must not use. |
| 64 | * |
| 65 | * @return success Whether the HAL accepts and abides by the provided blacklist. |
| 66 | */ |
| 67 | setBlacklist_2_1(vec<BlacklistedSource> blacklist) generates (bool success); |
Sasha Kuznetsov | 768de57 | 2020-02-11 06:00:10 +0000 | [diff] [blame] | 68 | }; |