Sensor Fusion Library 0.6.1
Orientation sensing for Espressif (ESP32, ESP8266) processors
Loading...
Searching...
No Matches
Macros
build.h File Reference

Build configuration file. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define THISBUILD   720
 define build number sent in debug packet for display purposes only
 
#define ENABLE_DEBUG_LOG   0
 
CoordinateSystemBitFields

These defines determine the frame of reference (x, y, z axes and Euler angles) standard to be used for a particular build. Change THISCOORDSYSTEM to whichever of NED, ANDROID or WIN8 you prefer.

#define NED   0
 identifier for NED (Aerospace) axes and angles
 
#define ANDROID   1
 identifier for Android axes and angles
 
#define WIN8   2
 identifier for Windows 8 axes and angles
 
#define THISCOORDSYSTEM   NED
 the coordinate system to be used
 
SensorBitFields

These bit-field values are used to declare which sensor types are used in the application. Change bit-field values to 0x0000 for any features NOT USED. These bitmasks are also used to set the pSensor->isInitialized flag once a particular sensor is communicating successfully. F_USING_NONE indicates a problem with that sensor.

#define F_USING_NONE   0x0000
 0x0000 indicates a sensor is unavailable / unconfigured.
 
#define F_USING_ACCEL   0x0001
 nominally 0x0001 if an accelerometer is to be used, 0x0000 otherwise
 
#define F_USING_MAG   0x0002
 nominally 0x0002 if an magnetometer is to be used, 0x0000 otherwise
 
#define F_USING_GYRO   0x0004
 nominally 0x0004 if a gyro is to be used, 0x0000 otherwise
 
#define F_USING_PRESSURE   0x0000
 nominally 0x0008 if altimeter is to be used, 0x0000 otherwise
 
#define F_USING_TEMPERATURE   0x0000
 nominally 0x0010 if temp sensor is to be used, 0x0000 otherwise
 
#define F_ALL_SENSORS   0x001F
 refers to all applicable sensor types for the given physical unit
 
FusionSelectionBitFields

These bit-field values are used to declare which sensor fusion algorithms are used in the application. You can use more than one, although they all run from the same data. Change individual bit-field values to 0x0000 for any features NOT USED.

#define F_1DOF_P_BASIC    0x0000
 1DOF pressure (altitude) and temperature algorithm selector - 0x0100 to include, 0x0000 otherwise/*#end#*‍/
 
#define F_3DOF_G_BASIC    0x0000
 3DOF accel tilt (accel) algorithm selector - 0x0200 to include, 0x0000 otherwise/*#end#*‍/
 
#define F_3DOF_B_BASIC    0x0000
 3DOF mag eCompass (vehicle/mag) algorithm selector - 0x0400 to include, 0x0000 otherwise/*#end#*‍/
 
#define F_3DOF_Y_BASIC    0x0000
 3DOF gyro integration algorithm selector - 0x0800 to include, 0x0000 otherwise/*#end#*‍/
 
#define F_6DOF_GB_BASIC    0x0000
 6DOF accel and mag eCompass algorithm selector - 0x1000 to include, 0x0000 otherwise/*#end#*‍/
 
#define F_6DOF_GY_KALMAN    0x0000
 6DOF accel and gyro (Kalman) algorithm selector - 0x2000 to include, 0x0000 otherwise/*#end#*‍/
 
#define F_9DOF_GBY_KALMAN    0x4000
 9DOF accel, mag and gyro algorithm selector - 0x4000 to include, 0x0000 otherwise/*#end#*‍/
 
SensorParameters
#define GYRO_ODR_HZ   400
 (int) requested gyroscope ODR Hz
 
#define ACCEL_ODR_HZ   200
 (int) requested accelerometer ODR Hz (overrides MAG_ODR_HZ for FXOS8700)
 
#define MAG_ODR_HZ   200
 (int) requested magnetometer ODR Hz (overridden by ACCEL_ODR_HZ for FXOS8700)
 
#define LOOP_RATE_HZ   40
 
#define FUSION_HZ   40
 (int) rate of fusion algorithm execution
 
#define MAXPACKETRATEHZ   40
 
#define RATERESOLUTION   1000
 
#define F_USE_WIRELESS_UART   0x0000
 0x0001 to include, 0x0000 otherwise
 
#define F_USE_WIRED_UART   0x0000
 0x0002 to include, 0x0000 otherwise
 

Detailed Description

Build configuration file.

This file contains only those parameters that directly relate to fusion implementation choices. Board dependencies are in board.h. Consult the Sensor Fusion User Guide for guidance and details.

Definition in file build.h.

Macro Definition Documentation

◆ ACCEL_ODR_HZ

#define ACCEL_ODR_HZ   200

(int) requested accelerometer ODR Hz (overrides MAG_ODR_HZ for FXOS8700)

Definition at line 80 of file build.h.

◆ ANDROID

#define ANDROID   1

identifier for Android axes and angles

Definition at line 35 of file build.h.

◆ ENABLE_DEBUG_LOG

#define ENABLE_DEBUG_LOG   0

Definition at line 27 of file build.h.

◆ F_1DOF_P_BASIC

#define F_1DOF_P_BASIC    0x0000

1DOF pressure (altitude) and temperature algorithm selector - 0x0100 to include, 0x0000 otherwise/*#end#*‍/

Definition at line 61 of file build.h.

◆ F_3DOF_B_BASIC

#define F_3DOF_B_BASIC    0x0000

3DOF mag eCompass (vehicle/mag) algorithm selector - 0x0400 to include, 0x0000 otherwise/*#end#*‍/

Definition at line 65 of file build.h.

◆ F_3DOF_G_BASIC

#define F_3DOF_G_BASIC    0x0000

3DOF accel tilt (accel) algorithm selector - 0x0200 to include, 0x0000 otherwise/*#end#*‍/

Definition at line 63 of file build.h.

◆ F_3DOF_Y_BASIC

#define F_3DOF_Y_BASIC    0x0000

3DOF gyro integration algorithm selector - 0x0800 to include, 0x0000 otherwise/*#end#*‍/

Definition at line 67 of file build.h.

◆ F_6DOF_GB_BASIC

#define F_6DOF_GB_BASIC    0x0000

6DOF accel and mag eCompass algorithm selector - 0x1000 to include, 0x0000 otherwise/*#end#*‍/

Definition at line 69 of file build.h.

◆ F_6DOF_GY_KALMAN

#define F_6DOF_GY_KALMAN    0x0000

6DOF accel and gyro (Kalman) algorithm selector - 0x2000 to include, 0x0000 otherwise/*#end#*‍/

Definition at line 71 of file build.h.

◆ F_9DOF_GBY_KALMAN

#define F_9DOF_GBY_KALMAN    0x4000

9DOF accel, mag and gyro algorithm selector - 0x4000 to include, 0x0000 otherwise/*#end#*‍/

Definition at line 73 of file build.h.

◆ F_ALL_SENSORS

#define F_ALL_SENSORS   0x001F

refers to all applicable sensor types for the given physical unit

Definition at line 53 of file build.h.

◆ F_USE_WIRED_UART

#define F_USE_WIRED_UART   0x0000

0x0002 to include, 0x0000 otherwise

Definition at line 95 of file build.h.

◆ F_USE_WIRELESS_UART

#define F_USE_WIRELESS_UART   0x0000

0x0001 to include, 0x0000 otherwise

Definition at line 94 of file build.h.

◆ F_USING_ACCEL

#define F_USING_ACCEL   0x0001

nominally 0x0001 if an accelerometer is to be used, 0x0000 otherwise

Definition at line 48 of file build.h.

◆ F_USING_GYRO

#define F_USING_GYRO   0x0004

nominally 0x0004 if a gyro is to be used, 0x0000 otherwise

Definition at line 50 of file build.h.

◆ F_USING_MAG

#define F_USING_MAG   0x0002

nominally 0x0002 if an magnetometer is to be used, 0x0000 otherwise

Definition at line 49 of file build.h.

◆ F_USING_NONE

#define F_USING_NONE   0x0000

0x0000 indicates a sensor is unavailable / unconfigured.

Definition at line 47 of file build.h.

◆ F_USING_PRESSURE

#define F_USING_PRESSURE   0x0000

nominally 0x0008 if altimeter is to be used, 0x0000 otherwise

Definition at line 51 of file build.h.

◆ F_USING_TEMPERATURE

#define F_USING_TEMPERATURE   0x0000

nominally 0x0010 if temp sensor is to be used, 0x0000 otherwise

Definition at line 52 of file build.h.

◆ FUSION_HZ

#define FUSION_HZ   40

(int) rate of fusion algorithm execution

Definition at line 85 of file build.h.

◆ GYRO_ODR_HZ

#define GYRO_ODR_HZ   400

(int) requested gyroscope ODR Hz

Definition at line 79 of file build.h.

◆ LOOP_RATE_HZ

#define LOOP_RATE_HZ   40

Definition at line 82 of file build.h.

◆ MAG_ODR_HZ

#define MAG_ODR_HZ   200

(int) requested magnetometer ODR Hz (overridden by ACCEL_ODR_HZ for FXOS8700)

Definition at line 81 of file build.h.

◆ MAXPACKETRATEHZ

#define MAXPACKETRATEHZ   40

Definition at line 88 of file build.h.

◆ NED

#define NED   0

identifier for NED (Aerospace) axes and angles

Definition at line 34 of file build.h.

◆ RATERESOLUTION

#define RATERESOLUTION   1000

Definition at line 89 of file build.h.

◆ THISBUILD

#define THISBUILD   720

define build number sent in debug packet for display purposes only

Definition at line 24 of file build.h.

◆ THISCOORDSYSTEM

#define THISCOORDSYSTEM   NED

the coordinate system to be used

Definition at line 37 of file build.h.

◆ WIN8

#define WIN8   2

identifier for Windows 8 axes and angles

Definition at line 36 of file build.h.