Map Matching
pointGPS.cpp
Go to the documentation of this file.
1 #include "pointGPS.h"
2 
3 #include <sstream>
4 
5 void PointGPS::addEmissionProbability(long roadId, double distance)
6 {
7  EmissionProbability e(roadId, distance);
8  m_emissionProbability.push_back(std::move(e));
9 }
10 
12 {
13  double sum = 0.0;
14  for (auto& e : m_emissionProbability)
15  sum += e.distance();
16  for (auto& e : m_emissionProbability)
17  e.updateProbability(sum);
18 }
19 
20 std::string PointGPS::infos() const
21 {
22  std::stringstream ss;
23  ss << Point::infos() << " with " << m_emissionProbability.size() << " emissions to roads < 200m";
24  return ss.str();
25 }
std::vector< EmissionProbability > m_emissionProbability
Definition: pointGPS.h:42
void addEmissionProbability(long roadId, double distance)
Definition: pointGPS.cpp:5
virtual std::string infos() const
Definition: point.cpp:45
std::string infos() const
Definition: pointGPS.cpp:20
void updateProbability()
Definition: pointGPS.cpp:11