Tag: kalman filter

prototype.Function不在node.js中导出

我发现这个JavaScript 卡尔曼filter库在线,我想用我的node.js应用程序。 正如我想包括这个js文件到我的node.js应用程序,我试图导出所需的function(添加module.exports如下所示)。 module.exports = { KalmanModel : function(){ function KalmanModel(x_0,P_0,F_k,Q_k){ this.x_k = x_0; this.P_k = P_0; this.F_k = F_k; this.Q_k = Q_k; } KalmanModel.prototype.update = function(o){ // code } return KalmanModel; }, KalmanObservation : function(){ function KalmanObservation(z_k,H_k,Q_k){ this.z_k = z_k;//observation this.H_k = H_k;//observation model this.R_k = R_k;//observation noise covariance } return KalmanObservation; } }; […]