libqe 0.2.6-dev.9001
QE C++ library
Loading...
Searching...
No Matches
trajectory.hpp File Reference

Parametric trajectory curve fitting, LOOCV-2D degree selection, and differential geometry (velocity, acceleration, curvature, turns). More...

#include <armadillo>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <limits>
#include "linalg_fallback.hpp"

Go to the source code of this file.

Classes

struct  qe::PolyCurveFit
 Polynomial curve fit result in 2D epistemic space. More...
 
struct  qe::TrajectoryDerivatives
 Differential geometry profile along a trajectory curve. More...
 

Namespaces

namespace  qe
 

Functions

arma::mat qe::build_raw_poly_design (const arma::vec &t_vec, int degree)
 
arma::vec qe::poly_multiply_by_linear (const arma::vec &coeffs, double shift)
 
arma::mat qe::orthogonal_poly_basis_from_coefs (const arma::vec &t_vec, int degree, const arma::vec &alpha, const arma::vec &norm2)
 
arma::mat qe::orthogonal_basis_raw_coefficients (int degree, const arma::vec &alpha, const arma::vec &norm2)
 
bool qe::modified_gram_schmidt_qr (const arma::mat &X, arma::mat &Q, arma::mat &R)
 
arma::mat qe::build_orthogonal_poly_design (const arma::vec &t_vec, int degree, arma::vec &alpha, arma::vec &norm2)
 
arma::mat qe::build_poly_design (const arma::vec &t_vec, int degree, const std::string &basis, arma::vec &alpha, arma::vec &norm2, arma::mat &basis_raw_coeffs)
 
double qe::eval_poly_scalar (const arma::vec &coeffs, double t)
 Evaluate a 1D polynomial sum(c_k * t^k) at a single time t.
 
double qe::eval_poly_deriv1_scalar (const arma::vec &coeffs, double t)
 Evaluate polynomial 1st derivative sum(k * c_k * t^(k-1)) at a single time t.
 
double qe::eval_poly_deriv2_scalar (const arma::vec &coeffs, double t)
 Evaluate polynomial 2nd derivative sum(k*(k-1) * c_k * t^(k-2)) at a single time t.
 
arma::mat qe::eval_poly_curve (const arma::vec &coeffs_x, const arma::vec &coeffs_y, const arma::vec &t_eval)
 Evaluate 2D parametric curve (x(t), y(t)) at multiple time points.
 
PolyCurveFit qe::fit_poly_loocv2d (const arma::mat &points, const arma::vec &t=arma::vec(), int max_degree=3, int fixed_degree=0, const std::string &criterion="loocv", const std::string &basis="orthogonal")
 Fit a 2D polynomial curve with automatic LOOCV-2D or AIC degree selection.
 
TrajectoryDerivatives qe::eval_trajectory_derivatives (const arma::vec &coeffs_x, const arma::vec &coeffs_y, const arma::vec &t_eval)
 Compute trajectory velocities, speeds, accelerations, heading turn rates, and curvatures.
 

Detailed Description

Parametric trajectory curve fitting, LOOCV-2D degree selection, and differential geometry (velocity, acceleration, curvature, turns).