Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
towr::Spline Class Reference

A spline built from a sequence of cubic polynomials. More...

#include <spline.h>

Inheritance diagram for towr::Spline:
Inheritance graph
[legend]

List of all members.

Public Member Functions

const State GetPoint (double t) const
const State GetPoint (int poly_id, double t_local) const
VecTimes GetPolyDurations () const
int GetPolynomialCount () const
double GetTotalTime () const
 Spline (const VecTimes &poly_durations, int n_dim)
virtual ~Spline ()

Static Public Member Functions

static int GetSegmentID (double t_global, const VecTimes &durations)

Protected Member Functions

std::pair< int, double > GetLocalTime (double t_global, const VecTimes &d) const
 How much time of the current segment has passed at t_global.
void UpdatePolynomialCoeff ()
 Updates the cubic-Hermite polynomial coefficients using the currently set nodes values and durations.

Protected Attributes

VecPoly cubic_polys_
 the sequence of polynomials making up the spline.

Detailed Description

A spline built from a sequence of cubic polynomials.

This class is responsible for stitching together multiple individual polynomials into one spline.

Definition at line 45 of file spline.h.


Constructor & Destructor Documentation

towr::Spline::Spline ( const VecTimes &  poly_durations,
int  n_dim 
)

Definition at line 36 of file spline.cc.

virtual towr::Spline::~Spline ( ) [virtual]

Member Function Documentation

std::pair< int, double > towr::Spline::GetLocalTime ( double  t_global,
const VecTimes &  d 
) const [protected]

How much time of the current segment has passed at t_global.

Parameters:
t_globalThe global time [s] along the spline.
dThe durations of each segment.
Returns:
The segment id and the time passed in this segment.

Definition at line 69 of file spline.cc.

const State towr::Spline::GetPoint ( double  t) const
Returns:
The state of the spline at time t.
Parameters:
tThe time at which the state of the spline is desired.

Definition at line 81 of file spline.cc.

const State towr::Spline::GetPoint ( int  poly_id,
double  t_local 
) const
Parameters:
poly_idPolynomial id, 0 is first polynomial.
t_localTime along the current polynomial.
Returns:
The position, velocity and acceleration of spline.

Definition at line 90 of file spline.cc.

Spline::VecTimes towr::Spline::GetPolyDurations ( ) const
Returns:
the durations of each polynomial.

Definition at line 109 of file spline.cc.

Returns:
the number of polynomials making up this spline.

Definition at line 103 of file spline.cc.

int towr::Spline::GetSegmentID ( double  t_global,
const VecTimes &  durations 
) [static]
Returns:
The segment (e.g. phase, polynomial) at time t_global.
Parameters:
t_globalThe global time in the spline.
durationsThe durations [s] of each segment.

Definition at line 49 of file spline.cc.

double towr::Spline::GetTotalTime ( ) const
Returns:
The total time of the spline.

Definition at line 119 of file spline.cc.

Updates the cubic-Hermite polynomial coefficients using the currently set nodes values and durations.

Definition at line 96 of file spline.cc.


Member Data Documentation

VecPoly towr::Spline::cubic_polys_ [protected]

the sequence of polynomials making up the spline.

Definition at line 89 of file spline.h.


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


towr
Author(s): Alexander W. Winkler
autogenerated on Mon Apr 15 2019 02:42:32