LiveFit
Track and plot projectiles for in-class demonstration
Functions
Util.hpp File Reference
#include "KFPrediction.hpp"
#include <gsl/gsl_multifit.h>
#include <stdbool.h>
#include <math.h>
#include <QList>
#include <QPoint>
Include dependency graph for Util.hpp:

Go to the source code of this file.

Functions

bool polynomialFitKFX (int degree, double tStart, QList< KFPrediction > preds, double *store)
 Fit a polynomial equation to (x,t) points. More...
 
bool polynomialFitKFY (int degree, double tStart, QList< KFPrediction > preds, double *store)
 Fit a polynomial equation to (y,t) points. More...
 

Function Documentation

bool polynomialFitKFX ( int  degree,
double  tStart,
QList< KFPrediction preds,
double *  store 
)

Fit a polynomial equation to (x,t) points.

Parameters
degreeDegree of polynomial to fit (usu: 1)
tStartInitial time value to fit from
predsList of KFPrediction with (x,y,t) data
storeResultant array of degree components with the coefficients; <b,M>
Returns
bool Whether the fit was successful
bool polynomialFitKFY ( int  degree,
double  tStart,
QList< KFPrediction preds,
double *  store 
)

Fit a polynomial equation to (y,t) points.

Parameters
degreeDegree of polynomial to fit (usu: 2)
tStartInitial time value to fit from
predsList of KFPrediction with (x,y,t) data
storeResultant array of degree components with the coefficients; <C,B,A>
Returns
bool Whether the fit was successful