Commit Graph

88 Commits

Author SHA1 Message Date
Yu-Han Yang
19a32b6270 Add VTS tests for measurementInterval, stopSvStatus, and stopNmea
Bug: 206670536
Test: atest VtsHalGnssTargetTest

Change-Id: Id597c772fbe63789cb394b2aa14faeb755196f64
2022-05-11 20:28:03 +00:00
Yu-Han Yang
f5bd7c054b Add ExcessPathInfo (hardware/interfaces)
Bug: 201253590
Test: atest VtsHalGnssTargetTest
Change-Id: I68562d0332d161d31dbd494254ef404d110066dd
2022-03-14 14:07:11 -07:00
Enrico Granata
976698ddcc Merge changes from topic "presubmit-am-0dab591a2da0487e86ae54ea1577f29a" into sc-v2-dev-plus-aosp am: 747d25206b
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/16989257

Change-Id: I9383e760669fdaaaa754b4db5ee014e12f6531e1
2022-02-24 02:30:20 +00:00
Enrico Granata
081068a809 [automerge] Support vendor GNSS file properties for AAOS virtualization 2p: 9447139c92
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/16989257

Bug: 213489959
Change-Id: I1879b5176020c8dbba93b423462932f3cdf1c388
2022-02-23 17:53:24 +00:00
Enrico Granata
9447139c92 Support vendor GNSS file properties for AAOS virtualization
The Android Automotive trout device uses GNSS HAL for fetching
location data from a live GNSS adapter, not a mock file. We also have
an established naming convention for console port names that is carried
over from the Bluetooth use case.

Add support for a vendor uart port for GNSS in addition to the existing
Cuttlefish debug property, in order to enable trout to establish a
connection to the host GNSS agent

Bug: 213489959
Test: build flash and boot
Change-Id: Id2d2134bb6ea60adef1072295c4f623463bfb010
2022-02-23 10:50:35 -07:00
Yuchen He
f46bb4ac80 Supported synchronized fixed location and measurement from device files
Replace NMEA by one row fixed location data

Test: atest VtsHalGnssTargetTest
Test: launch_cvd -cpus 16 -memory_mb 16192  --start_gnss_proxy --gnss_file_path=/usr/local/google/home/yuchenhe/Downloads/raw.txt --fixed_location_file_path=/google/data/rw/users/yu/yuchenhe/input.txt
Bug: 213225295

Merged-In: Ide7bbb3e81a90414496084691227bd95a2e7af18
Change-Id: Ide7bbb3e81a90414496084691227bd95a2e7af18
2022-02-18 18:05:09 -08:00
Yuchen He
76ff33b72d Add parser to support CSV location data
Bug: 213225295
Test: launch_cvd -cpus 16 -memory_mb 16192  --start_gnss_proxy
--gnss_file_path=/google/data/rw/users/yu/yuchenhe/input.txt (Running blue
dot in Google Maps)

Almost a cherry-pick but changed the data type from AIDL GnssLocation to
the HIDL type, since there are no AIDL GnssLocation Type in SC-V2.

Merged-In: I572315888c2f57ce701e695acb03aa6b28787f31
Change-Id: I572315888c2f57ce701e695acb03aa6b28787f31
2022-02-18 18:05:00 -08:00
Yuchen He
4eb8cf8f6a Read GNSS measurement from device file when available
Test: atest CtsLocationGnssTestCases GtsLocationTestCases on CF
Bug: 190757198
Change-Id: Ic03d56a5df6b99f7b20c5840e7091ead138316b1
Merged-In: Ic03d56a5df6b99f7b20c5840e7091ead138316b1
2022-02-18 18:03:44 -08:00
Yuchen He
6ceb09d60c Add raw measurement parser
Test: manual test (data cross verified with GnssLogger app)
Bug: 190757198

Change-Id: I8d57826c6aa2a9d1a09b4847aadfda8c9160b36f
Merged-In: I8d57826c6aa2a9d1a09b4847aadfda8c9160b36f
2022-02-18 18:03:34 -08:00
George Burgess IV
e7d2bbadca fix potential use-after-frees of stack memory
`devname_value` is a local variable; if `property_get` succeeds, we'll
return a pointer to it. Returning a `std::string` instead sidesteps this
problem.

Bug: 190757198
Test: TreeHugger
Change-Id: If9ca733dd21128706f2a9f62e8460b1286631aa5
Merged-In: If9ca733dd21128706f2a9f62e8460b1286631aa5
2022-02-18 18:03:24 -08:00
Yuchen He
95276a229b Refactor and reuse some read device file logic
Add skeleton on HAL for Gnss raw measurement injection

