class_docstr: Implements the Scaled Unscented Kalman filter (UKF) as defined by
  Simon Julier in [1], using the formulation provided by Wan and Merle
  in [2]. This filter scales the sigma points to avoid strong nonlinearities.
  
  
  You will have to set the following attributes after constructing this
  object for the filter to perform properly.
  
  Attributes
  ----------
  
  x : numpy.array(dim_x)
      state estimate vector
  
  P : numpy.array(dim_x, dim_x)
      covariance estimate matrix
  
  R : numpy.array(dim_z, dim_z)
      measurement noise matrix
  
  Q : numpy.array(dim_x, dim_x)
      process noise matrix
  
  
  You may read the following attributes.
  
  Readable Attributes
  -------------------
  
  
  K : numpy.array
      Kalman gain
  
  y : numpy.array
      innovation residual
  
  x : numpy.array(dim_x)
      predicted/updated state (result of predict()/update())
  
  P : numpy.array(dim_x, dim_x)
      predicted/updated covariance matrix (result of predict()/update())
  
  likelihood : scalar
      Likelihood of last measurement update.
  
  log_likelihood : scalar
      Log likelihood of last measurement update.
  
  
  References
  ----------
  
  .. [1] Julier, Simon J. "The scaled unscented transformation,"
      American Control Converence, 2002, pp 4555-4559, vol 6.
  
      Online copy:
      https://www.cs.unc.edu/~welch/kalman/media/pdf/ACC02-IEEE1357.PDF
  
  
  .. [2] E. A. Wan and R. Van der Merwe, “The unscented Kalman filter for
      nonlinear estimation,” in Proc. Symp. Adaptive Syst. Signal
      Process., Commun. Contr., Lake Louise, AB, Canada, Oct. 2000.
  
      Online Copy:
      https://www.seas.harvard.edu/courses/cs281/papers/unscented.pdf
class_docstr_tok: ["Implements","the","Scaled","Unscented","Kalman","filter","(","UKF",")","as","defined","by","Simon","Julier","in","[","1","]",",","using","the","formulation","provided","by","Wan","and","Merle","in","[","2","]",".","This","filter","scales","the","sigma","points","to","avoid","strong","nonlinearities",".","You","will","have","to","set","the","following","attributes","after","constructing","this","object","for","the","filter","to","perform","properly",".","Attributes","--","--","--","--","--","x",":","numpy.array","(","dim_x",")","state","estimate","vector","P",":","numpy.array","(","dim_x",",","dim_x",")","covariance","estimate","matrix","R",":","numpy.array","(","dim_z",",","dim_z",")","measurement","noise","matrix","Q",":","numpy.array","(","dim_x",",","dim_x",")","process","noise","matrix","You","may","read","the","following","attributes",".","Readable","Attributes","--","--","--","--","--","--","--","--","--","-","K",":","numpy.array","Kalman","gain","y",":","numpy.array","innovation","residual","x",":","numpy.array","(","dim_x",")","predicted\/updated","state","(","result","of","predict","(",")","\/update","(",")",")","P",":","numpy.array","(","dim_x",",","dim_x",")","predicted\/updated","covariance","matrix","(","result","of","predict","(",")","\/update","(",")",")","likelihood",":","scalar","Likelihood","of","last","measurement","update",".","log_likelihood",":","scalar","Log","likelihood","of","last","measurement","update",".","References","--","--","--","--","--","..","[","1","]","Julier",",","Simon","J",".","``","The","scaled","unscented","transformation",",","''","American","Control","Converence",",","2002",",","pp","4555-4559",",","vol","6",".","Online","copy",":","https",":","\/\/www.cs.unc.edu\/~welch\/kalman\/media\/pdf\/ACC02-IEEE1357.PDF","..","[","2","]","E.","A.","Wan","and","R.","Van","der","Merwe",",","\u201c","The","unscented","Kalman","filter","for","nonlinear","estimation",",","\u201d","in","Proc",".","Symp",".","Adaptive","Syst",".","Signal","Process.",",","Commun",".","Contr.",",","Lake","Louise",",","AB",",","Canada",",","Oct.","2000",".","Online","Copy",":","https",":","\/\/www.seas.harvard.edu\/courses\/cs281\/papers\/unscented.pdf"]
docstr: Performs the predict step of the UKF. On return, self.x and
  self.P contain the predicted state (x) and covariance (P). '
  
  Important: this MUST be called before update() is called for the first
  time.
  
  Parameters
  ----------
  
  dt : double, optional
      If specified, the time step to be used for this prediction.
      self._dt is used if this is not provided.
  
  UT : function(sigmas, Wm, Wc, noise_cov), optional
      Optional function to compute the unscented transform for the sigma
      points passed through hx. Typically the default function will
      work - you can use x_mean_fn and z_mean_fn to alter the behavior
      of the unscented transform.
  
  fx_args : tuple, optional, default (,)
      optional arguments to be passed into fx() after the required state
      variable.
