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:
-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: