Changeset 1195
- Timestamp:
- 09/24/10 21:36:35 (14 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/pmsm/simulator_zdenek/ekf_example/matrix_vs.cpp
r1184 r1195 157 157 beta = alpha; 158 158 lambda = -((long)(*a_j)<<15)/beta; 159 alpha += ((long)(*a_j)*(*b_j) >>15);160 D[j] = ((( long)beta<<15)/alpha)*(*D_j)>>15; //gamma is long159 alpha += ((long)(*a_j)*(*b_j))>>15; 160 D[j] = ((((long)beta<<15)/alpha)*(*D_j))>>15; //gamma is long 161 161 if (*D_j==0) *D_j=1; 162 162 163 163 for (i=0,b_i=b,U_ij=U+j; i<j; i++, b_i++,U_ij+=dimx) { 164 164 beta = *U_ij; 165 *U_ij += ( lambda*(*b_i))>>15;165 *U_ij += ((long)lambda*(*b_i))>>15; 166 166 *b_i += ((long)beta*(*b_j))>>15; 167 167 }