Accurate Bluetooth Ranging (ABR)#
Accurate Bluetooth Ranging.
These functions are related to the phase-based estimation of distance from I/Q-samples. The distances can be calculated following these steps:
Initialize a sl_rtl_abr_libitem instance
Set up the calculation parameters
Create the estimator
Process the I/Q data into a distance
Get distance estimate
Modules#
Enumerations#
ABR estimator mode.
Typedefs#
ABR library item.
Functions#
Enumeration Documentation#
sl_rtl_abr_algo_mode#
sl_rtl_abr_algo_mode
ABR estimator mode.
Enumerator | |
---|---|
SL_RTL_ABR_ALGO_MODE_REAL_TIME_BASIC | Medium filtering, medium response, medium CPU cost. Suitable for real-time tracking. |
SL_RTL_ABR_ALGO_MODE_STATIC | TODO add description,. |
SL_RTL_ABR_ALGO_MODE_LAST | Placeholder. |
723
of file /mnt/raid/workspaces/ws.pYEvgD5Jt/overlay/gsdk/util/silicon_labs/aox/inc/sl_rtl_clib_api.h
sl_rtl_abr_cs_mode#
sl_rtl_abr_cs_mode
Enumerator | |
---|---|
SL_RTL_ABR_CS_MODE_RTP | Round-trip phase based estimation (RTP) |
SL_RTL_ABR_CS_MODE_RTT | Round-trip time based estimation (RTT) |
SL_RTL_ABR_CS_MODE_LAST | Placeholder. |
731
of file /mnt/raid/workspaces/ws.pYEvgD5Jt/overlay/gsdk/util/silicon_labs/aox/inc/sl_rtl_clib_api.h
sl_rtl_abr_tone_quality#
sl_rtl_abr_tone_quality
Enumerator | |
---|---|
SL_RTL_ABR_TONE_QUALITY_GOOD | |
SL_RTL_ABR_TONE_QUALITY_MEDIUM | |
SL_RTL_ABR_TONE_QUALITY_LOW | |
SL_RTL_ABR_TONE_QUALITY_UNAVAILABLE |
739
of file /mnt/raid/workspaces/ws.pYEvgD5Jt/overlay/gsdk/util/silicon_labs/aox/inc/sl_rtl_clib_api.h
Typedef Documentation#
sl_rtl_abr_libitem#
typedef void* sl_rtl_abr_libitem
ABR library item.
775
of file /mnt/raid/workspaces/ws.pYEvgD5Jt/overlay/gsdk/util/silicon_labs/aox/inc/sl_rtl_clib_api.h
Function Documentation#
sl_rtl_abr_init#
enum sl_rtl_error_code sl_rtl_abr_init (sl_rtl_abr_libitem * item)
[in] | item | Pointer to the libitem to be initialized |
Initialize the ABR libitem instance.
Returns
SL_RTL_ERROR_SUCCESS if successful
783
of file /mnt/raid/workspaces/ws.pYEvgD5Jt/overlay/gsdk/util/silicon_labs/aox/inc/sl_rtl_clib_api.h
sl_rtl_abr_deinit#
enum sl_rtl_error_code sl_rtl_abr_deinit (sl_rtl_abr_libitem * item)
[in] | item | Pointer to the libitem to be deinitialized |
Deinitialize a libitem instance of the ABR estimator.
Returns
SL_RTL_ERROR_SUCCESS if successful
791
of file /mnt/raid/workspaces/ws.pYEvgD5Jt/overlay/gsdk/util/silicon_labs/aox/inc/sl_rtl_clib_api.h
sl_rtl_abr_set_algo_mode#
enum sl_rtl_error_code sl_rtl_abr_set_algo_mode (sl_rtl_abr_libitem * item, enum sl_rtl_abr_algo_mode mode)
[in] | item | Pointer to the initialized ABR libitem |
[in] | mode | Estimator mode as sl_rtl_abr_algo_mode |
Set the estimation mode.
Returns
SL_RTL_ERROR_SUCCESS if successful
Set the estimation mode. For example, ::SL_RTL_ABR_ALGO_MODE_BASIC sets medium filtering. For further description of the modes, see the documentation of sl_rtl_abr_algo_mode.
804
of file /mnt/raid/workspaces/ws.pYEvgD5Jt/overlay/gsdk/util/silicon_labs/aox/inc/sl_rtl_clib_api.h
sl_rtl_abr_set_cs_mode#
enum sl_rtl_error_code sl_rtl_abr_set_cs_mode (sl_rtl_abr_libitem * item, enum sl_rtl_abr_cs_mode cs_mode)
[in] | item | Pointer to the initialized ABR libitem |
[in] | cs_mode | cs_mode as sl_rtl_abr_cs_mode |
Set the estimation cs_mode.
Returns
SL_RTL_ERROR_SUCCESS if successful
Set the desired cs_mode. For example, SL_RTL_ABR_CS_MODE_RTP uses round-trip phase based cs_mode.
816
of file /mnt/raid/workspaces/ws.pYEvgD5Jt/overlay/gsdk/util/silicon_labs/aox/inc/sl_rtl_clib_api.h
sl_rtl_abr_set_parameters#
enum sl_rtl_error_code sl_rtl_abr_set_parameters (sl_rtl_abr_libitem * item, sl_rtl_abr_parameters * parameters)
[in] | item | Pointer to the initialized ABR libitem |
[in] | parameters | Data structure with CS initialisation parameters for the estimator |
Set parameters for estimation. Must be called before sl_rtl_abr_create_estimator.
Returns
SL_RTL_ERROR_SUCCESS if successful
825
of file /mnt/raid/workspaces/ws.pYEvgD5Jt/overlay/gsdk/util/silicon_labs/aox/inc/sl_rtl_clib_api.h
sl_rtl_abr_create_estimator#
enum sl_rtl_error_code sl_rtl_abr_create_estimator (sl_rtl_abr_libitem * item)
[in] | item | Pointer to the initialized and configured ABR libitem |
Create the estimator after initializing the libitem and setting parameters.
Returns
SL_RTL_ERROR_SUCCESS if successful
833
of file /mnt/raid/workspaces/ws.pYEvgD5Jt/overlay/gsdk/util/silicon_labs/aox/inc/sl_rtl_clib_api.h
sl_rtl_abr_process_rtp#
enum sl_rtl_error_code sl_rtl_abr_process_rtp (sl_rtl_abr_libitem * item, sl_rtl_abr_rtp_data * rtp_data)
[in] | item | Pointer to the initialized and configured ABR libitem |
[in] | rtp_data | Data structure with the RTP measurement data |
Calculate distance estimate based on RTP.
Returns
SL_RTL_ERROR_SUCCESS if successful and SL_RTL_ERROR_ESTIMATION_IN_PROGRESS if estimate is not yet final and more input data needs to be processed.
Calculate the distance estimate from the given I/Q samples captured at the given frequencies. Use sl_rtl_abr_get_distance to fetch the latest distance estimate.
850
of file /mnt/raid/workspaces/ws.pYEvgD5Jt/overlay/gsdk/util/silicon_labs/aox/inc/sl_rtl_clib_api.h
sl_rtl_abr_process_rtt#
enum sl_rtl_error_code sl_rtl_abr_process_rtt (sl_rtl_abr_libitem * item, sl_rtl_abr_rtt_data * rtt_data)
[in] | item | Pointer to the initialized and configured ABR libitem |
[in] | rtt_data | Data structure with the RTT measurement data |
Calculate distance estimate based on RTT.
Returns
SL_RTL_ERROR_SUCCESS if successful and SL_RTL_ERROR_ESTIMATION_IN_PROGRESS if estimate is not yet final and more input data needs to be processed.
Calculate the distance estimate from the given device time samples. Use sl_rtl_abr_get_distance to fetch the latest distance estimate.
865
of file /mnt/raid/workspaces/ws.pYEvgD5Jt/overlay/gsdk/util/silicon_labs/aox/inc/sl_rtl_clib_api.h
sl_rtl_abr_get_distance#
enum sl_rtl_error_code sl_rtl_abr_get_distance (sl_rtl_abr_libitem * item, float * distance)
[in] | item | Pointer to the initialized ABR libitem |
[out] | distance | Distance out in meters. |
Get likeliness of the distance estimate.
Returns
SL_RTL_ERROR_SUCCESS if successful
876
of file /mnt/raid/workspaces/ws.pYEvgD5Jt/overlay/gsdk/util/silicon_labs/aox/inc/sl_rtl_clib_api.h
sl_rtl_abr_get_distance_likeliness#
enum sl_rtl_error_code sl_rtl_abr_get_distance_likeliness (sl_rtl_abr_libitem * item, float * distance_likeliness)
[in] | item | Pointer to the initialized ABR libitem |
[out] | distance_likeliness | Likeliness between 0.0 - 1.0 (unlikely - likely) of the estimated distance |
Get distance estimate.
Returns
SL_RTL_ERROR_SUCCESS if successful
885
of file /mnt/raid/workspaces/ws.pYEvgD5Jt/overlay/gsdk/util/silicon_labs/aox/inc/sl_rtl_clib_api.h