blob: 8784d1afb5b4243602cfa31163eb1b587c1b315d [file] [log] [blame]
Hridya Valsaraju49526a72016-10-13 21:09:22 -07001package android.hardware.gnss@1.0;
2
3/* Extended interface for DEBUG support. */
4interface IGnssDebug {
Hridya Valsaraju97ecaa02016-11-02 10:20:07 -07005 enum SatelliteEphemerisType : uint8_t {
Hridya Valsaraju49526a72016-10-13 21:09:22 -07006 /* no information is known to the gnss hardware, about this satellite */
7 UNKNOWN,
8 /* this satellite is known to exist */
9 KNOWN,
10 /* this satellite is not known to exist */
11 NONEXISTENT,
12 /* Only Almanac (approximate) location known for this satellite */
13 ALMANAC_ONLY,
14 /* Ephemeris is known from demodulating the signal on device */
15 DEMODULATED,
16 /* Ephemeris has been provided by SUPL */
17 SUPL_PROVIDED,
18 /* Ephemeris has been provided by another server */
19 OTHER_SERVER_PROVIDED,
20 /*
21 * Predicted ephemeris has been provided by a server
22 * (e.g. Xtra, Extended Ephemeris, etc...)
23 */
24 SERVER_PREDICTED,
25 /*
26 * Predicted ephemeris in use, generated locally on the device (e.g. from prior
27 * ephemeris)
28 */
29 LOCALLY_PREDICTED
30 };
31
32 /*
33 * Provides the current best known position from any
34 * source (GNSS or injected assistance).
35 */
36 struct PositionDebug {
37 /*
38 * Validity of the data in this struct. False only if no
39 * latitude/longitude information is known.
Hridya Valsaraju97ecaa02016-11-02 10:20:07 -070040 */
Hridya Valsaraju49526a72016-10-13 21:09:22 -070041 bool valid;
42 /* Latitude expressed in degrees */
43 double latitudeDegrees;
44 /* Longitude expressed in degrees */
45 double longitudeDegrees;
46 /* Altitude above ellipsoid expressed in meters */
Hridya Valsaraju97ecaa02016-11-02 10:20:07 -070047 float altitudeMeters;
gomoc3d92782017-01-11 14:04:21 -080048 /* Represents speed in meters per second. */
49 float speedMetersPerSec;
50 /* Represents heading in degrees. */
51 float bearingDegrees;
Hridya Valsaraju49526a72016-10-13 21:09:22 -070052 /*
53 * estimated horizontal accuracy of position expressed in meters, radial,
54 * 68% confidence.
55 */
gomoc3d92782017-01-11 14:04:21 -080056 double horizontalAccuracyMeters;
57 /*
58 * estimated vertical accuracy of position expressed in meters, with
59 * 68% confidence.
60 */
61 double verticalAccuracyMeters;
62 /*
63 * estimated speed accuracy in meters per second with 68% confidence.
64 */
65 double speedAccuracyMetersPerSecond;
66 /*
67 * estimated bearing accuracy degrees with 68% confidence.
68 */
69 double bearingAccuracyDegrees;
Hridya Valsaraju49526a72016-10-13 21:09:22 -070070 /*
71 * Time duration before this report that this position information was
72 * valid.
73 */
74 float ageSeconds;
75 };
76
77 /*
78 * Provides the current best known UTC time estimate.
79 */
80 struct TimeDebug {
81 /*
82 * Validity of the data in the struct.
83 * False if current time is unknown.
84 */
85 bool valid;
86 /*
87 * UTC time estimate.
88 */
89 GnssUtcTime timeEstimate;
90 /* 68% error estimate in time. */
91 float timeUncertaintyNs;
92 };
93
94 /*
95 * Provides a single satellite info that has decoded navigation data.
96 */
97 struct SatelliteData {
98 /* Satellite vehicle ID number */
99 int16_t svid;
100 /* Defines the constellation type of the given SV. */
101 GnssConstellationType constellation;
102 /* Defines the ephemeris type of the satellite. */
103 SatelliteEphemerisType ephemerisType;
104 /*
105 * Time duration before this report, that the ephemeris source was last
106 * updated, e.g. latest demodulation, or latest server download.
107 * Set to 0 when ephemerisType is UNKNOWN.
108 */
109 float ephemerisAgeSeconds;
110 };
111
112 /*
113 * Provides a set of debug information that is filled by the GNSS chipset
114 * when the method getDebugData() is invoked.
115 */
116 struct DebugData {
117 /* Current best known position. */
118 PositionDebug position;
119 /* Current best know time estimate */
120 TimeDebug time;
121 /*
122 * Provides a list of the decoded satellite ephemeris.
gomoc3d92782017-01-11 14:04:21 -0800123 * Must provide a complete list for all constellations device can track,
Hridya Valsaraju49526a72016-10-13 21:09:22 -0700124 * including GnssConstellationType UNKNOWN.
125 */
126 vec<SatelliteData> satelliteDataArray;
127
128 };
129
130 /*
131 * This methods requests position, time and satellite ephemeris debug information
132 * from the HAL.
133 *
134 * @return ret debugData information from GNSS Hal that contains the current best
135 * known position, best known time estimate and a complete list of
136 * constellations that the device can track.
137 */
138 getDebugData() generates (DebugData debugData);
139};