Show
Ignore:
Timestamp:
08/02/11 16:02:37 (13 years ago)
Author:
smidl
Message:

simulator

Files:
1 modified

Legend:

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

    r1380 r1381  
    213213 
    214214} 
    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; 
     215void mpf_mean ( double *Ecosth, double *Esinth, double *Eome ) { 
     216        int i; 
     217        *Ecosth=0.0; 
     218        *Esinth=0.0; 
     219        *Eome=0.0; 
    220220        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])); 
    224224        } 
    225225