Fixed notes

This commit is contained in:
Constantin Shalnev 2015-12-15 13:52:24 +03:00
parent 632525a6b2
commit 9f2b793d38
2 changed files with 10 additions and 10 deletions

View file

@ -1,6 +1,6 @@
#include "map/gps_track_filter.hpp"
#include "geometry/mercator.hpp"
#include "geometry/distance_on_sphere.hpp"
#include "platform/settings.hpp"
@ -24,8 +24,8 @@ void GpsTrackFilter::StoreMinHorizontalAccuracy(double value)
GpsTrackFilter::GpsTrackFilter()
: m_minAccuracy(kMinHorizontalAccuracyMeters)
, m_lastPt(0, 0)
, m_hasLast(false)
, m_lastLl(0, 0)
, m_hasLastLl(false)
{
Settings::Get(kMinHorizontalAccuracyKey, m_minAccuracy);
}
@ -45,12 +45,12 @@ void GpsTrackFilter::Process(vector<location::GpsInfo> const & inPoints,
continue;
// Filter point by close distance
m2::PointD const & pt = MercatorBounds::FromLatLon(originPt.m_latitude, originPt.m_longitude);
if (m_hasLast && MercatorBounds::DistanceOnEarth(pt, m_lastPt) < kClosePointDistanceMeters)
ms::LatLon const ll(originPt.m_latitude, originPt.m_longitude);
if (m_hasLastLl && ms::DistanceOnEarth(m_lastLl, ll) < kClosePointDistanceMeters)
continue;
m_lastPt = pt;
m_hasLast = true;
m_lastLl = ll;
m_hasLastLl = true;
outPoints.emplace_back(originPt);
}

View file

@ -2,7 +2,7 @@
#include "platform/location.hpp"
#include "geometry/point2d.hpp"
#include "geometry/latlon.hpp"
#include "std/vector.hpp"
@ -19,7 +19,7 @@ public:
private:
double m_minAccuracy;
m2::PointD m_lastPt;
bool m_hasLast;
ms::LatLon m_lastLl;
bool m_hasLastLl;
};