Go to the documentation of this file.
44 #ifndef GNSSTK_POLYFIT_HPP
45 #define GNSSTK_POLYFIT_HPP
93 if(n != 0 &&
n_ != n) {
110 void Add(T d, T t, T w=T(1))
117 for(
size_t i=0; i<
n_; i++) {
P(i)=tt; tt *= t; }
138 for(
size_t j=0; j<m; j++) {
140 for(
size_t i=0; i<
n_; i++) {
P(j,i)=tt; tt *= t(j); }
152 void Add(
const std::vector<T>& d,
const std::vector<T>& t)
155 if(t.size() < m) m=t.size();
160 for(
int i=0; i<m; i++) D(i)=d[i];
162 for(
size_t j=0; j<m; j++) {
164 for(
size_t i=0; i<
n_; i++) {
P(j,i)=tt; tt *= t[j]; }
186 for(
size_t i=1; i<
X.size(); i++) {
204 for(
size_t j=0; j<Vt.
size(); j++) {
207 for(
size_t i=1; i<
X.size(); i++) {
222 inline unsigned int Degree(
void)
const {
return n_; }
224 inline unsigned int N(
void)
const {
return Npts; }
void Add(const Vector< T > &d, const Vector< T > &t)
Add a gnsstk::Vector of data to the estimation.
void Solve(void)
Invert the equation.
void Add(T d, T t, T w=T(1))
Add a single (optional: weighted) datum to the estimation.
PolyFit()
Empty constructor.
unsigned int n_
degree of polynomial to be fit (dimension of state).
Vector< T > Evaluate(const Vector< T > &Vt)
unsigned int N(void) const
get the number of data points processed
Vector & resize(const size_t index)
unsigned int Npts
number of data points added to the estimation so far.
PolyFit(unsigned int n)
Constructor given an initial size.
SparseMatrix< T > transpose(const SparseMatrix< T > &M)
transpose
Matrix< T > Covariance(void)
get the covariance matrix
bool isSingular(void)
is the problem singular?
Matrix< T > InfMatrix
information matrix = inverse(Cov) = sum[transpose(P)*P], P=partials.
@ P
Legacy GPS precise code.
Vector< T > Solution(void)
get the solution vector (coefficients)
size_t size() const
STL size.
Vector< T > InfData
information data = inverse(Cov)*X = sum[transpose(P)*data].
void Add(const std::vector< T > &d, const std::vector< T > &t)
Add a std::vector of data to the estimation.
Matrix< T > Cov
Covariance matrix.
bool Singular
flag indicating problem is singular.
Vector< T > X
State vector (array of polynomial coefficients) of size n_.
unsigned int Degree(void) const
get the degree of the polynomial
SparseMatrix< T > inverse(const SparseMatrix< T > &A)
bool Inverted
flag indicating problem has been inverted.
Matrix< T > outer(const ConstVectorBase< T, BaseClass > &v, const ConstVectorBase< T, BaseClass > &w)
void Reset(unsigned int n=0)
gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:40