Bug: 190757198
Test: manual test
Merged-In: I9b58043d5ed321aa71ff4f23031df251ae89c407
Change-Id: I9b58043d5ed321aa71ff4f23031df251ae89c407
2022-02-18 18:03:12 -08:00
Yu-Han Yang
c2fb318471 Change TOC and TOE to long
Change TOC and TOE definition to
1. long
2. time in seconds since GPS epoch, regardless of constellation
3. must not be encoded
4. rename to timeOfClockSeconds and timeOfEphemerisSeconds

Bug: 219575003
Test: on device
Change-Id: Icb75a3397d3bf41c91e2a19bbec8a95a97100a07
(cherry picked from commit f20e55cf46)
2022-02-18 19:49:01 +00:00
Yuchen He
55c22f897e Supported synchronized fixed location and measurement from device files
Replace NMEA by one row fixed location data

Test: atest VtsHalGnssTargetTest
Test: launch_cvd -cpus 16 -memory_mb 16192  --start_gnss_proxy --gnss_file_path=/usr/local/google/home/yuchenhe/Downloads/raw.txt --fixed_location_file_path=/google/data/rw/users/yu/yuchenhe/input.txt
Bug: 213225295

Merged-In: Ide7bbb3e81a90414496084691227bd95a2e7af18
Change-Id: Ide7bbb3e81a90414496084691227bd95a2e7af18
2022-02-16 14:46:33 -08:00
Yuchen He
be47920e9f Add parser to support CSV location data
Bug: 213225295
Test: launch_cvd -cpus 16 -memory_mb 16192  --start_gnss_proxy
--gnss_file_path=/google/data/rw/users/yu/yuchenhe/input.txt (Running blue
dot in Google Maps)

Almost a cherry-pick but changed the data type from AIDL GnssLocation to
the HIDL type, since there are no AIDL GnssLocation Type in SC-V2.

Merged-In: I572315888c2f57ce701e695acb03aa6b28787f31
Change-Id: I572315888c2f57ce701e695acb03aa6b28787f31
2022-02-16 14:46:10 -08:00
Yuchen He
d20063ad90 Merge fix to AOSP: Report default location when location is not available in /dev/gnss0
Change-Id: I3ce672aa1a7a39c256dd1396658859c205b61399
Merged-In: I3ce672aa1a7a39c256dd1396658859c205b61399
Test: atest VtsHalGnssTargetTest
Bug: 197579774
2022-02-15 16:19:12 -08:00
Yuchen He
65569272ad Read GNSS measurement from device file when available
Test: atest CtsLocationGnssTestCases GtsLocationTestCases on CF
Bug: 190757198
Change-Id: Ic03d56a5df6b99f7b20c5840e7091ead138316b1
Merged-In: Ic03d56a5df6b99f7b20c5840e7091ead138316b1
2022-02-15 16:18:34 -08:00
Yuchen He
31493d1dc4 Add raw measurement parser
Test: manual test (data cross verified with GnssLogger app)
Bug: 190757198

Change-Id: I8d57826c6aa2a9d1a09b4847aadfda8c9160b36f
Merged-In: I8d57826c6aa2a9d1a09b4847aadfda8c9160b36f
2022-02-15 16:18:01 -08:00
George Burgess IV
3f467bd10f fix potential use-after-frees of stack memory
`devname_value` is a local variable; if `property_get` succeeds, we'll
return a pointer to it. Returning a `std::string` instead sidesteps this
problem.

Bug: 190757198
Test: TreeHugger
Change-Id: If9ca733dd21128706f2a9f62e8460b1286631aa5
Merged-In: If9ca733dd21128706f2a9f62e8460b1286631aa5
2022-02-15 16:17:22 -08:00
Yuchen He
cb8474d7b6 Refactor and reuse some read device file logic
Add skeleton on HAL for Gnss raw measurement injection

Bug: 190757198
Test: manual test
Merged-In: I9b58043d5ed321aa71ff4f23031df251ae89c407
Change-Id: I9b58043d5ed321aa71ff4f23031df251ae89c407
2022-02-15 16:16:47 -08:00
Yu-Han Yang
4165ed1605 Add GNSS AIDL VTS tests
Copy existing VTS tests from HIDL HALs to AIDL, to make sure AIDL has at
least the same API coverage.

Bug: 216523795
Test: atest VtsHalGnssTargetTest
Change-Id: I0f09ba2b5541e19f28b8689ec93ce6c2ba6798ff
2022-02-09 17:43:11 -08:00
TreeHugger Robot
d1ad199afe Merge "Add ephSource, toc, toe, IODC, IODE to SatellitePvt (hardware/interfaces)" 2022-02-01 22:21:36 +00:00
TreeHugger Robot
5bba2e3aec Merge "Fix ANAPIC review comments (hardware/interfaces)" 2022-01-28 20:31:44 +00:00
Yu-Han Yang
19c2d9b2c4 Add ephSource, toc, toe, IODC, IODE to SatellitePvt
(hardware/interfaces)

