New cpp folder structure

Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
Alexander Borsuk
2025-07-17 22:35:52 +03:00
committed by Konstantin Pastbin
parent c9cbb64f12
commit 76ffc99abd
2390 changed files with 345 additions and 339 deletions

View File

@@ -0,0 +1,32 @@
#include "track_analyzing/track.hpp"
#include "track_analyzing/utils.hpp"
#include "storage/routing_helpers.hpp"
#include "storage/storage.hpp"
using namespace routing;
using namespace std;
namespace track_analyzing
{
void CmdCppTrack(string const & trackFile, string const & mwmName, string const & user,
size_t trackIdx)
{
storage::Storage storage;
auto const numMwmIds = CreateNumMwmIds(storage);
MwmToMatchedTracks mwmToMatchedTracks;
ReadTracks(numMwmIds, trackFile, mwmToMatchedTracks);
MatchedTrack const & track =
GetMatchedTrack(mwmToMatchedTracks, *numMwmIds, mwmName, user, trackIdx);
auto const backupPrecision = cout.precision();
cout.precision(8);
for (MatchedTrackPoint const & point : track)
{
cout << " {" << point.GetDataPoint().m_latLon.m_lat << ", " << point.GetDataPoint().m_latLon.m_lon
<< "}," << endl;
}
cout.precision(backupPrecision);
}
} // namespace track_analyzing