summaryrefslogtreecommitdiff
path: root/gnss/GnssAdapter.h
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-07-03 16:04:21 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-07-03 16:04:21 -0700
commit5b00f53189d74c5f85e39174a9dec9e2c9adfbf8 (patch)
treeaeb56c94e4e78c34a2bd2262ffeee25f5e755f3b /gnss/GnssAdapter.h
parent889d1eed233d4875e7b265eaa81d589e922f17be (diff)
parent56c4dd442074bad94c2ef1483ecfc328703f8557 (diff)
downloadgps-5b00f53189d74c5f85e39174a9dec9e2c9adfbf8.tar.gz
Merge "GPS: block CPI injection for those fixes orginate from modem"
Diffstat (limited to 'gnss/GnssAdapter.h')
-rw-r--r--gnss/GnssAdapter.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/gnss/GnssAdapter.h b/gnss/GnssAdapter.h
index ad55687..6ed9655 100644
--- a/gnss/GnssAdapter.h
+++ b/gnss/GnssAdapter.h
@@ -76,6 +76,19 @@ typedef struct {
uint32_t svIdOffset;
} NmeaSvMeta;
+typedef struct {
+ double latitude;
+ double longitude;
+ float accuracy;
+ // the CPI will be blocked until the boot time
+ // specified in blockedTillTsMs
+ int64_t blockedTillTsMs;
+ // CPIs whose both latitude and longitude differ
+ // no more than latLonThreshold will be blocked
+ // in units of degree
+ double latLonDiffThreshold;
+} BlockCPIInfo;
+
using namespace loc_core;
namespace loc_core {
@@ -125,6 +138,9 @@ class GnssAdapter : public LocAdapterBase {
std::string mMoServerUrl;
XtraSystemStatusObserver mXtraObserver;
+ /* === Misc ===================================================================== */
+ BlockCPIInfo mBlockCPIInfo;
+
/*==== CONVERSION ===================================================================*/
static void convertOptions(LocPosMode& out, const TrackingOptions& trackingOptions);
static void convertLocation(Location& out, const UlpLocation& ulpLocation,
@@ -337,6 +353,8 @@ public:
void injectLocationCommand(double latitude, double longitude, float accuracy);
void injectTimeCommand(int64_t time, int64_t timeReference, int32_t uncertainty);
+ void blockCPICommand(double latitude, double longitude, float accuracy,
+ int blockDurationMsec, double latLonDiffThreshold);
};
#endif //GNSS_ADAPTER_H