1/*
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.measurement_corrections@1.0;
18
19import IMeasurementCorrectionsCallback;
20
21/**
22 * Interface for measurement corrections support.
23 */
24interface IMeasurementCorrections {
25    /**
26     * Injects measurement corrections to be used by the HAL to improve the GNSS location output.
27     *
28     * These are NOT to be used to adjust the IGnssMeasurementCallback output values -
29     * those remain raw, uncorrected measurements.
30     *
31     * In general, these are injected when conditions defined by the platform are met, such as when
32     * GNSS Location is being requested at a sufficiently high accuracy, based on the capabilities
33     * of the GNSS chipset as reported in the IGnssCallback.
34     *
35     * @param corrections The computed corrections to be used by the HAL.
36     *
37     * @return success Whether the HAL can accept & use these corrections.
38     */
39    setCorrections(MeasurementCorrections corrections) generates (bool success);
40
41    /**
42     * Opens the interface and provides the callback routines to the implementation of this
43     * interface.
44     *
45     * @param callback Callback interface for IMeasurementCorrections.
46     *
47     * @return success Returns true on success.
48     */
49    setCallback(IMeasurementCorrectionsCallback callback) generates (bool success);
50};