GPS Properties
Data types of the parameters in the following table are described as follows:
- A valid double-type parameter value contains 15 or 16 digits. If a value contains more than 16 digits, use the scientific notation. Otherwise, garbled characters are displayed. Due to the type conversion of double-precision floating-point data, some upper-layer applications may encounter precision fluctuations even if the value is within the range.
- A valid float-type parameter value contains 6 or 7 digits. If a value contains more than 7 digits, use the scientific notation. Otherwise, garbled characters are displayed. Due to the type conversion of floating-point data, some upper-layer applications may encounter precision fluctuations even if the value is within the value range.
Configuration Item |
Description |
Type |
Value Range |
Default Value |
Remarks |
|---|---|---|---|---|---|
persist.gps.mock.latitude |
Latitude |
double |
[-90°, 90°] |
30.188433° |
The default value is the latitude of Hangzhou, China. Due to native code restrictions, the longitude and latitude cannot be set to 0 at the same time in the Android 11 environment. |
persist.gps.mock.longitude |
Longitude |
double |
[-180°, 180°] |
120.199818° |
The default value is the longitude of Hangzhou, China. Due to native code restrictions, the longitude and latitude cannot be set to 0 at the same time in the Android 11 environment. |
persist.gps.mock.altitude |
Altitude, in meters |
double |
Unlimited. It can be positive, negative, or 0. |
0 m |
The default value indicates that the current altitude is 0 m. |
persist.gps.mock.speed |
Current moving speed, in meters per second |
float |
[0, 400] m/s |
0 m/s |
The initial value indicates that the device is in the static state. If the speed exceeds 400 m/s, the Android system stops reporting GPS data. |
persist.gps.mock.bearing |
Current steering angle, in degrees |
float |
[0°, 360°) |
0° |
The initial value indicates due north. |
persist.gps.mock.accuracy |
Current positioning precision, in meters |
float |
Greater than or equal to 0 m |
20 m |
The initial value indicates that the positioning precision is ±20 m. |