1 /* 2 * Copyright (C) 2023 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 // This file contains backported system property definitions and backported enums. 18 19 #pragma once 20 21 namespace android { 22 namespace hardware { 23 namespace automotive { 24 namespace vehicle { 25 namespace V2_0 { 26 namespace backportedproperty { 27 28 /** 29 * Characterization of inputs used for computing location. 30 * 31 * This property must indicate what (if any) data and sensor inputs are considered by the system 32 * when computing the vehicle's location that is shared with Android through the GNSS HAL. 33 * 34 * The value must return a collection of bit flags. The bit flags are defined in 35 * LocationCharacterization. The value must also include exactly one of DEAD_RECKONED or 36 * RAW_GNSS_ONLY among its collection of bit flags. 37 * 38 * When this property is not supported, it is assumed that no additional sensor inputs are fused 39 * into the GNSS updates provided through the GNSS HAL. That is unless otherwise specified 40 * through the GNSS HAL interfaces. 41 * 42 * @change_mode VehiclePropertyChangeMode.STATIC 43 * @access VehiclePropertyAccess.READ 44 */ 45 constexpr int32_t LOCATION_CHARACTERIZATION = 0x31400C10; 46 47 /** 48 * Used by LOCATION_CHARACTERIZATION to enumerate the supported bit flags. 49 * 50 * These flags are used to indicate to what transformations are performed on the 51 * GNSS data before the location data is sent, so that location processing 52 * algorithms can take into account prior fusion. 53 * 54 * This enum can be extended in future releases to include additional bit flags. 55 */ 56 enum class LocationCharacterization : int32_t { 57 /** 58 * Prior location samples have been used to refine the raw GNSS data (e.g. a 59 * Kalman Filter). 60 */ 61 PRIOR_LOCATIONS = 0x1, 62 /** 63 * Gyroscope data has been used to refine the raw GNSS data. 64 */ 65 GYROSCOPE_FUSION = 0x2, 66 /** 67 * Accelerometer data has been used to refine the raw GNSS data. 68 */ 69 ACCELEROMETER_FUSION = 0x4, 70 /** 71 * Compass data has been used to refine the raw GNSS data. 72 */ 73 COMPASS_FUSION = 0x8, 74 /** 75 * Wheel speed has been used to refine the raw GNSS data. 76 */ 77 WHEEL_SPEED_FUSION = 0x10, 78 /** 79 * Steering angle has been used to refine the raw GNSS data. 80 */ 81 STEERING_ANGLE_FUSION = 0x20, 82 /** 83 * Car speed has been used to refine the raw GNSS data. 84 */ 85 CAR_SPEED_FUSION = 0x40, 86 /** 87 * Some effort is made to dead-reckon location. In particular, this means that 88 * relative changes in location have meaning when no GNSS satellite is 89 * available. 90 */ 91 DEAD_RECKONED = 0x80, 92 /** 93 * Location is based on GNSS satellite signals without sufficient fusion of 94 * other sensors for complete dead reckoning. This flag should be set when 95 * relative changes to location cannot be relied on when no GNSS satellite is 96 * available. 97 */ 98 RAW_GNSS_ONLY = 0x100, 99 }; 100 101 } // namespace backportedproperty 102 } // namespace V2_0 103 } // namespace vehicle 104 } // namespace automotive 105 } // namespace hardware 106 } // namespace android 107