In [1]:
%pylab inline
import px4tools
In [2]:
from px4tools.version import full_version
full_version
Out[2]:
In [3]:
d = px4tools.read_ulog('/home/jgoppert/.ros/rootfs/fs/microsd/log/2017-01-23/00_31_50.ulg')
innov = d['ekf2_innovations_0']
In [4]:
innov.t_ekf2_innovations_0__f_flow_innov_0_.plot()
innov.t_ekf2_innovations_0__f_flow_innov_1_.plot()
plt.grid()
plt.legend(loc='best')
Out[4]:
In [5]:
ind = innov.t_ekf2_innovations_0__f_flow_innov_1_.index
ind.freq = '1 day'
ind = innov.t_ekf2_innovations_0__f_flow_innov_1_.plot()
In [6]:
d = px4tools.pandas.TimedeltaIndex(start=0, freq='s', unit='s', periods=10)
px4tools.pandas.DataFrame(np.random.randn(len(d)), index=d).plot()
Out[6]:
In [7]:
innov['12 s': '20 s'].t_ekf2_innovations_0__f_flow_innov_var_0_.plot()
innov['12 s': '20 s'].t_ekf2_innovations_0__f_flow_innov_var_1_.plot()
gca().set_ylim(0, 0.003)
plt.title('Flow Variance')
Out[7]:
In [8]:
innov.t_ekf2_innovations_0__f_flow_innov_var_1_.plot()
Out[8]: