filt.py 文件源码

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

项目:pyins 作者: nmayorov 项目源码 文件源码
def traj_diff(t1, t2):
    """Compute trajectory difference.

    Parameters
    ----------
    t1, t2 : DataFrame
        Trajectories.

    Returns
    -------
    diff : DataFrame
        Trajectory difference. It can be interpreted as errors in `t1` relative
        to `t2`.
    """
    diff = t1 - t2
    diff['lat'] *= np.deg2rad(earth.R0)
    diff['lon'] *= np.deg2rad(earth.R0) * np.cos(0.5 *
                                                 np.deg2rad(t1.lat + t2.lat))
    diff['h'] %= 360
    diff.h[diff.h < -180] += 360
    diff.h[diff.h > 180] -= 360

    return diff.loc[t1.index.intersection(t2.index)]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号