ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
adore::fun::VehicleMotionStateBuffer Class Reference

Buffers and interpolates vehicle positions. More...

#include <vehiclemotionstatebuffer.h>

Collaboration diagram for adore::fun::VehicleMotionStateBuffer:
Collaboration graph

Public Member Functions

 VehicleMotionStateBuffer (adore::fun::AFactory::TMotionStateFeed *feed, double dt_max=1.0)
 
 ~VehicleMotionStateBuffer ()
 
void update ()
 call update to check for new data More...
 
double size ()
 
double getTmax ()
 
bool interpolate_or_latest (double t, VehicleMotionState9d &result)
 get the latest, if More...
 
bool interpolate (double t, VehicleMotionState9d &result)
 interpolate a value for time t, if t is in buffered time range More...
 

Private Member Functions

double interp (double t, double ta, double a, double tb, double b)
 

Private Attributes

adore::fun::AFactory::TMotionStateFeedfeed_
 
std::list< VehicleMotionState9dbuffer_
 
double dt_max_
 

Detailed Description

Buffers and interpolates vehicle positions.

Constructor & Destructor Documentation

◆ VehicleMotionStateBuffer()

adore::fun::VehicleMotionStateBuffer::VehicleMotionStateBuffer ( adore::fun::AFactory::TMotionStateFeed feed,
double  dt_max = 1.0 
)
inline

◆ ~VehicleMotionStateBuffer()

adore::fun::VehicleMotionStateBuffer::~VehicleMotionStateBuffer ( )
inline

Member Function Documentation

◆ getTmax()

double adore::fun::VehicleMotionStateBuffer::getTmax ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ interp()

double adore::fun::VehicleMotionStateBuffer::interp ( double  t,
double  ta,
double  a,
double  tb,
double  b 
)
inlineprivate
Here is the caller graph for this function:

◆ interpolate()

bool adore::fun::VehicleMotionStateBuffer::interpolate ( double  t,
VehicleMotionState9d result 
)
inline

interpolate a value for time t, if t is in buffered time range

Returns
true if data was found
Here is the call graph for this function:
Here is the caller graph for this function:

◆ interpolate_or_latest()

bool adore::fun::VehicleMotionStateBuffer::interpolate_or_latest ( double  t,
VehicleMotionState9d result 
)
inline

get the latest, if

Parameters
tis bigger than latest known time point. Otherwise interpolate.
Returns
true if data was found
Here is the call graph for this function:
Here is the caller graph for this function:

◆ size()

double adore::fun::VehicleMotionStateBuffer::size ( )
inline
Here is the caller graph for this function:

◆ update()

void adore::fun::VehicleMotionStateBuffer::update ( )
inline

call update to check for new data

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ buffer_

std::list<VehicleMotionState9d> adore::fun::VehicleMotionStateBuffer::buffer_
private

◆ dt_max_

double adore::fun::VehicleMotionStateBuffer::dt_max_
private

◆ feed_

adore::fun::AFactory::TMotionStateFeed* adore::fun::VehicleMotionStateBuffer::feed_
private

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