Public Member Functions | Public Attributes | List of all members
TypeIIRMLMath::TypeIIRMLPolynomial Class Reference

This class realizes polynomials of degree three as required for the Type II On-Line Trajectory Generation algorithm. More...

#include <TypeIIRMLPolynomial.h>

Public Member Functions

void CalculateRealRoots (unsigned int *NumberOfRoots, double *Root1, double *Root2) const
 Calculates the real roots of the polynomial specified by the attributes of this object. More...
 
double CalculateValue (const double &t) const
 Calculates the function value at $ t $ of the polynomial specified by the attributes of this object. More...
 
void GetCoefficients (double *Coeff2, double *Coeff1, double *Coeff0, double *Diff) const
 Returns the coefficients of the polynomial object. More...
 
void SetCoefficients (const double &Coeff2, const double &Coeff1, const double &Coeff0, const double &Diff)
 Sets the coefficients of the polynomial object. More...
 
 TypeIIRMLPolynomial (void)
 Constructor of the class TypeIIRMLPolynomial. More...
 
 ~TypeIIRMLPolynomial (void)
 Destructor of the class TypeIIRMLPolynomial. More...
 

Public Attributes

double a0
 Parameter $ a_0 $ of the polynomial function $ f(t) = a_2 \cdot (t - \Delta T)^2 + a_1 \cdot (t - \Delta T) + a_0 $. More...
 
double a1
 Parameter $ a_1 $ of the polynomial function $ f(t) = a_2 \cdot (t - \Delta T)^2 + a_1 \cdot (t - \Delta T) + a_0 $. More...
 
double a2
 Parameter $ a_2 $ of the polynomial function $ f(t) = a_2 \cdot (t - \Delta T)^2 + a_1 \cdot (t - \Delta T) + a_0 $. More...
 
unsigned int Degree
 Positive integer number that defines the degree of the current polynomial. More...
 
double DeltaT
 Parameter $ \Delta T $ of the polynomial function $ f(t) = a_2 \cdot (t - \Delta T)^2 + a_1 \cdot (t - \Delta T) + a_0 $. More...
 

Detailed Description

This class realizes polynomials of degree three as required for the Type II On-Line Trajectory Generation algorithm.

See also
struct MotionPolynomials

Definition at line 65 of file TypeIIRMLPolynomial.h.

Constructor & Destructor Documentation

TypeIIRMLMath::TypeIIRMLPolynomial::TypeIIRMLPolynomial ( void  )

Constructor of the class TypeIIRMLPolynomial.

Definition at line 53 of file TypeIIRMLPolynomial.cpp.

TypeIIRMLMath::TypeIIRMLPolynomial::~TypeIIRMLPolynomial ( void  )

Destructor of the class TypeIIRMLPolynomial.

Definition at line 66 of file TypeIIRMLPolynomial.cpp.

Member Function Documentation

void TypeIIRMLMath::TypeIIRMLPolynomial::CalculateRealRoots ( unsigned int *  NumberOfRoots,
double *  Root1,
double *  Root2 
) const

Calculates the real roots of the polynomial specified by the attributes of this object.

Calculates up to three roots of the polynomial of degree two $ f(t) = a_2 \cdot (t - \Delta T)^2 + a_1 \cdot (t - \Delta T) + a_0 $, that is $ f(t) = (t - r_1) \cdot (t - r_2) $, where $ r_1 $ and $ r_2 $ are the desired roots of the current polynomial function.

Parameters
NumberOfRootsA pointer to the value of the number of roots (0...2)
Root1A pointer to the value of the first root (only valid for polynomials of degree one and higher)
Root2A pointer to the value of the second root (only valid for polynomials of degree two)

Definition at line 137 of file TypeIIRMLPolynomial.cpp.

double TypeIIRMLMath::TypeIIRMLPolynomial::CalculateValue ( const double &  t) const

Calculates the function value at $ t $ of the polynomial specified by the attributes of this object.

Calculates the function value of $ f(t) $ at $t$
$ f(t) = a_2 \cdot (t - \Delta T)^2 + a_1 \cdot (t - \Delta T) + a_0 $.

Parameters
tfunction input value
Returns
The function value at $t$

Definition at line 124 of file TypeIIRMLPolynomial.cpp.

void TypeIIRMLMath::TypeIIRMLPolynomial::GetCoefficients ( double *  Coeff2,
double *  Coeff1,
double *  Coeff0,
double *  Diff 
) const

Returns the coefficients of the polynomial object.

Gets the coefficients for the polynomial of degree three $ f(t) = a_2 \cdot (t - \Delta T)^2 + a_1 \cdot (t - \Delta T) + a_0 $.

Parameters
Coeff2$\ \Longrightarrow \ a_2$
Coeff1$\ \Longrightarrow \ a_1$
Coeff0$\ \Longrightarrow \ a_0$
Diff$\ \Longrightarrow \ \Delta T$

Definition at line 105 of file TypeIIRMLPolynomial.cpp.

void TypeIIRMLMath::TypeIIRMLPolynomial::SetCoefficients ( const double &  Coeff2,
const double &  Coeff1,
const double &  Coeff0,
const double &  Diff 
)

Sets the coefficients of the polynomial object.

Sets the coefficients for the polynomial of degree three $ f(t) = a_2 \cdot (t - \Delta T)^2 + a_1 \cdot (t - \Delta T) + a_0 $.

Parameters
Coeff2$\ \Longrightarrow \ a_2$
Coeff1$\ \Longrightarrow \ a_1$
Coeff0$\ \Longrightarrow \ a_0$
Diff$\ \Longrightarrow \ \Delta T$

Definition at line 74 of file TypeIIRMLPolynomial.cpp.

Member Data Documentation

double TypeIIRMLMath::TypeIIRMLPolynomial::a0

Parameter $ a_0 $ of the polynomial function $ f(t) = a_2 \cdot (t - \Delta T)^2 + a_1 \cdot (t - \Delta T) + a_0 $.

Definition at line 229 of file TypeIIRMLPolynomial.h.

double TypeIIRMLMath::TypeIIRMLPolynomial::a1

Parameter $ a_1 $ of the polynomial function $ f(t) = a_2 \cdot (t - \Delta T)^2 + a_1 \cdot (t - \Delta T) + a_0 $.

Definition at line 219 of file TypeIIRMLPolynomial.h.

double TypeIIRMLMath::TypeIIRMLPolynomial::a2

Parameter $ a_2 $ of the polynomial function $ f(t) = a_2 \cdot (t - \Delta T)^2 + a_1 \cdot (t - \Delta T) + a_0 $.

Definition at line 209 of file TypeIIRMLPolynomial.h.

unsigned int TypeIIRMLMath::TypeIIRMLPolynomial::Degree

Positive integer number that defines the degree of the current polynomial.

Definition at line 199 of file TypeIIRMLPolynomial.h.

double TypeIIRMLMath::TypeIIRMLPolynomial::DeltaT

Parameter $ \Delta T $ of the polynomial function $ f(t) = a_2 \cdot (t - \Delta T)^2 + a_1 \cdot (t - \Delta T) + a_0 $.

Definition at line 239 of file TypeIIRMLPolynomial.h.


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


libreflexxestype2
Author(s):
autogenerated on Sat Nov 21 2020 03:17:35