123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330 |
- #ifndef _PRECESS_RESULT_H_
- #define _PRECESS_RESULT_H_
- #include "main.h"
- #include "motion_config.h"
- #include "footPDR.h"
- #include "motion_interface.h"
- #include "detect_step_by_acc.h"
- #include "detect_step_by_acc_gyr.h"
- #define GYR_LSB 16.4f
- #define ACC_LSB 2048.0f
- #if SH_NUMBER == 1
- float accBias[3] = {-0.0116f, 0.0122f, -0.0172f,};
- float accScale[3] = {1.0015f, 1.0010f, 0.9884f,};
- //float magBias[3] = { 377.7242f, 111.6333f, 258.3704f};
- float magBias[3] = { 521.4416f, 311.3539f, 203.1051f};
- float magScale[3] = {0.0040f, 0.0038f, 0.0037,};
-
- #elif SH_NUMBER == 2
-
- float accBias[3] = {-0.0143f, 0.0020f, -0.0295f};
- float accScale[3] = {1.0026f, 1.0017f, 0.9876f};
- float magBias[3] = {208.19076f, 676.30954f, -1314.16369f};
- float magScale[3] = {0.0040f, 0.0038f, 0.0039f};
-
- #elif SH_NUMBER == 3
- float accBias[3] = {-0.0073f, 0.0112f, -0.0120f,};
- float accScale[3] = {1.0011f, 0.9997f, 0.9932f};
- //float magBias[3] = { -91.4046f, -173.7336f, -16.4311f};
- //float magBias[3] = { -33.7960f, -182.2888f, -72.0429f};
- //float magBias[3] = { 98.2326f, -244.3920f, -112.4380f};
- float magBias[3] = { -2394.65484f, 6539.55844f, -1429.03f};
- float magScale[3] = { 0.004f , 0.0038f , 0.0037f,};
-
- #elif SH_NUMBER == 4
-
- float accBias[3] = { -0.0000f, 0.0096f, -0.0308f};
- float accScale[3] = {1.0002f, 1.0009f, 0.9910f};
- //float magBias[3] = {29.8783f, 142.8769f, -149.3421f};
- //float magBias[3] = { 18.2790f, 93.3995f, -146.4823};
- //float magBias[3] = { -15.8519f, 70.4827f, -128.3174f};
-
- float magBias[3] = {-72.9602f, -149.2124f, -154.5789f};
- float magScale[3] = { 0.0040f, 0.0040f, 0.0040f};
- #elif SH_NUMBER == 5
- float accBias[3] = { 0.0208f, 0.0066f, -0.0281f,};
- float accScale[3] = {1.0011f, 1.0004f, 0.9955f,};
- float magBias[3] = { 63.2058f , 113.6578f , -539.3837f};
- float magScale[3] = {0.0038f , 0.0038f , 0.0037f,};
-
- #elif SH_NUMBER == 6
-
- float accBias[3] = { -0.0173f, 0.0078f, -0.1042f};
- float accScale[3] = {1.0015f, 1.0002f, 0.9861f};
- float magBias[3] = {97.0186f, 685.1305f, -513.0043f};
- float magScale[3] = {0.0038f, 0.0039f, 0.0037f};
- #elif SH_NUMBER == 7
- float accBias[3] = { 0.0208f, 0.0066f, -0.0281f,};
- float accScale[3] = {1.0011f, 1.0004f, 0.9955f,};
- float magBias[3] = { 63.2058f , 113.6578f , -539.3837f};
- float magScale[3] = {0.0038f , 0.0038f , 0.0037f,};
-
- #elif SH_NUMBER == 8
-
- float accBias[3] = { -0.0055f, 0.0097f, -0.0550f};
- float accScale[3] = {1.0004f, 0.9991f, 1.0000f};
- float magBias[3] = {-80.7255f, 715.1156f, -870.1321f};
- float magScale[3] = {0.0037f, 0.0038f, 0.0036f};
-
- #elif SH_NUMBER == 9
- float accBias[3] = {-0.0178f, 0.0056f, -0.1022f};
- float accScale[3] = {1.0005f, 1.0017f, 0.9880f};
- float magBias[3] = {-86.6536f, 341.2955f, -674.9064f};
- float magScale[3] = {0.0039f, 0.0039f , 0.0040f,};
-
- #elif SH_NUMBER == 10
-
- float accBias[3] = { -0.0069f , 0.0141f , -0.0498f};
- float accScale[3] = {1.0007f , 1.0031f , 0.9970f};
- float magBias[3] = { -77.8889f, 482.7083f, -616.4837f};
- float magScale[3] = { 0.0040f, 0.0040f, 0.0039f,};
- #elif SH_NUMBER == 11
- float accBias[3] = {0.0149f, 0.0208f, -0.0272f};
- float accScale[3] = {1.0010f , 1.0008f , 0.9969f};
- //float magBias[3] = { -66.0267f, 473.8725f, -529.6988f};
- //float magScale[3] = {0.0040f, 0.0040f, 0.0040f};
- float magBias[3] = { -79.0751f, 471.0133f, -600.3712f};
- float magScale[3] = {0.0040f, 0.0041f , 0.0039f};
-
- #elif SH_NUMBER == 12
-
- float accBias[3] = {0.0025f, 0.0086f, -0.0016f,};
- float accScale[3] = {1.0007f, 1.0009f, 0.9948f,};
- //float magBias[3] = {54.5925f, 293.4265f, -684.2667f,};
- float magBias[3] = {36.3369f, 314.0196f, -709.6340f,};
- float magScale[3] = {0.0040f, 0.0040f, 0.0041f,};
-
- #elif SH_NUMBER == 13
-
- float accBias[3] = {0.0063f, 0.0053f, 0.0138f,};
- float accScale[3] = {0.9993f, 1.0022f, 0.9883f,};
- float magBias[3] = {292.1026f, 633.6321f, -664.0924f,};
- float magScale[3] = {0.0039f, 0.0039f, 0.0037f};
- #elif SH_NUMBER == 14
-
- float accBias[3] = {0.0244f, 0.0082f, 0.0898f,};
- float accScale[3] = {0.9992f, 1.0024f, 0.9848f,};
- float magBias[3] = {82.3285f, 418.0601f, -636.9080f};
- float magScale[3] = {0.0041f , 0.0042f, 0.0040f};
-
- #elif SH_NUMBER == 15
-
- float accBias[3] = {-0.0199f , 0.0149f , -0.0832f,};
- float accScale[3] = {1.0006f , 1.0012f , 0.9883f,};
- float magBias[3] = { -83.9929f, 378.1395f, -683.2781f};
- float magScale[3] = {0.0039f, 0.0040f, 0.0041f};
-
- #elif SH_NUMBER == 16
-
- float accBias[3] = {-0.0062f, 0.0176f, -0.0461f};
- float accScale[3] = {1.0006f, 1.0030f, 0.9965f};
- float magBias[3] = {-66.5185f, 497.9997f, -618.6814f};
- float magScale[3] = {0.0040f, 0.0041f, 0.0040f};
-
- #elif SH_NUMBER == 17
-
- float accBias[3] = {0.0201f, 0.0207f, 0.1268f};
- float accScale[3] = {0.9984f, 1.0027f, 0.9927f};
- float magBias[3] = {1238.45506f, 553.76179f, -466.85981f};
- float magScale[3] = {0.0041f, 0.0045f, 0.0043f};
-
- #elif SH_NUMBER == 18
-
- float accBias[3] = {-0.0338f, 0.0088f, -0.0118f};
- float accScale[3] = { 0.9995f, 1.0009f, 0.9926f};
- float magBias[3] = {1471.773663f, 551.73478f, -348.20543f};
- float magScale[3] = {0.0041f, 0.0046f, 0.0043f};
-
- #elif SH_NUMBER == 19
-
- float accBias[3] = {-0.017644f, 0.0044866f, -0.048548f};
- float accScale[3] = { 1.0011f, 1.0001f, 0.9911f};
- float magBias[3] = {294.8f, 1054.5f, -254.15f};
- float magScale[3] = {0.004482f, 0.0041116f, 0.004236f};
-
- #elif SH_NUMBER == 20
-
- float accBias[3] = {-0.02376f, 0.01068f, 0.069101f};
- float accScale[3] = { 0.99977f, 1.0007f, 0.99655f};
- float magBias[3] = { 285.12f, 1218.7f, -416.98f};
- float magScale[3] = {0.004411f, 0.0040035f, 0.0041864f};
-
- #elif SH_NUMBER == 21
-
- float accBias[3] = { 0.0176f, 0.0217f, 0.1217f};
- float accScale[3] = { 1.0032f, 1.0025f, 0.9973f};
- float magBias[3] = {357.05161f, 1111.658506f, -434.721060f};
- float magScale[3] = {0.0044f, 0.004f, 0.0042f};
-
- #elif SH_NUMBER == 22
-
- float accBias[3] = { -0.0371f, 0.0082f, -0.0177f};
- float accScale[3] = { 1.0032f, 1.0025f, 0.9973f};
- float magBias[3] = {443.781061f, 1401.779316f, -264.01198f};
- float magScale[3] = {0.0046f, 0.0041f, 0.0043f};
-
- #elif SH_NUMBER == 23
- float accBias[3] = { -0.0294f, 0.0088f, 0.0213f};
- float accScale[3] = { 1.0037f, 0.9976f, 0.9940f};
- float magBias[3] = {508.4243192f, 1189.075561f, -373.32054f};
- float magScale[3] = {0.0046f, 0.0042f, 0.0041};
-
- #elif SH_NUMBER == 24
- float accBias[3] = { -0.0119f, -0.0012f, 0.0454f};
- float accScale[3] = { 1.0002f, 0.9956f, 1.0038f};
- float magBias[3] = {726.44178f, 710.183522f, -510.867688f};
- float magScale[3] = {0.0045f, 0.0041f, 0.0042f};
- #elif SH_NUMBER == 25
- float accBias[3] = { -0.0065f, 0.0027f, 0.0271f};
- float accScale[3] = { 1.0005f, 0.9992f, 0.9952f};
- float magBias[3] = {213.41965895f, 1127.6071397f, -188.07170366f};
- float magScale[3] = {0.0044f, 0.004f, 0.0041f};
-
- #elif SH_NUMBER == 26
- float accBias[3] = { -0.0132f, 0.0037f, -0.0090f};
- float accScale[3] = { 1.0022f, 1.0008f, 0.9946f};
- float magBias[3] = {705.2909f, 888.2859f, -162.9662f};
- float magScale[3] = { 0.0045f, 0.0041f, 0.0043f};
-
- #elif SH_NUMBER == 27
- float accBias[3] = { -0.0176f, 0.0093f, 0.0459f};
- float accScale[3] = { 1.0022f, 1.0004f, 1.0050f};
- float magBias[3] = {-123.9147f, -5.1146f, -268.7183f};
- float magScale[3] = {0.0045f, 0.0040f, 0.0042f};
-
- #elif SH_NUMBER == 28
- float accBias[3] = { -0.0226f, 0.0083f, 0.0473f};
- float accScale[3] = { 1.0006f, 1.0019f, 0.9971f};
- float magBias[3] = { 270.3228f, 7.2314f, -93.2455f};
- float magScale[3] = { 0.0044f, 0.0039f, 0.0040f};
-
- #elif SH_NUMBER == 31
- float accBias[3] = { -0.007613f, 0.0049329f, -0.022617f};
- float accScale[3] = { 1.0374647f, 0.98994f, 0.995096f};
- float magBias[3] = { -591.6082f, 760.9560f, -194.1897};
- float magScale[3] = { 0.0047f, 0.0043f, 0.0043f};
-
- #elif SH_NUMBER == 32
- float accBias[3] = { -0.006894f, 0.013296f, -0.030154f};
- float accScale[3] = { 0.98567f, 1.0142618f, 0.99747f};
- float magBias[3] = { -526.1854f, 553.1508f, -142.6464f};
- float magScale[3] = { 0.0045f, 0.0042f, 0.0042f};
-
- #elif SH_NUMBER == 33
- float accBias[3] = { -0.0091f, 0.0124f, -0.0790f};
- float accScale[3] = { 1.0021f, 0.9966f, 0.9928f};
- float magBias[3] = {813.1402436536083f, 280.82271197483055f, -29.053538226463385f};
- float magScale[3] = {0.0042312985166727685f, 0.003920572901665482f, 0.0039770217454643255f};
-
- #elif SH_NUMBER == 34
- float accBias[3] = { -0.0141f, 0.0072f, 0.0108f};
- float accScale[3] = { 1.0091f , 0.9943f , 1.0023f};
- float magBias[3] = {-122.09773026023785f, -588.9466945960162f, -277.99760629602105f};
- float magScale[3] = {0.004216299267535813f, 0.003918950857638731f, 0.003974970092518379f};
- #
-
-
- #endif
- #ifdef WHITE_SH0
- #if IS_HOST
-
- float accBias[3] = { -0.0055f, 0.0114f, -0.0075f};
- float accScale[3] = {1.0011f, 0.9997f, 0.9930f};
- float magBias[3] = { 98.5793f, -199.4005f, -188.8333f};
- float magScale[3] = {0.0040f, 0.0040f, 0.0037f};
-
- #else
- /* slave*/
- float accBias[3] = { 0.0009f, 0.0062f, -0.0224f};
- float accScale[3] = {1.0000f, 1.0006f, 0.9913f};
- float magBias[3] = { -75.9748f, 80.7247, -134.6379f};
- float magScale[3] = { 0.0039f, 0.0037f, 0.0037f};
- #endif
- #elif defined BLUE_SHO
-
-
- #if IS_HOST
- float accBias[3] = { -0.0118f , 0.0130f , -0.0026f};
- float accScale[3] = {1.0015f , 1.0011f , 0.9896f};
- float magBias[3] = { 569.5943f , 271.8484f , 298.8276f};
- float magScale[3] = {0.0040f , 0.0037f , 0.0039f};
- #else
- /* slave*/
- float accBias[3] = {-0.0299f, 0.0114f , -0.0716f};
- float accScale[3] = {1.0017f, 1.0023f, 0.9884f};
- float magBias[3] = {324.02837f, 599.89072f, -1323.1148f};
- float magScale[3] = {0.0039f, 0.0037f, 0.0037f};
- #endif
- #endif
- #endif
|