Class ThirdPolynomial
Defined in File spline_and_polynomial.hpp
Class Documentation
-
class ThirdPolynomial
Represents a cubic polynomial defined by its initial position, final position, final velocity, final acceleration, and time duration.
Public Functions
-
ThirdPolynomial(float xs, float xe, float vxe, float axe, float time)
Constructor for third_polynomial.
- Parameters:
xs – Initial position.
xe – Final position.
vxe – Final velocity.
axe – Final acceleration.
time – Duration over which the polynomial is defined.
-
inline float calc_point(float t) const
Calculates the value of the polynomial at a given time.
- Parameters:
t – Time at which to evaluate the polynomial.
- Returns:
Value of the polynomial at time t.
-
inline float calc_first_derivative(float t) const
Calculates the derivative of the polynomial at a given time.
- Parameters:
t – Time at which to evaluate the polynomial.
- Returns:
Derivative of the polynomial at time t.
-
inline float calc_second_derivative(float t) const
Calculates the second derivative of the polynomial at a given time.
- Parameters:
t – Time at which to evaluate the polynomial.
- Returns:
Second derivative of the polynomial at time t.
-
inline float calc_third_derivative() const
Calculates the third derivative of the polynomial at a given time.
- Parameters:
t – Time at which to evaluate the polynomial.
- Returns:
Third derivative of the polynomial at time t.
-
inline std::tuple<float, float, float, float> calc_all(float t) const
Calculates the value, first derivative, second derivative, and third derivative of the polynomial at a given time.
- Parameters:
t – Time at which to evaluate the polynomial.
- Returns:
A tuple containing the value, first derivative, second derivative, and third derivative of the polynomial at time t.
-
ThirdPolynomial(float xs, float xe, float vxe, float axe, float time)