Vanetza
Loading...
Searching...
No Matches
vanetza::facilities::PathHistory Class Reference

#include <path_history.hpp>

Classes

struct  Parameters

Public Member Functions

 PathHistory (const Parameters &params)
void addSample (const PathPoint &)
void clear ()
const PathPointgetReferencePoint () const
const std::list< PathPoint > & getConcisePoints () const
boost::iterator_range< std::list< PathPoint >::const_iterator > getConcisePointsMinLength (units::Length distance) const
boost::iterator_range< std::list< PathPoint >::const_iterator > getConcisePointsMinLength (units::Length distance, std::size_t max_points) const
 As above but capped at max_points.
boost::iterator_range< std::list< PathPoint >::const_iterator > getConcisePointsMaxLength (units::Length distance) const
boost::iterator_range< std::list< PathPoint >::const_iterator > getConcisePointsMaxLength (units::Length distance, std::size_t max_points) const
 As above but capped at max_points.

Private Member Functions

void updateConcisePoints ()
void truncateConcisePoints ()
const PathPointstarting () const
const PathPointprevious () const
const PathPointnext () const

Private Attributes

Parameters m_params
boost::circular_buffer< PathPointm_samples
std::list< PathPointm_concise

Detailed Description

Implementation of Path History Reference Design (Method One)

See also
NHTSA Document "VSC-A Final Report: Appendix B-2" from September 2011

Definition at line 24 of file path_history.hpp.

Constructor & Destructor Documentation

◆ PathHistory() [1/2]

vanetza::facilities::PathHistory::PathHistory ( )

Definition at line 14 of file path_history.cpp.

◆ PathHistory() [2/2]

vanetza::facilities::PathHistory::PathHistory ( const Parameters & params)
explicit

Definition at line 18 of file path_history.cpp.

Member Function Documentation

◆ addSample()

void vanetza::facilities::PathHistory::addSample ( const PathPoint & point)

Consider one further path point for inclusion into path history

Parameters
apath point, expected to be newer than any previously given point

Definition at line 41 of file path_history.cpp.

◆ clear()

void vanetza::facilities::PathHistory::clear ( )

Drop all samples and concise points, e.g. on pseudonym (AT) change

Definition at line 52 of file path_history.cpp.

◆ getConcisePoints()

const std::list< PathPoint > & vanetza::facilities::PathHistory::getConcisePoints ( ) const
inline

Get concise list of path points

Note
previously given path points are only included if the algorithm presented in above mentioned document as "Method One" selects them
Returns
list of path points, some given points might be omitted

Definition at line 61 of file path_history.hpp.

◆ getConcisePointsMaxLength() [1/2]

boost::iterator_range< std::list< PathPoint >::const_iterator > vanetza::facilities::PathHistory::getConcisePointsMaxLength ( units::Length distance) const

Newest concise points covering at most a distance (crossing point excluded)

Parameters
distancemaximum distance to cover
Returns
view of the newest concise points

Definition at line 136 of file path_history.cpp.

◆ getConcisePointsMaxLength() [2/2]

boost::iterator_range< std::list< PathPoint >::const_iterator > vanetza::facilities::PathHistory::getConcisePointsMaxLength ( units::Length distance,
std::size_t max_points ) const

As above but capped at max_points.

Definition at line 142 of file path_history.cpp.

◆ getConcisePointsMinLength() [1/2]

boost::iterator_range< std::list< PathPoint >::const_iterator > vanetza::facilities::PathHistory::getConcisePointsMinLength ( units::Length distance) const

Newest concise points covering at least a distance (crossing point included)

Parameters
distanceminimum distance to cover
Returns
view of the newest concise points

Definition at line 110 of file path_history.cpp.

◆ getConcisePointsMinLength() [2/2]

boost::iterator_range< std::list< PathPoint >::const_iterator > vanetza::facilities::PathHistory::getConcisePointsMinLength ( units::Length distance,
std::size_t max_points ) const

As above but capped at max_points.

Definition at line 116 of file path_history.cpp.

◆ getReferencePoint()

const PathPoint & vanetza::facilities::PathHistory::getReferencePoint ( ) const

Get current reference point, i.e. last provided path point

Returns
current reference point (fallback is a default constructed PathPoint)

Definition at line 58 of file path_history.cpp.

◆ next()

const PathPoint & vanetza::facilities::PathHistory::next ( ) const
private

Definition at line 35 of file path_history.cpp.

◆ previous()

const PathPoint & vanetza::facilities::PathHistory::previous ( ) const
private

Definition at line 29 of file path_history.cpp.

◆ starting()

const PathPoint & vanetza::facilities::PathHistory::starting ( ) const
private

Definition at line 23 of file path_history.cpp.

◆ truncateConcisePoints()

void vanetza::facilities::PathHistory::truncateConcisePoints ( )
private

Definition at line 93 of file path_history.cpp.

◆ updateConcisePoints()

void vanetza::facilities::PathHistory::updateConcisePoints ( )
private

Definition at line 69 of file path_history.cpp.

Member Data Documentation

◆ m_concise

std::list<PathPoint> vanetza::facilities::PathHistory::m_concise
private

Definition at line 96 of file path_history.hpp.

◆ m_params

Parameters vanetza::facilities::PathHistory::m_params
private

Definition at line 94 of file path_history.hpp.

◆ m_samples

boost::circular_buffer<PathPoint> vanetza::facilities::PathHistory::m_samples
private

Definition at line 95 of file path_history.hpp.


The documentation for this class was generated from the following files: