![]() |
nRF Connect SDK API 3.3.99
|
| bool accel_to_angle_diff_check | ( | struct accel_to_angle_ctx * | ctx, |
| const struct accel_to_angle_pr_data * | pr_threshold_deg, | ||
| const uint8_t | axis_threshold_num ) |
#include <include/accel_to_angle/accel_to_angle.h>
Check for significant rotation change.
The function checks if the change in rotation exceeds the specified threshold on at least the specified number of axes. To perform this check, the function uses the cumulative angle difference stored in the context instance, which is updated after each invocation of the accel_to_angle_calc API function using its output parameter.
If the threshold is exceeded the function clears the cumulative difference in the context.
| [in] | ctx | Pointer to the accel_to_angle_ctx context. |
| [in] | pr_threshold_deg | Rotation threshold in degrees for pitch and roll. |
| [in] | axis_threshold_num | Number of axes that must exceed the threshold to consider the rotation change significant. The value can be either 1 or 2. |
| true | If the rotation change exceeds the threshold on the specified number of axes. |
| false | Otherwise. |