From ed90e4dd9e1601702635412a048a7e77d3faec3f Mon Sep 17 00:00:00 2001 From: Wyatt Riley Date: Wed, 14 Feb 2018 08:31:33 -0800 Subject: [PATCH] Adding additional enum value for Half Cycle Adds Enum, and documents the deprecated fields. Bug: 71908529 Test: Builds for device and vts, with corresponding framework and vts changes. Change-Id: I232239f583f820c5d0538e1ae9567f01944f2399 --- gnss/1.1/Android.bp | 1 + gnss/1.1/IGnssMeasurement.hal | 2 +- gnss/1.1/IGnssMeasurementCallback.hal | 80 +++++++++++++++++++++++++++ 3 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 gnss/1.1/IGnssMeasurementCallback.hal diff --git a/gnss/1.1/Android.bp b/gnss/1.1/Android.bp index 417b4f5bd1..4ae4439aa2 100644 --- a/gnss/1.1/Android.bp +++ b/gnss/1.1/Android.bp @@ -11,6 +11,7 @@ hidl_interface { "IGnssCallback.hal", "IGnssConfiguration.hal", "IGnssMeasurement.hal", + "IGnssMeasurementCallback.hal", ], interfaces: [ "android.hardware.gnss@1.0", diff --git a/gnss/1.1/IGnssMeasurement.hal b/gnss/1.1/IGnssMeasurement.hal index 75df5a8ad0..cd83ae3539 100644 --- a/gnss/1.1/IGnssMeasurement.hal +++ b/gnss/1.1/IGnssMeasurement.hal @@ -17,7 +17,7 @@ package android.hardware.gnss@1.1; import @1.0::IGnssMeasurement; -import @1.0::IGnssMeasurementCallback; +import IGnssMeasurementCallback; /** * Extended interface for GNSS Measurements support. diff --git a/gnss/1.1/IGnssMeasurementCallback.hal b/gnss/1.1/IGnssMeasurementCallback.hal new file mode 100644 index 0000000000..5a60a56bdf --- /dev/null +++ b/gnss/1.1/IGnssMeasurementCallback.hal @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2018 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@1.1; + +import @1.0::IGnssMeasurementCallback; + +/** The callback interface to report measurements from the HAL. */ +interface IGnssMeasurementCallback extends @1.0::IGnssMeasurementCallback { + /** + * Flags indicating the Accumulated Delta Range's states. + */ + enum GnssAccumulatedDeltaRangeState + : @1.0::IGnssMeasurementCallback.GnssAccumulatedDeltaRangeState { + ADR_STATE_HALF_CYCLE_RESOLVED = 1 << 3, // Carrier-phase half-cycle ambiguity resolved + }; + + /** + * Extends a GNSS Measurement, adding the new enum. + */ + struct GnssMeasurement { + /** + * GNSS measurement information for a single satellite and frequency, as in the 1.0 + * version of the HAL. + * + * In this version of the HAL, these fields of the + * @1.0::IGnssMeasurementCallback.GnssMeasurement v1_0 struct are deprecated, and + * are no longer used by the framework: + * carrierCycles + * carrierPhase + * carrierPhaseUncertainty + * + * Similar information about carrier phase signal tracking is still reported in these + * fields of @1.0::IGnssMeasurementCallback.GnssMeasurement v1_0: + * accumulatedDeltaRangeM + * accumulatedDeltaRangeUncertaintyM + */ + @1.0::IGnssMeasurementCallback.GnssMeasurement v1_0; + + /** + * Provides the state of Accumulated Delta Range values, including additional information + * beyond version 1.0 of the HAL. See GnssAccumulatedDeltaRangeState. + * + * In this (1.1) version of the HAL, this value is used by the framework, not the + * value provided by v1_0.accumulatedDeltaRangeState. + */ + bitfield accumulatedDeltaRangeState; + }; + + /** + * Complete set of GNSS Measurement data, same as 1.0 with additional enum in measurements. + */ + struct GnssData { + /** The full set of satellite measurement observations. */ + vec measurements; + + /** The GNSS clock time reading. */ + GnssClock clock; + }; + + /** + * Callback for the hal to pass a GnssData structure back to the client. + * + * @param data Contains a reading of GNSS measurements. + */ + gnssMeasurementCb(GnssData data); +};