Bug: 206670536
Test: atest VtsHalGnssTargetTest
Change-Id: I564e9e0f48d5a22d40f103286d0d7553006be1de
2022-01-27 15:13:54 -08:00
Yu-Han Yang
75934f7a02 Fix ANAPIC review comments (hardware/interfaces)
* Use "GnssAgc[] gnssAgcs = {};" for backwards compatibility
* Add comments on AgnssTypes
* Rename SetIDType -> SetIdType
* Update the comment on NetworkAttributes -> networkHandle
* Remove the “DELETE_” prefix in the GnssAidingData
* Make a parcelable for setPositionMode parameters

Bug: 215566115
Test: atest VtsHalGnssTargetTest
Change-Id: Ifc2de451a43cd1f32267e74dc288a3821b75f0cb
2022-01-26 14:16:20 -08:00
Yuchen He
090f16c0b8 Supported synchronized fixed location and measurement from device files
Replace NMEA by one row fixed location data

Test: atest VtsHalGnssTargetTest
Test: launch_cvd -cpus 16 -memory_mb 16192  --start_gnss_proxy --gnss_file_path=/usr/local/google/home/yuchenhe/Downloads/raw.txt --fixed_location_file_path=/google/data/rw/users/yu/yuchenhe/input.txt
Bug: 213225295

Change-Id: Ide7bbb3e81a90414496084691227bd95a2e7af18
2022-01-20 23:17:16 +00:00
Edwin Tung
bbf7fb9322 Add MeasurementCorrections AIDL HAL (hardware/interfaces)
Bug: 208728105
Test: atest VtsHalGnssTargetTest
Change-Id: I2192670951a517bd229535a083997cc9bab31287
2022-01-19 16:50:58 +08:00
Yuchen He
7ba34d5b53 Merge "Add parser to support CSV location data" 2022-01-14 23:37:04 +00:00
Yu-Han Yang
cbaacea799 Merge "Add GnssAgc to GnssMeasurementsEvent (hardware/interfaces)" 2022-01-14 22:07:59 +00:00
Yuchen He
19a6a6a76c Add parser to support CSV location data
Bug: 213225295
Test: launch_cvd -cpus 16 -memory_mb 16192  --start_gnss_proxy
--gnss_file_path=/google/data/rw/users/yu/yuchenhe/input.txt (Running blue
dot in Google Maps)

Change-Id: I572315888c2f57ce701e695acb03aa6b28787f31
2022-01-13 22:19:00 +00:00
Yuchen He
42b2d0a65f Support the location injection in AIDL HAL
Bug: 213225295
Test: atest VtsHalGnssTargetTest
Change-Id: Iff9fca55722af9bad6cc50f0170e4e1a069d05d6
2022-01-13 01:54:48 +00:00
Yu-Han Yang
406cb76efe Add GnssAgc to GnssMeasurementsEvent (hardware/interfaces)
Bug: 206670536
Test: atest VtsHalGnssTargetTest
Change-Id: I024c503f05c17d769e0833090ca555dc2a6f3ece
2022-01-06 15:07:40 -08:00
Yu-Han Yang
1afbd5f23e Add navigation methods to IGnss AIDL HAL (hardware/interfaces)
Bug: 205185251
Test: atest VtsHalGnssTargetTest
Change-Id: Ib412aeb0b302952d13e236554f00690206b98253
2022-01-05 10:20:15 -08:00
Yu-Han Yang
10cf736cef Add GnssNavigationMessage AIDL HAL (hardware/interfaces)
Bug: 201253590
Test: atest VtsHalGnssTargetTest
Change-Id: I3a12b69c2d03293d07c977eefdc6995323cb802b
2021-11-24 11:14:21 -08:00
Yu-Han Yang
3a75dc0cf0 Add GnssBatching AIDL HAL (hardware/interfaces)
Bug: 201253590
Test: atest VtsHalGnssTargetTest
Change-Id: Ied71c609dff714de06e2792f51d54a2dbddbb9d8
2021-09-28 18:31:40 -07:00
Yuchen He
3cbf5f3291 Read GNSS measurement from device file when available
Test: atest CtsLocationGnssTestCases GtsLocationTestCases on CF
Bug: 190757198
Change-Id: Ic03d56a5df6b99f7b20c5840e7091ead138316b1
2021-09-09 04:47:11 +00:00
Yuchen He
1c9032daed Add raw measurement parser
Test: manual test (data cross verified with GnssLogger app)
Bug: 190757198

