LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
quinticpolynomial.hpp
Go to the documentation of this file.
1
7#ifndef _MATH_QUINTIC_POLYNOMIAL_HPP_
8#define _MATH_QUINTIC_POLYNOMIAL_HPP_
9
10#include <string>
11
12namespace squiggles {
14 public:
29 double s_v,
30 double s_a,
31 double g_p,
32 double g_v,
33 double g_a,
34 double t);
35
40 double calc_point(double t);
41 double calc_first_derivative(double t);
42 double calc_second_derivative(double t);
43 double calc_third_derivative(double t);
44
50 std::string to_string() const {
51 return "QuinticPolynomial: {0: " + std::to_string(a0) +
52 " 1: " + std::to_string(a1) + " 2: " + std::to_string(a2) +
53 " 3: " + std::to_string(a3) + " 4: " + std::to_string(a4) +
54 " 5: " + std::to_string(a5) + "}";
55 }
56
57 protected:
61 double a0, a1, a2, a3, a4, a5;
62};
63} // namespace squiggles
64
65#endif
double calc_third_derivative(double t)
double a0
The coefficients for each term of the polynomial.
double calc_first_derivative(double t)
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.
std::string to_string() const
Serializes the Quintic Polynomial data for debugging.
double calc_second_derivative(double t)
Copyright 2020 Jonathan Bayless.