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

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

fusion_config.h
Go to the documentation of this file.
1 /**
2 * @file fusion_config.h
3 * @brief The \b fusion_config.h file contains additional static configuration for the Sensor Fusion based Virtual Orientation sensor adapter
4
5 * @copyright Copyright (c) 2015, Freescale Semiconductor, Inc.
6 * @version 01.00
7 */
8 #ifndef FUSION_CONFIG_H_
9 #define FUSION_CONFIG_H_
10
11 #include "fusion_types.h"
12
13 // set this value to set parallel (1) or sequential (0) operation of fusion algorithms
14 // a) if defined to be 1 (true) (default for demos) then all algorithms execute in parallel
15 // b) if defined to be 0 (false) then only the one algorithm required to support
16 // pState->algorithmToUse is executed
17 #define PARALLELNOTSEQUENTIAL 1 // default is 1
18
19 // sampling rate and kalman filter timing
20 #define ORIENTATION_OUTPUT_PERIOD_USECS 40000 // time in usecs between orientation output samples
21 #define OVERSAMPLE_RATIO 8 // int32: accel and mag sampling and algorithms run at SENSORFS / OVERS
22 #define SENSORFS (uint32)((1000000.0F/((float)ORIENTATION_OUTPUT_PERIOD_USECS))* OVERSAMPLE_RATIO) // int32: 200Hz: frequency (Hz) of sensor sampling process
23 #define ACCEL_OVERSAMPLE_RATIO 4 // number of accel samples to take per orientation output
24 #define MAG_OVERSAMPLE_RATIO 4 // number of mag samples to take per orientation output
25 #define GYRO_OVERSAMPLE_RATIO 16 // number of gyro samples to take per orientation output
26 #define PRESSURE_OVERSAMPLE_RATIO 1 // number of pressure samples to take per orientation output
27 #define ALGO_CHOICE Q9 // Enum for the fusion algorithm to use in computing the orientation output
28
29 // normally all enabled: degrees of freedom algorithms to be executed
30
31 // TODO - Check the names in the component vs. the #defines in the code.
32 #define THISCOORDSYSTEM NED // the coordinate system to be used
33
34
35 // Coordinate HAL Configuration set based on the Coordinate System selected
36 // Default Values for NED Coordinate System
37 # define ACCEL_GET_HAL_X_VALUE(v) (v)
38 # define ACCEL_HAL_X_INDEX Y
39 # define ACCEL_GET_HAL_Y_VALUE(v) (v)
40 # define ACCEL_HAL_Y_INDEX X
41 # define ACCEL_GET_HAL_Z_VALUE(v) (v)
42 # define ACCEL_HAL_Z_INDEX Z
43 # define MAG_GET_HAL_X_VALUE(v) (-(v))
44 # define MAG_HAL_X_INDEX Y
45 # define MAG_GET_HAL_Y_VALUE(v) (-(v))
46 # define MAG_HAL_Y_INDEX X
47 # define MAG_HAL_Z_INDEX Z
48 # define GYRO_GET_HAL_X_VALUE(v) (-(v))
49 # define GYRO_HAL_X_INDEX Y
50 # define GYRO_GET_HAL_Y_VALUE(v) (-(v))
51 # define GYRO_HAL_Y_INDEX X
52 # define GYRO_GET_HAL_Z_VALUE(v) (-(v))
53 # define GYRO_HAL_Z_INDEX Z
54
55
56
57 #endif /* FUSION_CONFIG_H_ */
58
fusion_types.h
- © Freescale Semiconductor, Inc. 2016. All Rights Reserved.