Copyright 2015 Roger R Labbe Jr.

FilterPy library.

Documentation at:

Supporting book at:

This is licensed under an MIT license. See the readme.MD file for more information., critical=False)[source]

Computes the g,h constants for a Benedict-Bordner filter, which minimizes transient errors for a g-h filter.

Returns the values g,h for a specified g. Strictly speaking, only h is computed, g is returned unchanged.

The default formula for the Benedict-Bordner allows ringing. We can “nearly” critically damp it; ringing will be reduced, but not entirely eliminated at the cost of reduced performance.

g : float

scaling factor g for the filter

critical : boolean, default False

Attempts to critically damp the filter.

g : float

scaling factor g (same as the g that was passed in)

h : float

scaling factor h that minimizes the transient errors


Brookner, “Tracking and Kalman Filters Made Easy”. John Wiley and Sons, 1998.


from import GHFilter, benedict_bornder_constants
g, h = benedict_bornder_constants(.855)
f = GHFilter(0, 0, 1, g, h)