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
- Committer:
- Bragadeesh153
- Date:
- 2016-12-30
- Revision:
- 89:2d0cdc87329a
- Parent:
- 49:61c9f28332ba
File content as of revision 89:2d0cdc87329a:
#include "mbed.h" #include "math.h" #include "pni.h" //........................................... #define TIME_PERIOD 0.02 #define TR_CONSTANT 0.3 #define sampling_time 5 #define kdetumble 2000000 #define MmntMax 1.1 // Unit: Ampere*Meter^2 #define OmegaMax 1*3.1415/180.0 // Unit: Radians/Second //#define ACS_DEMAG_TIME_DELAY 65 //#define ACS_Z_FIXED_MOMENT 1.3 ka lvl assign kar de;;;;;;;; #define senstivity_gyro 6.5536; //senstivity is obtained from 2^15/5000dps #define senstivity_mag 32.768; //senstivity is obtained from 2^15/1000microtesla #define senstivity_time 32; //senstivity is obtained from 2^16/2048dps void FCTN_ACS_GENPWM_MAIN(float*); void FCTN_ACS_CNTRLALGO(float*,float*,float*,uint8_t,uint8_t,uint8_t); void controllermodes(float*,float*, float*, float*, uint8_t,uint8_t); void inverse(float mat[3][3],float inv[3][3]); extern void FLAG(); void FCTN_ATS_SWITCH(bool); int FCTN_ACS_INIT(); //initialization of registers happens void FCTN_T_OUT(); //timeout function to stop infinite loop int FCTN_ATS_DATA_ACQ();