ignav的代码
static void updstat(const insopt_t *opt,insstate_t *ins,const double dt,
const double *x0,const double *P0,double *phi,double *P,
double *x,double *Q)
{
opt->exprn?getprn(ins,opt,dt,Q): getQ(opt,dt,Q); //
//phi 状态转移矩阵 ,离散化的公式代入,微分误差方程的系数矩阵
opt->exphi?precPhi(opt,dt,ins->Cbe,ins->re,ins->omgb,ins->fb,phi):getPhi1(opt,dt,ins->Cbe,ins->re,ins->omgb,ins->fb,phi);
if (fabs(dt)>=MAXUPDTIMEINT) {
getP0(opt,P);// 初始化
}
else {
propP(opt,Q,phi,P0,P); // P的预测 pk/k-1 = phi *P0* phiT +Q
}
if (x) propx(opt,x0,x);
if (ins->P0) matcpy(ins->P0,P ,ins->nx,ins->nx);
if (ins->F ) matcpy(ins->F ,phi,ins->nx,ins->nx);
}