Files
comaps/tracking/archive.cpp
Konstantin Pastbin e3e4a1985a Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run:
  git remote add om-historic [om-historic.git repo url]
  git fetch --tags om-historic
  git replace squashed-history historic-commits
2025-05-08 21:10:51 +07:00

49 lines
1.4 KiB
C++

#include "tracking/archive.hpp"
#include "geometry/latlon.hpp"
namespace tracking
{
namespace helpers
{
double const Restrictions::kMinDeltaLat = ms::LatLon::kMinLat - ms::LatLon::kMaxLat;
double const Restrictions::kMaxDeltaLat = ms::LatLon::kMaxLat - ms::LatLon::kMinLat;
double const Restrictions::kMinDeltaLon = ms::LatLon::kMinLon - ms::LatLon::kMaxLon;
double const Restrictions::kMaxDeltaLon = ms::LatLon::kMaxLon - ms::LatLon::kMinLon;
Limits GetLimits(bool isDelta)
{
if (isDelta)
{
return {Restrictions::kMinDeltaLat, Restrictions::kMaxDeltaLat, Restrictions::kMinDeltaLon,
Restrictions::kMaxDeltaLon};
}
return {ms::LatLon::kMinLat, ms::LatLon::kMaxLat, ms::LatLon::kMinLon, ms::LatLon::kMaxLon};
}
} // namespace helpers
Packet::Packet() : m_lat(0.0), m_lon(0.0), m_timestamp(0) {}
Packet::Packet(location::GpsInfo const & info)
: m_lat(info.m_latitude), m_lon(info.m_longitude), m_timestamp(info.m_timestamp)
{
}
Packet::Packet(double lat, double lon, uint32_t timestamp)
: m_lat(lat), m_lon(lon), m_timestamp(timestamp)
{
}
PacketCar::PacketCar() : m_speedGroup(traffic::SpeedGroup::Unknown) {}
PacketCar::PacketCar(location::GpsInfo const & info, traffic::SpeedGroup const & speedGroup)
: Packet(info), m_speedGroup(speedGroup)
{
}
PacketCar::PacketCar(double lat, double lon, uint32_t timestamp, traffic::SpeedGroup speed)
: Packet(lat, lon, timestamp), m_speedGroup(speed)
{
}
} // namespace tracking