#include <complex.h>
#include <float.h>
#include <inttypes.h>
#include <math.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "acc_alg_basic_utils.h"
#include "acc_algorithm.h"
#include "acc_config.h"
#include "acc_config_subsweep.h"
#include "acc_integration.h"
#include "acc_integration_log.h"
#include "acc_processing.h"
#include "example_vibration.h"
Go to the source code of this file.
|
| static void | circular_float_buffer_write_angle (circular_float_buffer_t *cb, float new_element) |
| | Write an angle (in rads) to the circular buffer. The angle will be "unwrapped" before write. More...
|
| |
| static float | circular_float_buffer_get (const circular_float_buffer_t *cb, uint16_t chronological_idx) |
| | Get an element of the circular buffer given its "age". A chronological index of 0 returns the oldest element in the buffer. More...
|
| |
| static bool | validate_config (const acc_vibration_config_t *config) |
| |
| static bool | translate_config (const acc_vibration_config_t *config, acc_config_t *sensor_config) |
| |
| static void | setup_rfft_bounds (acc_vibration_handle_t *handle, const acc_vibration_config_t *config) |
| |
| static void | setup_sample_frequencies (acc_vibration_handle_t *handle, float sweep_rate) |
| |
| static void | update_vibration_result (acc_vibration_handle_t *handle, acc_vibration_config_t *config, acc_vibration_result_t *result) |
| |
| static float * | get_zero_mean_time_series (acc_vibration_handle_t *handle) |
| |
| static void | calculate_threshold (acc_vibration_handle_t *handle, acc_vibration_config_t *config) |
| |
| void | acc_vibration_preset_set (acc_vibration_config_t *config, acc_vibration_preset_t preset) |
| |
| void | acc_vibration_config_log (const acc_vibration_config_t *config) |
| |
| acc_vibration_handle_t * | acc_vibration_handle_create (const acc_vibration_config_t *config) |
| |
| const acc_config_t * | acc_vibration_handle_sensor_config_get (acc_vibration_handle_t *handle) |
| |
| const float * | acc_vibration_handle_displacement_history_get (acc_vibration_handle_t *handle, uint16_t *num_elem) |
| |
| bool | acc_vibration_handle_continuous_data_acquisition_get (acc_vibration_handle_t *handle, bool *continuous_data_acquisition) |
| |
| void | acc_vibration_handle_destroy (acc_vibration_handle_t *handle) |
| |
| void | acc_vibration_process (acc_processing_result_t *proc_result, acc_vibration_handle_t *handle, acc_vibration_config_t *config, acc_vibration_result_t *result) |
| |
◆ BOOL_TO_STR
| #define BOOL_TO_STR |
( |
|
b | ) |
(b ? "true" : "false") |
◆ CFAR_HALF_GUARD_LENGTH
| #define CFAR_HALF_GUARD_LENGTH (5U) |
◆ CFAR_MARGIN
◆ CFAR_WINDOW_LENGTH
| #define CFAR_WINDOW_LENGTH (10U) |
◆ IS_POWER_OF_TWO
| #define IS_POWER_OF_TWO |
( |
|
x | ) |
(((x) & ((x) - 1)) == 0) |
◆ MODULE
| #define MODULE "example_vibration" |
◆ NUM_POINTS
◆ RADIANS_TO_DISPLACEMENT_FACTOR
| #define RADIANS_TO_DISPLACEMENT_FACTOR (394.32604621792916f) |
/ c/f \ | ----— | * 1e6 with c = 299792458 m/s,
\ 2 / f = 60.5 GHz
2 pi
Definition at line 32 of file example_vibration.c.
◆ acc_vibration_config_log()
◆ acc_vibration_handle_continuous_data_acquisition_get()
| bool acc_vibration_handle_continuous_data_acquisition_get |
( |
acc_vibration_handle_t * |
handle, |
|
|
bool * |
continuous_data_acquisition |
|
) |
| |
- Parameters
-
| [in] | handle | A handle to get the internal setting from |
| [out] | continuous_data_acquisition | Wether continuous data acquisition is enabled |
- Returns
- True is arguments are non-NULL, false otherwise
Definition at line 369 of file example_vibration.c.
◆ acc_vibration_handle_create()
- Parameters
-
| [in] | config | A vibration app config to set default settings to. |
- Returns
- A vibration processing handle
Definition at line 233 of file example_vibration.c.
◆ acc_vibration_handle_destroy()
◆ acc_vibration_handle_displacement_history_get()
| const float* acc_vibration_handle_displacement_history_get |
( |
acc_vibration_handle_t * |
handle, |
|
|
uint16_t * |
num_elem |
|
) |
| |
- Parameters
-
| [in] | handle | A handle to get the internal displacement history from |
| [out] | num_elem | The number of elements in the returned array |
- Returns
- An array with displacements if arguments are non-NULL
Definition at line 355 of file example_vibration.c.
◆ acc_vibration_handle_sensor_config_get()
- Parameters
-
- Returns
- pointer to a sensor config corresponding to the vibration config 'handle' was created with.
Definition at line 350 of file example_vibration.c.
◆ acc_vibration_preset_set()
- Parameters
-
| [out] | config | The vibration config to set a preset for |
| [in] | preset | The preset |
Definition at line 115 of file example_vibration.c.
◆ acc_vibration_process()
- Parameters
-
| [in] | proc_result | Input for vibration processing |
| [in] | handle | The vibration processing handle |
| [in] | config | The vibration app config |
| [out] | result | The vibration processing result |
Definition at line 437 of file example_vibration.c.
◆ calculate_threshold()
◆ circular_float_buffer_get()
Get an element of the circular buffer given its "age". A chronological index of 0 returns the oldest element in the buffer.
Definition at line 568 of file example_vibration.c.
◆ circular_float_buffer_write_angle()
Write an angle (in rads) to the circular buffer. The angle will be "unwrapped" before write.
Definition at line 558 of file example_vibration.c.
◆ get_zero_mean_time_series()
◆ setup_rfft_bounds()
◆ setup_sample_frequencies()
◆ translate_config()
◆ update_vibration_result()
◆ validate_config()