- Timestamp:
- 08/02/11 16:02:37 (13 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/pmsm/simulator_zdenek/ekf_example/mpf_double.cpp
r1380 r1381 213 213 214 214 } 215 void mpf_mean ( double Ecosth, double Esinth, doubleEome ) {216 int i; 217 Ecosth=0.0;218 Esinth=0.0;219 Eome=0.0;215 void mpf_mean ( double *Ecosth, double *Esinth, double *Eome ) { 216 int i; 217 *Ecosth=0.0; 218 *Esinth=0.0; 219 *Eome=0.0; 220 220 for ( i=0;i<N;i++ ) { 221 Ecosth+=w[i]*cth[i];222 Esinth+=w[i]*sth[i];223 Eome+=w[i]*om[i];221 *Ecosth+=(w[i]*(cth[i])); 222 *Esinth+=(w[i]*(sth[i])); 223 *Eome+=(w[i]*(om[i])); 224 224 } 225 225