Utils.py 文件源码

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

项目:SoftSAR 作者: eduardosufan 项目源码 文件源码
def plot_trajectory_3D(traj):
    """
    Plot airplane trajectory in 3D.

    Parameters
    ----------
    traj: object (AirplaneTrajectory instance).
      AirplaneTrajectory instance.

    Returns
    -------
    -.
    """

    fig = plt.figure()
    fp = Axes3D(fig)

    fp.plot(traj.flight_x, traj.flight_y, traj.flight_z, label='Airplane trajectory')
    fp.legend()
    fp.set_xlabel('x position')
    fp.set_ylabel('y position')
    fp.set_zlabel('z position')

    figv = plt.figure()
    fv = figv.gca(projection='3d')
    fv.plot(traj.flight_vx, traj.flight_vy, traj.flight_vz, label='Airplane velocity')
    fv.set_xscale('linear')
    fv.set_yscale('linear')
    fv.set_zscale('linear')

    fv.legend()
    fv.set_xlabel('x velocity')
    fv.set_ylabel('y velocity')
    fv.set_zlabel('z velocity')
    plt.show()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号