Show
Ignore:
Timestamp:
12/16/12 23:05:25 (11 years ago)
Author:
smidl
Message:

uprava generatoru

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • applications/pmsm/simulator_zdenek/ekf_example/matrix_vs.cpp

    r1465 r1468  
    669669} 
    670670 
    671 void carlson_fastC(int16 *difz, int16 *xp, int16 *Ch, int16 *C, int16 *R, unsigned int16 dimy, unsigned int16 dimx, int16 *detS, int16 *rem ) { 
     671void carlson_fastC(int16 *difz, int16 *xp, int16 *Ch, int16 *C, int16 *R, unsigned int16 dimy, unsigned int16 dimx, int32 *detS, int16 *rem ) { 
    672672        int16 alpha,beta,gamma; 
    673673        int16 delta, eta,epsilon,zeta,sigma,tau; 
     
    678678        int16 *Ch_ij, *w_i, *x_i, *C_yi; 
    679679         
    680         *detS = 32767; 
     680        *detS = 1;// 
     681        *rem = 0; 
    681682        for (iy=0; iy<dimy; iy++) 
    682683        { 
     
    741742                } 
    742743                 
    743                 *detS = ((int32)*detS*alpha+(1<<14))>>8; 
    744744                *rem += ((int32)delta*delta)/alpha; 
    745         } 
    746 } 
    747  
     745                *detS = ((int32)*detS*alpha); // !!! unshifterd!!, ie.e multipled by q15, all numbers are small 
     746                printf("%d %d %d %d\n", delta, alpha, *rem, *detS); 
     747        } 
     748        printf("\n"); 
     749} 
     750