| invn.algo.orientation-bundle.asf - InvnAlgoASFLib documentation 1.1.1 Documentation on Algo ASF Library.

- Main Page
- Modules
- Data Structures

Data Structures | Enumerations | Functions
AdvancedSensorFusion

Algorithm that provides device orientation. More...

## Data Structures
struct | InvnAlgoASFSerif
| AdvancedSensorFusion serial interface structure. More...
struct | InvnAlgoASFInput
| AdvancedSensorFusion input structure (raw data) More...
struct | InvnAlgoASFOutput
| AdvancedSensorFusion output structure (calibrated sensors and fusion output) More...
struct | InvnAlgoASFConfig
| AdvancedSensorFusion configuration structure (sensor related settings) More...

## Enumerations
enum | InvnAlgoASF_ModeId_t { INVN_ALGO_ASF_HIGH_ACCURACY = 1, INVN_ALGO_ASF_FAST_MOTION = 2 }
| AdvancedSensorFusion enum to select mode ID.

## Functions
const char * | invn_algo_asf_version (void)
| Return library version x.y.z-suffix as a char array. More...
uint8_t | invn_algo_asf_generate_config (InvnAlgoASFConfig *config, InvnAlgoASF_ModeId_t mode_id)
| Generate default configuration. More...
uint8_t | invn_algo_asf_init (const InvnAlgoASFSerif *serif, const InvnAlgoASFConfig *config)
| Initializes algorithms with default parameters and reset states. More...
void | invn_algo_asf_process (const InvnAlgoASFInput *inputs, InvnAlgoASFOutput *outputs)
| Performs algorithm computation. More...

## Detailed Description

Algorithm that provides device orientation.

Algorithm inputs are raw accelerometer, raw gyroscope and raw magnetometer data. Algorithm outputs calibrated sensor and 3DOF sensor fusion. Sensor fusion implements advanced features such as in-run, in-motion sensor calibration, high performance rotation tracking.

Warning
  supported sampling frequency [50 Hz, 1000 Hz]
  supported gyroscope FSR [250 dps, 500 dps, 1000 dps, 2000 dps, 4000 dps]
  supported accelerometer FSR [1 g, 2 g, 4 g, 8 g, 16 g]

## Function Documentation

uint8_t invn_algo_asf_generate_config | ( | InvnAlgoASFConfig * | config,
|  | InvnAlgoASF_ModeId_t | mode_id
| ) |  |

Generate default configuration.

Some parameters such as sensor ODR and FSR can be changed to match sensor settings. [out] algo init parameters structure.

Returns
  initialization success indicator.

Return values

  0 | Success
  1 | Fail

uint8_t invn_algo_asf_init | ( | const InvnAlgoASFSerif * | serif,
|  | const InvnAlgoASFConfig * | config
| ) |  |

Initializes algorithms with default parameters and reset states.

[in] serial interface structure. [in] algo init parameters structure.

Returns
  initialization success indicator.

Return values

  0 | Success
  1 | Fail

void invn_algo_asf_process | ( | const InvnAlgoASFInput * | inputs,
|  | InvnAlgoASFOutput * | outputs
| ) |  |

Performs algorithm computation.

inputs algorithm input. Input mask (inputs->mask) should be set with respect to new sensor data in InvnAlgoASFInput. outputs algorithm output. Output mask (outputs->mask) reports updated outputs in InvnAlgoASFOutput.

const char* invn_algo_asf_version | ( | void |  | ) |

Return library version x.y.z-suffix as a char array.

Return values

  libray | version a char array "x.y.z-suffix"