sbgECom Library  5.3.2276-stable
Interface SBG Systems IMU/AHRS/INS
Loading...
Searching...
No Matches
sbgEComVibMonFft.h File Reference

Vibration monitoring FFT management. More...

Go to the source code of this file.

Data Structures

struct  _SbgEComVibMonFft
 

Macros

#define SBG_ECOM_VIB_MON_FFT_MAX_BIN_COUNT   (2048)
 

Typedefs

typedef struct _SbgEComVibMonFft SbgEComVibMonFft
 

Functions

SbgErrorCode sbgEComVibMonFftReadFromStream (SbgEComVibMonFft *pVibMonFft, SbgStreamBuffer *pStreamBuffer)
 
SbgErrorCode sbgEComVibMonFftWriteToStream (const SbgEComVibMonFft *pVibMonFft, SbgStreamBuffer *pStreamBuffer)
 
SbgEComVibMonAxis sbgEComVibMonFftGetAxis (const SbgEComVibMonFft *pLogData)
 
SbgEComVibMonWindow sbgEComVibMonFftGetWindow (const SbgEComVibMonFft *pLogData)
 
float sbgEComVibMonFftGetFrequencyFromBinIndex (const SbgEComVibMonFft *pVibMonFft, size_t binIndex)
 
size_t sbgEComVibMonFftGetBinIndexFromFrequency (const SbgEComVibMonFft *pVibMonFft, float frequency)
 
float sbgEComVibMonFftGetMagnitudeFromBinIndex (const SbgEComVibMonFft *pVibMonFft, size_t binIndex)
 
float sbgEComVibMonFftGetMagnitudeFromBinIndexAcfCorrected (const SbgEComVibMonFft *pVibMonFft, size_t binIndex)
 
float sbgEComVibMonFftGetMagnitudeFromBinIndexEcfCorrected (const SbgEComVibMonFft *pVibMonFft, size_t binIndex)
 
float sbgEComVibMonFftGetMagnitudeFromFrequency (const SbgEComVibMonFft *pVibMonFft, float frequency)
 
float sbgEComVibMonFftGetMagnitudeFromFrequencyAcfCorrected (const SbgEComVibMonFft *pVibMonFft, float frequency)
 
float sbgEComVibMonFftGetMagnitudeFromFrequencyEcfCorrected (const SbgEComVibMonFft *pVibMonFft, float frequency)
 

Detailed Description

Vibration monitoring FFT management.

Author
SBG Systems
Date
May 5, 2025

Vibration monitoring FFT logs may be sent regularly by a device. This module handles the reassembly of that information for the convenience of the user.

License

The MIT license

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Macro Definition Documentation

◆ SBG_ECOM_VIB_MON_FFT_MAX_BIN_COUNT

#define SBG_ECOM_VIB_MON_FFT_MAX_BIN_COUNT   (2048)

Maximum number of bins.

Typedef Documentation

◆ SbgEComVibMonFft

Vibration monitoring FFT, reconstructed.

This is a public structure.

Function Documentation

◆ sbgEComVibMonFftReadFromStream()

SbgErrorCode sbgEComVibMonFftReadFromStream ( SbgEComVibMonFft * pVibMonFft,
SbgStreamBuffer * pStreamBuffer )

Parse vibration monitoring FFT data and fill the corresponding structure.

Parameters
[out]pVibMonFftStructure instance to fill.
[in]pStreamBufferInput stream buffer to read from.
Returns
SBG_NO_ERROR if valid vibration monitoring FFT data have been read from the stream buffer.

◆ sbgEComVibMonFftWriteToStream()

SbgErrorCode sbgEComVibMonFftWriteToStream ( const SbgEComVibMonFft * pVibMonFft,
SbgStreamBuffer * pStreamBuffer )

Write vibration monitoring FFT data to the output stream buffer.

Parameters
[in]pVibMonFftStructure instance to write.
[out]pStreamBufferOutput stream buffer to write to.
Returns
SBG_NO_ERROR if vibration monitoring FFT data have have been written to the stream buffer.

◆ sbgEComVibMonFftGetAxis()

SbgEComVibMonAxis sbgEComVibMonFftGetAxis ( const SbgEComVibMonFft * pLogData)

Returns the vibration monitoring axis status.

Parameters
[in]pLogDataLog instance.
Returns
Axis.

◆ sbgEComVibMonFftGetWindow()

