From 8f0cc7ac0d1e8007d3bef4f6428df27e44cb27a6 Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Fri, 7 Jun 2013 00:17:01 +0300 Subject: Enabled alt/course/speed support for location --- platform/location.hpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'platform/location.hpp') 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: -- cgit v1.2.3