Zephyr Scientific Library (zscilib)
Modules | Files | Data Structures | Typedefs
Sensor Fusion

Sensor fusion. More...

Modules

 Calibration
 Sensor fusion calibration.
 
 Algorithms
 Implementations of specific fusion algorithms.
 

Files

file  fusion.h
 API header file for sensor fusion algorithms in zscilib.
 

Data Structures

struct  zsl_fus_drv
 Sensor fusion algorithm implementation. More...
 

Typedefs

typedef int(* zsl_fus_init_cb_t) (uint32_t freq, void *cfg)
 Init callback prototype for sensor fusion implementations. More...
 
typedef int(* zsl_fus_feed_cb_t) (struct zsl_vec *accel, struct zsl_vec *mag, struct zsl_vec *gyro, zsl_real_t *incl, struct zsl_quat *q, void *cfg)
 Update callback prototype for sensor fusion implementations. More...
 
typedef void(* zsl_fus_error_cb_t) (int error)
 Callback prototype when a fusion algorithm fails to properly feed. More...
 

Detailed Description

Sensor fusion.

Typedef Documentation

◆ zsl_fus_error_cb_t

zsl_fus_error_cb_t

Callback prototype when a fusion algorithm fails to properly feed.

Parameters
errorNegative error code produced during node execution.

Definition at line 94 of file fusion.h.

◆ zsl_fus_feed_cb_t

zsl_fus_feed_cb_t

Update callback prototype for sensor fusion implementations.

Some filters have the option to include the Earth's magnetic field inclination (the angle between the magnetic north and the vertical axis) at a certain date, latitude, longitude and altitude for better results. This filters are Madgwick, Mahony and Kalman. For the other filters or for inexistent inclination data, use NULL. To calculate the inclination (also known as dip angle) one can use the following webpage: https://www.ngdc.noaa.gov/geomag/calculators/magcalc.shtml?#igrfwmm

Parameters
accelPointer to the accelerometer XYZ data. NULL for none.
magPointer to the magnetometer XYZ data. NULL for none.
gyroPointer to the gyroscope XYZ data. NULL for none.
inclPointer to the Earth's magnetic field inclination angle, in degrees. NULL for none.
qPointer to the quaternion output placeholder.
cfgPointer to the config struct for this algorithm.
Returns
0 on success, negative error code on failure

Definition at line 84 of file fusion.h.

◆ zsl_fus_init_cb_t

zsl_fus_init_cb_t

Init callback prototype for sensor fusion implementations.

Parameters
freqSample frequency in Hz (samples per second).
cfgPointer to the config struct for this algorithm.
Returns
0 on success, negative error code on failure

Definition at line 59 of file fusion.h.