diff --git a/compatibility_matrices/compatibility_matrix.202504.xml b/compatibility_matrices/compatibility_matrix.202504.xml index 9f6e283613..0a7c18881d 100644 --- a/compatibility_matrices/compatibility_matrix.202504.xml +++ b/compatibility_matrices/compatibility_matrix.202504.xml @@ -225,7 +225,7 @@ android.hardware.gnss - 2-4 + 2-5 IGnss default diff --git a/compatibility_matrices/exclude/fcm_exclude.cpp b/compatibility_matrices/exclude/fcm_exclude.cpp index e7a31e626a..eabb60311f 100644 --- a/compatibility_matrices/exclude/fcm_exclude.cpp +++ b/compatibility_matrices/exclude/fcm_exclude.cpp @@ -140,6 +140,7 @@ bool ShouldCheckMissingAidlHalsInFcm(const std::string& packageAndVersion) { "android.hardware.camera.common@", "android.hardware.common@", "android.hardware.common.fmq@", + "android.hardware.gnss.gnss_assistance@", "android.hardware.gnss.measurement_corrections@", "android.hardware.gnss.visibility_control@", "android.hardware.graphics.common@", diff --git a/gnss/1.1/default/Android.bp b/gnss/1.1/default/Android.bp index 697cb91f4f..6c338bdcf5 100644 --- a/gnss/1.1/default/Android.bp +++ b/gnss/1.1/default/Android.bp @@ -27,7 +27,7 @@ cc_binary { "android.hardware.gnss@2.0", "android.hardware.gnss@1.1", "android.hardware.gnss@1.0", - "android.hardware.gnss-V4-ndk", + "android.hardware.gnss-V5-ndk", ], static_libs: [ "android.hardware.gnss@common-default-lib", diff --git a/gnss/1.1/vts/functional/Android.bp b/gnss/1.1/vts/functional/Android.bp index 65c752c977..1398462939 100644 --- a/gnss/1.1/vts/functional/Android.bp +++ b/gnss/1.1/vts/functional/Android.bp @@ -37,7 +37,7 @@ cc_test { "android.hardware.gnss@1.1", "android.hardware.gnss@2.0", "android.hardware.gnss@common-vts-lib", - "android.hardware.gnss-V4-cpp", + "android.hardware.gnss-V5-cpp", ], shared_libs: [ "android.hardware.gnss.measurement_corrections@1.0", diff --git a/gnss/2.0/default/Android.bp b/gnss/2.0/default/Android.bp index 35c2e376ac..6a4965b648 100644 --- a/gnss/2.0/default/Android.bp +++ b/gnss/2.0/default/Android.bp @@ -50,7 +50,7 @@ cc_binary { "android.hardware.gnss@2.0", "android.hardware.gnss@1.1", "android.hardware.gnss@1.0", - "android.hardware.gnss-V4-ndk", + "android.hardware.gnss-V5-ndk", ], static_libs: [ "android.hardware.gnss@common-default-lib", diff --git a/gnss/2.0/vts/functional/Android.bp b/gnss/2.0/vts/functional/Android.bp index 4ca30630e8..08d4cb3316 100644 --- a/gnss/2.0/vts/functional/Android.bp +++ b/gnss/2.0/vts/functional/Android.bp @@ -40,7 +40,7 @@ cc_test { "android.hardware.gnss@2.0", "android.hardware.gnss@2.1", "android.hardware.gnss@common-vts-lib", - "android.hardware.gnss-V4-cpp", + "android.hardware.gnss-V5-cpp", ], test_suites: [ "general-tests", diff --git a/gnss/2.1/default/Android.bp b/gnss/2.1/default/Android.bp index 1bb7512113..a2e652eaf6 100644 --- a/gnss/2.1/default/Android.bp +++ b/gnss/2.1/default/Android.bp @@ -44,7 +44,7 @@ cc_binary { "android.hardware.gnss@1.0", "android.hardware.gnss@1.1", "android.hardware.gnss@2.0", - "android.hardware.gnss-V4-ndk", + "android.hardware.gnss-V5-ndk", ], static_libs: [ "android.hardware.gnss@common-default-lib", diff --git a/gnss/2.1/vts/functional/Android.bp b/gnss/2.1/vts/functional/Android.bp index af660378d9..8a8fa93bc1 100644 --- a/gnss/2.1/vts/functional/Android.bp +++ b/gnss/2.1/vts/functional/Android.bp @@ -41,7 +41,7 @@ cc_test { "android.hardware.gnss@2.0", "android.hardware.gnss@2.1", "android.hardware.gnss@common-vts-lib", - "android.hardware.gnss-V4-cpp", + "android.hardware.gnss-V5-cpp", ], shared_libs: [ "libvintf", diff --git a/gnss/aidl/Android.bp b/gnss/aidl/Android.bp index 47fc3af6d0..6e159a154b 100644 --- a/gnss/aidl/Android.bp +++ b/gnss/aidl/Android.bp @@ -30,6 +30,7 @@ aidl_interface { "android/hardware/gnss/*.aidl", "android/hardware/gnss/measurement_corrections/*.aidl", "android/hardware/gnss/visibility_control/*.aidl", + "android/hardware/gnss/gnss_assistance/*.aidl", ], stability: "vintf", backend: { @@ -56,6 +57,6 @@ aidl_interface { }, ], - frozen: true, + frozen: false, } diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnss.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnss.aidl index d1aaf2c457..fc74612735 100644 --- a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnss.aidl +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/IGnss.aidl @@ -61,6 +61,7 @@ interface IGnss { void stopSvStatus(); void startNmea(); void stopNmea(); + android.hardware.gnss.gnss_assistance.IGnssAssistanceInterface getExtensionGnssAssistanceInterface(); const int ERROR_INVALID_ARGUMENT = 1; const int ERROR_ALREADY_INIT = 2; const int ERROR_GENERIC = 3; diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl new file mode 100644 index 0000000000..f42e1d0b32 --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2024 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. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +parcelable BeidouAlmanac { + int beidouWeekNumber; + android.hardware.gnss.gnss_assistance.BeidouAlmanac.BeidouSatelliteAlmanac[] satelliteAlmanac; + @VintfStability + parcelable BeidouSatelliteAlmanac { + int prn; + int svHealth; + int toaSeconds; + double eccentricity; + double deltaI; + double omega; + double omega0; + double omegaDot; + double rootA; + double m0; + double af0; + double af1; + } +} diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouSatelliteEphemeris.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouSatelliteEphemeris.aidl new file mode 100644 index 0000000000..91735a056a --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/BeidouSatelliteEphemeris.aidl @@ -0,0 +1,47 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +parcelable BeidouSatelliteEphemeris { + int prn; + android.hardware.gnss.gnss_assistance.BeidouSatelliteEphemeris.BeidouSatelliteClockModel satelliteClockModel; + android.hardware.gnss.gnss_assistance.KeplerianOrbitModel satelliteOrbitModel; + android.hardware.gnss.gnss_assistance.BeidouSatelliteEphemeris.BeidouSatelliteHealth satelliteHealth; + android.hardware.gnss.gnss_assistance.BeidouSatelliteEphemeris.BeidouSatelliteEphemerisTime satelliteEphemerisTime; + @VintfStability + parcelable BeidouSatelliteClockModel { + android.hardware.gnss.gnss_assistance.TimeOfClock timeOfClock; + double af0; + double af1; + double af2; + double tgd1; + double tgd2; + int aodc; + } + parcelable BeidouSatelliteHealth { + int satH1; + double svAccur; + } + parcelable BeidouSatelliteEphemerisTime { + int aode; + int weekNumber; + int toeSeconds; + } +} diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GalileoAlmanac.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GalileoAlmanac.aidl new file mode 100644 index 0000000000..ffe2c3f5cb --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GalileoAlmanac.aidl @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2024 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. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +parcelable GalileoAlmanac { + long issueDate; + int weekNumber; + int toa; + int iod; + android.hardware.gnss.gnss_assistance.GalileoAlmanac.GalileoSatelliteAlmanac[] satelliteAlmanac; + @VintfStability + parcelable GalileoSatelliteAlmanac { + int svId; + android.hardware.gnss.gnss_assistance.GalileoAlmanac.GalileoAlmanacSvHealth svHealth; + double eccentricity; + double deltaI; + double omega; + double omega0; + double omegaDot; + double rootA; + double m0; + double af0; + double af1; + int weekNumber; + int toa; + int iod; + } + @VintfStability + parcelable GalileoAlmanacSvHealth { + int fNavE5a; + int iNavE5b; + int iNavE1b; + } +} diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GalileoIonosphericModel.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GalileoIonosphericModel.aidl new file mode 100644 index 0000000000..6d8040bb85 --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GalileoIonosphericModel.aidl @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2024 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. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +parcelable GalileoIonosphericModel { + double ai0; + double ai1; + double ai2; +} diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GalileoSatelliteEphemeris.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GalileoSatelliteEphemeris.aidl new file mode 100644 index 0000000000..17d48b1c2a --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GalileoSatelliteEphemeris.aidl @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2024 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. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +parcelable GalileoSatelliteEphemeris { + int satelliteCodeNumber; + android.hardware.gnss.gnss_assistance.GalileoSatelliteEphemeris.GalileoSatelliteClockModel[] satelliteClockModel; + android.hardware.gnss.gnss_assistance.KeplerianOrbitModel satelliteOrbitModel; + android.hardware.gnss.gnss_assistance.GalileoSatelliteEphemeris.GalileoSvHealth svHealth; + android.hardware.gnss.gnss_assistance.SatelliteEphemerisTime satelliteEphemerisTime; + @VintfStability + parcelable GalileoSatelliteClockModel { + android.hardware.gnss.gnss_assistance.TimeOfClock toc; + double af0; + double af1; + double af2; + double bgdSeconds; + double sisaMeters; + android.hardware.gnss.gnss_assistance.GalileoSatelliteEphemeris.GalileoSatelliteClockModel.SatelliteClockType satelliteClockType; + @Backing(type="int") @VintfStability + enum SatelliteClockType { + UNDEFINED = 0, + GALILEO_FNAV_CLOCK = 1, + GALILEO_INAV_CLOCK = 2, + } + } + @VintfStability + parcelable GalileoSvHealth { + int dataValidityStatusE1b; + int signalHealthStatusE1b; + int dataValidityStatusE5a; + int signalHealthStatusE5a; + int dataValidityStatusE5b; + int signalHealthStatusE5b; + } +} diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GlonassAlmanac.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GlonassAlmanac.aidl new file mode 100644 index 0000000000..a5451668ef --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GlonassAlmanac.aidl @@ -0,0 +1,39 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +parcelable GlonassAlmanac { + long issueDate; + android.hardware.gnss.gnss_assistance.GlonassAlmanac.GlonassSatelliteAlmanac[] satelliteAlmanac; + @VintfStability + parcelable GlonassSatelliteAlmanac { + int slotNumber; + int svHealth; + int frequencyChannel; + double tau; + double tLambda; + double lambda; + double deltaI; + double deltaT; + double deltaTDot; + double eccentricity; + double omega; + } +} diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GlonassSatelliteEphemeris.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GlonassSatelliteEphemeris.aidl new file mode 100644 index 0000000000..fbab59c5c2 --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GlonassSatelliteEphemeris.aidl @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2024 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. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +parcelable GlonassSatelliteEphemeris { + int slotNumber; + int svHealth; + double frameTimeSeconds; + int ageInDays; + android.hardware.gnss.gnss_assistance.GlonassSatelliteEphemeris.GlonassSatelliteClockModel satelliteClockModel; + android.hardware.gnss.gnss_assistance.GlonassSatelliteEphemeris.GlonassSatelliteOrbitModel satelliteOrbitModel; + @VintfStability + parcelable GlonassSatelliteClockModel { + android.hardware.gnss.gnss_assistance.TimeOfClock timeOfClock; + double clockBias; + double freqBias; + int freqNumber; + } + @VintfStability + parcelable GlonassSatelliteOrbitModel { + double x; + double xDot; + double xAccel; + double y; + double yDot; + double yAccel; + double z; + double zDot; + double zAccel; + } +} diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl new file mode 100644 index 0000000000..98383acce6 --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl @@ -0,0 +1,100 @@ +/* + * Copyright (C) 2024 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. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +parcelable GnssAssistance { + android.hardware.gnss.gnss_assistance.GnssAssistance.GpsAssistance gpsAssistance; + android.hardware.gnss.gnss_assistance.GnssAssistance.GlonassAssistance gloAssistance; + android.hardware.gnss.gnss_assistance.GnssAssistance.GalileoAssistance galAssistance; + android.hardware.gnss.gnss_assistance.GnssAssistance.BeidouAssistance bdsAssistance; + android.hardware.gnss.gnss_assistance.GnssAssistance.QzssAssistance qzsAssistance; + @VintfStability + parcelable GnssSatelliteCorrections { + int svid; + android.hardware.gnss.gnss_assistance.IonosphericCorrection[] inonosphericCorrections; + } + @VintfStability + parcelable GpsAssistance { + android.hardware.gnss.gnss_assistance.GpsAlmanac almanac; + android.hardware.gnss.gnss_assistance.KlobucharIonosphericModel ionosphericModel; + android.hardware.gnss.gnss_assistance.UtcModel utcModel; + android.hardware.gnss.gnss_assistance.LeapSecondsModel leapSecondsModel; + android.hardware.gnss.gnss_assistance.TimeModel[] timeModels; + android.hardware.gnss.gnss_assistance.GpsSatelliteEphemeris[] satelliteEphemeris; + android.hardware.gnss.gnss_assistance.RealTimeIntegrityModel[] realTimeIntegrityModels; + android.hardware.gnss.gnss_assistance.GnssAssistance.GnssSatelliteCorrections[] satelliteCorrections; + } + @VintfStability + parcelable GalileoAssistance { + android.hardware.gnss.gnss_assistance.GalileoAlmanac almanac; + android.hardware.gnss.gnss_assistance.GalileoIonosphericModel ionosphericModel; + android.hardware.gnss.gnss_assistance.UtcModel utcModel; + android.hardware.gnss.gnss_assistance.LeapSecondsModel leapSecondsModel; + android.hardware.gnss.gnss_assistance.TimeModel[] timeModels; + android.hardware.gnss.gnss_assistance.GalileoSatelliteEphemeris[] satelliteEphemeris; + android.hardware.gnss.gnss_assistance.RealTimeIntegrityModel[] realTimeIntegrityModels; + android.hardware.gnss.gnss_assistance.GnssAssistance.GnssSatelliteCorrections[] satelliteCorrections; + } + @VintfStability + parcelable GlonassAssistance { + android.hardware.gnss.gnss_assistance.GlonassAlmanac almanac; + android.hardware.gnss.gnss_assistance.UtcModel utcModel; + android.hardware.gnss.gnss_assistance.TimeModel[] timeModels; + android.hardware.gnss.gnss_assistance.GlonassSatelliteEphemeris[] satelliteEphemeris; + android.hardware.gnss.gnss_assistance.GnssAssistance.GnssSatelliteCorrections[] satelliteCorrections; + } + @VintfStability + parcelable QzssAssistance { + android.hardware.gnss.gnss_assistance.QzssAlmanac almanac; + android.hardware.gnss.gnss_assistance.KlobucharIonosphericModel ionosphericModel; + android.hardware.gnss.gnss_assistance.UtcModel utcModel; + android.hardware.gnss.gnss_assistance.LeapSecondsModel leapSecondsModel; + android.hardware.gnss.gnss_assistance.TimeModel[] timeModels; + android.hardware.gnss.gnss_assistance.QzssSatelliteEphemeris[] satelliteEphemeris; + android.hardware.gnss.gnss_assistance.RealTimeIntegrityModel[] realTimeIntegrityModels; + android.hardware.gnss.gnss_assistance.GnssAssistance.GnssSatelliteCorrections[] satelliteCorrections; + } + @VintfStability + parcelable BeidouAssistance { + android.hardware.gnss.gnss_assistance.BeidouAlmanac almanac; + android.hardware.gnss.gnss_assistance.KlobucharIonosphericModel ionosphericModel; + android.hardware.gnss.gnss_assistance.UtcModel utcModel; + android.hardware.gnss.gnss_assistance.LeapSecondsModel leapSecondsModel; + android.hardware.gnss.gnss_assistance.TimeModel[] timeModels; + android.hardware.gnss.gnss_assistance.BeidouSatelliteEphemeris[] satelliteEphemeris; + android.hardware.gnss.gnss_assistance.RealTimeIntegrityModel[] realTimeIntegrityModels; + android.hardware.gnss.gnss_assistance.GnssAssistance.GnssSatelliteCorrections[] satelliteCorrections; + } +} diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssCorrectionComponent.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssCorrectionComponent.aidl new file mode 100644 index 0000000000..2d43bb3d63 --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GnssCorrectionComponent.aidl @@ -0,0 +1,37 @@ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +parcelable GnssCorrectionComponent { + String sourceKey; + android.hardware.gnss.gnss_assistance.GnssCorrectionComponent.GnssInterval validityInterval; + android.hardware.gnss.gnss_assistance.GnssCorrectionComponent.PseudorangeCorrection pseudorangeCorrection; + @VintfStability + parcelable GnssInterval { + long startMillisSinceGpsEpoch; + long endMillisSinceGpsEpoch; + } + @VintfStability + parcelable PseudorangeCorrection { + double correctionMeters; + double correctionUncertaintyMeters; + double correctionRateMetersPerSecond; + } +} diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl new file mode 100644 index 0000000000..60e0b969ae --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2024 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. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +parcelable GpsAlmanac { + int gpsWeekNumber; + int secondsOfGpsWeek; + android.hardware.gnss.gnss_assistance.GpsAlmanac.GpsSatelliteAlmanac[] satelliteAlmanac; + @VintfStability + parcelable GpsSatelliteAlmanac { + int prn; + int svHealth; + double eccentricity; + double inclination; + double omega; + double omega0; + double omegaDot; + double rootA; + double m0; + double af0; + double af1; + } +} diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsSatelliteEphemeris.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsSatelliteEphemeris.aidl new file mode 100644 index 0000000000..1e80516f7f --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/GpsSatelliteEphemeris.aidl @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2024 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. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +parcelable GpsSatelliteEphemeris { + int prn; + android.hardware.gnss.gnss_assistance.GpsSatelliteEphemeris.GpsL2Params gpsL2Params; + android.hardware.gnss.gnss_assistance.GpsSatelliteEphemeris.GpsSatelliteClockModel satelliteClockModel; + android.hardware.gnss.gnss_assistance.KeplerianOrbitModel satelliteOrbitModel; + android.hardware.gnss.gnss_assistance.GpsSatelliteEphemeris.GpsSatelliteHealth satelliteHealth; + android.hardware.gnss.gnss_assistance.SatelliteEphemerisTime satelliteEphemerisTime; + @VintfStability + parcelable GpsL2Params { + int l2Code; + int l2Flag; + } + @VintfStability + parcelable GpsSatelliteClockModel { + android.hardware.gnss.gnss_assistance.TimeOfClock timeOfClock; + double af0; + double af1; + double af2; + double tgd; + int iodc; + } + @VintfStability + parcelable GpsSatelliteHealth { + int svHealth; + double svAccur; + double fitInt; + } +} diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/IGnssAssistanceCallback.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/IGnssAssistanceCallback.aidl new file mode 100644 index 0000000000..602a249730 --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/IGnssAssistanceCallback.aidl @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 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. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +interface IGnssAssistanceCallback { + void injectRequestCb(); +} diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/IGnssAssistanceInterface.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/IGnssAssistanceInterface.aidl new file mode 100644 index 0000000000..4dd5cf6aa1 --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/IGnssAssistanceInterface.aidl @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +interface IGnssAssistanceInterface { + void injectGnssAssistance(in android.hardware.gnss.gnss_assistance.GnssAssistance gnssAssistance); + void setCallback(in android.hardware.gnss.gnss_assistance.IGnssAssistanceCallback callback); +} diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/IonosphericCorrection.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/IonosphericCorrection.aidl new file mode 100644 index 0000000000..e02d97fd0b --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/IonosphericCorrection.aidl @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +parcelable IonosphericCorrection { + long carrierFrequencyHz; + android.hardware.gnss.gnss_assistance.GnssCorrectionComponent ionosphericCorrection; +} diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/KeplerianOrbitModel.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/KeplerianOrbitModel.aidl new file mode 100644 index 0000000000..835c6ec43a --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/KeplerianOrbitModel.aidl @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +parcelable KeplerianOrbitModel { + double rootA; + double eccentricity; + double i0; + double iDot; + double omega; + double omega0; + double omegaDot; + double m0; + double deltaN; + android.hardware.gnss.gnss_assistance.KeplerianOrbitModel.SecondOrderHarmonicPerturbation secondOrderHarmonicPerturbation; + @VintfStability + parcelable SecondOrderHarmonicPerturbation { + double cic; + double cis; + double crc; + double crs; + double cuc; + double cus; + } +} diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/KlobucharIonosphericModel.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/KlobucharIonosphericModel.aidl new file mode 100644 index 0000000000..5a0caa5680 --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/KlobucharIonosphericModel.aidl @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 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. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +parcelable KlobucharIonosphericModel { + double alpha0; + double alpha1; + double alpha2; + double alpha3; + double beta0; + double beta1; + double beta2; + double beta3; +} diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/LeapSecondsModel.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/LeapSecondsModel.aidl new file mode 100644 index 0000000000..bc38b9b020 --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/LeapSecondsModel.aidl @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +parcelable LeapSecondsModel { + int leapSeconds; + int leapSecondsFuture; + int weekNumberLeapSecondsFuture; + int dayNumberLeapSecondsFuture; +} diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/QzssAlmanac.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/QzssAlmanac.aidl new file mode 100644 index 0000000000..6c645a6ea9 --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/QzssAlmanac.aidl @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2024 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. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +parcelable QzssAlmanac { + int qzssWeekNumber; + int secondsOfQzssWeek; + android.hardware.gnss.gnss_assistance.QzssAlmanac.QzssSatelliteAlmanac[] satelliteAlmanac; + @VintfStability + parcelable QzssSatelliteAlmanac { + int prn; + int svHealth; + double eccentricity; + double inclination; + double omega; + double omega0; + double omegaDot; + double rootA; + double m0; + double af0; + double af1; + } +} diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/QzssSatelliteEphemeris.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/QzssSatelliteEphemeris.aidl new file mode 100644 index 0000000000..5bb1c97998 --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/QzssSatelliteEphemeris.aidl @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 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. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +parcelable QzssSatelliteEphemeris { + int prn; + android.hardware.gnss.gnss_assistance.GpsSatelliteEphemeris.GpsL2Params gpsL2Params; + android.hardware.gnss.gnss_assistance.GpsSatelliteEphemeris.GpsSatelliteClockModel satelliteClockModel; + android.hardware.gnss.gnss_assistance.KeplerianOrbitModel satelliteOrbitModel; + android.hardware.gnss.gnss_assistance.GpsSatelliteEphemeris.GpsSatelliteHealth satelliteHealth; + android.hardware.gnss.gnss_assistance.SatelliteEphemerisTime satelliteEphemerisTime; +} diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/RealTimeIntegrityModel.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/RealTimeIntegrityModel.aidl new file mode 100644 index 0000000000..c7379e1d3f --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/RealTimeIntegrityModel.aidl @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 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. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +parcelable RealTimeIntegrityModel { + int svid; + boolean usable; + long publishDateSeconds; + long startDateSeconds; + long endDateSeconds; + String advisoryType; + String advisoryNumber; +} diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/SatelliteEphemerisTime.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/SatelliteEphemerisTime.aidl new file mode 100644 index 0000000000..1e5cd028f0 --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/SatelliteEphemerisTime.aidl @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2024 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. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +parcelable SatelliteEphemerisTime { + int iode; + int weekNumber; + int toeSeconds; +} diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/TimeModel.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/TimeModel.aidl new file mode 100644 index 0000000000..e1ce8900fe --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/TimeModel.aidl @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +parcelable TimeModel { + android.hardware.gnss.GnssConstellationType toGnss; + double a0; + double a1; + int timeOfWeek; + int weekNumber; +} diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/TimeOfClock.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/TimeOfClock.aidl new file mode 100644 index 0000000000..ae709d4312 --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/TimeOfClock.aidl @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 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. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +parcelable TimeOfClock { + int year; + int month; + int day; + int hour; + int minute; + int seconds; +} diff --git a/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/UtcModel.aidl b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/UtcModel.aidl new file mode 100644 index 0000000000..df754bcd23 --- /dev/null +++ b/gnss/aidl/aidl_api/android.hardware.gnss/current/android/hardware/gnss/gnss_assistance/UtcModel.aidl @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package android.hardware.gnss.gnss_assistance; +/* @hide */ +@VintfStability +parcelable UtcModel { + double a0; + double a1; + int timeOfWeek; + int weekNumber; +} diff --git a/gnss/aidl/android/hardware/gnss/IGnss.aidl b/gnss/aidl/android/hardware/gnss/IGnss.aidl index aaafe7f583..5fc8a48bf1 100644 --- a/gnss/aidl/android/hardware/gnss/IGnss.aidl +++ b/gnss/aidl/android/hardware/gnss/IGnss.aidl @@ -29,6 +29,7 @@ import android.hardware.gnss.IGnssMeasurementInterface; import android.hardware.gnss.IGnssNavigationMessageInterface; import android.hardware.gnss.IGnssPowerIndication; import android.hardware.gnss.IGnssPsds; +import android.hardware.gnss.gnss_assistance.IGnssAssistanceInterface; import android.hardware.gnss.measurement_corrections.IMeasurementCorrectionsInterface; import android.hardware.gnss.visibility_control.IGnssVisibilityControl; @@ -343,4 +344,11 @@ interface IGnss { * Stops the NMEA output stream. */ void stopNmea(); + + /** + * This method returns the IGnssAssistanceInterface. + * + * @return Handle to the IGnssAssistanceInterface. + */ + IGnssAssistanceInterface getExtensionGnssAssistanceInterface(); } diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl new file mode 100644 index 0000000000..1df485ebd8 --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouAlmanac.aidl @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2024 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.gnss_assistance; + +/** + * Contains Beidou almanac data. + * This is defined in BDS-SIS-ICD-B1I-3.0, section 5.2.4.15. + * + * @hide + */ +@VintfStability +parcelable BeidouAlmanac { + /** + * Contains Beidou satellite almanac data. + * This is defined in BDS-SIS-ICD-B1I-3.0, section 5.2.4.15. + */ + @VintfStability + parcelable BeidouSatelliteAlmanac { + /** The PRN number of the Beidou satellite. */ + int prn; + + /** Satellite health (0=healthy, 1=unhealthy). */ + int svHealth; + + /** Almanac reference time in seconds. */ + int toaSeconds; + + /** Eccentricity. */ + double eccentricity; + + /** + * Correction of inclination angle relative to reference value at reference time + * in semi-circles. + */ + double deltaI; + + /** Argument of perigee in semi-circles. */ + double omega; + + /** Longitude of ascending node of orbital plane at weekly epoch in semi-circles. */ + double omega0; + + /** Rate of right ascension in semi-circles per second. */ + double omegaDot; + + /** Square root of semi-major axis in square root of meters. */ + double rootA; + + /** Mean anomaly at reference time in semi-circles. */ + double m0; + + /** Satellite clock time bias correction coefficient in seconds. */ + double af0; + + /** Satellite clock time drift correction coefficient in seconds per second. */ + double af1; + } + + /** Beidou week number. */ + int beidouWeekNumber; + + /** Array of BeidouSatelliteAlmanac. */ + BeidouSatelliteAlmanac[] satelliteAlmanac; +} diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouSatelliteEphemeris.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouSatelliteEphemeris.aidl new file mode 100644 index 0000000000..025f402e29 --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/BeidouSatelliteEphemeris.aidl @@ -0,0 +1,94 @@ +package android.hardware.gnss.gnss_assistance; + +import android.hardware.gnss.gnss_assistance.KeplerianOrbitModel; +import android.hardware.gnss.gnss_assistance.TimeOfClock; + +/** + * Contains ephemeris parameters specific to Beidou satellites. + * + * @hide + */ +@VintfStability +parcelable BeidouSatelliteEphemeris { + /* + * Contains the set of parameters needed for Beidou satellite clock + * correction. + * This is defined in BDS-SIS-ICD-B1I-3.0, section 5.2.4.9, 5.2.4.10. + */ + @VintfStability + parcelable BeidouSatelliteClockModel { + /** Time of the clock. */ + TimeOfClock timeOfClock; + + /** SV clock bias in seconds. */ + double af0; + + /** SV clock drift in seconds per second. */ + double af1; + + /** Clock drift rate in seconds per second squared. */ + double af2; + + /** Group delay differential 1 B1/B3 in seconds. */ + double tgd1; + + /** Group delay differential 2 B2/B3 in seconds. */ + double tgd2; + + /** + * Age of Data Clock and field range is: 0-31. + * This is defined in BDS-SIS-ICD-B1I-3.0 Section 5.2.4.8 Table 5-6. + */ + int aodc; + } + + /** Contains information about Beidou health. */ + parcelable BeidouSatelliteHealth { + /** + * The autonomous satellite health flag (SatH1) occupies 1 bit. “0” means + * broadcasting satellite is good and “1” means not. + * This is defined in BDS-SIS-ICD-B1I-3.0 section 5.2.4.6. + */ + int satH1; + + /** + * SV accuracy in meters. + * This is defined in the "BROADCAST ORBIT - 6" record of RINEX 3.05 + * Table A14, pp.78. + */ + double svAccur; + } + + /** Contains information about time of ephemeris */ + parcelable BeidouSatelliteEphemerisTime { + /** + * AODE Age of Data, Ephemeris. + * This is as defined in BDS-SIS-ICD-B1I-3.0 section 5.2.4.11 Table 5-8. + */ + int aode; + + /** Beidou week number. */ + int weekNumber; + + /** + * Time of ephemeris in seconds. + * This is defined in BDS-SIS-ICD-B1I-3.0 section 5.2.4.12. + */ + int toeSeconds; + } + + /** The PRN number of the Beidou satellite. */ + int prn; + + /** Satellite clock model. */ + BeidouSatelliteClockModel satelliteClockModel; + + /** Satellite orbit model. */ + KeplerianOrbitModel satelliteOrbitModel; + + /** Satellite health. */ + BeidouSatelliteHealth satelliteHealth; + + /** Satellite ephemeris time. */ + BeidouSatelliteEphemerisTime satelliteEphemerisTime; +} diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GalileoAlmanac.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GalileoAlmanac.aidl new file mode 100644 index 0000000000..db5dd04915 --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/GalileoAlmanac.aidl @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2024 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.gnss_assistance; + +/** + * Contains Galileo almanac data. + * This is defined in Galileo-OS-SIS-ICD-v2.1, 5.1.10. + * + * @hide + */ +@VintfStability +parcelable GalileoAlmanac { + /** + * Contains Galileo satellite almanac data. + * This is defined in Galileo-OS-SIS-ICD-v2.1, 5.1.10. + */ + @VintfStability + parcelable GalileoSatelliteAlmanac { + /** Satellite ID. */ + int svId; + + /** Satellite health status. */ + GalileoAlmanacSvHealth svHealth; + + /** Eccentricity. */ + double eccentricity; + + /** + * Difference between the inclination angle at reference time and the + * nominal inclination, in semi-circles. + */ + double deltaI; + + /** Argument of perigee in semi-circles. */ + double omega; + + /** Longitude of ascending node of orbital plane at weekly epoch in semi-circles. */ + double omega0; + + /** Rate of right ascension in semi-circles per second. */ + double omegaDot; + + /** + * Difference with respect to the square root of the nominal semi-major axis + * in square root of meters. + */ + double rootA; + + /** Satellite mean anomaly at reference time in semi-circles. */ + double m0; + + /** Satellite clock correction bias in seconds. */ + double af0; + + /** Satellite clock correction linear in seconds per second. */ + double af1; + + /** + * Almanac reference week number. + * Modulo 4 representation of the Galileo system time week number. + */ + int weekNumber; + + /** Almanac reference time in seconds. */ + int toa; + + /** Almanac issue of data. */ + int iod; + } + + /** + * Contains Galileo satellite health status. + */ + @VintfStability + parcelable GalileoAlmanacSvHealth { + /** Satellite E5a signal health status. */ + int fNavE5a; + + /** Satellite E5b signal health status. */ + int iNavE5b; + + /** Satellite E1b signal health status. */ + int iNavE1b; + } + + /** Almanac reference UTC time in milliseconds */ + long issueDate; + + /** + * Almanac reference week number. + * Modulo 4 representation of the Galileo system time week number. + */ + int weekNumber; + + /** Almanac reference time in seconds. */ + int toa; + + /** Almanac issue of data. */ + int iod; + + /** Array of GalileoSatelliteAlmanac. */ + GalileoSatelliteAlmanac[] satelliteAlmanac; +} diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GalileoIonosphericModel.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GalileoIonosphericModel.aidl new file mode 100644 index 0000000000..ced8917b48 --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/GalileoIonosphericModel.aidl @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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.gnss_assistance; + +/** + * Contains Galileo ionospheric model. + * This is Defined in Galileo-OS-SIS-ICD-v2.1, 5.1.6. + * + * @hide + */ +@VintfStability +parcelable GalileoIonosphericModel { + /** Effective ionisation level 1st order parameter in sfu. */ + double ai0; + + /** Effective ionisation level 2nd order parameter in sfu per degree. */ + double ai1; + + /** Effective ionisation level 3nd order parameter in sfu per degree squared. */ + double ai2; +} diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GalileoSatelliteEphemeris.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GalileoSatelliteEphemeris.aidl new file mode 100644 index 0000000000..156293400d --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/GalileoSatelliteEphemeris.aidl @@ -0,0 +1,114 @@ +/* + * Copyright (C) 2024 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.gnss_assistance; + +import android.hardware.gnss.gnss_assistance.KeplerianOrbitModel; +import android.hardware.gnss.gnss_assistance.SatelliteEphemerisTime; +import android.hardware.gnss.gnss_assistance.TimeOfClock; + +/** + * Contains ephemeris parameters specific to Galileo satellites. + * + * @hide + */ +@VintfStability +parcelable GalileoSatelliteEphemeris { + /** + * Contains the set of parameters needed for Galileo satellite clock correction. + * This is defined in Galileo-OS-SIS-ICD 5.1.3. + */ + @VintfStability + parcelable GalileoSatelliteClockModel { + /* + * States the type of satellite clock. + */ + @VintfStability + @Backing(type="int") + enum SatelliteClockType { + UNDEFINED = 0, + GALILEO_FNAV_CLOCK = 1, + GALILEO_INAV_CLOCK = 2 + } + + /** Time of the clock. */ + TimeOfClock toc; + + /** SV clock bias correction coefficient in seconds. */ + double af0; + + /** SV clock drift correction coefficient in seconds per second. */ + double af1; + + /** SV clock drift rate correction coefficient in seconds per second squared. */ + double af2; + + /** + * Broadcast group delay in seconds. + * This is defined in Galileo-OS-SIS-ICD 5.1.5. + */ + double bgdSeconds; + + /** + * Signal in space accuracy in meters. + * This is defined in Galileo-OS-SIS-ICD 5.1.12. + */ + double sisaMeters; + + /** Type of satellite clock .*/ + SatelliteClockType satelliteClockType; + } + + /** + * Contains satellite health. + * This is defined in Galileo-OS-SIS-ICD 5.1.9.3. + */ + @VintfStability + parcelable GalileoSvHealth { + /** E1-B data validity status. */ + int dataValidityStatusE1b; + + /** E1-B/C signal health status. */ + int signalHealthStatusE1b; + + /** E5a data validity status. */ + int dataValidityStatusE5a; + + /** E5a signal health status. */ + int signalHealthStatusE5a; + + /** E5b data validity status. */ + int dataValidityStatusE5b; + + /** E5b signal health status. */ + int signalHealthStatusE5b; + } + + /** Satellite code number. */ + int satelliteCodeNumber; + + /** Array of satellite clock model. */ + GalileoSatelliteClockModel[] satelliteClockModel; + + /** Satellite orbit model. */ + KeplerianOrbitModel satelliteOrbitModel; + + /** Satellite health. */ + GalileoSvHealth svHealth; + + /** Satellite ephemeris time. */ + SatelliteEphemerisTime satelliteEphemerisTime; +} diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GlonassAlmanac.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GlonassAlmanac.aidl new file mode 100644 index 0000000000..266271706e --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/GlonassAlmanac.aidl @@ -0,0 +1,56 @@ +package android.hardware.gnss.gnss_assistance; + +/** + * Contains Glonass almanac data. + * This is defined in Glonass ICD v5.1, Section 4.5. + * + * @hide + */ +@VintfStability +parcelable GlonassAlmanac { + /** + * Contains Glonass satellite almanac data. + * This is defined in Glonass ICD v5.1, Section 4.5. + */ + @VintfStability + parcelable GlonassSatelliteAlmanac { + /** Slot number. */ + int slotNumber; + + /** Satellite health (0=healthy, 1=unhealthy). */ + int svHealth; + + /** Frequency channel number. */ + int frequencyChannel; + + /** Coarse value of satellite time correction to GLONASS time in seconds. */ + double tau; + + /** Time of first ascending node passage of satellite in seconds. */ + double tLambda; + + /** Longitude of the first ascending node in semi-circles. */ + double lambda; + + /** Correction to the mean value of inclination in semi-circles. */ + double deltaI; + + /** Correction to the mean value of the draconian period in seconds per orbital period. */ + double deltaT; + + /** Rate of change of draconian period in seconds per orbital period squared. */ + double deltaTDot; + + /** Eccentricity. */ + double eccentricity; + + /** Argument of perigee in radians. */ + double omega; + } + + /** Almanac reference UTC time in milliseconds. */ + long issueDate; + + /** Array of GlonassSatelliteAlmanac. */ + GlonassSatelliteAlmanac[] satelliteAlmanac; +} diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GlonassSatelliteEphemeris.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GlonassSatelliteEphemeris.aidl new file mode 100644 index 0000000000..383aed1ab6 --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/GlonassSatelliteEphemeris.aidl @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2024 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.gnss_assistance; + +import android.hardware.gnss.gnss_assistance.SatelliteEphemerisTime; +import android.hardware.gnss.gnss_assistance.TimeOfClock; + +/** + * Contains ephemeris parameters specific to Glonass satellites. + * This is defined in RINEX 3.05 APPENDIX 10 and Glonass ICD v5.1, section 4.4. + * + * @hide + */ +@VintfStability +parcelable GlonassSatelliteEphemeris { + /** Contains the set of parameters needed for Glonass satellite clock correction. */ + @VintfStability + parcelable GlonassSatelliteClockModel { + /** Time of Clock. */ + TimeOfClock timeOfClock; + + /** Clock bias in seconds (-TauN). */ + double clockBias; + + /** Frequency bias (+GammaN). */ + double freqBias; + + /** Frequency number. */ + int freqNumber; + } + + /** Contains Glonass orbit model parameters in PZ-90 coordinate system. */ + @VintfStability + parcelable GlonassSatelliteOrbitModel { + /** X position in kilometers. */ + double x; + + /** X velocity in kilometers per second. */ + double xDot; + + /** X acceleration in kilometers per second squared. */ + double xAccel; + + /** Y position in kilometers. */ + double y; + + /** Y velocity in kilometers per second. */ + double yDot; + + /** Y acceleration in kilometers per second squared. */ + double yAccel; + + /** Z position in kilometers. */ + double z; + + /** Z velocity in kilometers per second. */ + double zDot; + + /** Z acceleration in kilometers per second squared. */ + double zAccel; + } + + /** + * L1/Satellite system (R), satellite number (slot number in sat. + * constellation). + */ + int slotNumber; + + /** Satellite health (0=healthy, 1=unhealthy). */ + int svHealth; + + /** Message frame time in seconds of the UTC week (tk+nd*86400). */ + double frameTimeSeconds; + + /** Age of current information in days (E). */ + int ageInDays; + + /** Satellite clock model. */ + GlonassSatelliteClockModel satelliteClockModel; + + /** Satellite orbit model. */ + GlonassSatelliteOrbitModel satelliteOrbitModel; +} diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl new file mode 100644 index 0000000000..dad07645a9 --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssAssistance.aidl @@ -0,0 +1,209 @@ +/* + * Copyright (C) 2024 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.gnss_assistance; + +import android.hardware.gnss.gnss_assistance.BeidouAlmanac; +import android.hardware.gnss.gnss_assistance.BeidouSatelliteEphemeris; +import android.hardware.gnss.gnss_assistance.GalileoAlmanac; +import android.hardware.gnss.gnss_assistance.GalileoIonosphericModel; +import android.hardware.gnss.gnss_assistance.GalileoSatelliteEphemeris; +import android.hardware.gnss.gnss_assistance.GlonassAlmanac; +import android.hardware.gnss.gnss_assistance.GlonassSatelliteEphemeris; +import android.hardware.gnss.gnss_assistance.GpsAlmanac; +import android.hardware.gnss.gnss_assistance.GpsSatelliteEphemeris; +import android.hardware.gnss.gnss_assistance.IonosphericCorrection; +import android.hardware.gnss.gnss_assistance.KlobucharIonosphericModel; +import android.hardware.gnss.gnss_assistance.LeapSecondsModel; +import android.hardware.gnss.gnss_assistance.QzssAlmanac; +import android.hardware.gnss.gnss_assistance.QzssSatelliteEphemeris; +import android.hardware.gnss.gnss_assistance.RealTimeIntegrityModel; +import android.hardware.gnss.gnss_assistance.TimeModel; +import android.hardware.gnss.gnss_assistance.UtcModel; + +/** + * Contains GNSS assistance. + * + * @hide + */ +@VintfStability +parcelable GnssAssistance { + /** GNSS corrections for satellites. */ + @VintfStability + parcelable GnssSatelliteCorrections { + /** + * Pseudo-random or satellite ID number for the satellite, a.k.a. Space Vehicle (SV), or + * OSN number for Glonass. The distinction is made by looking at the constellation field. + * Values must be in the range of: + * + * - GNSS: 1-32 + * - GLONASS: 1-25 + * - QZSS: 183-206 + * - Galileo: 1-36 + * - Beidou: 1-63 + */ + int svid; + + /** Ionospheric corrections */ + IonosphericCorrection[] inonosphericCorrections; + } + + /** Contains GPS assistance. */ + @VintfStability + parcelable GpsAssistance { + /** The GPS almanac. */ + GpsAlmanac almanac; + + /** The Klobuchar ionospheric model. */ + KlobucharIonosphericModel ionosphericModel; + + /** The UTC model. */ + UtcModel utcModel; + + /** The leap seconds model. */ + LeapSecondsModel leapSecondsModel; + + /** The array of time models. */ + TimeModel[] timeModels; + + /** The array of GPS ephemeris. */ + GpsSatelliteEphemeris[] satelliteEphemeris; + + /** The array of real time integrity models. */ + RealTimeIntegrityModel[] realTimeIntegrityModels; + + /** The array of GPS satellite corrections. */ + GnssSatelliteCorrections[] satelliteCorrections; + } + + /** Contains Galileo assistance. */ + @VintfStability + parcelable GalileoAssistance { + /** The Galileo almanac. */ + GalileoAlmanac almanac; + + /** The Galileo ionospheric model. */ + GalileoIonosphericModel ionosphericModel; + + /** The UTC model. */ + UtcModel utcModel; + + /** The leap seconds model. */ + LeapSecondsModel leapSecondsModel; + + /** The array of time models. */ + TimeModel[] timeModels; + + /** The array of Galileo ephemeris. */ + GalileoSatelliteEphemeris[] satelliteEphemeris; + + /** The array of real time integrity models. */ + RealTimeIntegrityModel[] realTimeIntegrityModels; + + /** The array of Galileo satellite corrections. */ + GnssSatelliteCorrections[] satelliteCorrections; + } + + /** Contains Glonass assistance. */ + @VintfStability + parcelable GlonassAssistance { + /** The Glonass almanac. */ + GlonassAlmanac almanac; + + /** The UTC model. */ + UtcModel utcModel; + + /** The array of time models. */ + TimeModel[] timeModels; + + /** The array of Glonass ephemeris. */ + GlonassSatelliteEphemeris[] satelliteEphemeris; + + /** The array of Glonass satellite corrections. */ + GnssSatelliteCorrections[] satelliteCorrections; + } + + /** Contains QZSS assistance. */ + @VintfStability + parcelable QzssAssistance { + /** The QZSS almanac. */ + QzssAlmanac almanac; + + /** The Klobuchar ionospheric model. */ + KlobucharIonosphericModel ionosphericModel; + + /** The UTC model. */ + UtcModel utcModel; + + /** The leap seconds model. */ + LeapSecondsModel leapSecondsModel; + + /** The array of time models. */ + TimeModel[] timeModels; + + /** The array of QZSS ephemeris. */ + QzssSatelliteEphemeris[] satelliteEphemeris; + + /** The array of real time integrity models. */ + RealTimeIntegrityModel[] realTimeIntegrityModels; + + /** The array of QZSS satellite corrections. */ + GnssSatelliteCorrections[] satelliteCorrections; + } + + /** Contains Beidou assistance. */ + @VintfStability + parcelable BeidouAssistance { + /** The Beidou almanac. */ + BeidouAlmanac almanac; + + /** The Klobuchar ionospheric model. */ + KlobucharIonosphericModel ionosphericModel; + + /** The UTC model. */ + UtcModel utcModel; + + /** The leap seconds model. */ + LeapSecondsModel leapSecondsModel; + + /** The array of time models. */ + TimeModel[] timeModels; + + /** The array of Beidou ephemeris. */ + BeidouSatelliteEphemeris[] satelliteEphemeris; + + /** The array of real time integrity models. */ + RealTimeIntegrityModel[] realTimeIntegrityModels; + + /** The array of Beidou satellite corrections. */ + GnssSatelliteCorrections[] satelliteCorrections; + } + + /** GPS assistance. */ + GpsAssistance gpsAssistance; + + /** Glonass assistance. */ + GlonassAssistance gloAssistance; + + /** Galileo assistance. */ + GalileoAssistance galAssistance; + + /** Beidou assistance. */ + BeidouAssistance bdsAssistance; + + /** QZSS assistance. */ + QzssAssistance qzsAssistance; +} diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssCorrectionComponent.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssCorrectionComponent.aidl new file mode 100644 index 0000000000..445727f1a9 --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/GnssCorrectionComponent.aidl @@ -0,0 +1,64 @@ +package android.hardware.gnss.gnss_assistance; + +/** + * Gnss correction associated with a component (e.g. the Ionospheric error). + * + * @hide + */ +@VintfStability +parcelable GnssCorrectionComponent { + /** + * Uniquely identifies the source of correction (e.g. "Klobuchar" for + * ionospheric corrections). + * Clients should not depend on the value of the source key but, rather, + * can compare before/after to detect changes. + */ + String sourceKey; + + /** + * Time interval referenced against the GPS epoch. The start must be less than + * or equal to the end. When the start equals the end, the interval is empty. + */ + @VintfStability + parcelable GnssInterval { + /** + * Inclusive start of the interval in milliseconds since the GPS epoch. + * A timestamp matching this interval will have to be the same or after the + * start. Required as a reference time for the initial correction value and + * its rate of change over time. + */ + long startMillisSinceGpsEpoch; + + /** + * Exclusive end of the interval in milliseconds since the GPS epoch. If + * specified, a timestamp matching this interval will have to be before the + * end. + */ + long endMillisSinceGpsEpoch; + } + + /** The correction is only applicable during this time interval. */ + GnssInterval validityInterval; + + /** Pseudorange correction. */ + @VintfStability + parcelable PseudorangeCorrection { + /* Correction to be added to the measured pseudorange, in meters. */ + double correctionMeters; + + /* Uncertainty of the correction, in meters. */ + double correctionUncertaintyMeters; + + /** + * Linear approximation of the change in correction over time. Intended + * usage is to adjust the correction using the formula: + * correctionMeters + correctionRateMetersPerSecond * delta_seconds + * Where `delta_seconds` is the number of elapsed seconds since the beginning + * of the correction validity interval. + */ + double correctionRateMetersPerSecond; + } + + /* Pseudorange correction. */ + PseudorangeCorrection pseudorangeCorrection; +} diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl new file mode 100644 index 0000000000..9cc37f9e08 --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/GpsAlmanac.aidl @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2024 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.gnss_assistance; + +/** + * Contains GPS almanac data. + * This is defined in IS-GPS-200, section 20.3.3.5.1.2. + * + * @hide + */ +@VintfStability +parcelable GpsAlmanac { + /** GPS week number. */ + int gpsWeekNumber; + + /** GPS time of week in seconds. */ + int secondsOfGpsWeek; + + /** + * Contains GPS satellite almanac data. + * This is defined in IS-GPS-200, section 20.3.3.5.1.2. + */ + @VintfStability + parcelable GpsSatelliteAlmanac { + /** The PRN number of the GPS satellite. */ + int prn; + + /** + * Satellite health information. + * The satellite subframe 4 and 5, page 25 six-bit health code as defined + * in IS-GPS-200 Table 20-VIII expressed in integer form. + */ + int svHealth; + + /** Eccentricity. */ + double eccentricity; + + /** + * Correction of inclination angle relative to reference value at + * reference time in semi-circles. + */ + double inclination; + + /** Argument of perigee in semi-circles. */ + double omega; + + /** Longitude of ascending node of orbital plane at weekly epoch in semi-circles. */ + double omega0; + + /** Rate of right ascension in semi-circles per second. */ + double omegaDot; + + /** Square root of semi-major axis in square root of meters. */ + double rootA; + + /** Mean anomaly at reference time in semi-circles. */ + double m0; + + /** Satellite clock time bias correction coefficient in seconds. */ + double af0; + + /** Satellite clock time drift correction coefficient in seconds per second. */ + double af1; + } + + /** Array of GpsSatelliteAlmanac. */ + GpsSatelliteAlmanac[] satelliteAlmanac; +} diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/GpsSatelliteEphemeris.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/GpsSatelliteEphemeris.aidl new file mode 100644 index 0000000000..b24c593a61 --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/GpsSatelliteEphemeris.aidl @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2024 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.gnss_assistance; + +import android.hardware.gnss.gnss_assistance.KeplerianOrbitModel; +import android.hardware.gnss.gnss_assistance.SatelliteEphemerisTime; +import android.hardware.gnss.gnss_assistance.TimeOfClock; + +/** + * Contains ephemeris parameters specific to GPS satellites. + * This is defined in IS-GPS-200, section 20.3.3.3. + * + * @hide + */ +@VintfStability +parcelable GpsSatelliteEphemeris { + /** Satellite PRN */ + int prn; + + /* Contains information about L2 params. */ + @VintfStability + parcelable GpsL2Params { + /** Code(s) on L2 Channel. */ + int l2Code; + + /** Data Flag for L2 P-Code. */ + int l2Flag; + } + + /** L2 parameters. */ + GpsL2Params gpsL2Params; + + /** Contains the set of parameters needed for GPS satellite clock correction. */ + @VintfStability + parcelable GpsSatelliteClockModel { + /** Time of the clock. */ + TimeOfClock timeOfClock; + + /** SV clock bias in seconds. */ + double af0; + + /** SV clock drift in seconds per second. */ + double af1; + + /** Clock drift rate in seconds per second squared. */ + double af2; + + /** Group delay differential in seconds. */ + double tgd; + + /** Issue of data, clock. */ + int iodc; + } + + /** Clock model. */ + GpsSatelliteClockModel satelliteClockModel; + + /** Orbit model. */ + KeplerianOrbitModel satelliteOrbitModel; + + /** + * Contains information about GPS health. The information is tied to + * Legacy Navigation (LNAV) data, not Civil Navigation (CNAV) data. + */ + @VintfStability + parcelable GpsSatelliteHealth { + /** + * Represents "SV health" in the "BROADCAST ORBIT - 6" + * record of RINEX 3.05. Table A6, pp.68. + */ + int svHealth; + + /** + * Represents "SV accuracy" in meters in the "BROADCAST ORBIT - 6" + * record of RINEX 3.05. Table A6, pp.68. + */ + double svAccur; + + /** + * Represents the "Fit Interval" in hours in the "BROADCAST ORBIT - 7" + * record of RINEX 3.05. Table A6, pp.69. + */ + double fitInt; + } + + /** Satellite health. */ + GpsSatelliteHealth satelliteHealth; + + /** Ephemeris time. */ + SatelliteEphemerisTime satelliteEphemerisTime; +} diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/IGnssAssistanceCallback.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/IGnssAssistanceCallback.aidl new file mode 100644 index 0000000000..883189ce1d --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/IGnssAssistanceCallback.aidl @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2024 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.gnss_assistance; + +/** + * The callback interface for GNSS HAL to request GNSS assistance data + * (ephemeris and ionospheric corrections) from the framework. + * + * @hide + */ +@VintfStability +interface IGnssAssistanceCallback { + /** + * Callback to request the framework to inject GNSS assistance data via + * IGnssAssistanceInterface. + */ + void injectRequestCb(); +} diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/IGnssAssistanceInterface.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/IGnssAssistanceInterface.aidl new file mode 100644 index 0000000000..2097e1e002 --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/IGnssAssistanceInterface.aidl @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2024 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.gnss_assistance; + +import android.hardware.gnss.gnss_assistance.GnssAssistance; +import android.hardware.gnss.gnss_assistance.IGnssAssistanceCallback; + +/** + * Interface used by the GNSS HAL to request the GNSS assistance data + * (ephemeris and ionospheric corrections) from the framework. + * + * The GNSS chipset uses the injected assistance data in the process of computing + * the user position for satellite position computation and error corrections. + * + * The framework ensures the assistance data is valid. GNSS HAL should request the + * data when it's engine lacks valid assistance data. + * + * @hide + */ +@VintfStability +interface IGnssAssistanceInterface { + /** + * Inject the GNSS assistance into the GNSS receiver. + * + * @param gnssAssistance GNSS assistance. + */ + void injectGnssAssistance(in GnssAssistance gnssAssistance); + + /** + * Provides the callback routines to request the GNSS assistance. + * + * @param callback Handle to the IGnssAssistanceCallback interface. + */ + void setCallback(in IGnssAssistanceCallback callback); +} diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/IonosphericCorrection.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/IonosphericCorrection.aidl new file mode 100644 index 0000000000..e8e50bd4e2 --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/IonosphericCorrection.aidl @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 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.gnss_assistance; + +import android.hardware.gnss.gnss_assistance.GnssCorrectionComponent; + +/** + * Contains Ionospheric correction. + * + * @hide + */ +@VintfStability +parcelable IonosphericCorrection { + /** + * Carrier frequency in Hz to differentiate signals from the same satellite. + * e.g. GPS L1/L5 + */ + long carrierFrequencyHz; + + /** Ionospheric correction. */ + GnssCorrectionComponent ionosphericCorrection; +} diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/KeplerianOrbitModel.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/KeplerianOrbitModel.aidl new file mode 100644 index 0000000000..15003e7788 --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/KeplerianOrbitModel.aidl @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2024 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.gnss_assistance; + +/** + * Contains Keplerian orbit model parameters for GPS/Galileo/QZSS/Beidou. + * For GPS, this is defined in IS-GPS-200 Table 20-II. + * For Galileo, this is defined in Galileo-OS-SIS-ICD-v2.1 5.1.1. + * For QZSS, this is defined in IS-QZSS-PNT section 4.1.2. + * For Baidou, this is defined in BDS-SIS-ICD-B1I-3.0 section 5.2.4.12. + * + * @hide + */ +@VintfStability +parcelable KeplerianOrbitModel { + /** Square root of the semi-major axis in square root of meters. */ + double rootA; + + /** Eccentricity. */ + double eccentricity; + + /** Inclination angle at reference time in semi-circles. */ + double i0; + + /** Rate of change of inclination angle in semi-circles per second. */ + double iDot; + + /** Argument of perigee in semi-circles. */ + double omega; + + /** Longitude of ascending node of orbit plane at beginning of week in semi-circles. */ + double omega0; + + /** Rate of right ascension in semi-circles per second. */ + double omegaDot; + + /** Mean anomaly at reference time in semi-circles. */ + double m0; + + /** Mean motion difference from computed value in semi-circles per second. */ + double deltaN; + + /** + * Contains second-order harmonic perturbations. + */ + @VintfStability + parcelable SecondOrderHarmonicPerturbation { + /** Amplitude of cosine harmonic correction term to angle of inclination in radians. */ + double cic; + + /** Amplitude of sine harmonic correction term to angle of inclination in radians. */ + double cis; + + /** Amplitude of cosine harmonic correction term to the orbit in meters. */ + double crc; + + /** Amplitude of sine harmonic correction term to the orbit in meters. */ + double crs; + + /** Amplitude of cosine harmonic correction term to the argument of latitude in radians. */ + double cuc; + + /** Amplitude of sine harmonic correction term to the argument of latitude in radians. */ + double cus; + } + + /** Second-order harmonic perturbations. */ + SecondOrderHarmonicPerturbation secondOrderHarmonicPerturbation; +} diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/KlobucharIonosphericModel.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/KlobucharIonosphericModel.aidl new file mode 100644 index 0000000000..e261e97573 --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/KlobucharIonosphericModel.aidl @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2024 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.gnss_assistance; + +/** + * Contains Klobuchar ionospheric model coefficients used by GPS, BDS, QZSS. + * This is defined in IS-GPS-200 20.3.3.5.1.7. + * + * @hide + */ +@VintfStability +parcelable KlobucharIonosphericModel { + /** Alpha0 coefficient in seconds. */ + double alpha0; + + /** Alpha1 coefficient in seconds per semi-circle. */ + double alpha1; + + /** Alpha2 coefficient in seconds per semi-circle squared. */ + double alpha2; + + /** Alpha3 coefficient in seconds per semi-circle cubed. */ + double alpha3; + + /** Beta0 coefficient in seconds. */ + double beta0; + + /** Beta1 coefficient in seconds per semi-circle. */ + double beta1; + + /** Beta2 coefficient in seconds per semi-circle squared. */ + double beta2; + + /** Beta3 coefficient in seconds per semi-circle cubed. */ + double beta3; +} diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/LeapSecondsModel.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/LeapSecondsModel.aidl new file mode 100644 index 0000000000..0ebd46dd78 --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/LeapSecondsModel.aidl @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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.gnss_assistance; + +/** + * Contains the leap seconds set of parameters needed for GNSS time. + * This is defined in RINEX 3.05 "LEAP SECONDS" in table A2. + * + * @hide + */ +@VintfStability +parcelable LeapSecondsModel { + /** Time difference due to leap seconds before the event in seconds. */ + int leapSeconds; + + /** Time difference due to leap seconds after the event in seconds. */ + int leapSecondsFuture; + + /** GNSS week number in which the leap second event will occur. */ + int weekNumberLeapSecondsFuture; + + /** Day number when the next leap second will occur. */ + int dayNumberLeapSecondsFuture; +} diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/QzssAlmanac.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/QzssAlmanac.aidl new file mode 100644 index 0000000000..80ace3908b --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/QzssAlmanac.aidl @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2024 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.gnss_assistance; + +/** + * Contains QZSS almanac data. + * This is defined in IS-QZSS-PNT, section 4.1.2.6. + * + * @hide + */ +@VintfStability +parcelable QzssAlmanac { + /** QZSS week number. */ + int qzssWeekNumber; + + /** QZSS time of week in seconds. */ + int secondsOfQzssWeek; + + /** + * Contains QZSS satellite almanac data. + * This is defined in IS-QZSS-PNT, section 4.1.2.6. + */ + @VintfStability + parcelable QzssSatelliteAlmanac { + /** The PRN number of the QZSS satellite. */ + int prn; + + /** + * Satellite health information. + * This is the 5-bit health code as defined in IS-QZSS-PNT, Table 4.1.2-5-2 + * expressed in integer form. + */ + int svHealth; + + /** Eccentricity. */ + double eccentricity; + + /** + * Correction of inclination angle relative to reference value at + * reference time in semi-circles. + */ + double inclination; + + /** Argument of perigee in semi-circles. */ + double omega; + + /** Longitude of ascending node of orbital plane at weekly epoch in semi-circles. */ + double omega0; + + /** Rate of right ascension in semi-circles per second. */ + double omegaDot; + + /** Square root of semi-major axis in square root of meters. */ + double rootA; + + /** Mean anomaly at reference time in semi-circles. */ + double m0; + + /** Satellite clock time bias correction coefficient in seconds. */ + double af0; + + /** Satellite clock time drift correction coefficient in seconds per second. */ + double af1; + } + + /** Array of QzssSatelliteAlmanac. */ + QzssSatelliteAlmanac[] satelliteAlmanac; +} diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/QzssSatelliteEphemeris.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/QzssSatelliteEphemeris.aidl new file mode 100644 index 0000000000..7efa4d97f0 --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/QzssSatelliteEphemeris.aidl @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2024 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.gnss_assistance; + +import android.hardware.gnss.gnss_assistance.GpsSatelliteEphemeris.GpsL2Params; +import android.hardware.gnss.gnss_assistance.GpsSatelliteEphemeris.GpsSatelliteClockModel; +import android.hardware.gnss.gnss_assistance.GpsSatelliteEphemeris.GpsSatelliteHealth; +import android.hardware.gnss.gnss_assistance.KeplerianOrbitModel; +import android.hardware.gnss.gnss_assistance.SatelliteEphemerisTime; +import android.hardware.gnss.gnss_assistance.TimeOfClock; + +/** + * Contains ephemeris parameters specific to QZSS satellites. + * This is defined in IS-QZSS-PNT, section 4.1.2. + * + * @hide + */ +@VintfStability +parcelable QzssSatelliteEphemeris { + /** Satellite PRN. */ + int prn; + + /** L2 parameters. */ + GpsL2Params gpsL2Params; + + /** Clock model. */ + GpsSatelliteClockModel satelliteClockModel; + + /** Orbit model. */ + KeplerianOrbitModel satelliteOrbitModel; + + /** Satellite health. */ + GpsSatelliteHealth satelliteHealth; + + /** Ephemeris time. */ + SatelliteEphemerisTime satelliteEphemerisTime; +} diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/RealTimeIntegrityModel.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/RealTimeIntegrityModel.aidl new file mode 100644 index 0000000000..4a4122c733 --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/RealTimeIntegrityModel.aidl @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2024 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.gnss_assistance; + +/** + * Contains the real time integrity status of a GNSS satellite based on + * notice advisory. + * + * @hide + */ +@VintfStability +parcelable RealTimeIntegrityModel { + /** + * Pseudo-random or satellite ID number for the satellite, a.k.a. Space Vehicle (SV), or + * OSN number for Glonass. The distinction is made by looking at the constellation field. + * Values must be in the range of: + * + * - GNSS: 1-32 + * - GLONASS: 1-25 + * - QZSS: 183-206 + * - Galileo: 1-36 + * - Beidou: 1-63 + */ + int svid; + + /** Indicates whether the satellite is currently usable for navigation. */ + boolean usable; + + /** UTC timestamp (in seconds) when the advisory was published. */ + long publishDateSeconds; + + /** UTC timestamp (in seconds) for the start of the event. */ + long startDateSeconds; + + /** UTC timestamp (in seconds) for the end of the event. */ + long endDateSeconds; + + /** + * Abbreviated type of the advisory, providing a concise summary of the event. + * This field follows different definitions depending on the GNSS constellation: + * - GPS: See NANU type definitions + * (https://www.navcen.uscg.gov/nanu-abbreviations-and-descriptions) + * - Galileo: See NAGU type definitions + * (https://www.gsc-europa.eu/system-service-status/nagu-information) + * - QZSS: See NAQU type definitions (https://sys.qzss.go.jp/dod/en/naqu/type.html) + * - BeiDou: Not used; set to an empty string. + */ + String advisoryType; + + /** + * Unique identifier for the advisory within its constellation's system. + * For BeiDou, this is not used and should be an empty string. + */ + String advisoryNumber; +} diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/SatelliteEphemerisTime.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/SatelliteEphemerisTime.aidl new file mode 100644 index 0000000000..2d9b3e6249 --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/SatelliteEphemerisTime.aidl @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 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.gnss_assistance; + +/** + * Contains time of ephemeris. + * + * For GPS, this is defined in IS-GPS-200, section 20.3.3.4.1. + * For QZSS, this is defined in IS-QZSS-200, section 4.1.2.4. + * @hide + */ +@VintfStability +parcelable SatelliteEphemerisTime { + /** The issue of ephemeris data. */ + int iode; + + /** The satellite week number. */ + int weekNumber; + + /** The broadcast time of ephemeris in GNSS time of week in seconds. */ + int toeSeconds; +} diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/TimeModel.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/TimeModel.aidl new file mode 100644 index 0000000000..8804f02499 --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/TimeModel.aidl @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 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.gnss_assistance; + +import android.hardware.gnss.GnssConstellationType; + +/* + * Contains the GNSS-GNSS system time offset between the GNSS system time. + * This is defined in RINEX 3.05 "TIME SYSTEM CORR" in table A5. + * + * @hide + */ +@VintfStability +parcelable TimeModel { + /* + * Model represents parameters to convert from current GNSS to GNSS system + * time indicated by toGnss. + */ + GnssConstellationType toGnss; + + /** Bias coefficient of GNSS time scale relative to GNSS time scale in seconds. */ + double a0; + + /** Drift coefficient of GNSS time scale relative to GNSS time scale in seconds per second. */ + double a1; + + /** Reference GNSS time of week in seconds. */ + int timeOfWeek; + + /** Reference GNSS week number. */ + int weekNumber; +} diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/TimeOfClock.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/TimeOfClock.aidl new file mode 100644 index 0000000000..7b9cc9fdb1 --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/TimeOfClock.aidl @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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.gnss_assistance; + +/* + * Contains the reference time of the GNSS clock. + * + * @hide + */ +@VintfStability +parcelable TimeOfClock { + /** Year of the clock. */ + int year; + + /** Month of the clock. */ + int month; + + /** Day of the clock. */ + int day; + + /** Hour of the clock. */ + int hour; + + /** Minute of the clock. */ + int minute; + + /** Second of the clock. */ + int seconds; +} diff --git a/gnss/aidl/android/hardware/gnss/gnss_assistance/UtcModel.aidl b/gnss/aidl/android/hardware/gnss/gnss_assistance/UtcModel.aidl new file mode 100644 index 0000000000..c16a711acf --- /dev/null +++ b/gnss/aidl/android/hardware/gnss/gnss_assistance/UtcModel.aidl @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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.gnss_assistance; + +/** + * Contains parameters to convert from current GNSS time to UTC time. + * This is defined in RINEX 3.05 "TIME SYSTEM CORR" in table A5. + * + * @hide + */ +@VintfStability +parcelable UtcModel { + /** Bias coefficient of GNSS time scale relative to UTC time scale in seconds. */ + double a0; + + /** Drift coefficient of GNSS time scale relative to UTC time scale in seconds per second. */ + double a1; + + /** Reference GNSS time of week in seconds. */ + int timeOfWeek; + + /** Reference GNSS week number. */ + int weekNumber; +} diff --git a/gnss/aidl/default/Android.bp b/gnss/aidl/default/Android.bp index 822e8fc882..efe2953baa 100644 --- a/gnss/aidl/default/Android.bp +++ b/gnss/aidl/default/Android.bp @@ -45,13 +45,14 @@ cc_binary { "android.hardware.gnss.measurement_corrections@1.1", "android.hardware.gnss.measurement_corrections@1.0", "android.hardware.gnss.visibility_control@1.0", - "android.hardware.gnss-V4-ndk", + "android.hardware.gnss-V5-ndk", ], srcs: [ "AGnssRil.cpp", "AGnss.cpp", "Gnss.cpp", "GnssAntennaInfo.cpp", + "GnssAssistanceInterface.cpp", "GnssBatching.cpp", "GnssDebug.cpp", "GnssGeofence.cpp", diff --git a/gnss/aidl/default/Gnss.cpp b/gnss/aidl/default/Gnss.cpp index 94d4d000ac..4978281864 100644 --- a/gnss/aidl/default/Gnss.cpp +++ b/gnss/aidl/default/Gnss.cpp @@ -25,6 +25,7 @@ #include "DeviceFileReader.h" #include "FixLocationParser.h" #include "GnssAntennaInfo.h" +#include "GnssAssistanceInterface.h" #include "GnssBatching.h" #include "GnssConfiguration.h" #include "GnssDebug.h" @@ -390,6 +391,14 @@ ndk::ScopedAStatus Gnss::getExtensionMeasurementCorrections( return ndk::ScopedAStatus::ok(); } +ndk::ScopedAStatus Gnss::getExtensionGnssAssistanceInterface( + std::shared_ptr* iGnssAssistanceInterface) { + ALOGD("Gnss::getExtensionGnssAssistanceInterface"); + + *iGnssAssistanceInterface = SharedRefBase::make(); + return ndk::ScopedAStatus::ok(); +} + void Gnss::setGnssMeasurementEnabled(const bool enabled) { mGnssMeasurementEnabled = enabled; } diff --git a/gnss/aidl/default/Gnss.h b/gnss/aidl/default/Gnss.h index 73085ef591..56fe399798 100644 --- a/gnss/aidl/default/Gnss.h +++ b/gnss/aidl/default/Gnss.h @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -83,6 +84,9 @@ class Gnss : public BnGnss { std::shared_ptr* iMeasurementCorrections) override; + ndk::ScopedAStatus getExtensionGnssAssistanceInterface( + std::shared_ptr* + iGnssAssistanceInterface) override; void reportSvStatus() const; void setGnssMeasurementEnabled(const bool enabled); diff --git a/gnss/aidl/default/GnssAssistanceInterface.cpp b/gnss/aidl/default/GnssAssistanceInterface.cpp new file mode 100644 index 0000000000..2ef334c133 --- /dev/null +++ b/gnss/aidl/default/GnssAssistanceInterface.cpp @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 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. + */ + +#define LOG_TAG "GnssAssistanceInterfaceAidl" + +#include "GnssAssistanceInterface.h" +#include +#include + +namespace aidl::android::hardware::gnss::gnss_assistance { + +std::shared_ptr GnssAssistanceInterface::sCallback = nullptr; + +ndk::ScopedAStatus GnssAssistanceInterface::setCallback( + const std::shared_ptr& callback) { + ALOGD("setCallback"); + std::unique_lock lock(mMutex); + sCallback = callback; + return ndk::ScopedAStatus::ok(); +} + +ndk::ScopedAStatus GnssAssistanceInterface::injectGnssAssistance( + const GnssAssistance& gnssAssistance) { + ALOGD("injectGnssAssistance. %s", gnssAssistance.toString().c_str()); + if (gnssAssistance.gpsAssistance.satelliteEphemeris.size() == 0 && + gnssAssistance.gpsAssistance.satelliteCorrections.size() == 0) { + ALOGE("Empty GnssAssistance"); + return ndk::ScopedAStatus::fromServiceSpecificError(IGnss::ERROR_INVALID_ARGUMENT); + } + return ndk::ScopedAStatus::ok(); +} +} // namespace aidl::android::hardware::gnss::gnss_assistance diff --git a/gnss/aidl/default/GnssAssistanceInterface.h b/gnss/aidl/default/GnssAssistanceInterface.h new file mode 100644 index 0000000000..9d92975f86 --- /dev/null +++ b/gnss/aidl/default/GnssAssistanceInterface.h @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 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. + */ + +#pragma once + +#include + +namespace aidl::android::hardware::gnss::gnss_assistance { + +struct GnssAssistanceInterface : public BnGnssAssistanceInterface { + public: + ndk::ScopedAStatus setCallback( + const std::shared_ptr& callback) override; + ndk::ScopedAStatus injectGnssAssistance(const GnssAssistance& gnssAssistance) override; + + private: + // Guarded by mMutex + static std::shared_ptr sCallback; + + // Synchronization lock for sCallback + mutable std::mutex mMutex; +}; + +} // namespace aidl::android::hardware::gnss::gnss_assistance diff --git a/gnss/aidl/default/gnss-default.xml b/gnss/aidl/default/gnss-default.xml index c01069e4fe..700e240345 100644 --- a/gnss/aidl/default/gnss-default.xml +++ b/gnss/aidl/default/gnss-default.xml @@ -1,7 +1,7 @@ android.hardware.gnss - 4 + 5 IGnss default diff --git a/gnss/aidl/vts/Android.bp b/gnss/aidl/vts/Android.bp index 2bd6f07e95..20cf44f602 100644 --- a/gnss/aidl/vts/Android.bp +++ b/gnss/aidl/vts/Android.bp @@ -52,7 +52,7 @@ cc_test { "libbinder", ], static_libs: [ - "android.hardware.gnss-V4-cpp", + "android.hardware.gnss-V5-cpp", "android.hardware.gnss@common-vts-lib", ], test_suites: [ diff --git a/gnss/aidl/vts/gnss_hal_test_cases.cpp b/gnss/aidl/vts/gnss_hal_test_cases.cpp index e4890a778e..a2e81d1b8d 100644 --- a/gnss/aidl/vts/gnss_hal_test_cases.cpp +++ b/gnss/aidl/vts/gnss_hal_test_cases.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -73,6 +74,8 @@ using android::hardware::gnss::IGnssPsds; using android::hardware::gnss::PsdsType; using android::hardware::gnss::SatellitePvt; using android::hardware::gnss::common::Utils; +using android::hardware::gnss::gnss_assistance::GnssAssistance; +using android::hardware::gnss::gnss_assistance::IGnssAssistanceInterface; using android::hardware::gnss::measurement_corrections::IMeasurementCorrectionsInterface; using android::hardware::gnss::visibility_control::IGnssVisibilityControl; @@ -1877,3 +1880,22 @@ TEST_P(GnssHalTest, TestSvStatusIntervals) { } } } + +/* + * Test GnssAssistanceExtension: + * 1. Gets the GnssAssistanceExtension + * 2. Injects empty GnssAssistance data and verifies that it returns an error. + */ +TEST_P(GnssHalTest, TestGnssAssistanceExtension) { + // Only runs on devices launched in Android 16+ + if (aidl_gnss_hal_->getInterfaceVersion() <= 4) { + return; + } + sp iGnssAssistance; + auto status = aidl_gnss_hal_->getExtensionGnssAssistanceInterface(&iGnssAssistance); + if (status.isOk() && iGnssAssistance != nullptr) { + GnssAssistance gnssAssistance = {}; + status = iGnssAssistance->injectGnssAssistance(gnssAssistance); + ASSERT_FALSE(status.isOk()); + } +} diff --git a/gnss/common/utils/default/Android.bp b/gnss/common/utils/default/Android.bp index 208bc593f3..e8c370a9bb 100644 --- a/gnss/common/utils/default/Android.bp +++ b/gnss/common/utils/default/Android.bp @@ -57,6 +57,6 @@ cc_library_static { "android.hardware.gnss@2.1", "android.hardware.gnss.measurement_corrections@1.1", "android.hardware.gnss.measurement_corrections@1.0", - "android.hardware.gnss-V4-ndk", + "android.hardware.gnss-V5-ndk", ], } diff --git a/gnss/common/utils/vts/Android.bp b/gnss/common/utils/vts/Android.bp index ed5674cf99..b8b048a53d 100644 --- a/gnss/common/utils/vts/Android.bp +++ b/gnss/common/utils/vts/Android.bp @@ -44,7 +44,7 @@ cc_library_static { "android.hardware.gnss@2.1", "android.hardware.gnss.measurement_corrections@1.0", "android.hardware.gnss.measurement_corrections@1.1", - "android.hardware.gnss-V4-cpp", + "android.hardware.gnss-V5-cpp", ], static_libs: [ "libgtest",