![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
gotta check ctrl algo - it gives negative value
Fork of BAE_hw_test1_3 by
Diff: main.cpp
- Revision:
- 9:8b74ed33be76
- Parent:
- 8:939b37cdcb92
- Child:
- 11:6b00f3b1be17
diff -r 939b37cdcb92 -r 8b74ed33be76 main.cpp --- a/main.cpp Sun Mar 01 05:30:12 2015 +0000 +++ b/main.cpp Sun Mar 01 07:41:51 2015 +0000 @@ -96,7 +96,9 @@ { float *mag_field; float *omega; - float *moment; + float mag_field1[3]; + float omega1[1]; + float moment[3]; float *mnm_data; while(1) { @@ -118,15 +120,20 @@ } for(int i = 0 ; i<3;i++) { - omega[i] = mnm_data[i]; + omega1[i] = mnm_data[i]; } for( int i = 3;i<6;i++) { - mag_field[i-3] = mnm_data[i]; + mag_field1[i-3] = mnm_data[i]; } if(acs_pflag == 1) { - moment = FUNC_ACS_CNTRLALGO(mag_field,omega); + FUNC_ACS_CNTRLALGO(mag_field1,omega1,moment); + printf("\n\r control algo values "); + for(int i=0; i<3; i++) + { + printf("%f\t",moment[i]); + } FUNC_ACS_GENPWM(moment); }