| ISF 2.2 rev 5 Intelligent Sensing Framework for Kinetis with Processor Expert

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Macros | Functions | Variables
fsl_fusion_virt_3D_orient.c File Reference

The orientation sensor adapter is a virtual adapter that uses sensor fusion algorithms to compute orientation data using accelerometer, magnetomer and gyrometer data. Multiple fusion algorithms are available to which each require different combinations of these sensors. A tilt algorithm can compute pitch and roll from only accelerometer data. An automotive compass algorithm computes magnetic heading from only magnetometer data A rotation algorithm computes pitch, roll, and yaw from only gyro data. A tilt-compensated Ecompass algorithm computes pitch, roll and magnetic heading from accel + mag data A gaming handset algorithm computes pitch, roll, and yaw from accel + gyro data A gyro-stabilized Compass computes pitch, roll, and magnetic heading from accel + mag + gyro data. More...

`#include <isf.h>`
`#include <isf_types.h>`
`#include <isf_dsa_adapter.h>`
`#include <isf_dsa_direct.h>`
`#include <isf_bm.h>`
`#include <isf_sensor_types.h>`
`#include <isf_fifo.h>`
`#include <isf_accelerometer_types.h>`
`#include <isf_gyrometer_types.h>`
`#include <isf_magnetometer_types.h>`
`#include <isf_altitude_types.h>`
`#include <isf_temperature_types.h>`
`#include <isf_orientation_types.h>`
`#include <isf_comm.h>`
`#include <isf_util.h>`
`#include <isf_sensors.h>`
`#include "fsl_os_abstraction.h"`
`#include "fsl_fusion_virt_3D_orient.h"`
`#include "fusion_config.h"`
`#include "fusion_types.h"`
`#include "fusion_exec.h"`
`#include "Ac_Fixed_utils.h"`
`#include "drivers.h"`
Include dependency graph for fsl_fusion_virt_3D_orient.c:

Go to the source code of this file.

## Macros
#define | ACCEL_DATA_READY_EVENT (0L)
#define | MAG_DATA_READY_EVENT (0L)
#define | GYRO_DATA_READY_EVENT (0L)
#define | PRESSURE_DATA_READY_EVENT (0L)
#define | MAGCAL_EVENT_FLAG (1L)
#define | PRESSURE_DATA_MASK ~PRESSURE_DATA_READY_EVENT
#define | SENSOR_DATA_READY_EVENT GYRO_DATA_READY_EVENT | ACCEL_DATA_READY_EVENT | MAG_DATA_READY_EVENT | PRESSURE_DATA_READY_EVENT
#define | HYBRID_SENSOR_DATA_READY_EVENT GYRO_DATA_READY_EVENT | MAG_DATA_READY_EVENT | PRESSURE_DATA_READY_EVENT