Change-Id: I8d57826c6aa2a9d1a09b4847aadfda8c9160b36f
2021-09-09 04:47:03 +00:00
TreeHugger Robot
53d4a1acb3 Merge "Implement deleteAidingData and simulate TTFF" 2021-08-27 16:20:47 +00:00
Yu-Han Yang
ef24c7a10d Implement deleteAidingData and simulate TTFF
Bug: 197671205
Test: atest GnssLocationRateChangeTest
Test: atest GnssMeasurementWhenNoLocationTest
Change-Id: I9b6a196a1acc24ecb30b0706b4eceba08dad90e9
2021-08-26 16:13:41 -07:00
Yuchen He
1c2eaeae77 Report default location when location is not available in /dev/gnss0
Test: atest VtsHalGnssTargetTest
Bug: 197579774
Bug: 197825053
Change-Id: I08e761d6023df2954d8a265b4af3e5b5d0aec09c
(cherry picked from commit 1aac7fa45c)
2021-08-26 16:45:13 +00:00
Yuchen He
1aac7fa45c Report default location when location is not available in /dev/gnss0
Test: atest VtsHalGnssTargetTest
Bug: 197579774

Change-Id: I08e761d6023df2954d8a265b4af3e5b5d0aec09c
2021-08-24 07:45:25 +00:00
TreeHugger Robot
cef59faf54 Merge "Allow negative value for CorrelationVector#samplingStartM" into sc-dev am: 97f4447645 am: 3dceda3c65
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15515071

Change-Id: If5d34568a2bc85948da5590d6608fb94070dce8f
2021-08-12 07:53:47 +00:00
TreeHugger Robot
15b960f17d Merge "Allow negative value for CorrelationVector#samplingStartM" into sc-dev am: 97f4447645
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15515071

Change-Id: Ib16dec6302d62fc49517975e7efee26b3c5a2405
2021-08-12 07:30:57 +00:00
Yuchen He
3b68169c6b Update initial mock data to fix CTS/GTS
Test result: http://ab/I58400009976737381

Bug: 190757198
Test: atest
com.google.android.location.gts.gnss.GnssMeasurementValuesTest#testListenForGnssMeasurements android.location.cts.gnss.GnssMeasurementValuesTest#testListenForGnssMeasurements
on raw measurement data injected cuttlefish

Change-Id: I32be5399129b05fa408ee6a9aa3e218cd588de3a
2021-08-10 23:00:00 +00:00
Shinru Han
37f63ed771 Allow negative value for CorrelationVector#samplingStartM
Bug: 195934893
Test: on cuttlefish
Change-Id: Ief1514c8d8e48c9c3f13b93c3d2c355a508a84a7
2021-08-10 18:25:30 +08:00
Jiyong Park
d55d28a1d0 Remove ndk_platform backend. Use the ndk backend.
The ndk_platform backend will soon be deprecated because the ndk backend
can serve the same purpose. This is to eliminate the confusion about
having two variants (ndk and ndk_platform) for the same ndk backend.

Bug: 161456198
Test: m
Merged-In: I0652f1efe920111d79dd8c2ecd52e55dda54538f
Change-Id: Ib58c9f1cb80d083a3c62d03415610be855b80f03
(cherry picked from commit c426c6dbdc)
2021-08-09 11:20:04 +09:00
Jiyong Park
c426c6dbdc Remove ndk_platform backend. Use the ndk backend.
The ndk_platform backend will soon be deprecated because the ndk backend
can serve the same purpose. This is to eliminate the confusion about
having two variants (ndk and ndk_platform) for the same ndk backend.

Bug: 161456198
Test: m
Change-Id: I0652f1efe920111d79dd8c2ecd52e55dda54538f
2021-08-04 12:48:07 +09:00
Yu-Han Yang
eefdd9f657 Merge "Report GnssStatusValue when GNSS start/stop" into sc-dev am: 63133733c1 am: 76cd6fa648
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15342527

Change-Id: I43dc328298012611cacf201eac9e78b062da374d
2021-07-24 01:28:23 +00:00
Yu-Han Yang
703ac9601c Report GnssStatusValue when GNSS start/stop
Also add carrier frequencies to the mock GnssStatus and GnssAntennaInfo

Bug: 194117673
Test: atest GnssStatusTest
Change-Id: Ib22aefe8e4dc8389a933e9009e36872287546c7b
2021-07-20 18:22:41 -07:00
George Burgess IV
f2493a3c3a fix potential use-after-frees of stack memory
`devname_value` is a local variable; if `property_get` succeeds, we'll
return a pointer to it. Returning a `std::string` instead sidesteps this
problem.

Bug: 190757198
Test: TreeHugger
Change-Id: If9ca733dd21128706f2a9f62e8460b1286631aa5
2021-07-07 09:59:32 -07:00
Yuchen He
14a3018371 Refactor and reuse some read device file logic
Add skeleton on HAL for Gnss raw measurement injection

Bug: 190757198
Test: manual test
Change-Id: I9b58043d5ed321aa71ff4f23031df251ae89c407
2021-06-16 17:28:36 -07:00