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

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

magnetic_config.h
Go to the documentation of this file.
1 /*
2 *
3 * Copyright (c) 2015, Freescale Semiconductor, Inc.
4 *
5 */
6 /*
7 * magnetic_config.h
8 *
9 * Created on: Nov 26, 2013,
10 * Author: B37804
11 */
12
13 #ifndef MAGNETIC_CONFIG_H_
14 #define MAGNETIC_CONFIG_H_
15
16 // geomagnetic model parameters
17 #define DEFAULTB 50.0F // default geomagnetic field (uT)
18 #define INV_DEFAULTB (1.0F/50.0F) // default geomagnetic field (1/uT)
19
20 // magnetic calibration constants
21 #ifdef USE_SMALL_MAGBUFFER
22 // FXLC95000CL magnetic buffer parameters
23 #define MAGBUFFSIZEX 6 // x dimension in magnetometer buffer (6x12 equals 72 elements)
24 #define MAGBUFFSIZEY (2 * MAGBUFFSIZEX) // y dimension in magnetometer buffer (6x12 equals 72 elements)
25 #define MINMEASUREMENTS4CAL 40 // minimum number of measurements for 4 element calibration
26 #define MINMEASUREMENTS7CAL 55 // minimum number of measurements for 7 element calibration
27 #define MINMEASUREMENTS10CAL 60 // minimum number of measurements for 10 element calibration
28 #define MAXMEASUREMENTS 65 // maximum number of measurements used for calibration
29 #else
30 // Kinetis magnetic buffer parameters
31 #define MAGBUFFSIZEX 14 // x dimension in magnetometer buffer (12x24 equals 288 elements)
32 #define MAGBUFFSIZEY (2 * MAGBUFFSIZEX) // y dimension in magnetometer buffer (12x24 equals 288 elements)
33 #define MINMEASUREMENTS4CAL 100 // minimum number of measurements for 4 element calibration
34 #define MINMEASUREMENTS7CAL 150 // minimum number of measurements for 7 element calibration
35 #define MINMEASUREMENTS10CAL 250 // minimum number of measurements for 10 element calibration
36 #define MAXMEASUREMENTS 340 // maximum number of measurements used for calibration
37 #endif
38
39 // parameters common to Kinetis and Galla
40 #define INTERVAL4CAL 75 // 3s at 25Hz: 4 element interval (samples)
41 #define INTERVAL7CAL 250 // 10s at 25Hz: 7 element interval (samples)
42 #define INTERVAL10CAL 750 // 30s at 25Hz: 10 element interval (samples)
43 #define MINBFITUT 10.0F // minimum acceptable geomagnetic field B (uT) for valid calibration
44 #define MAXBFITUT 90.0F // maximum acceptable geomagnetic field B (uT) for valid calibration
45 #define FITERRORAGINGSECS 86400.0F // 24 hours: time (s) for fit error to increase (age) by e=2.718
46
47 //#define FUTPERCOUNT (1.0F/256.0F) // Really uT per LSB in AC_FIXED(16,8,1) notation
48 #define FUTPERCOUNT (0.1F)
49
50 #if 1
51 #define MESHDELTACOUNTS (50) // magnetic buffer mesh spacing in counts (here 5uT)
52 #else
53 #define MESHDELTACOUNTS (0x500) // magnetic buffer mesh spacing in uT AC_FIXED(16,8,1) (here 5uT * 256 )
54 #endif
55
56
57 #endif /* MAGNETIC_CONFIG_H_ */
- © Freescale Semiconductor, Inc. 2016. All Rights Reserved.