Zephyr Scientific Library (zscilib)
saam.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021 Marti Riba Pons
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
23 #ifndef ZEPHYR_INCLUDE_ZSL_FUSION_SAAM_H_
24 #define ZEPHYR_INCLUDE_ZSL_FUSION_SAAM_H_
25 
26 #include <zsl/zsl.h>
27 #include <zsl/vectors.h>
28 #include <zsl/matrices.h>
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 /* Source: https://hal.inria.fr/hal-01922922/document */
36 
46 int zsl_fus_saam_init(uint32_t freq, void *cfg);
47 
62 int zsl_fus_saam_feed(struct zsl_vec *a, struct zsl_vec *m,
63  struct zsl_vec *g, zsl_real_t *incl, struct zsl_quat *q,
64  void *cfg);
65 
73 void zsl_fus_saam_error(int error);
74 
75 #ifdef __cplusplus
76 }
77 #endif
78 
79 #endif /* ZEPHYR_INCLUDE_ZSL_FUSION_SAAM_H_ */
80  /* End of algorithms group */
zsl_quat
Represents a quaternion, a 4D structure capable of representing 3D rigid body orientations.
Definition: quaternions.h:89
zsl_fus_saam_feed
int zsl_fus_saam_feed(struct zsl_vec *a, struct zsl_vec *m, struct zsl_vec *g, zsl_real_t *incl, struct zsl_quat *q, void *cfg)
Super-fast Attitude from Accelerometer and Magnetometer (SAAM) sensor fusion algorithm implementation...
quaternions.h
API header file for quaternions in zscilib.
vectors.h
API header file for vectors in zscilib.
zsl_fus_saam_error
void zsl_fus_saam_error(int error)
Default error handler for the SAAM sensor fusion driver.
matrices.h
API header file for matrices in zscilib.
zsl.h
API header file for zscilib.
zsl_vec
Represents a vector.
Definition: vectors.h:40
zsl_real_t
double zsl_real_t
Definition: zsl.h:51
zsl_fus_saam_init
int zsl_fus_saam_init(uint32_t freq, void *cfg)
Sets the sample frequency (in Hz) for the algorithm.