This guide explains how to configure the User FIR filter applied to accelerometer and gyroscope data to meet your application requirements in terms of bandwidth, latency, and relative timing between sensor measurements.

Before You Start

PULSE implements the sbgInsRestApi protocol over a serial interface. All available settings and commands are described on the Digital interfaces page. All examples use the sbgEComApi command-line tool.

In this guide, we consider a PULSE connected to a Windows computer on serial port COM12, using the default baud rate of 921600 bps.

Read the Current FIR Filter Coefficients

You can read the current FIR filter coefficients using the following commands.

Accelerometers

Use the following command to read the current accelerometer FIR filter coefficients:

sbgEComApi.exe -s COM12 -r 921600 -g /api/v1/settings/imuFilter/comA/accelerometers/firFilter

By default, the device returns:

{"coefficients":[]}

Info

An empty coefficient array indicates that no User FIR filter is applied to the accelerometer measurements.

Gyroscopes

Use the following command to read the current gyroscope FIR filter coefficients:

sbgEComApi.exe -s COM12 -r 921600 -g /api/v1/settings/imuFilter/comA/gyroscopes/firFilter

By default, the device returns the coefficients of its internal filter:

{"coefficients":[0.25700291991233826,0.48599418997764587,0.25700291991233826]}

Change the FIR Filter Coefficients

The following command sets new User FIR filter coefficients for the gyroscopes:

sbgEComApi.exe -s COM12 -r 921600 /api/v1/settings/imuFilter/comA/gyroscopes/firFilter -p -b '{\"coefficients\":[0.2,0.2,0.3,0.3]}' 

To configure the accelerometer User FIR filter, replace gyroscopes with accelerometers in the API path.

Important

Ensure that the FIR filter coefficients are normalized so that their sum equals 1. Otherwise, the filter will not have unity gain and will alter the scale of constant or low-frequency accelerometer and gyroscope measurements.

If the FIR filter coefficients are successfully updated, the device should return:

{"title":"request successful","needReboot":true}

Alternative Configuration Method

FIR filter coefficients can also be configured by exporting, modifying, and importing the device settings as a JSON file. For more information, see Export and Import Settings .

Save the New Settings

To retain the new FIR filter coefficients after a power cycle, save the device configuration using the following command:

sbgEComApi.exe -s COM12 -r 921600 /api/v1/settings/save -p

If the settings are successfully saved, the device should return:

{"title":"request successful"}