Go to the documentation of this file.
37 #define SENSOR_ID (1U)
43 int app_main(
int argc,
char *argv[]);
65 printf(
"acc_control_helper_create() failed\n");
74 printf(
"acc_control_helper_activate() failed\n");
87 bool mem_ok = (current_sweep_iq != NULL) && (adaptive_background_iq != NULL) &&
88 (motion_reflections_iq != NULL) && (adaptive_background_amplitude != NULL) &&
89 (motion_reflections_amplitude != NULL);
93 printf(
"Memory allocation for vectors failed\n");
97 float time_constant_static_background = 5.0f;
101 uint32_t iterations = 50U;
103 for (uint32_t i = 0U; i < iterations; i++)
107 printf(
"acc_control_helper_get_next() failed\n");
125 printf(
"Highest background peak index : %" PRIu32
"\n", max_peak_index_static);
126 printf(
"Highest motion peak index : %" PRIu32
"\n", max_peak_index_motion);
139 printf(
"Application finished OK\n");
147 int32_t start_point = 100;
148 uint16_t step_length = 12;
149 uint16_t num_points = 16;
void acc_config_start_point_set(acc_config_t *config, int32_t start_point)
Set the starting point of the sweep.
bool acc_control_helper_create(acc_control_helper_t *radar, acc_sensor_id_t sensor_id)
Create a helper instance.
void acc_vector_float_free(acc_vector_float_t *vector)
Free storage of data elements in a float vector.
void acc_vector_iq_free(acc_vector_iq_t *vector)
Free storage of data elements in an IQ vector.
void acc_config_profile_set(acc_config_t *config, acc_config_profile_t profile)
Set a profile.
void acc_config_sweeps_per_frame_set(acc_config_t *config, uint16_t sweeps)
Set sweeps per frame.
float acc_processing_helper_dynamic_sf(float static_sf, uint32_t update_count)
Calculate a dynamic smoothing factor.
void acc_vector_iq_subtract(const acc_vector_iq_t *vector_a, const acc_vector_iq_t *vector_b, acc_vector_iq_t *vector_out)
Subtract two IQ vectors.
void acc_control_helper_destroy(acc_control_helper_t *radar)
Destroy a helper instance.
const acc_hal_a121_t * acc_hal_rss_integration_get_implementation(void)
Get hal implementation reference.
void acc_config_frame_rate_set(acc_config_t *config, float frame_rate)
Set the frame rate.
acc_processing_metadata_t proc_meta
int app_main(int argc, char *argv[])
Assembly test example.
void acc_vector_iq_amplitude(const acc_vector_iq_t *vector_a, acc_vector_float_t *vector_out)
Amplitude of an IQ vector.
void acc_config_hwaas_set(acc_config_t *config, uint16_t hwaas)
Set the hardware accelerated average samples (HWAAS)
const char * acc_version_get(void)
Get the version of the Acconeer software.
struct acc_config acc_config_t
float acc_config_frame_rate_get(const acc_config_t *config)
Get the frame rate.
void acc_config_step_length_set(acc_config_t *config, uint16_t step_length)
Set the step length in a sweep.
void acc_config_num_points_set(acc_config_t *config, uint16_t num_points)
Set the number of data points to measure.
acc_vector_iq_t * acc_vector_iq_alloc(uint32_t data_length)
Allocate storage for an IQ vector.
acc_vector_float_t * acc_vector_float_alloc(uint32_t data_length)
Allocate storage for a float vector.
void acc_vector_float_print(const char *label, acc_vector_float_t *vector_a)
Print float vector.
static const acc_hal_a121_t hal
bool acc_control_helper_activate(acc_control_helper_t *radar)
Activate the sensor.
void acc_config_prf_set(acc_config_t *config, acc_config_prf_t prf)
Set Pulse Repetition Frequency.
@ ACC_CONFIG_PRF_13_0_MHZ
bool acc_control_helper_get_next(acc_control_helper_t *radar)
Perform a radar measurement and wait for the result.
void acc_get_iq_sweep_vector(const acc_control_helper_t *control_helper_state, acc_vector_iq_t *vector_out)
Converts a newly captured IQ frame with one sweep to an IQ vector.
static void update_configuration(acc_config_t *config)
uint32_t acc_vector_float_argmax(acc_vector_float_t *vector_a)
Index of element with maximum value in a float vector.
void acc_vector_iq_update_exponential_average(const acc_vector_iq_t *current, acc_vector_iq_t *averaged_data, float sf)
Update the exponential average of an IQ vector.
float acc_processing_helper_tc_to_sf(float time_constant_s, float update_rate_hz)
Convert time constant to smoothing factor.