Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FreescaleIAP mbed-rtos mbed
Fork of RAJANGAM_REVIEW_BAE_CODE by
ACS.h@20:949d13045431, 2016-07-01 (annotated)
- Committer:
- lakshya
- Date:
- Fri Jul 01 17:55:30 2016 +0000
- Revision:
- 20:949d13045431
- Parent:
- 0:7b4c00e3912f
- Child:
- 41:5df2bed2157d
- Child:
- 49:61c9f28332ba
BAE final 1.0 (1st july); ; BCN and EPS code to be upgraded; +; testing and troubleshooting to be done ; +; watchdog to be implemented; ; comparing with flowcharts.
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 |
lakshya | 20:949d13045431 | 8 | #define sampling_time 10 |
lakshya | 20:949d13045431 | 9 | #define kdetumble 2000000 |
lakshya | 20:949d13045431 | 10 | #define MmntMax 1.1 // Unit: Ampere*Meter^2 |
lakshya | 20:949d13045431 | 11 | #define OmegaMax 1*3.1415/180.0 // Unit: Radians/Second |
lakshya | 20:949d13045431 | 12 | //#define ACS_DEMAG_TIME_DELAY 65 |
lakshya | 20:949d13045431 | 13 | //#define ACS_Z_FIXED_MOMENT 1.3 ka lvl assign kar de;;;;;;;; |
lakshya | 20:949d13045431 | 14 | |
lakshya | 20:949d13045431 | 15 | #define senstivity_gyro 6.5536; //senstivity is obtained from 2^15/5000dps |
lakshya | 20:949d13045431 | 16 | #define senstivity_mag 32.768; //senstivity is obtained from 2^15/1000microtesla |
lakshya | 20:949d13045431 | 17 | #define senstivity_time 32; //senstivity is obtained from 2^16/2048dps |
sakthipriya | 0:7b4c00e3912f | 18 | |
sakthipriya | 0:7b4c00e3912f | 19 | void FCTN_ACS_GENPWM_MAIN(float*); |
lakshya | 20:949d13045431 | 20 | void FCTN_ACS_CNTRLALGO(float*,float*,float*,uint8_t,uint8_t,uint8_t); |
lakshya | 20:949d13045431 | 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); |
lakshya | 20:949d13045431 | 26 | int FCTN_ACS_INIT(); //initialization of registers happens |
sakthipriya | 0:7b4c00e3912f | 27 | void FCTN_T_OUT(); //timeout function to stop infinite loop |
lakshya | 20:949d13045431 | 28 | int FCTN_ATS_DATA_ACQ(); |