class_docstr: Implements the g-h-k filter.
  
  Parameters
  ----------
  
  x : 1D np.array or scalar
      Initial value for the filter state. Each value can be a scalar
      or a np.array.
  
      You can use a scalar for x0. If order > 0, then 0.0 is assumed
      for the higher order terms.
  
      x[0] is the value being tracked
      x[1] is the first derivative (for order 1 and 2 filters)
      x[2] is the second derivative (for order 2 filters)
  
  dx : 1D np.array or scalar
      Initial value for the derivative of the filter state.
  
  ddx : 1D np.array or scalar
      Initial value for the second derivative of the filter state.
  
  dt : scalar
      time step
  
  g : float
      filter g gain parameter.
  
  h : float
      filter h gain parameter.
  
  k : float
      filter k gain parameter.
  
  
  
  Attributes
  ----------
  x : 1D np.array or scalar
      filter state
  
  dx : 1D np.array or scalar
     derivative of the filter state.
  
  ddx : 1D np.array or scalar
     second derivative of the filter state.
  
  x_prediction : 1D np.array or scalar
      predicted filter state
  
  dx_prediction : 1D np.array or scalar
     predicted derivative of the filter state.
  
  ddx_prediction : 1D np.array or scalar
     second predicted derivative of the filter state.
  
  dt : scalar
      time step
  
  g : float
      filter g gain parameter.
  
  h : float
      filter h gain parameter.
  
  k : float
      filter k gain parameter.
  
  y : np.array, or scalar
      residual (difference between measurement and prior)
  
  z : np.array, or scalar
      measurement passed into update()
  
  References
  ----------
  
  Brookner, "Tracking and Kalman Filters Made Easy". John Wiley and
  Sons, 1998.
class_docstr_tok: ["Implements","the","g-h-k","filter",".","Parameters","--","--","--","--","--","x",":","1D","np.array","or","scalar","Initial","value","for","the","filter","state",".","Each","value","can","be","a","scalar","or","a","np.array",".","You","can","use","a","scalar","for","x0",".","If","order",">","0",",","then","0.0","is","assumed","for","the","higher","order","terms",".","x","[","0","]","is","the","value","being","tracked","x","[","1","]","is","the","first","derivative","(","for","order","1","and","2","filters",")","x","[","2","]","is","the","second","derivative","(","for","order","2","filters",")","dx",":","1D","np.array","or","scalar","Initial","value","for","the","derivative","of","the","filter","state",".","ddx",":","1D","np.array","or","scalar","Initial","value","for","the","second","derivative","of","the","filter","state",".","dt",":","scalar","time","step","g",":","float","filter","g","gain","parameter",".","h",":","float","filter","h","gain","parameter",".","k",":","float","filter","k","gain","parameter",".","Attributes","--","--","--","--","--","x",":","1D","np.array","or","scalar","filter","state","dx",":","1D","np.array","or","scalar","derivative","of","the","filter","state",".","ddx",":","1D","np.array","or","scalar","second","derivative","of","the","filter","state",".","x_prediction",":","1D","np.array","or","scalar","predicted","filter","state","dx_prediction",":","1D","np.array","or","scalar","predicted","derivative","of","the","filter","state",".","ddx_prediction",":","1D","np.array","or","scalar","second","predicted","derivative","of","the","filter","state",".","dt",":","scalar","time","step","g",":","float","filter","g","gain","parameter",".","h",":","float","filter","h","gain","parameter",".","k",":","float","filter","k","gain","parameter",".","y",":","np.array",",","or","scalar","residual","(","difference","between","measurement","and","prior",")","z",":","np.array",",","or","scalar","measurement","passed","into","update","(",")","References","--","--","--","--","--","Brookner",",","``","Tracking","and","Kalman","Filters","Made","Easy","''",".","John","Wiley","and","Sons",",","1998","."]
code: def __init__(self, x, dx, ddx, dt, g, h, k):
      self.x = x
      self.dx = dx
      self.ddx = ddx
      self.x_prediction = self.x
      self.dx_prediction = self.dx
      self.ddx_prediction = self.ddx
  
      self.dt = dt
      self.g = g
      self.h = h
      self.k = k
  
      if np.ndim(x) == 0:
          self.y = 0.0  # residual
          self.z = 0.0
      else:
          self.y = np.zeros(len(x))
          self.z = np.zeros(len(x))
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import numpy
  from numpy import dot
  from filterpy.common import pretty_str
label_desc: Use image node_id 1 to create a new GHKFilter object from inherited base classes: object with example: obj = GHKFilter(x, dx, ddx, dt, g, h, k)