nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches
Accel to angle library API

Accel to angle library API. More...

Data Structures

struct  accel_to_angle_accel_data
 Accelerometer data from 3 axes from the sensor. More...
 
struct  accel_to_angle_pr_data
 Pitch and roll data calculated from accelerometer data. More...
 
struct  accel_to_angle_filter
 Descriptor of the filter instance. More...
 
struct  accel_to_angle_ctx
 Descriptor of the library context instance. More...
 

Macros

#define ACCEL_TO_ANGLE_AXIS_NUM   3
 
#define ACCEL_TO_ANGLE_CTX_DEFINE(_instance_name, _filter)
 Define a context instance that is described by the accel_to_angle_ctx structure.
 
#define ACCEL_TO_ANGLE_FILTER_DEFINE(_instance_name, _ctx, _process_request, _clean_request)
 Define a filter instance.
 

Functions

int accel_to_angle_filter_set (struct accel_to_angle_ctx *ctx, struct accel_to_angle_filter *filter)
 Set a filter.
 
int accel_to_angle_calc (struct accel_to_angle_ctx *ctx, const struct sensor_value vals[3], struct accel_to_angle_pr_data *pr)
 Calculate pitch and roll angles from accelerometer data.
 
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)
 Check for significant rotation change.
 
int accel_to_angle_state_clean (struct accel_to_angle_ctx *ctx)
 Clean the internal state of the context instance.
 

Detailed Description

Accel to angle library API.

This API represents a library that converts the three-dimensional acceleration into the two-dimensional angle change (so-called pitch and roll angles).