kf.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:mht 作者: jonatanolofsson 项目源码 文件源码
def __call__(self, report, parent=None):
        """Init new target from report."""
        if parent is None:
            model = models.ConstantVelocityModel(self.q)
            x0 = np.array([report.z[0], report.z[1], 0.0, 0.0])
            P0 = block_diag(report.R, self.pv)
            return KFilter(model, x0, P0)
        # elif parent.is_new():
            # model = models.ConstantVelocityModel(self.q)
            # x0 = np.array([report.z[0],
                           # report.z[1],
                           # (report.z[0] - parent.filter.x[0])/self.dT,
                           # (report.z[1] - parent.filter.x[1])/self.dT])
            # P0 = block_diag(report.R, self.pv)
            # return KFilter(model, x0, P0)
        else:
            return deepcopy(parent.filter)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号