Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Zolotarev <alex@mapswithme.com>2013-06-07 01:17:01 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:58:20 +0300
commit8f0cc7ac0d1e8007d3bef4f6428df27e44cb27a6 (patch)
treeb797e57a0f4869f422d8e33689ec307120809858 /platform/location.hpp
parent12b40fc5d7187b9e507710f58fc99fa589c65944 (diff)
Enabled alt/course/speed support for location
Diffstat (limited to 'platform/location.hpp')
-rw-r--r--platform/location.hpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/platform/location.hpp b/platform/location.hpp
index cbfbc82475..814ebf87ef 100644
--- a/platform/location.hpp
+++ b/platform/location.hpp
@@ -23,7 +23,8 @@ namespace location
EGoogle
};
- /// @note always check m_status before using this structure
+ /// Our structure ALWAYS has valid lat, lon and horizontal accuracy.
+ /// We filter out location events without lat/lon/acc in native code as we don't need them.
class GpsInfo
{
public:
@@ -32,13 +33,16 @@ namespace location
double m_latitude; //!< degrees
double m_longitude; //!< degrees
double m_horizontalAccuracy; //!< metres
-// double m_altitude; //!< metres
-// double m_verticalAccuracy; //!< metres
-// double m_course; //!< positive degrees from the true North
-// double m_speed; //!< metres per second
+ double m_altitude; //!< metres
+ double m_verticalAccuracy; //!< metres
+ double m_course; //!< positive degrees from the true North
+ double m_speed; //!< metres per second
+
+ bool HasAltitude() const { return m_verticalAccuracy >= 0.; }
+ bool HasBearing() const { return m_course >= 0.; }
+ bool HasSpeed() const { return m_speed >= 0.; }
};
- /// @note always check m_status before using this structure
class CompassInfo
{
public: