Ruprecht Altenburger
/
RT2_P3_students_G4
Template for group 4
Fork of RT2_P3_students by
Diff: main.cpp
- Revision:
- 9:67ee46be0403
- Parent:
- 8:72f260c467ad
- Child:
- 10:85840c065e00
diff -r 72f260c467ad -r 67ee46be0403 main.cpp --- a/main.cpp Tue Apr 24 09:13:59 2018 +0000 +++ b/main.cpp Tue Apr 24 09:17:04 2018 +0000 @@ -53,13 +53,10 @@ //------------------------------------------ //LinearCharacteristics i2u(0.8f,-2.0f); LinearCharacteristics i2u(-2.0f,2.0f,0.0f,3.2f); -LinearCharacteristics ax2ms2(0.2972f,0.7028f,-9.81,9.81); -LinearCharacteristics ay2ms2(0.29866f,0.70134f,-9.81,9.81); -LinearCharacteristics gz2om(4.6517f,1.4852f); //-------------DEFINE FILTERS---------------- float tau = 1.0f; -IIR_filter f_ax(tau,Ts,1.0f); // filter ax signals -IIR_filter f_ay(tau,Ts,1.0f); // filter ay signals +IIR_filter f_ax(tau,Ts); // filter ax signals +IIR_filter f_ay(tau,Ts); // filter ay signals IIR_filter f_gz(tau,Ts,tau); // filter gz signals //------------------------------------------ @@ -105,12 +102,9 @@ */ //float phi1 = atan2(-f_ax(ax2ms2(ax.read())),f_ay(ax2ms2(ay.read()))) + PI/4.0f + f_gz(gz2om(gz.read()*3.3f)); - float fax = f_ax(ax2ms2(ax.read())); - float fay = f_ay(ay2ms2(ay.read())); if(++k >= 249){ k = 0; - //pc.printf("Phi1: %1.5f \r\n",phi1); - pc.printf("f_ax: %1.5f f_ay: %1.5f \r\n",fax,fay); + pc.printf("Some Output: %1.5f \r\n",PI); } } //******************************************************************************