Vanetza
Loading...
Searching...
No Matches
path_history.hpp
1
#ifndef PATH_HISTORY_HPP_1ITSMS5I
2
#define PATH_HISTORY_HPP_1ITSMS5I
3
4
#include <vanetza/facilities/path_point.hpp>
5
#include <boost/circular_buffer.hpp>
6
#include <list>
7
8
namespace
vanetza
9
{
10
namespace
facilities
11
{
12
13
/**
14
* Implementation of Path History Reference Design (Method One)
15
* \see NHTSA Document "VSC-A Final Report: Appendix B-2" from September 2011
16
*/
17
class
PathHistory
18
{
19
public
:
20
PathHistory
();
21
22
/**
23
* Consider one further path point for inclusion into path history
24
* \param a path point, expected to be newer than any previously given point
25
*/
26
void
addSample
(
const
PathPoint
&);
27
28
/**
29
* Get current reference point, i.e. last provided path point
30
* \return current reference point (fallback is a default constructed PathPoint)
31
*/
32
const
PathPoint
&
getReferencePoint
()
const
;
33
34
/**
35
* Get concise list of path points
36
* \note previously given path points are only included if the algorithm
37
* presented in above mentioned document as "Method One" selects them
38
* \return list of path points, some given points might be omitted
39
*/
40
const
std::list<PathPoint>&
getConcisePoints
()
const
{
return
m_concise; }
41
42
private
:
43
void
updateConcisePoints();
44
void
truncateConcisePoints();
45
const
PathPoint
& starting()
const
;
46
const
PathPoint
& previous()
const
;
47
const
PathPoint
& next()
const
;
48
49
boost::circular_buffer<PathPoint> m_samples;
50
std::list<PathPoint> m_concise;
51
};
52
53
}
// namespace facilities
54
}
// namespace vanetza
55
56
#endif
/* PATH_HISTORY_HPP_1ITSMS5I */
57
vanetza::facilities::PathHistory
Definition:
path_history.hpp:18
vanetza::facilities::PathHistory::addSample
void addSample(const PathPoint &)
Definition:
path_history.cpp:39
vanetza::facilities::PathHistory::getReferencePoint
const PathPoint & getReferencePoint() const
Definition:
path_history.cpp:50
vanetza::facilities::PathHistory::getConcisePoints
const std::list< PathPoint > & getConcisePoints() const
Definition:
path_history.hpp:40
vanetza::facilities::PathPoint
Definition:
path_point.hpp:16
vanetza
facilities
path_history.hpp
Generated on Thu Nov 30 2023 12:03:35 for Vanetza by
1.9.6