SbgEComVibMonWindow sbgEComVibMonFftGetWindow ( const SbgEComVibMonFft * pLogData)

Returns the vibration monitoring window status.

Parameters
[in]pLogDataLog instance.
Returns
Window.

◆ sbgEComVibMonFftGetFrequencyFromBinIndex()

float sbgEComVibMonFftGetFrequencyFromBinIndex ( const SbgEComVibMonFft * pVibMonFft,
size_t binIndex )

Get the first frequency of a bin, in Hz.

Parameters
[in]pVibMonFftVibration monitoring FFT.
[in]binIndexBin index.
Returns
Bin frequency, in Hz.

◆ sbgEComVibMonFftGetBinIndexFromFrequency()

size_t sbgEComVibMonFftGetBinIndexFromFrequency ( const SbgEComVibMonFft * pVibMonFft,
float frequency )

Get the index of the bin that contains the frequency.

The frequency must be valid (i.e. positive and smaller than the Nyquist frequency).

Parameters
[in]pVibMonFftVibration monitoring FFT.
[in]frequencyBin frequency, in Hz.
Returns
Bin index.

◆ sbgEComVibMonFftGetMagnitudeFromBinIndex()

float sbgEComVibMonFftGetMagnitudeFromBinIndex ( const SbgEComVibMonFft * pVibMonFft,
size_t binIndex )

Get the magnitude of a bin, in m.s^-2.

Parameters
[in]pVibMonFftVibration monitoring FFT.
[in]binIndexBin index.
Returns
Magnitude, in m.s^-2.

◆ sbgEComVibMonFftGetMagnitudeFromBinIndexAcfCorrected()

float sbgEComVibMonFftGetMagnitudeFromBinIndexAcfCorrected ( const SbgEComVibMonFft * pVibMonFft,
size_t binIndex )

Get the magnitude of a bin, with the amplitude correction factor applied, in m.s^-2.

Parameters
[in]pVibMonFftVibration monitoring FFT.
[in]binIndexBin index.
Returns
Magnitude, in m.s^-2.

◆ sbgEComVibMonFftGetMagnitudeFromBinIndexEcfCorrected()

float sbgEComVibMonFftGetMagnitudeFromBinIndexEcfCorrected ( const SbgEComVibMonFft * pVibMonFft,
size_t binIndex )

Get the magnitude of a bin, with the energy correction factor applied, in m.s^-2.

Parameters
[in]pVibMonFftVibration monitoring FFT.
[in]binIndexBin index.
Returns
Magnitude, in m.s^-2.

◆ sbgEComVibMonFftGetMagnitudeFromFrequency()

float sbgEComVibMonFftGetMagnitudeFromFrequency ( const SbgEComVibMonFft * pVibMonFft,
float frequency )

Get the magnitude of a frequency, in m.s^-2.

The frequency must be valid (i.e. positive and smaller than the Nyquist frequency). The magnitude returned is the magnitude of the bin that contains the frequency.

Parameters
[in]pVibMonFftVibration monitoring FFT.
[in]frequencyFrequency, in Hz.
Returns
Magnitude, in m.s^-2.

◆ sbgEComVibMonFftGetMagnitudeFromFrequencyAcfCorrected()

float sbgEComVibMonFftGetMagnitudeFromFrequencyAcfCorrected ( const SbgEComVibMonFft * pVibMonFft,
float frequency )

Get the magnitude of a frequency, with the amplitude correction factor applied, in m.s^-2.

The frequency must be valid (i.e. positive and smaller than the Nyquist frequency). The magnitude returned is the magnitude of the bin that contains the frequency.

Parameters
[in]pVibMonFftVibration monitoring FFT.
[in]frequencyFrequency, in Hz.
Returns
Magnitude, in m.s^-2.

◆ sbgEComVibMonFftGetMagnitudeFromFrequencyEcfCorrected()

float sbgEComVibMonFftGetMagnitudeFromFrequencyEcfCorrected ( const SbgEComVibMonFft * pVibMonFft,
float frequency )

Get the magnitude of a frequency, with the energy correction factor applied, in m.s^-2.

The frequency must be valid (i.e. positive and smaller than the Nyquist frequency). The magnitude returned is the magnitude of the bin that contains the frequency.

Parameters
[in]pVibMonFftVibration monitoring FFT.
[in]frequencyFrequency, in Hz.
Returns
Magnitude, in m.s^-2.