![](/media/cache/group/nine_tails_kurama_by_zubair43-d4zyf5s.jpg.50x50_q85.jpg)
FINAL ACS TO BE USED FOR TESTING. COMMISSIONING, ACS MAIN, DATA ACQ ALL DONE.
Dependencies: FreescaleIAP mbed-rtos mbed
Fork of ACS_FULL_Flowchart_BAE by
ACS.h@19:403cb36e22ed, 2016-06-28 (annotated)
- Committer:
- Bragadeesh153
- Date:
- Tue Jun 28 10:11:54 2016 +0000
- Revision:
- 19:403cb36e22ed
- Parent:
- 18:21740620c65e
FINAL ACS TO BE USED FOR TESTING
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sakthipriya | 0:7b4c00e3912f | 1 | #include "mbed.h" |
sakthipriya | 0:7b4c00e3912f | 2 | #include "math.h" |
sakthipriya | 0:7b4c00e3912f | 3 | #include "pni.h" |
sakthipriya | 0:7b4c00e3912f | 4 | |
sakthipriya | 0:7b4c00e3912f | 5 | //........................................... |
sakthipriya | 0:7b4c00e3912f | 6 | #define TIME_PERIOD 0.02 |
sakthipriya | 0:7b4c00e3912f | 7 | #define TR_CONSTANT 0.3 |
Bragadeesh153 | 17:1e1955f3db75 | 8 | #define sampling_time 10 |
Bragadeesh153 | 17:1e1955f3db75 | 9 | #define kdetumble 2000000 |
Bragadeesh153 | 17:1e1955f3db75 | 10 | #define MmntMax 1.1 // Unit: Ampere*Meter^2 |
Bragadeesh153 | 17:1e1955f3db75 | 11 | #define OmegaMax 1*3.1415/180.0 // Unit: Radians/Second |
Bragadeesh153 | 19:403cb36e22ed | 12 | #define ACS_DEMAG_TIME_DELAY 65 |
Bragadeesh153 | 19:403cb36e22ed | 13 | #define ACS_Z_FIXED_MOMENT 1.3 |
Bragadeesh153 | 17:1e1955f3db75 | 14 | |
Bragadeesh153 | 17:1e1955f3db75 | 15 | #define senstivity_gyro 6.5536; //senstivity is obtained from 2^15/5000dps |
Bragadeesh153 | 17:1e1955f3db75 | 16 | #define senstivity_mag 32.768; //senstivity is obtained from 2^15/1000microtesla |
Bragadeesh153 | 19:403cb36e22ed | 17 | #define senstivity_time 32; //senstivity is obtained from 2^16/2048 s |
sakthipriya | 0:7b4c00e3912f | 18 | |
sakthipriya | 0:7b4c00e3912f | 19 | void FCTN_ACS_GENPWM_MAIN(float*); |
Bragadeesh153 | 19:403cb36e22ed | 20 | void FCTN_ACS_CNTRLALGO(float*,float*,float*,uint8_t,uint8_t,uint8_t); |
Bragadeesh153 | 19:403cb36e22ed | 21 | void controlmodes(float*,float*, float*, float*, uint8_t,uint8_t); |
sakthipriya | 0:7b4c00e3912f | 22 | void inverse(float mat[3][3],float inv[3][3]); |
sakthipriya | 0:7b4c00e3912f | 23 | extern void FLAG(); |
sakthipriya | 0:7b4c00e3912f | 24 | |
sakthipriya | 0:7b4c00e3912f | 25 | void FCTN_ATS_SWITCH(bool); |
Bragadeesh153 | 16:cc77770d787f | 26 | int FCTN_ACS_INIT(); //initialization of registers happens |
sakthipriya | 0:7b4c00e3912f | 27 | void FCTN_T_OUT(); //timeout function to stop infinite loop |
Bragadeesh153 | 16:cc77770d787f | 28 | int FCTN_ATS_DATA_ACQ(); |