Added MMAE filtering section.

This commit is contained in:
Roger Labbe 2015-07-30 21:45:13 -07:00
parent e8b17d668b
commit 625c89bee4
3 changed files with 250 additions and 90 deletions

File diff suppressed because one or more lines are too long

View File

@ -11,7 +11,8 @@ import book_plots as bp
def plot_track_and_residuals(t, xs, z_xs, res):
plt.subplot(121)
bp.plot_measurements(t, z_xs, label='z')
if z_xs is not None:
bp.plot_measurements(t, z_xs, label='z')
bp.plot_filter(t, xs)
plt.legend(loc=2)
plt.xlabel('time (sec)')

View File

@ -136,6 +136,7 @@ def plot_track(xs, ys=None, label='Track', c='k', lw=2, **kwargs):
def plot_filter(xs, ys=None, c='#013afe', label='Filter', vars=None, **kwargs):
#def plot_filter(xs, ys=None, c='#6d904f', label='Filter', vars=None, **kwargs):
if ys is None:
ys = xs
xs = range(len(ys))
@ -144,6 +145,7 @@ def plot_filter(xs, ys=None, c='#013afe', label='Filter', vars=None, **kwargs):
if vars is None:
return
print('here')
vars = np.asarray(vars)
std = np.sqrt(vars)