summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/LocAdapterBase.cpp6
-rw-r--r--core/LocAdapterBase.h3
-rw-r--r--core/LocApiBase.cpp13
-rw-r--r--core/LocApiBase.h3
-rw-r--r--gnss/GnssAdapter.cpp17
-rw-r--r--gnss/GnssAdapter.h3
-rw-r--r--location/LocationDataTypes.h2
-rw-r--r--utils/gps_extended_c.h6
8 files changed, 19 insertions, 34 deletions
diff --git a/core/LocAdapterBase.cpp b/core/LocAdapterBase.cpp
index 5f6a0c8..6fad918 100644
--- a/core/LocAdapterBase.cpp
+++ b/core/LocAdapterBase.cpp
@@ -101,10 +101,6 @@ void LocAdapterBase::
DEFAULT_IMPL()
void LocAdapterBase::
- reportSvMeasurementEvent(GnssSvMeasurementSet &/*svMeasurementSet*/)
-DEFAULT_IMPL()
-
-void LocAdapterBase::
reportSvPolynomialEvent(GnssSvPolynomial &/*svPolynomial*/)
DEFAULT_IMPL()
@@ -162,7 +158,7 @@ bool LocAdapterBase::
DEFAULT_IMPL(false)
void LocAdapterBase::
- reportGnssMeasurementDataEvent(const GnssMeasurementsNotification& /*measurements*/,
+reportGnssMeasurementsEvent(const GnssMeasurements& /*gnssMeasurements*/,
int /*msInWeek*/)
DEFAULT_IMPL()
diff --git a/core/LocAdapterBase.h b/core/LocAdapterBase.h
index 05b72db..13c8493 100644
--- a/core/LocAdapterBase.h
+++ b/core/LocAdapterBase.h
@@ -158,7 +158,6 @@ public:
bool fromEngineHub=false);
virtual void reportDataEvent(const GnssDataNotification& dataNotify, int msInWeek);
virtual void reportNmeaEvent(const char* nmea, size_t length);
- virtual void reportSvMeasurementEvent(GnssSvMeasurementSet &svMeasurementSet);
virtual void reportSvPolynomialEvent(GnssSvPolynomial &svPolynomial);
virtual void reportSvEphemerisEvent(GnssSvEphemerisReport &svEphemeris);
virtual void reportStatus(LocGpsStatusValue status);
@@ -175,7 +174,7 @@ public:
virtual bool requestNiNotifyEvent(const GnssNiNotification &notify, const void* data);
inline virtual bool isInSession() { return false; }
ContextBase* getContext() const { return mContext; }
- virtual void reportGnssMeasurementDataEvent(const GnssMeasurementsNotification& measurements,
+ virtual void reportGnssMeasurementsEvent(const GnssMeasurements& gnssMeasurements,
int msInWeek);
virtual bool reportWwanZppFix(LocGpsLocation &zppLoc);
virtual bool reportZppBestAvailableFix(LocGpsLocation &zppLoc,
diff --git a/core/LocApiBase.cpp b/core/LocApiBase.cpp
index 3c67af2..c172376 100644
--- a/core/LocApiBase.cpp
+++ b/core/LocApiBase.cpp
@@ -434,14 +434,6 @@ void LocApiBase::reportSv(GnssSvNotification& svNotify)
);
}
-void LocApiBase::reportSvMeasurement(GnssSvMeasurementSet &svMeasurementSet)
-{
- // loop through adapters, and deliver to all adapters.
- TO_ALL_LOCADAPTERS(
- mLocAdapters[i]->reportSvMeasurementEvent(svMeasurementSet)
- );
-}
-
void LocApiBase::reportSvPolynomial(GnssSvPolynomial &svPolynomial)
{
// loop through adapters, and deliver to all adapters.
@@ -534,11 +526,10 @@ void* LocApiBase :: getSibling()
LocApiProxyBase* LocApiBase :: getLocApiProxy()
DEFAULT_IMPL(NULL)
-void LocApiBase::reportGnssMeasurementData(GnssMeasurementsNotification& measurements,
- int msInWeek)
+void LocApiBase::reportGnssMeasurements(GnssMeasurements& gnssMeasurements, int msInWeek)
{
// loop through adapters, and deliver to all adapters.
- TO_ALL_LOCADAPTERS(mLocAdapters[i]->reportGnssMeasurementDataEvent(measurements, msInWeek));
+ TO_ALL_LOCADAPTERS(mLocAdapters[i]->reportGnssMeasurementsEvent(gnssMeasurements, msInWeek));
}
void LocApiBase::reportGnssSvIdConfig(const GnssSvIdConfig& config)
diff --git a/core/LocApiBase.h b/core/LocApiBase.h
index afdb83c..1c2afaf 100644
--- a/core/LocApiBase.h
+++ b/core/LocApiBase.h
@@ -164,7 +164,6 @@ public:
GnssDataNotification* pDataNotify = nullptr,
int msInWeek = -1);
void reportSv(GnssSvNotification& svNotify);
- void reportSvMeasurement(GnssSvMeasurementSet &svMeasurementSet);
void reportSvPolynomial(GnssSvPolynomial &svPolynomial);
void reportSvEphemeris(GnssSvEphemerisReport &svEphemeris);
void reportStatus(LocGpsStatusValue status);
@@ -179,7 +178,7 @@ public:
void requestATL(int connHandle, LocAGpsType agps_type, LocApnTypeMask apn_type_mask);
void releaseATL(int connHandle);
void requestNiNotify(GnssNiNotification &notify, const void* data);
- void reportGnssMeasurementData(GnssMeasurementsNotification& measurements, int msInWeek);
+ void reportGnssMeasurements(GnssMeasurements& gnssMeasurements, int msInWeek);
void reportWwanZppFix(LocGpsLocation &zppLoc);
void reportZppBestAvailableFix(LocGpsLocation &zppLoc, GpsLocationExtended &location_extended,
LocPosTechMask tech_mask);
diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp
index febea69..3563ed0 100644
--- a/gnss/GnssAdapter.cpp
+++ b/gnss/GnssAdapter.cpp
@@ -3575,20 +3575,21 @@ GnssAdapter::requestNiNotify(const GnssNiNotification& notify, const void* data)
}
void
-GnssAdapter::reportGnssMeasurementDataEvent(const GnssMeasurementsNotification& measurements,
+GnssAdapter::reportGnssMeasurementsEvent(const GnssMeasurements& gnssMeasurements,
int msInWeek)
{
LOC_LOGD("%s]: msInWeek=%d", __func__, msInWeek);
struct MsgReportGnssMeasurementData : public LocMsg {
GnssAdapter& mAdapter;
+ GnssMeasurements mGnssMeasurements;
GnssMeasurementsNotification mMeasurementsNotify;
inline MsgReportGnssMeasurementData(GnssAdapter& adapter,
- const GnssMeasurementsNotification& measurements,
+ const GnssMeasurements& gnssMeasurements,
int msInWeek) :
LocMsg(),
mAdapter(adapter),
- mMeasurementsNotify(measurements) {
+ mMeasurementsNotify(gnssMeasurements.gnssMeasNotification) {
if (-1 != msInWeek) {
mAdapter.getAgcInformation(mMeasurementsNotify, msInWeek);
}
@@ -3598,7 +3599,8 @@ GnssAdapter::reportGnssMeasurementDataEvent(const GnssMeasurementsNotification&
}
};
- sendMsg(new MsgReportGnssMeasurementData(*this, measurements, msInWeek));
+ sendMsg(new MsgReportGnssMeasurementData(*this, gnssMeasurements, msInWeek));
+ mEngHubProxy->gnssReportSvMeasurement(gnssMeasurements.gnssSvMeasurementSet);
}
void
@@ -3612,13 +3614,6 @@ GnssAdapter::reportGnssMeasurementData(const GnssMeasurementsNotification& measu
}
void
-GnssAdapter::reportSvMeasurementEvent(GnssSvMeasurementSet &svMeasurementSet)
-{
- LOC_LOGD("%s]: ", __func__);
- mEngHubProxy->gnssReportSvMeasurement(svMeasurementSet);
-}
-
-void
GnssAdapter::reportSvPolynomialEvent(GnssSvPolynomial &svPolynomial)
{
LOC_LOGD("%s]: ", __func__);
diff --git a/gnss/GnssAdapter.h b/gnss/GnssAdapter.h
index 1ed1151..9720ba4 100644
--- a/gnss/GnssAdapter.h
+++ b/gnss/GnssAdapter.h
@@ -354,9 +354,8 @@ public:
virtual void reportNmeaEvent(const char* nmea, size_t length);
virtual void reportDataEvent(const GnssDataNotification& dataNotify, int msInWeek);
virtual bool requestNiNotifyEvent(const GnssNiNotification& notify, const void* data);
- virtual void reportGnssMeasurementDataEvent(const GnssMeasurementsNotification& measurements,
+ virtual void reportGnssMeasurementsEvent(const GnssMeasurements& gnssMeasurements,
int msInWeek);
- virtual void reportSvMeasurementEvent(GnssSvMeasurementSet &svMeasurementSet);
virtual void reportSvPolynomialEvent(GnssSvPolynomial &svPolynomial);
virtual void reportSvEphemerisEvent(GnssSvEphemerisReport & svEphemeris);
virtual void reportGnssSvIdConfigEvent(const GnssSvIdConfig& config);
diff --git a/location/LocationDataTypes.h b/location/LocationDataTypes.h
index 1cb63fe..f8bb6cb 100644
--- a/location/LocationDataTypes.h
+++ b/location/LocationDataTypes.h
@@ -38,7 +38,7 @@
#define GNSS_NI_REQUESTOR_MAX (256)
#define GNSS_NI_MESSAGE_ID_MAX (2048)
#define GNSS_SV_MAX (176)
-#define GNSS_MEASUREMENTS_MAX (64)
+#define GNSS_MEASUREMENTS_MAX (128)
#define GNSS_UTC_TIME_OFFSET (3657)
#define GNSS_BUGREPORT_GPS_MIN (1)
diff --git a/utils/gps_extended_c.h b/utils/gps_extended_c.h
index 680f938..242fe84 100644
--- a/utils/gps_extended_c.h
+++ b/utils/gps_extended_c.h
@@ -1397,6 +1397,12 @@ typedef struct {
} GnssSvMeasurementSet;
+typedef struct {
+ uint32_t size; // set to sizeof(GnssMeasurements)
+ GnssSvMeasurementSet gnssSvMeasurementSet;
+ GnssMeasurementsNotification gnssMeasNotification;
+} GnssMeasurements;
+
typedef enum
{
GNSS_SV_POLY_COEFF_VALID = 0x01,