docstr_tok: ["Performs","the","predict","step","of","the","UKF",".","On","return",",","self.x","and","self.P","contain","the","predicted","state","(","x",")","and","covariance","(","P",")",".","'","Important",":","this","MUST","be","called","before","update","(",")","is","called","for","the","first","time",".","Parameters","--","--","--","--","--","dt",":","double",",","optional","If","specified",",","the","time","step","to","be","used","for","this","prediction",".","self._dt","is","used","if","this","is","not","provided",".","UT",":","function","(","sigmas",",","Wm",",","Wc",",","noise_cov",")",",","optional","Optional","function","to","compute","the","unscented","transform","for","the","sigma","points","passed","through","hx",".","Typically","the","default","function","will","work","-","you","can","use","x_mean_fn","and","z_mean_fn","to","alter","the","behavior","of","the","unscented","transform",".","fx_args",":","tuple",",","optional",",","default","(",",",")","optional","arguments","to","be","passed","into","fx","(",")","after","the","required","state","variable","."]
code: def predict(self, dt=None, UT=None, fx_args=()):
      r"""Performs the predict step of the UKF. On return, self.x and
      self.P contain the predicted state (x) and covariance (P). '
  
      Important: this MUST be called before update() is called for the first
      time.
  
      Parameters
      ----------
  
      dt : double, optional
          If specified, the time step to be used for this prediction.
          self._dt is used if this is not provided.
  
      UT : function(sigmas, Wm, Wc, noise_cov), optional
          Optional function to compute the unscented transform for the sigma
          points passed through hx. Typically the default function will
          work - you can use x_mean_fn and z_mean_fn to alter the behavior
          of the unscented transform.
  
      fx_args : tuple, optional, default (,)
          optional arguments to be passed into fx() after the required state
          variable.
      """
  
      if dt is None:
          dt = self._dt
  
      if not isinstance(fx_args, tuple):
          fx_args = (fx_args,)
  
      if UT is None:
          UT = unscented_transform2
  
      # calculate sigma points for given mean and covariance
      sigmas = self.points_fn.sigma_points(self.x, self.P)
  
      for i in range(self._num_sigmas):
          self.sigmas_f[:, i] = self.fx(sigmas[:, i], dt, *fx_args)
  
      self.x, self.P = UT(
          self.sigmas_f,
          self.Wm,
          self.Wc,
          self.Q,
          self.x_mean,
          self.residual_x,
      )
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import matplotlib.pyplot
  import numpy.random
  from numpy.random import randn
  from numpy import asarray
  import numpy
  from filterpy.kalman import UnscentedKalmanFilter
  from filterpy.kalman import unscented_transform, MerweScaledSigmaPoints, JulierSigmaPoints, SimplexSigmaPoints
  from filterpy.common import Q_discrete_white_noise
  import filterpy.stats
  from math import cos, sin
  from filterpy.kalman import UnscentedKalmanFilter2
label_desc: Use image node_id 2 for calling the UnscentedKalmanFilter2 obj's underlying member method code with example usage: obj.predict(dt, UT, fx_args) without return types