LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
squiggles::QuinticPolynomial Class Reference

#include <quinticpolynomial.hpp>

Public Member Functions

 QuinticPolynomial (double s_p, double s_v, double s_a, double g_p, double g_v, double g_a, double t)
 Defines the polynomial function for a spline in one dimension.
 
double calc_point (double t)
 Calculates the values of the polynomial and its derivatives at the given time stamp.
 
double calc_first_derivative (double t)
 
double calc_second_derivative (double t)
 
double calc_third_derivative (double t)
 
std::string to_string () const
 Serializes the Quintic Polynomial data for debugging.
 

Protected Attributes

double a0
 The coefficients for each term of the polynomial.
 
double a1
 
double a2
 
double a3
 
double a4
 
double a5
 

Detailed Description

Definition at line 13 of file quinticpolynomial.hpp.

Constructor & Destructor Documentation

◆ QuinticPolynomial()

squiggles::QuinticPolynomial::QuinticPolynomial ( double  s_p,
double  s_v,
double  s_a,
double  g_p,
double  g_v,
double  g_a,
double  t 
)

Defines the polynomial function for a spline in one dimension.

Parameters
s_pThe starting position of the curve in meters.
s_vThe starting velocity of the curve in meters per second.
s_aThe starting acceleration of the curve in meters per second per second.
g_pThe goal or ending position of the curve in meters.
g_vThe goal or ending velocity of the curve in meters per second.
g_aThe goal or ending acceleration of the curve in meters per second per second.
tThe desired duration for the curve in seconds.

Member Function Documentation

◆ calc_first_derivative()

double squiggles::QuinticPolynomial::calc_first_derivative ( double  t)

◆ calc_point()

double squiggles::QuinticPolynomial::calc_point ( double  t)

Calculates the values of the polynomial and its derivatives at the given time stamp.

◆ calc_second_derivative()

double squiggles::QuinticPolynomial::calc_second_derivative ( double  t)

◆ calc_third_derivative()

double squiggles::QuinticPolynomial::calc_third_derivative ( double  t)

◆ to_string()

std::string squiggles::QuinticPolynomial::to_string ( ) const
inline

Serializes the Quintic Polynomial data for debugging.

Returns
The Quintic Polynomial data.

Definition at line 50 of file quinticpolynomial.hpp.

Member Data Documentation

◆ a0

double squiggles::QuinticPolynomial::a0
protected

The coefficients for each term of the polynomial.

Definition at line 61 of file quinticpolynomial.hpp.

◆ a1

double squiggles::QuinticPolynomial::a1
protected

Definition at line 61 of file quinticpolynomial.hpp.

◆ a2

double squiggles::QuinticPolynomial::a2
protected

Definition at line 61 of file quinticpolynomial.hpp.

◆ a3

double squiggles::QuinticPolynomial::a3
protected

Definition at line 61 of file quinticpolynomial.hpp.

◆ a4

double squiggles::QuinticPolynomial::a4
protected

Definition at line 61 of file quinticpolynomial.hpp.

◆ a5

double squiggles::QuinticPolynomial::a5
protected

Definition at line 61 of file quinticpolynomial.hpp.


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