summaryrefslogtreecommitdiffstats
path: root/gps/libloc_api_50001/loc_eng_msg.h
diff options
context:
space:
mode:
Diffstat (limited to 'gps/libloc_api_50001/loc_eng_msg.h')
-rwxr-xr-x[-rw-r--r--]gps/libloc_api_50001/loc_eng_msg.h59
1 files changed, 51 insertions, 8 deletions
diff --git a/gps/libloc_api_50001/loc_eng_msg.h b/gps/libloc_api_50001/loc_eng_msg.h
index d1f4011..0728653 100644..100755
--- a/gps/libloc_api_50001/loc_eng_msg.h
+++ b/gps/libloc_api_50001/loc_eng_msg.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011,2012 Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -9,7 +9,7 @@
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
- * * Neither the name of Code Aurora Forum, Inc. nor the names of its
+ * * Neither the name of The Linux Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
@@ -98,6 +98,35 @@ struct LocPosMode
}
};
+/** Flags to indicate which values are valid in a GpsLocationExtended. */
+typedef uint16_t GpsLocationExtendedFlags;
+/** GpsLocationExtended has valid pdop, hdop, vdop. */
+#define GPS_LOCATION_EXTENDED_HAS_DOP 0x0001
+/** GpsLocationExtended has valid altitude mean sea level. */
+#define GPS_LOCATION_EXTENDED_HAS_ALTITUDE_MEAN_SEA_LEVEL 0x0002
+/** GpsLocation has valid magnetic deviation. */
+#define GPS_LOCATION_EXTENDED_HAS_MAG_DEV 0x0004
+/** GpsLocation has valid mode indicator. */
+#define GPS_LOCATION_EXTENDED_HAS_MODE_IND 0x0008
+
+/** Represents gps location extended. */
+typedef struct {
+ /** set to sizeof(GpsLocationExtended) */
+ size_t size;
+ /** Contains GpsLocationExtendedFlags bits. */
+ uint16_t flags;
+ /** Contains the Altitude wrt mean sea level */
+ float altitudeMeanSeaLevel;
+ /** Contains Position Dilusion of Precision. */
+ float pdop;
+ /** Contains Horizontal Dilusion of Precision. */
+ float hdop;
+ /** Contains Vertical Dilusion of Precision. */
+ float vdop;
+ /** Contains Magnetic Deviation. */
+ float magneticDeviation;
+} GpsLocationExtended;
+
typedef enum {
LOC_ENG_IF_REQUEST_TYPE_SUPL = 0,
LOC_ENG_IF_REQUEST_TYPE_WIFI,
@@ -107,6 +136,7 @@ typedef enum {
typedef enum {
LOC_ENG_IF_REQUEST_SENDER_ID_QUIPC = 0,
LOC_ENG_IF_REQUEST_SENDER_ID_MSAPM,
+ LOC_ENG_IF_REQUEST_SENDER_ID_MSAPU,
LOC_ENG_IF_REQUEST_SENDER_ID_GPSONE_DAEMON,
LOC_ENG_IF_REQUEST_SENDER_ID_MODEM,
LOC_ENG_IF_REQUEST_SENDER_ID_UNKNOWN
@@ -317,25 +347,38 @@ struct loc_eng_msg_delete_aiding_data : public loc_eng_msg {
struct loc_eng_msg_report_position : public loc_eng_msg {
const GpsLocation location;
+ const GpsLocationExtended locationExtended;
const void* locationExt;
const enum loc_sess_status status;
- inline loc_eng_msg_report_position(void* instance, GpsLocation &loc, void* locExt,
+ const LocPosTechMask technology_mask;
+ inline loc_eng_msg_report_position(void* instance, GpsLocation &loc, GpsLocationExtended &locExtended, void* locExt,
enum loc_sess_status st) :
loc_eng_msg(instance, LOC_ENG_MSG_REPORT_POSITION),
- location(loc), locationExt(locExt), status(st)
+ location(loc), locationExtended(locExtended), locationExt(locExt), status(st), technology_mask(LOC_POS_TECH_MASK_DEFAULT)
+ {
+ LOC_LOGV("flags: %d\n source: %d\n latitude: %f\n longitude: %f\n altitude: %f\n speed: %f\n bearing: %f\n accuracy: %f\n timestamp: %lld\n rawDataSize: %d\n rawData: %p\n Session status: %d\n Technology mask: %u",
+ location.flags, location.position_source, location.latitude, location.longitude,
+ location.altitude, location.speed, location.bearing, location.accuracy,
+ location.timestamp, location.rawDataSize, location.rawData,status,technology_mask);
+ }
+ inline loc_eng_msg_report_position(void* instance, GpsLocation &loc, GpsLocationExtended &locExtended, void* locExt,
+ enum loc_sess_status st, LocPosTechMask technology) :
+ loc_eng_msg(instance, LOC_ENG_MSG_REPORT_POSITION),
+ location(loc), locationExtended(locExtended), locationExt(locExt), status(st), technology_mask(technology)
{
- LOC_LOGV("flags: %d\n source: %d\n latitude: %f\n longitude: %f\n altitude: %f\n speed: %f\n bearing: %f\n accuracy: %f\n timestamp: %lld\n rawDataSize: %d\n rawData: %p\n Session status: %d",
+ LOC_LOGV("flags: %d\n source: %d\n latitude: %f\n longitude: %f\n altitude: %f\n speed: %f\n bearing: %f\n accuracy: %f\n timestamp: %lld\n rawDataSize: %d\n rawData: %p\n Session status: %d\n Technology mask: %u",
location.flags, location.position_source, location.latitude, location.longitude,
location.altitude, location.speed, location.bearing, location.accuracy,
- location.timestamp, location.rawDataSize, location.rawData,status);
+ location.timestamp, location.rawDataSize, location.rawData,status,technology_mask);
}
};
struct loc_eng_msg_report_sv : public loc_eng_msg {
const GpsSvStatus svStatus;
+ const GpsLocationExtended locationExtended;
const void* svExt;
- inline loc_eng_msg_report_sv(void* instance, GpsSvStatus &sv, void* ext) :
- loc_eng_msg(instance, LOC_ENG_MSG_REPORT_SV), svStatus(sv), svExt(ext)
+ inline loc_eng_msg_report_sv(void* instance, GpsSvStatus &sv, GpsLocationExtended &locExtended, void* ext) :
+ loc_eng_msg(instance, LOC_ENG_MSG_REPORT_SV), svStatus(sv), locationExtended(locExtended), svExt(ext)
{
LOC_LOGV("num sv: %d\n ephemeris mask: %dxn almanac mask: %x\n used in fix mask: %x\n sv: prn snr elevation azimuth",
svStatus.num_svs, svStatus.ephemeris_mask, svStatus.almanac_mask, svStatus.used_in_fix_mask);