Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08dec500 authored by Sasha Kuznetsov's avatar Sasha Kuznetsov Committed by Android (Google) Code Review
Browse files

Merge "Add GnssAntennaInfo to HAL"

parents d227f17c 44d2b0a7
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -648,11 +648,13 @@ f18695dd36ee205640b8326a17453858a7b4596653aaa6ef0016b0aef1bd4dac android.hardwar
446287268831f4ddfac4a51bb1c32ae1e48e47bccd535fccc2c4546d0e7c4013 android.hardware.dumpstate@1.1::types
f284ffde7cadf5a1364b75ab313baf22401eeca289bdde2a2dc7a27ea4ab98d7 android.hardware.dumpstate@1.1::IDumpstateDevice
769d346927a94fd40ee80a5a976d8d15cf022ef99c5900738f4a82f26c0ed229 android.hardware.gnss@2.1::types
88371e0edf69a1f72bfc45ecb2335e9b145e87339d3eecc92664a1fb200213ba android.hardware.gnss@2.1::IGnss
ba62e1e8993bfb9f27fa04816fa0f2241ae2d01edfa3d0c04182e2e5de80045c android.hardware.gnss@2.1::IGnssCallback
ccdf3c0fb2c02a6d4dc57afb276c3497ae8172b80b00ebc0bf8a0238dd38b01d android.hardware.gnss@2.1::IGnssConfiguration
5a125c49ca83629e22afc8c39e865509343bfa2c38f0baea9a186bbac103492d android.hardware.gnss@2.1::IGnssMeasurement
d7bf37660a0946de9599dcbae997b077ee3e604fc2044534d40d3da04297a5d3 android.hardware.gnss@2.1::IGnssMeasurementCallback
626db710bf917ecf551a0b0b1f25be10bf52758f43e0fc808b148b6aae2ef73e android.hardware.gnss@2.1::IGnss
ba5ac712b2a656dc07c83ab4a7a2c2f3bee1bbcb752e8b8ffa9b672f3b5b0728 android.hardware.gnss@2.1::IGnssAntennaInfo
0bc3ed97cbc3f6abc89c68f4e9f4d124f9f723431997dc88c2186cf4d2ad47ee android.hardware.gnss@2.1::IGnssAntennaInfoCallback
50c5d009af76d65b3023a9d94ee519545e72cb7c59bc7166d768d6f00923774d android.hardware.gnss@2.1::IGnssCallback
737d750017738f0753d13ba01a3310e0161f294b8ae80b3fd63eaa227e9d9c66 android.hardware.gnss@2.1::IGnssConfiguration
7913a11206a577b12ade86a7cf3f95c2639cb514d086673f279bf99238c9917e android.hardware.gnss@2.1::IGnssMeasurement
9999f2484f35ebfacdd433dfeae459f2a582334315959653ec8efde7699ec556 android.hardware.gnss@2.1::IGnssMeasurementCallback
6670e7780803a8c696c6391fda5589a334b1b37dc7be9393792ed35035413633 android.hardware.gnss.measurement_corrections@1.1::IMeasurementCorrections
a3f439b782a6a92aaf3c0250f3526e94e8bf8844c3d578f0815e21b12c431346 android.hardware.gnss.measurement_corrections@1.1::types
ce8dbe76eb9ee94b46ef98f725be992e760a5751073d4f4912484026541371f3 android.hardware.health@2.1::IHealth
+2 −0
Original line number Diff line number Diff line
@@ -9,6 +9,8 @@ hidl_interface {
    srcs: [
        "types.hal",
        "IGnss.hal",
        "IGnssAntennaInfo.hal",
        "IGnssAntennaInfoCallback.hal",
        "IGnssCallback.hal",
        "IGnssMeasurement.hal",
        "IGnssMeasurementCallback.hal",
+13 −3
Original line number Diff line number Diff line
@@ -18,10 +18,10 @@ package android.hardware.gnss@2.1;

import android.hardware.gnss.measurement_corrections@1.1::IMeasurementCorrections;
import @2.0::IGnss;

import IGnssCallback;
import IGnssMeasurement;
import IGnssConfiguration;
import IGnssAntennaInfo;

/**
 * Represents the standard GNSS (Global Navigation Satellite System) interface.
@@ -72,5 +72,15 @@ interface IGnss extends @2.0::IGnss {
     *
     * @return measurementCorrectionsIface Handle to the IMeasurementCorrections interface.
     */
     getExtensionMeasurementCorrections_1_1() generates (IMeasurementCorrections measurementCorrectionsIface);
    getExtensionMeasurementCorrections_1_1()
        generates (IMeasurementCorrections measurementCorrectionsIface);

    /**
     * This method returns the IGnssAntennaInfo interface.
     *
     * This method must return non-null.
     *
     * @return gnssAntennaInfoIface Handle to the IGnssAntennaInfo interface.
     */
    getExtensionGnssAntennaInfo() generates (IGnssAntennaInfo gnssAntennaInfoIface);
};
+46 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.hardware.gnss@2.1;

import IGnssAntennaInfoCallback;

/**
 * Extended interface for GNSS antenna information support.
 */
interface IGnssAntennaInfo {
    enum GnssAntennaInfoStatus : int32_t {
        SUCCESS = 0,
        ERROR_ALREADY_INIT = -100,
        ERROR_GENERIC = -101,
    };

    /**
     * Registers the callback routines with the HAL.
     *
     * @param callback Handle to the GnssAntennaInfo callback interface.
     */
    setCallback(IGnssAntennaInfoCallback callback) generates (GnssAntennaInfoStatus initRet);

    /**
     * Stops updates from the HAL, and unregisters the callback routines.
     * After a call to close(), the previously registered callbacks must be
     * considered invalid by the HAL.
     * If close() is invoked without a previous setCallback, this function must perform
     * no work.
     */
    close();
};
+136 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.hardware.gnss@2.1;

/**
 * The callback interface to report GNSS antenna information from the HAL.
 */
interface IGnssAntennaInfoCallback {
    /**
     * A row of doubles. This is used to represent a row in a 2D array, which are used to
     * characterize the phase center variation corrections and signal gain corrections.
     */
    struct Row {
        vec<double> row;
    };

    /**
     * A point in 3D space, with associated uncertainty.
     */
    struct Coord {
        double x;

        double xUncertainty;

        double y;

        double yUncertainty;

        double z;

        double zUncertainty;
    };

    struct GnssAntennaInfo {
        /**
         * The carrier frequency in MHz.
         */
        double carrierFrequencyMHz;

        /**
         * Phase center offset (PCO) with associated 1-sigma uncertainty. PCO is defined with
         * respect to the origin of the Android sensor coordinate system, e.g., center of primary
         * screen for mobiles - see sensor or form factor documents for details.
         */
        Coord phaseCenterOffsetCoordinateMillimeters;

        /**
         * 2D vectors representing the phase center variation (PCV) corrections, in
         * millimeters, at regularly spaced azimuthal angle (theta) and zenith angle
         * (phi). The PCV correction is added to the phase measurement to obtain the
         * corrected value.
         *
         * The azimuthal angle, theta, is defined with respect to the X axis of the
         * Android sensor coordinate system, increasing toward the Y axis. The zenith
         * angle, phi, is defined with respect to the Z axis of the Android Sensor
         * coordinate system, increasing toward the X-Y plane.
         *
         * Each row vector (outer vectors) represents a fixed theta. The first row
         * corresponds to a theta angle of 0 degrees. The last row corresponds to a
         * theta angle of (360 - deltaTheta) degrees, where deltaTheta is the regular
         * spacing between azimuthal angles, i.e., deltaTheta = 360 / (number of rows).
         *
         * The columns (inner vectors) represent fixed zenith angles, beginning at 0
         * degrees and ending at 180 degrees. They are separated by deltaPhi, the regular
         * spacing between zenith angles, i.e., deltaPhi = 180 / (number of columns - 1).
         *
         * This field is optional, i.e., an empty vector.
         */
        vec<Row> phaseCenterVariationCorrectionMillimeters;

        /**
         * 2D vectors of 1-sigma uncertainty in millimeters associated with the PCV
         * correction values.
         *
         * This field is optional, i.e., an empty vector.
         */
        vec<Row> phaseCenterVariationCorrectionUncertaintyMillimeters;

        /**
         * 2D vectors representing the signal gain corrections at regularly spaced
         * azimuthal angle (theta) and zenith angle (phi). The values are calculated or
         * measured at the antenna feed point without considering the radio and receiver
         * noise figure and path loss contribution, in dBi, i.e., decibel over isotropic
         * antenna with the same total power. The signal gain correction is added the
         * signal gain measurement to obtain the corrected value.
         *
         * The azimuthal angle, theta, is defined with respect to the X axis of the
         * Android sensor coordinate system, increasing toward the Y axis. The zenith
         * angle, phi, is defined with respect to the Z axis of the Android Sensor
         * coordinate system, increasing toward the X-Y plane.
         *
         * Each row vector (outer vectors) represents a fixed theta. The first row
         * corresponds to a theta angle of 0 degrees. The last row corresponds to a
         * theta angle of (360 - deltaTheta) degrees, where deltaTheta is the regular
         * spacing between azimuthal angles, i.e., deltaTheta = 360 / (number of rows).
         *
         * The columns (inner vectors) represent fixed zenith angles, beginning at 0
         * degrees and ending at 180 degrees. They are separated by deltaPhi, the regular
         * spacing between zenith angles, i.e., deltaPhi = 180 / (number of columns - 1).
         *
         * This field is optional, i.e., an empty vector.
         */
        vec<Row> signalGainCorrectionDbi;

        /**
         * 2D vectors of 1-sigma uncertainty in dBi associated with the signal
         * gain correction values.
         *
         * This field is optional, i.e., an empty vector.
         */
        vec<Row> signalGainCorrectionUncertaintyDbi;
    };

    /**
     * Called when on connection, and on known-change to these values, such as upon a known
     * GNSS RF antenna tuning change, or a foldable device state change.
     *
     * This is optional. It can never be called if the GNSS antenna information is not
     * available.
     */
    gnssAntennaInfoCb(vec<GnssAntennaInfo> gnssAntennaInfos);
};
Loading