|
Presence detector API description. More...
Data Structures | |
struct | acc_detector_presence_result_t |
Presence detector results container. More... | |
struct | acc_detector_presence_metadata_t |
Typedefs | |
typedef struct acc_detector_presence_handle | acc_detector_presence_handle_t |
typedef struct acc_detector_presence_config | acc_detector_presence_config_t |
Functions | |
acc_detector_presence_config_t * | acc_detector_presence_config_create (void) |
Create a configuration for a presence detector. More... | |
void | acc_detector_presence_config_destroy (acc_detector_presence_config_t *presence_config) |
Destroy a presence detector configuration. More... | |
void | acc_detector_presence_config_log (acc_detector_presence_config_t *presence_config) |
Print a configuration to the log. More... | |
bool | acc_detector_presence_get_buffer_size (const acc_detector_presence_handle_t *presence_handle, uint32_t *buffer_size) |
Get the buffer size needed for the provided presence detector handle. More... | |
acc_detector_presence_handle_t * | acc_detector_presence_create (acc_detector_presence_config_t *presence_config, acc_detector_presence_metadata_t *metadata) |
Create a presence detector with the provided configuration. More... | |
void | acc_detector_presence_destroy (acc_detector_presence_handle_t *presence_handle) |
Destroy a presence detector identified with the provided handle. More... | |
bool | acc_detector_presence_prepare (const acc_detector_presence_handle_t *presence_handle, acc_detector_presence_config_t *presence_config, acc_sensor_t *sensor, const acc_cal_result_t *cal_result, void *buffer, uint32_t buffer_size) |
Prepare the detector to do a measurement. More... | |
bool | acc_detector_presence_process (acc_detector_presence_handle_t *presence_handle, void *buffer, acc_detector_presence_result_t *result) |
Process the data according to the configuration used in acc_detector_presence_config_create. More... | |
void | acc_detector_presence_config_start_set (acc_detector_presence_config_t *presence_config, float start) |
Set the start point of measurement interval in meters. More... | |
float | acc_detector_presence_config_start_get (const acc_detector_presence_config_t *presence_config) |
Get the start point of measurement interval in meters. More... | |
void | acc_detector_presence_config_end_set (acc_detector_presence_config_t *presence_config, float end) |
Set the end point of measurement interval in meters. More... | |
float | acc_detector_presence_config_end_get (const acc_detector_presence_config_t *presence_config) |
Get the end point of measurement interval in meters. More... | |
void | acc_detector_presence_config_step_length_set (acc_detector_presence_config_t *presence_config, uint16_t step_length) |
Set the step length in points. More... | |
uint16_t | acc_detector_presence_config_step_length_get (const acc_detector_presence_config_t *presence_config) |
Get the step length in points. More... | |
void | acc_detector_presence_config_auto_step_length_set (acc_detector_presence_config_t *presence_config, bool enable) |
Enable automatic selection of step length based on the profile. More... | |
bool | acc_detector_presence_config_auto_step_length_get (const acc_detector_presence_config_t *presence_config) |
Get if automatic selection of step length based on the profile is enabled. More... | |
void | acc_detector_presence_config_profile_set (acc_detector_presence_config_t *presence_config, acc_config_profile_t profile) |
Set a profile. More... | |
acc_config_profile_t | acc_detector_presence_config_profile_get (const acc_detector_presence_config_t *presence_config) |
Get the currently set profile. More... | |
void | acc_detector_presence_config_auto_profile_set (acc_detector_presence_config_t *presence_config, bool enable) |
Enable automatic selection of profile based on start point of measurement. More... | |
bool | acc_detector_presence_config_auto_profile_get (const acc_detector_presence_config_t *presence_config) |
Get if automatic selection of profile based on start point of measurement is enabled. More... | |
void | acc_detector_presence_config_inter_frame_idle_state_set (acc_detector_presence_config_t *presence_config, acc_config_idle_state_t idle_state) |
Set inter frame idle state. More... | |
acc_config_idle_state_t | acc_detector_presence_config_inter_frame_idle_state_get (const acc_detector_presence_config_t *presence_config) |
Get inter frame idle state. More... | |
void | acc_detector_presence_config_hwaas_set (acc_detector_presence_config_t *presence_config, uint16_t hwaas) |
Set the hardware accelerated average samples (HWAAS) More... | |
uint16_t | acc_detector_presence_config_hwaas_get (const acc_detector_presence_config_t *presence_config) |
Get the hardware accelerated average samples (HWAAS) More... | |
void | acc_detector_presence_config_sweeps_per_frame_set (acc_detector_presence_config_t *presence_config, uint16_t sweeps_per_frame) |
Set the number of sweeps per frame. More... | |
uint16_t | acc_detector_presence_config_sweeps_per_frame_get (const acc_detector_presence_config_t *presence_config) |
Get the number of sweeps per frame. More... | |
void | acc_detector_presence_config_frame_rate_set (acc_detector_presence_config_t *presence_config, float frame_rate) |
Set the frame rate. More... | |
float | acc_detector_presence_config_frame_rate_get (const acc_detector_presence_config_t *presence_config) |
Get the frame rate. More... | |
void | acc_detector_presence_config_frame_rate_app_driven_set (acc_detector_presence_config_t *presence_config, bool enable) |
Set if the application should maintain the requested frame rate. More... | |
bool | acc_detector_presence_config_frame_rate_app_driven_get (const acc_detector_presence_config_t *presence_config) |
Get if the application should maintain the requested frame rate. More... | |
void | acc_detector_presence_config_sensor_set (acc_detector_presence_config_t *presence_config, acc_sensor_id_t sensor_id) |
Set sensor ID. More... | |
acc_sensor_id_t | acc_detector_presence_config_sensor_get (const acc_detector_presence_config_t *presence_config) |
Get sensor ID. More... | |
void | acc_detector_presence_config_reset_filters_on_prepare_set (acc_detector_presence_config_t *presence_config, bool enable) |
Set if the presence filters should reset on prepare. More... | |
bool | acc_detector_presence_config_reset_filters_on_prepare_get (const acc_detector_presence_config_t *presence_config) |
Get if the presence filters should reset on prepare. More... | |
void | acc_detector_presence_config_inter_frame_presence_timeout_set (acc_detector_presence_config_t *presence_config, uint16_t inter_frame_presence_timeout) |
Set the inter-frame presence timeout in seconds. More... | |
uint16_t | acc_detector_presence_config_inter_frame_presence_timeout_get (const acc_detector_presence_config_t *presence_config) |
Get the inter-frame presence timeout in seconds. More... | |
void | acc_detector_presence_config_inter_phase_boost_set (acc_detector_presence_config_t *presence_config, bool enable) |
Set inter-frame phase boost. More... | |
bool | acc_detector_presence_config_inter_phase_boost_get (const acc_detector_presence_config_t *presence_config) |
Get if inter-frame phase boost is enabled. More... | |
void | acc_detector_presence_config_intra_detection_set (acc_detector_presence_config_t *presence_config, bool enable) |
Set intra-frame presence detection. More... | |
bool | acc_detector_presence_config_intra_detection_get (const acc_detector_presence_config_t *presence_config) |
Get if frame intra-frame presence detection is enabled. More... | |
void | acc_detector_presence_config_intra_detection_threshold_set (acc_detector_presence_config_t *presence_config, float intra_detection_threshold) |
Set the detection threshold for the intra-frame presence detection. More... | |
float | acc_detector_presence_config_intra_detection_threshold_get (const acc_detector_presence_config_t *presence_config) |
Get the detection threshold for the intra-frame presence detection. More... | |
void | acc_detector_presence_config_inter_detection_set (acc_detector_presence_config_t *presence_config, bool enable) |
Set inter-frame presence detection. More... | |
bool | acc_detector_presence_config_inter_detection_get (const acc_detector_presence_config_t *presence_config) |
Get if inter-frame presence detection is enabled. More... | |
void | acc_detector_presence_config_inter_detection_threshold_set (acc_detector_presence_config_t *presence_config, float inter_detection_threshold) |
Set the detection threshold for the inter-frame presence detection. More... | |
float | acc_detector_presence_config_inter_detection_threshold_get (const acc_detector_presence_config_t *presence_config) |
Get the detection threshold for the inter-frame presence detection. More... | |
void | acc_detector_presence_config_inter_frame_deviation_time_const_set (acc_detector_presence_config_t *presence_config, float inter_frame_deviation_time_const) |
Set the time constant of the low pass filter for the inter-frame deviation between fast and slow. More... | |
float | acc_detector_presence_config_inter_frame_deviation_time_const_get (const acc_detector_presence_config_t *presence_config) |
Get the time constant of the low pass filter for the inter-frame deviation between fast and slow. More... | |
void | acc_detector_presence_config_inter_frame_fast_cutoff_set (acc_detector_presence_config_t *presence_config, float inter_frame_fast_cutoff) |
Set the cutoff frequency of the low pass filter for the fast filtered absolute sweep mean. More... | |
float | acc_detector_presence_config_inter_frame_fast_cutoff_get (const acc_detector_presence_config_t *presence_config) |
Get the cutoff frequency of the low pass filter for the fast filtered absolute sweep mean. More... | |
void | acc_detector_presence_config_inter_frame_slow_cutoff_set (acc_detector_presence_config_t *presence_config, float inter_frame_slow_cutoff) |
Set the cutoff frequency of the low pass filter for the slow filtered absolute sweep mean. More... | |
float | acc_detector_presence_config_inter_frame_slow_cutoff_get (const acc_detector_presence_config_t *presence_config) |
Get the cutoff frequency of the low pass filter for the slow filtered absolute sweep mean. More... | |
void | acc_detector_presence_config_intra_frame_time_const_set (acc_detector_presence_config_t *presence_config, float intra_frame_time_const) |
Set the time constant for the depthwise filtering in the intra-frame part. More... | |
float | acc_detector_presence_config_intra_frame_time_const_get (const acc_detector_presence_config_t *presence_config) |
Get the time constant for the depthwise filtering in the intra-frame part. More... | |
void | acc_detector_presence_config_intra_output_time_const_set (acc_detector_presence_config_t *presence_config, float intra_output_time_const) |
Set the time constant for the output in the intra-frame part. More... | |
float | acc_detector_presence_config_intra_output_time_const_get (const acc_detector_presence_config_t *presence_config) |
Get the time constant for the output in the intra-frame part. More... | |
void | acc_detector_presence_config_inter_output_time_const_set (acc_detector_presence_config_t *presence_config, float inter_output_time_const) |
Set the time constant for the output in the inter-frame part. More... | |
float | acc_detector_presence_config_inter_output_time_const_get (const acc_detector_presence_config_t *presence_config) |
Get the time constant for the output in the inter-frame part. More... | |
void | acc_detector_presence_config_automatic_subsweeps_set (acc_detector_presence_config_t *presence_config, bool automatic_subsweeps) |
Set if automatic subsweeps should be used. More... | |
bool | acc_detector_presence_config_automatic_subsweeps_get (const acc_detector_presence_config_t *presence_config) |
Get if automatic subsweeps should be used. More... | |
void | acc_detector_presence_config_signal_quality_set (acc_detector_presence_config_t *presence_config, float signal_quality) |
Set signal quality. More... | |
float | acc_detector_presence_config_signal_quality_get (const acc_detector_presence_config_t *presence_config) |
Get signal quality. More... | |
float | acc_detector_presence_get_distance_m (const acc_detector_presence_handle_t *presence_handle, uint16_t point_idx) |
Calculate distance in meter for a point in a sweep (including subsweeps) More... | |
Presence detector API description.
For a detailed description of the presence detector algorithm and its configuration parameters, see docs.acconeer.com
typedef struct acc_detector_presence_config acc_detector_presence_config_t |
Definition at line 44 of file acc_detector_presence.h.
typedef struct acc_detector_presence_handle acc_detector_presence_handle_t |
Definition at line 36 of file acc_detector_presence.h.
bool acc_detector_presence_config_auto_profile_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get if automatic selection of profile based on start point of measurement is enabled.
See acc_detector_presence_config_auto_profile_set
[in] | presence_config | The configuration |
void acc_detector_presence_config_auto_profile_set | ( | acc_detector_presence_config_t * | presence_config, |
bool | enable | ||
) |
Enable automatic selection of profile based on start point of measurement.
The highest possible profile without interference of direct leakage will used to maximize SNR
NOTE! Only used if automatic_subsweeps is set to false
[in] | presence_config | The configuration |
[in] | enable | true to enable auto selection, false to disable |
bool acc_detector_presence_config_auto_step_length_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get if automatic selection of step length based on the profile is enabled.
See acc_detector_presence_config_auto_step_length_set
[in] | presence_config | The configuration |
void acc_detector_presence_config_auto_step_length_set | ( | acc_detector_presence_config_t * | presence_config, |
bool | enable | ||
) |
Enable automatic selection of step length based on the profile.
The highest possible step length based on the fwhm of the set profile with the goal to achieve detection on the complete range with minimum number of sampling points
NOTE! Only used if automatic_subsweeps is set to false
[in] | presence_config | The configuration |
[in] | enable | true to enable auto selection, false to disable |
bool acc_detector_presence_config_automatic_subsweeps_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get if automatic subsweeps should be used.
[in] | presence_config | The configuration to get enable automatic subsweeps for |
void acc_detector_presence_config_automatic_subsweeps_set | ( | acc_detector_presence_config_t * | presence_config, |
bool | automatic_subsweeps | ||
) |
Set if automatic subsweeps should be used.
Enabling subsweeps will make the presence detector utilize subsweeps. This will automatically optimize settings for the selected range. This setting will disable other settings and automatically overwrite their values.
[in] | presence_config | The configuration to set enable automatic subsweeps for |
[in] | automatic_subsweeps | Enable automatic subsweeps setting, true will enable the setting |
acc_detector_presence_config_t* acc_detector_presence_config_create | ( | void | ) |
Create a configuration for a presence detector.
void acc_detector_presence_config_destroy | ( | acc_detector_presence_config_t * | presence_config | ) |
Destroy a presence detector configuration.
[in] | presence_config | The configuration to destroy |
float acc_detector_presence_config_end_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get the end point of measurement interval in meters.
[in] | presence_config | The configuration |
void acc_detector_presence_config_end_set | ( | acc_detector_presence_config_t * | presence_config, |
float | end | ||
) |
Set the end point of measurement interval in meters.
[in] | presence_config | The configuration |
[in] | end | The end point of measurement interval in meters |
bool acc_detector_presence_config_frame_rate_app_driven_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get if the application should maintain the requested frame rate.
See acc_detector_presence_config_frame_rate_app_driven_set
[in] | presence_config | The configuration |
void acc_detector_presence_config_frame_rate_app_driven_set | ( | acc_detector_presence_config_t * | presence_config, |
bool | enable | ||
) |
Set if the application should maintain the requested frame rate.
If set to true, the application must maintain the frame rate set using acc_detector_presence_config_frame_rate_set If set to false, the frame rate is maintained by the sensor at the frame rate given by acc_detector_presence_config_frame_rate_set.
[in] | presence_config | The configuration |
[in] | enable | true to enable application driven frame rate, false to disable |
float acc_detector_presence_config_frame_rate_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get the frame rate.
See acc_detector_presence_config_frame_rate_set
[in] | presence_config | The configuration |
void acc_detector_presence_config_frame_rate_set | ( | acc_detector_presence_config_t * | presence_config, |
float | frame_rate | ||
) |
Set the frame rate.
This frame rate is maintained by the sensor if acc_detector_presence_config_frame_rate_app_driven_set is invoked with false (default) and the application must maintain the given frame rate if invoked with true. If the application maintains the frame rate it is important that it doesn't deviate more than 10% from the set value for the presence algorithm to work optimally. See acc_config_frame_rate_set for details
[in] | presence_config | The configuration |
[in] | frame_rate | Frame rate in Hz. Must be > 0 |
uint16_t acc_detector_presence_config_hwaas_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get the hardware accelerated average samples (HWAAS)
See acc_detector_presence_config_hwaas_set
[in] | presence_config | The configuration |
void acc_detector_presence_config_hwaas_set | ( | acc_detector_presence_config_t * | presence_config, |
uint16_t | hwaas | ||
) |
Set the hardware accelerated average samples (HWAAS)
See acc_config_hwaas_set for more details
[in] | presence_config | The configuration |
[in] | hwaas | Hardware accelerated average samples |
bool acc_detector_presence_config_inter_detection_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get if inter-frame presence detection is enabled.
See acc_detector_presence_config_inter_detection_set
[in] | presence_config | The configuration to get inter-frame presence detection for |
void acc_detector_presence_config_inter_detection_set | ( | acc_detector_presence_config_t * | presence_config, |
bool | enable | ||
) |
Set inter-frame presence detection.
This is used for detecting slower movements between frames
[in] | presence_config | The configuration to set inter-frame detection for |
[in] | enable | true if inter-frame presence detection should be enabled |
float acc_detector_presence_config_inter_detection_threshold_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get the detection threshold for the inter-frame presence detection.
See acc_detector_presence_config_inter_detection_threshold_set
[in] | presence_config | The configuration to get the detection threshold for |
void acc_detector_presence_config_inter_detection_threshold_set | ( | acc_detector_presence_config_t * | presence_config, |
float | inter_detection_threshold | ||
) |
Set the detection threshold for the inter-frame presence detection.
This is the threshold for detecting slower movements between frames
[in] | presence_config | The configuration to set the detection threshold for |
[in] | inter_detection_threshold | The threshold |
float acc_detector_presence_config_inter_frame_deviation_time_const_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get the time constant of the low pass filter for the inter-frame deviation between fast and slow.
[in] | presence_config | The configuration to get the time constant for |
void acc_detector_presence_config_inter_frame_deviation_time_const_set | ( | acc_detector_presence_config_t * | presence_config, |
float | inter_frame_deviation_time_const | ||
) |
Set the time constant of the low pass filter for the inter-frame deviation between fast and slow.
[in] | presence_config | The configuration |
[in] | inter_frame_deviation_time_const | Time constant to set |
float acc_detector_presence_config_inter_frame_fast_cutoff_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get the cutoff frequency of the low pass filter for the fast filtered absolute sweep mean.
[in] | presence_config | The configuration to get the cutoff frequency for |
void acc_detector_presence_config_inter_frame_fast_cutoff_set | ( | acc_detector_presence_config_t * | presence_config, |
float | inter_frame_fast_cutoff | ||
) |
Set the cutoff frequency of the low pass filter for the fast filtered absolute sweep mean.
No filtering is applied if the cutoff is set over half the frame rate (Nyquist limit).
[in] | presence_config | The configuration |
[in] | inter_frame_fast_cutoff | Cutoff frequency to set |
acc_config_idle_state_t acc_detector_presence_config_inter_frame_idle_state_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get inter frame idle state.
See acc_detector_presence_config_inter_frame_idle_state_set
[in] | presence_config | The configuration |
void acc_detector_presence_config_inter_frame_idle_state_set | ( | acc_detector_presence_config_t * | presence_config, |
acc_config_idle_state_t | idle_state | ||
) |
Set inter frame idle state.
The 'inter-frame idle state' is the state the sensor idles in between each frame.
See also acc_config_idle_state_t.
[in] | presence_config | The configuration |
[in] | idle_state | The idle state to use between frames |
uint16_t acc_detector_presence_config_inter_frame_presence_timeout_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get the inter-frame presence timeout in seconds.
See acc_detector_presence_config_inter_frame_presence_timeout_set
[in] | presence_config | The configuration |
void acc_detector_presence_config_inter_frame_presence_timeout_set | ( | acc_detector_presence_config_t * | presence_config, |
uint16_t | inter_frame_presence_timeout | ||
) |
Set the inter-frame presence timeout in seconds.
Number of seconds the inter-frame presence score needs to decrease before exponential scaling starts for faster decline. Should be between 0 and 30 where 0 means no timeout
[in] | presence_config | The configuration |
[in] | inter_frame_presence_timeout | Timeout in seconds between 0 and 30 |
float acc_detector_presence_config_inter_frame_slow_cutoff_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get the cutoff frequency of the low pass filter for the slow filtered absolute sweep mean.
[in] | presence_config | The configuration to get the cutoff frequency for |
void acc_detector_presence_config_inter_frame_slow_cutoff_set | ( | acc_detector_presence_config_t * | presence_config, |
float | inter_frame_slow_cutoff | ||
) |
Set the cutoff frequency of the low pass filter for the slow filtered absolute sweep mean.
[in] | presence_config | The configuration |
[in] | inter_frame_slow_cutoff | Cutoff frequency to set |
float acc_detector_presence_config_inter_output_time_const_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get the time constant for the output in the inter-frame part.
[in] | presence_config | The configuration to get the time constant for |
void acc_detector_presence_config_inter_output_time_const_set | ( | acc_detector_presence_config_t * | presence_config, |
float | inter_output_time_const | ||
) |
Set the time constant for the output in the inter-frame part.
[in] | presence_config | The configuration |
[in] | inter_output_time_const | Time constant to set |
bool acc_detector_presence_config_inter_phase_boost_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get if inter-frame phase boost is enabled.
See acc_detector_presence_config_inter_phase_boost_set
[in] | presence_config | The configuration to get inter phase boost for |
void acc_detector_presence_config_inter_phase_boost_set | ( | acc_detector_presence_config_t * | presence_config, |
bool | enable | ||
) |
Set inter-frame phase boost.
Used to increase detection of slow motions by utilizing the phase information in the Sparse IQ data.
[in] | presence_config | The configuration to set inter phase boost for |
[in] | enable | true if inter phase boost should be enabled |
bool acc_detector_presence_config_intra_detection_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get if frame intra-frame presence detection is enabled.
See acc_detector_presence_config_intra_detection_set
[in] | presence_config | The configuration to get intra detection for |
void acc_detector_presence_config_intra_detection_set | ( | acc_detector_presence_config_t * | presence_config, |
bool | enable | ||
) |
Set intra-frame presence detection.
This is used for detecting faster movements inside frames
[in] | presence_config | The configuration to set intra-frame detection for |
[in] | enable | true if intra-frame detection should be enabled |
float acc_detector_presence_config_intra_detection_threshold_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get the detection threshold for the intra-frame presence detection.
See acc_detector_presence_config_intra_detection_threshold_set
[in] | presence_config | The configuration to get the detection threshold for |
void acc_detector_presence_config_intra_detection_threshold_set | ( | acc_detector_presence_config_t * | presence_config, |
float | intra_detection_threshold | ||
) |
Set the detection threshold for the intra-frame presence detection.
This is the threshold for detecting faster movements inside frames
[in] | presence_config | The configuration to set the detection threshold for |
[in] | intra_detection_threshold | The intra-frame detection threshold to set |
float acc_detector_presence_config_intra_frame_time_const_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get the time constant for the depthwise filtering in the intra-frame part.
[in] | presence_config | The configuration to get the time constant for |
void acc_detector_presence_config_intra_frame_time_const_set | ( | acc_detector_presence_config_t * | presence_config, |
float | intra_frame_time_const | ||
) |
Set the time constant for the depthwise filtering in the intra-frame part.
[in] | presence_config | The configuration |
[in] | intra_frame_time_const | Time constant to set |
float acc_detector_presence_config_intra_output_time_const_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get the time constant for the output in the intra-frame part.
[in] | presence_config | The configuration to get the time constant for |
void acc_detector_presence_config_intra_output_time_const_set | ( | acc_detector_presence_config_t * | presence_config, |
float | intra_output_time_const | ||
) |
Set the time constant for the output in the intra-frame part.
[in] | presence_config | The configuration |
[in] | intra_output_time_const | Time constant to set |
void acc_detector_presence_config_log | ( | acc_detector_presence_config_t * | presence_config | ) |
Print a configuration to the log.
[in] | presence_config | The configuration to log |
acc_config_profile_t acc_detector_presence_config_profile_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get the currently set profile.
See acc_detector_presence_config_profile_set
[in] | presence_config | The configuration |
void acc_detector_presence_config_profile_set | ( | acc_detector_presence_config_t * | presence_config, |
acc_config_profile_t | profile | ||
) |
Set a profile.
Each profile consists of a number of settings for the sensor that configures the RX and TX paths. Lower profiles have higher depth resolution while higher profiles have higher SNR.
The set profile will only be used if profile auto selection was disabled through acc_detector_presence_config_auto_profile_set
NOTE! Only used if automatic_subsweeps is set to false
[in] | presence_config | The configuration |
[in] | profile | The profile to set |
bool acc_detector_presence_config_reset_filters_on_prepare_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get if the presence filters should reset on prepare.
See acc_detector_presence_config_reset_filters_on_prepare_set
[in] | presence_config | The configuration |
void acc_detector_presence_config_reset_filters_on_prepare_set | ( | acc_detector_presence_config_t * | presence_config, |
bool | enable | ||
) |
Set if the presence filters should reset on prepare.
If set to true, the presence filters will be reset when acc_detector_presence_prepare is invoked.
[in] | presence_config | The configuration |
[in] | enable | true to reset the filters on prepare, false to not reset |
acc_sensor_id_t acc_detector_presence_config_sensor_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get sensor ID.
[in] | presence_config | The configuration to get the sensor ID for |
void acc_detector_presence_config_sensor_set | ( | acc_detector_presence_config_t * | presence_config, |
acc_sensor_id_t | sensor_id | ||
) |
Set sensor ID.
[in] | presence_config | The configuration to set the sensor ID for |
[in] | sensor_id | The sensor ID |
float acc_detector_presence_config_signal_quality_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get signal quality.
[in] | presence_config | The configuration to get signal quality for |
void acc_detector_presence_config_signal_quality_set | ( | acc_detector_presence_config_t * | presence_config, |
float | signal_quality | ||
) |
Set signal quality.
Only used if automatic subsweeps is enabled.
[in] | presence_config | The configuration to set signal quality for |
[in] | signal_quality | Signal quality to use |
float acc_detector_presence_config_start_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get the start point of measurement interval in meters.
[in] | presence_config | The configuration |
void acc_detector_presence_config_start_set | ( | acc_detector_presence_config_t * | presence_config, |
float | start | ||
) |
Set the start point of measurement interval in meters.
[in] | presence_config | The configuration |
[in] | start | The start point of measurement interval in meters |
uint16_t acc_detector_presence_config_step_length_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get the step length in points.
[in] | presence_config | The configuration |
void acc_detector_presence_config_step_length_set | ( | acc_detector_presence_config_t * | presence_config, |
uint16_t | step_length | ||
) |
Set the step length in points.
This sets the number of steps between each data point.
The set step length will only be used if step length auto selection was disabled through acc_detector_presence_config_auto_step_length_set
Sampling produces complex (IQ) data points with configurable distance spacing, starting from ~2.5mm.
NOTE! Only used if automatic_subsweeps is set to false
[in] | presence_config | The configuration |
[in] | step_length | The step length |
uint16_t acc_detector_presence_config_sweeps_per_frame_get | ( | const acc_detector_presence_config_t * | presence_config | ) |
Get the number of sweeps per frame.
See acc_detector_presence_config_sweeps_per_frame_set
[in] | presence_config | The configuration |
void acc_detector_presence_config_sweeps_per_frame_set | ( | acc_detector_presence_config_t * | presence_config, |
uint16_t | sweeps_per_frame | ||
) |
Set the number of sweeps per frame.
Sets the number of sweeps that will be captured in each frame (measurement).
[in] | presence_config | The configuration |
[in] | sweeps_per_frame | Sweeps per frame, must be at least 6 |
acc_detector_presence_handle_t* acc_detector_presence_create | ( | acc_detector_presence_config_t * | presence_config, |
acc_detector_presence_metadata_t * | metadata | ||
) |
Create a presence detector with the provided configuration.
[in] | presence_config | The presence detector configuration to create a presence detector with |
[out] | metadata | Metadata for the presence detector given the presence_config |
void acc_detector_presence_destroy | ( | acc_detector_presence_handle_t * | presence_handle | ) |
Destroy a presence detector identified with the provided handle.
Destroy the context of a presence detector allowing another presence detector to be created using the same resources. If NULL is sent in, nothing happens.
[in] | presence_handle | A reference to the presence detector handle to destroy |
bool acc_detector_presence_get_buffer_size | ( | const acc_detector_presence_handle_t * | presence_handle, |
uint32_t * | buffer_size | ||
) |
Get the buffer size needed for the provided presence detector handle.
This buffer size can be used to allocate a memory buffer in the application, which is needed for several functions in the detector library. This size will also include memory for holding the depthwise inter/intra presence score arrays that will be part of the result, see acc_detector_presence_result_t
[in] | presence_handle | The presence detector handle to to get the buffer size for |
[out] | buffer_size | The buffer size |
float acc_detector_presence_get_distance_m | ( | const acc_detector_presence_handle_t * | presence_handle, |
uint16_t | point_idx | ||
) |
Calculate distance in meter for a point in a sweep (including subsweeps)
[in] | presence_handle | The presence detector handle |
[in] | point_idx | Index for distance point in sweep |
bool acc_detector_presence_prepare | ( | const acc_detector_presence_handle_t * | presence_handle, |
acc_detector_presence_config_t * | presence_config, | ||
acc_sensor_t * | sensor, | ||
const acc_cal_result_t * | cal_result, | ||
void * | buffer, | ||
uint32_t | buffer_size | ||
) |
Prepare the detector to do a measurement.
[in] | presence_handle | The presence detector handle to prepare for |
[in] | presence_config | The configuration to prepare with |
[in] | sensor | The sensor instance to prepare |
[in] | cal_result | The calibration result to prepare with |
[in] | buffer | Memory used by the detector to prepare the sensor for measurements The buffer will only be used during the duration of this call |
[in] | buffer_size | The size in bytes of the buffer, should be at least buffer_size from acc_detector_presence_get_buffer_size |
bool acc_detector_presence_process | ( | acc_detector_presence_handle_t * | presence_handle, |
void * | buffer, | ||
acc_detector_presence_result_t * | result | ||
) |
Process the data according to the configuration used in acc_detector_presence_config_create.
[in] | presence_handle | The presence detector handle for the presence detector to get the next result for |
[in] | buffer | A reference to the buffer (populated by acc_sensor_read) containing the data to be processed. After this function returns, the depthwise inter/intra presence that is part of the result (acc_detector_presence_result_t) will point to memory located in this buffer. If these arrays are of interest for the application they need to be processed before the buffer is used in any other function. |
[out] | result | Presence detector results |