2016-10-14 06:09:22 +02:00
|
|
|
package android.hardware.gnss@1.0;
|
|
|
|
|
2017-03-29 01:19:16 +02:00
|
|
|
/** Extended interface for DEBUG support. */
|
2016-10-14 06:09:22 +02:00
|
|
|
interface IGnssDebug {
|
2016-11-02 18:20:07 +01:00
|
|
|
enum SatelliteEphemerisType : uint8_t {
|
2017-03-29 19:11:59 +02:00
|
|
|
/** Ephemeris is known for this satellite. */
|
|
|
|
EPHEMERIS,
|
|
|
|
/**
|
|
|
|
* Ephemeris is not known, but Almanac (approximate location) is known.
|
|
|
|
*/
|
2016-10-14 06:09:22 +02:00
|
|
|
ALMANAC_ONLY,
|
2017-03-29 19:11:59 +02:00
|
|
|
/**
|
|
|
|
* Both ephemeris & almanac are not known (e.g. during a cold start
|
|
|
|
* blind search.)
|
|
|
|
*/
|
|
|
|
NOT_AVAILABLE
|
|
|
|
};
|
|
|
|
|
|
|
|
enum SatelliteEphemerisSource : uint8_t {
|
|
|
|
/**
|
|
|
|
* The ephemeris (or almanac only) information was demodulated from the
|
|
|
|
* signal received on the device
|
|
|
|
*/
|
2016-10-14 06:09:22 +02:00
|
|
|
DEMODULATED,
|
2017-03-29 19:11:59 +02:00
|
|
|
/**
|
|
|
|
* The ephemeris (or almanac only) information was received from a SUPL
|
|
|
|
* server.
|
|
|
|
*/
|
2016-10-14 06:09:22 +02:00
|
|
|
SUPL_PROVIDED,
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2017-03-29 19:11:59 +02:00
|
|
|
* The ephemeris (or almanac only) information was provided by another
|
|
|
|
* server.
|
2016-10-14 06:09:22 +02:00
|
|
|
*/
|
2017-03-29 19:11:59 +02:00
|
|
|
OTHER_SERVER_PROVIDED,
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2017-03-29 19:11:59 +02:00
|
|
|
* The ephemeris (or almanac only) information was provided by another
|
|
|
|
* method, e.g. injected via a local debug tool, from build defaults
|
|
|
|
* (e.g. almanac), or is from a satellite
|
|
|
|
* with SatelliteEphemerisType::NOT_AVAILABLE.
|
2016-10-14 06:09:22 +02:00
|
|
|
*/
|
2017-03-29 19:11:59 +02:00
|
|
|
OTHER
|
|
|
|
};
|
|
|
|
|
|
|
|
enum SatelliteEphemerisHealth : uint8_t {
|
|
|
|
/** The ephemeris is known good. */
|
|
|
|
GOOD,
|
|
|
|
/** The ephemeris is known bad. */
|
|
|
|
BAD,
|
|
|
|
/** The ephemeris is unknown to be good or bad. */
|
|
|
|
UNKNOWN
|
2016-10-14 06:09:22 +02:00
|
|
|
};
|
|
|
|
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2016-10-14 06:09:22 +02:00
|
|
|
* Provides the current best known position from any
|
|
|
|
* source (GNSS or injected assistance).
|
|
|
|
*/
|
|
|
|
struct PositionDebug {
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2016-10-14 06:09:22 +02:00
|
|
|
* Validity of the data in this struct. False only if no
|
|
|
|
* latitude/longitude information is known.
|
2016-11-02 18:20:07 +01:00
|
|
|
*/
|
2016-10-14 06:09:22 +02:00
|
|
|
bool valid;
|
2017-03-29 01:19:16 +02:00
|
|
|
/** Latitude expressed in degrees */
|
2016-10-14 06:09:22 +02:00
|
|
|
double latitudeDegrees;
|
2017-03-29 01:19:16 +02:00
|
|
|
/** Longitude expressed in degrees */
|
2016-10-14 06:09:22 +02:00
|
|
|
double longitudeDegrees;
|
2017-03-29 01:19:16 +02:00
|
|
|
/** Altitude above ellipsoid expressed in meters */
|
2016-11-02 18:20:07 +01:00
|
|
|
float altitudeMeters;
|
2017-03-29 19:11:59 +02:00
|
|
|
/** Represents horizontal speed in meters per second. */
|
2017-01-11 23:04:21 +01:00
|
|
|
float speedMetersPerSec;
|
2017-03-29 01:19:16 +02:00
|
|
|
/** Represents heading in degrees. */
|
2017-01-11 23:04:21 +01:00
|
|
|
float bearingDegrees;
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2017-03-29 19:11:59 +02:00
|
|
|
* Estimated horizontal accuracy of position expressed in meters, radial,
|
2016-10-14 06:09:22 +02:00
|
|
|
* 68% confidence.
|
|
|
|
*/
|
2017-01-11 23:04:21 +01:00
|
|
|
double horizontalAccuracyMeters;
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2017-03-29 19:11:59 +02:00
|
|
|
* Estimated vertical accuracy of position expressed in meters, with
|
2017-01-11 23:04:21 +01:00
|
|
|
* 68% confidence.
|
|
|
|
*/
|
|
|
|
double verticalAccuracyMeters;
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2017-03-29 19:11:59 +02:00
|
|
|
* Estimated speed accuracy in meters per second with 68% confidence.
|
2017-01-11 23:04:21 +01:00
|
|
|
*/
|
|
|
|
double speedAccuracyMetersPerSecond;
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2017-01-11 23:04:21 +01:00
|
|
|
* estimated bearing accuracy degrees with 68% confidence.
|
|
|
|
*/
|
|
|
|
double bearingAccuracyDegrees;
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2016-10-14 06:09:22 +02:00
|
|
|
* Time duration before this report that this position information was
|
2017-03-29 19:11:59 +02:00
|
|
|
* valid. This can, for example, be a previous injected location with
|
|
|
|
* an age potentially thousands of seconds old, or
|
|
|
|
* extrapolated to the current time (with appropriately increased
|
|
|
|
* accuracy estimates), with a (near) zero age.
|
2016-10-14 06:09:22 +02:00
|
|
|
*/
|
|
|
|
float ageSeconds;
|
|
|
|
};
|
|
|
|
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2016-10-14 06:09:22 +02:00
|
|
|
* Provides the current best known UTC time estimate.
|
2017-03-29 19:11:59 +02:00
|
|
|
* If no fresh information is available, e.g. after a delete all,
|
|
|
|
* then whatever the effective defaults are on the device must be
|
|
|
|
* provided (e.g. Jan. 1, 2017, with an uncertainty of 5 years) expressed
|
|
|
|
* in the specified units.
|
2016-10-14 06:09:22 +02:00
|
|
|
*/
|
|
|
|
struct TimeDebug {
|
2017-03-29 19:11:59 +02:00
|
|
|
/** UTC time estimate. */
|
2016-10-14 06:09:22 +02:00
|
|
|
GnssUtcTime timeEstimate;
|
2017-03-29 01:19:16 +02:00
|
|
|
/** 68% error estimate in time. */
|
2016-10-14 06:09:22 +02:00
|
|
|
float timeUncertaintyNs;
|
2017-03-29 19:11:59 +02:00
|
|
|
/**
|
|
|
|
* 68% error estimate in local clock drift,
|
|
|
|
* in nanoseconds per second (also known as parts per billion - ppb.)
|
|
|
|
*/
|
|
|
|
float frequencyUncertaintyNsPerSec;
|
2016-10-14 06:09:22 +02:00
|
|
|
};
|
|
|
|
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2016-10-14 06:09:22 +02:00
|
|
|
* Provides a single satellite info that has decoded navigation data.
|
|
|
|
*/
|
|
|
|
struct SatelliteData {
|
2017-03-29 01:19:16 +02:00
|
|
|
/** Satellite vehicle ID number */
|
2016-10-14 06:09:22 +02:00
|
|
|
int16_t svid;
|
2017-03-29 01:19:16 +02:00
|
|
|
/** Defines the constellation type of the given SV. */
|
2016-10-14 06:09:22 +02:00
|
|
|
GnssConstellationType constellation;
|
2017-03-29 19:11:59 +02:00
|
|
|
|
2017-03-29 01:19:16 +02:00
|
|
|
/** Defines the ephemeris type of the satellite. */
|
2016-10-14 06:09:22 +02:00
|
|
|
SatelliteEphemerisType ephemerisType;
|
2017-03-29 19:11:59 +02:00
|
|
|
/** Defines the ephemeris source of the satellite. */
|
|
|
|
SatelliteEphemerisSource ephemerisSource;
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2017-03-29 19:11:59 +02:00
|
|
|
* Defines whether the satellite is known healthy
|
|
|
|
* (safe for use in location calculation.)
|
|
|
|
*/
|
|
|
|
SatelliteEphemerisHealth ephemerisHealth;
|
|
|
|
/**
|
|
|
|
* Time duration from this report (current time), minus the
|
|
|
|
* effective time of the ephemeris source (e.g. TOE, TOA.)
|
|
|
|
* Set to 0 when ephemerisType is NOT_AVAILABLE.
|
2016-10-14 06:09:22 +02:00
|
|
|
*/
|
|
|
|
float ephemerisAgeSeconds;
|
2017-03-29 19:11:59 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* True if a server has provided a predicted orbit (& clock) for
|
|
|
|
* this satellite.
|
|
|
|
*/
|
|
|
|
bool serverPredictionIsAvailable;
|
|
|
|
/**
|
|
|
|
* Time duration from this report (current time) minus the time of the
|
|
|
|
* start of the server predicted information. For example, a 1 day
|
|
|
|
* old prediction would be reported as 86400 seconds here.
|
|
|
|
*/
|
|
|
|
float serverPredictionAgeSeconds;
|
2016-10-14 06:09:22 +02:00
|
|
|
};
|
|
|
|
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2016-10-14 06:09:22 +02:00
|
|
|
* Provides a set of debug information that is filled by the GNSS chipset
|
|
|
|
* when the method getDebugData() is invoked.
|
|
|
|
*/
|
|
|
|
struct DebugData {
|
2017-03-29 01:19:16 +02:00
|
|
|
/** Current best known position. */
|
2016-10-14 06:09:22 +02:00
|
|
|
PositionDebug position;
|
2017-03-29 01:19:16 +02:00
|
|
|
/** Current best know time estimate */
|
2016-10-14 06:09:22 +02:00
|
|
|
TimeDebug time;
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2017-03-29 19:11:59 +02:00
|
|
|
* Provides a list of the available satellite data, for all
|
|
|
|
* satellites and constellations the device can track,
|
2016-10-14 06:09:22 +02:00
|
|
|
* including GnssConstellationType UNKNOWN.
|
|
|
|
*/
|
|
|
|
vec<SatelliteData> satelliteDataArray;
|
|
|
|
};
|
|
|
|
|
2017-03-29 01:19:16 +02:00
|
|
|
/**
|
2016-10-14 06:09:22 +02:00
|
|
|
* This methods requests position, time and satellite ephemeris debug information
|
|
|
|
* from the HAL.
|
|
|
|
*
|
|
|
|
* @return ret debugData information from GNSS Hal that contains the current best
|
|
|
|
* known position, best known time estimate and a complete list of
|
|
|
|
* constellations that the device can track.
|
|
|
|
*/
|
|
|
|
getDebugData() generates (DebugData debugData);
|
|
|
|
};
|