| 20 | using std::vector; |
| 21 | |
| 22 | double CalculateLength(vector<TrafficGPSEncoder::DataPoint> const & path) |
| 23 | { |
| 24 | double res = 0; |
| 25 | for (size_t i = 1; i < path.size(); ++i) |
| 26 | { |
| 27 | auto p1 = mercator::FromLatLon(path[i - 1].m_latLon.m_lat, path[i - 1].m_latLon.m_lon); |
| 28 | auto p2 = mercator::FromLatLon(path[i].m_latLon.m_lat, path[i].m_latLon.m_lon); |
| 29 | res += mercator::DistanceOnEarth(p1, p2); |
| 30 | } |
| 31 | return res; |
| 32 | } |
| 33 | |
| 34 | void Test(vector<TrafficGPSEncoder::DataPoint> & points) |
| 35 | { |
no test coverage detected