ISSDK  1.8
IoT Sensing Software Development Kit
standard_build.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015, Freescale Semiconductor, Inc.
3  * Copyright 2016-2017 NXP
4  * All rights reserved.
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  */
8 
9 /*! \file standard_build.h
10  \brief A "standard" build configuration file
11 
12  This file contains only those parameters that directly relate to fusion
13  implementation choices. Board dependencies are in hal_<shield_board>.h. Consult the
14  Sensor Fusion User Guide for guidance and details.
15 */
16 
17 #ifndef BUILD_H
18 #define BUILD_H
19 
20 
21 #define THISBUILD 700 ///< define build number sent in debug packet for display purposes only
22 
23 /// @name CoordinateSystemBitFields
24 /// These defines determine the frame of reference (x, y, z axes and Euler angles) standard
25 /// to be used for a particular build. Change THISCOORDSYSTEM to whichever of NED, ANDROID
26 /// or WIN8 you prefer.
27 ///@{
28 #define NED 0 ///< identifier for NED (Aerospace) axes and angles
29 #define ANDROID 1 ///< identifier for Android axes and angles
30 #define WIN8 2 ///< identifier for Windows 8 axes and angles
31 #define THISCOORDSYSTEM NED ///< the coordinate system to be used
32 ///@}
33 
34 ///@{
35 /// @name SensorBitFields
36 /// These bit-field values are used to declare which sensor types are used in the application.
37 /// Change bit-field values to 0x0000 for any features NOT USED
38 #define F_USING_ACCEL 0x0001 ///< nominally 0x0001 if an accelerometer is to be used, 0x0000 otherwise
39 #define F_USING_MAG 0x0002 ///< nominally 0x0002 if an magnetometer is to be used, 0x0000 otherwise
40 #define F_USING_GYRO 0x0004 ///< nominally 0x0004 if a gyro is to be used, 0x0000 otherwise
41 #define F_USING_PRESSURE 0x0008 ///< nominally 0x0008 if altimeter is to be used, 0x0000 otherwise
42 #define F_USING_TEMPERATURE 0x0010 ///< nominally 0x0010 if temp sensor is to be used, 0x0000 otherwise
43 #define F_ALL_SENSORS 0x001F ///< refers to all applicable sensor types for the given physical unit
44 ///@}
45 /// @name FusionSelectionBitFields
46 /// These bit-field values are used to declare which sensor fusion algorithms are used
47 /// in the application. You can use more than one, altough they all run from the same data.
48 /// Change individual bit-field values to 0x0000 for any features NOT USED.
49 ///@{
50 #define F_1DOF_P_BASIC 0x0100 ///< 1DOF pressure (altitude) and temperature algorithm selector - 0x0100 to include, 0x0000 otherwise
51 #define F_3DOF_G_BASIC 0x0200 ///< 3DOF accel tilt (accel) algorithm selector - 0x0200 to include, 0x0000 otherwise
52 #define F_3DOF_B_BASIC 0x0400 ///< 3DOF mag eCompass (vehicle/mag) algorithm selector - 0x0400 to include, 0x0000 otherwise
53 #define F_3DOF_Y_BASIC 0x0800 ///< 3DOF gyro integration algorithm selector - 0x0800 to include, 0x0000 otherwise
54 #define F_6DOF_GB_BASIC 0x1000 ///< 6DOF accel and mag eCompass algorithm selector - 0x1000 to include, 0x0000 otherwise
55 #define F_6DOF_GY_KALMAN 0x2000 ///< 6DOF accel and gyro (Kalman) algorithm selector - 0x2000 to include, 0x0000 otherwise
56 #define F_9DOF_GBY_KALMAN 0x4000 ///< 9DOF accel, mag and gyro algorithm selector - 0x4000 to include, 0x0000 otherwise
57 ///@}
58 
59 /// @name SensorParameters
60 /// FIFO sizes effect the size of the sensor data structures. ODR refers to "Output Data Rate"
61 ///@{
62 #define ACCEL_FIFO_SIZE 32 ///< FXOS8700 (accel), MMA8652, FXLS8952 all have 32 element FIFO
63 #define MAG_FIFO_SIZE 16 ///< FXOS8700 (mag), MAG3110 have no FIFO so equivalent to 1 element FIFO
64 #define GYRO_FIFO_SIZE 32 ///< FXAX21000, FXAS21002 have 32 element FIFO
65 #define ACCEL_ODR_HZ 200 ///< (int) requested accelerometer ODR Hz (over-rides MAG_ODR_HZ for FXOS8700)
66 #define MAG_ODR_HZ 200 ///< (int) requested magnetometer ODR Hz (over-ridden by ACCEL_ODR_HZ for FXOS8700)
67 #define GYRO_ODR_HZ 400 ///< (int) requested gyroscope ODR Hz
68 #define FUSION_HZ 40 ///< (int) actual rate of fusion algorithm execution and sensor FIFO reads
69 #define FAST_LOOP_HZ 80 ///< Over Sample Ratio * FUSION_HZ when using no FIFO
70 #define OVERSAMPLE_RATE FAST_LOOP_HZ/FUSION_HZ
71 ///@}
72 
73 #endif // BUILD_H