organicmaps/map/track_statistics.hpp
Kiryl Kaveryn 83df1e5004 [map] review fixes
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
2025-02-21 14:38:11 -03:00

30 lines
702 B
C++

#pragma once
#include "platform/location.hpp"
#include "kml/types.hpp"
struct TrackStatistics
{
using Points = kml::MultiGeometry::LineT;
using Timestamps = kml::MultiGeometry::TimeT;
TrackStatistics();
explicit TrackStatistics(kml::MultiGeometry const & geometry);
double m_length;
double m_duration;
double m_ascent;
double m_descent;
geometry::Altitude m_minElevation;
geometry::Altitude m_maxElevation;
void AddGpsInfoPoint(location::GpsInfo const & point);
private:
void AddPoints(Points const & points);
void AddTimestamps(Timestamps const & timestamps);
bool HasNoPoints() const;
geometry::PointWithAltitude m_previousPoint;
double m_previousTimestamp;
};