Merge "Fix to report bearing and speed accuracy"

This commit is contained in:
Linux Build Service Account 2017-08-16 02:35:56 -07:00 committed by Gerrit - the friendly Code Review server
commit 6f104ee746
4 changed files with 9 additions and 5 deletions

View file

@ -544,10 +544,12 @@ enum loc_api_adapter_err LocApiBase::
} }
enum loc_api_adapter_err LocApiBase:: enum loc_api_adapter_err LocApiBase::
getBestAvailableZppFix(LocGpsLocation & zppLoc, LocPosTechMask & tech_mask) getBestAvailableZppFix(LocGpsLocation & zppLoc, GpsLocationExtended & locationExtended,
LocPosTechMask & tech_mask)
{ {
memset(&zppLoc, 0, sizeof(zppLoc)); memset(&zppLoc, 0, sizeof(zppLoc));
memset(&tech_mask, 0, sizeof(tech_mask)); memset(&tech_mask, 0, sizeof(tech_mask));
memset(&locationExtended, 0, sizeof (locationExtended));
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS) DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
} }

View file

@ -209,7 +209,8 @@ public:
virtual enum loc_api_adapter_err virtual enum loc_api_adapter_err
getBestAvailableZppFix(LocGpsLocation & zppLoc); getBestAvailableZppFix(LocGpsLocation & zppLoc);
virtual enum loc_api_adapter_err virtual enum loc_api_adapter_err
getBestAvailableZppFix(LocGpsLocation & zppLoc, LocPosTechMask & tech_mask); getBestAvailableZppFix(LocGpsLocation & zppLoc, GpsLocationExtended & locationExtended,
LocPosTechMask & tech_mask);
virtual int initDataServiceClient(bool isDueToSsr); virtual int initDataServiceClient(bool isDueToSsr);
virtual int openAndStartDataCall(); virtual int openAndStartDataCall();
virtual void stopDataCall(); virtual void stopDataCall();

View file

@ -1661,7 +1661,8 @@ GnssAdapter::getZppCommand()
GpsLocationExtended locationExtended = {}; GpsLocationExtended locationExtended = {};
locationExtended.size = sizeof(locationExtended); locationExtended.size = sizeof(locationExtended);
mApi.getBestAvailableZppFix(location.gpsLocation, techMask); mApi.getBestAvailableZppFix(location.gpsLocation, locationExtended,
techMask);
//Mark the location source as from ZPP //Mark the location source as from ZPP
location.gpsLocation.flags |= LOCATION_HAS_SOURCE_INFO; location.gpsLocation.flags |= LOCATION_HAS_SOURCE_INFO;
location.position_source = ULP_LOCATION_IS_FROM_ZPP; location.position_source = ULP_LOCATION_IS_FROM_ZPP;

View file

@ -99,7 +99,7 @@ typedef uint16_t LocGpsLocationFlags;
/** LocGpsLocation has valid accuracy. */ /** LocGpsLocation has valid accuracy. */
#define LOC_GPS_LOCATION_HAS_ACCURACY 0x0010 #define LOC_GPS_LOCATION_HAS_ACCURACY 0x0010
/** LocGpsLocation has valid vertical uncertainity */ /** LocGpsLocation has valid vertical uncertainity */
#define LOC_GPS_LOCATION_HAS_VERT_UNCERTAINITY 0x0020 #define LOC_GPS_LOCATION_HAS_VERT_UNCERTAINITY 0x0040
/** Flags for the loc_gps_set_capabilities callback. */ /** Flags for the loc_gps_set_capabilities callback. */
@ -541,7 +541,7 @@ typedef struct {
* Represents altitude in meters above the WGS 84 reference ellipsoid. * Represents altitude in meters above the WGS 84 reference ellipsoid.
*/ */
double altitude; double altitude;
/** Represents speed in meters per second. */ /** Represents horizontal speed in meters per second. */
float speed; float speed;
/** Represents heading in degrees. */ /** Represents heading in degrees. */
float bearing; float bearing;