In [ ]:
%pylab inline
import px4tools

In [ ]:
d = px4tools.ulog.cached_log_processing(
    log='/home/jgoppert/git/px4/src/px4/build_posix_sitl_default/'
    'tmp/rootfs/fs/microsd/log/2017-01-25/07_18_50.ulg',
    msg_filter='',
    processing_func=lambda x: x,
    save_path='./logs/2017-01-25-sitl-mission-uneven.pkl',
    force_processing=False)
dt = 0.01
d = d.concat(dt=dt).ffill().bfill()
d = px4tools.ulog.compute_data(d)

In [ ]:
px4tools.estimator_analysis(d)
plt.gcf().autofmt_xdate()

In [ ]:
d.t_vehicle_local_position_0__f_speed.plot()
plt.gcf().autofmt_xdate()
plt.ylabel('speed, m/s')
plt.xlabel('time')
plt.grid()

In [ ]:
path_length = d.t_vehicle_local_position_0__f_speed.sum()*0.1
path_length

In [ ]:
d.t_vehicle_local_position_0__f_vx_error.plot(label='vx error')
d.t_vehicle_local_position_0__f_vy_error.plot(label='vy error')
plt.legend(ncol=2, loc='best')
plt.grid()
plt.gcf().autofmt_xdate()