## Functions
| OSA_TASK_DEFINE (fsl_fusion, 2000)
| OSA_TASK_DEFINE (fsl_MagCal, 3000)
void | fsl_fusion_task (uint32_t task_init_data)
void | fsl_MagCal_task (uint32_t task_init_data)
isf_dsa_status_t | fsl_fusion_virt_3D_orient_Initialize (isf_SensorHandle_t *pSensorHandle)
| This is the concrete implementation of the orientation sensor adapter initialization. More...
isf_dsa_status_t | fsl_fusion_virt_3D_orient_ValidateSettings (isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
| This is the concrete implementation of the orientation sensor adapter for validating current settings. More...
isf_dsa_status_t | fsl_fusion_virt_3D_orient_Configure (isf_SensorHandle_t *pSensorHandle, isf_dsa_SensorSettings_t *pSensorSettings)
| This is the concrete implementation of the fusion sensor adapter configuration function. More...
isf_dsa_status_t | fsl_fusion_virt_3D_orient_StartData (isf_SensorHandle_t *pSensorHandle)
| This is the concrete implementation of the orientation sensor adapter for start Data. More...
isf_dsa_status_t | fsl_fusion_virt_3D_orient_EndData (isf_SensorHandle_t *pSensorHandle)
| This is the concrete implementation of the orientation sensor adapter for End Data. More...
isf_dsa_status_t | fsl_fusion_virt_3D_orient_Calibrate (isf_SensorHandle_t *pSensorHandle, void *pCalData)
| This is the concrete implementation of the orientation sensor adapter for calibration . More...
isf_dsa_status_t | fsl_fusion_virt_3D_orient_Shutdown (isf_SensorHandle_t *pSensorHandle)
| This is the concrete implementation of the orientation sensor adapter for shutdown . More...
void | fsl_fusion_virt_3D_orient_PeriodicCallback (void *pSensorHandle)
| The orientation sensor adapter's periodic processing function. More...
isf_dsa_status_t | fsl_fusion_virt_3D_orient_Convert (volatile isf_SensorHandle_t *pSensorHandle, isf_SensorDataTypes_t convertToType, isf_dsa_result_types_t resultType, void *pNativeSample, void *pConvertedSample, int32 *numBytes)
| This function coverts the raw sample data to the desired output type. More...

## Variables
const uint8_t * | mqx_task_stack_pointers []
isf_SensorTypes_t | fsl_fusion_SupportedSensorTypes []
| Supported sensor and data types for the orientation sensor. More...
isf_SensorDataTypes_t | fsl_fusion_SupportedDataTypes []

## Detailed Description

The orientation sensor adapter is a virtual adapter that uses sensor fusion algorithms to compute orientation data using accelerometer, magnetomer and gyrometer data. Multiple fusion algorithms are available to which each require different combinations of these sensors. A tilt algorithm can compute pitch and roll from only accelerometer data. An automotive compass algorithm computes magnetic heading from only magnetometer data A rotation algorithm computes pitch, roll, and yaw from only gyro data. A tilt-compensated Ecompass algorithm computes pitch, roll and magnetic heading from accel + mag data A gaming handset algorithm computes pitch, roll, and yaw from accel + gyro data A gyro-stabilized Compass computes pitch, roll, and magnetic heading from accel + mag + gyro data.

File: fsl_fusion_virt_3D_orient.c

Copyright (c) 2015, Freescale Semiconductor, Inc.

Definition in file fsl_fusion_virt_3D_orient.c.

## Macro Definition Documentation

#define ACCEL_DATA_READY_EVENT (0L)

Definition at line 53 of file fsl_fusion_virt_3D_orient.c.

Referenced by fsl_fusion_virt_3D_orient_Initialize(), and fsl_fusion_virt_3D_orient_PeriodicCallback().

#define GYRO_DATA_READY_EVENT (0L)

Definition at line 65 of file fsl_fusion_virt_3D_orient.c.

Referenced by fsl_fusion_virt_3D_orient_Initialize(), and fsl_fusion_virt_3D_orient_PeriodicCallback().

#define HYBRID_SENSOR_DATA_READY_EVENT GYRO_DATA_READY_EVENT | MAG_DATA_READY_EVENT | PRESSURE_DATA_READY_EVENT

Definition at line 80 of file fsl_fusion_virt_3D_orient.c.

Referenced by fsl_fusion_task(), and fsl_fusion_virt_3D_orient_Initialize().

#define MAG_DATA_READY_EVENT (0L)

Definition at line 59 of file fsl_fusion_virt_3D_orient.c.

Referenced by fsl_fusion_virt_3D_orient_Initialize(), and fsl_fusion_virt_3D_orient_PeriodicCallback().

#define MAGCAL_EVENT_FLAG (1L)

Definition at line 74 of file fsl_fusion_virt_3D_orient.c.

Referenced by fsl_fusion_virt_3D_orient_PeriodicCallback(), and fsl_MagCal_task().

#define PRESSURE_DATA_MASK ~PRESSURE_DATA_READY_EVENT

Definition at line 76 of file fsl_fusion_virt_3D_orient.c.

Referenced by fsl_fusion_virt_3D_orient_PeriodicCallback().

#define PRESSURE_DATA_READY_EVENT (0L)

Definition at line 71 of file fsl_fusion_virt_3D_orient.c.

Referenced by fsl_fusion_virt_3D_orient_Initialize(), and fsl_fusion_virt_3D_orient_PeriodicCallback().

#define SENSOR_DATA_READY_EVENT GYRO_DATA_READY_EVENT | ACCEL_DATA_READY_EVENT | MAG_DATA_READY_EVENT | PRESSURE_DATA_READY_EVENT

Definition at line 79 of file fsl_fusion_virt_3D_orient.c.

Referenced by fsl_fusion_task(), fsl_fusion_virt_3D_orient_Initialize(), and fsl_fusion_virt_3D_orient_PeriodicCallback().

## Function Documentation

OSA_TASK_DEFINE | ( | fsl_fusion | ,
|  | 2000 |
| ) |  |

OSA_TASK_DEFINE | ( | fsl_MagCal | ,
|  | 3000 |
| ) |  |

## Variable Documentation

const uint8_t* mqx_task_stack_pointers[]

- © Freescale Semiconductor, Inc. 2016. All Rights Reserved.