Changeset 1153 for applications
- Timestamp:
- 07/28/10 10:45:14 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/pmsm/pmsmDS.h
r897 r1153 109 109 }; 110 110 111 void log_register ( logger &L ) 112 { 113 L_x = L.add_vector ( rx, "x" ); 114 L_oy = L.add_vector ( ry, "o" ); 115 L_ou = L.add_vector ( ru, "o" ); 116 L_iu = L.add_vector ( ru, "t" ); 117 // log differences 111 void log_register ( logger &L , const string &prefix) 112 { 113 DS::log_register ( L, prefix ); 114 115 // log differences 118 116 if ( log_level[logvoltage] ) 119 117 { 120 L _optu = L.add_vector (ru, "model" );118 L.add_vector ( log_level, logvoltage, ru, "model" ); 121 119 } 122 120 } … … 124 122 void log_write ( logger &L ) 125 123 { 126 L.log_vector ( L_x, vec ( x,4 ) );127 L.log_vector ( L_oy, vec_2 ( KalmanObs[2],KalmanObs[3] ) );128 L.log_vector ( L_ou, vec_2 ( KalmanObs[0],KalmanObs[1] ) );129 L.log_vector ( L_iu, vec_2 ( KalmanObs[4],KalmanObs[5] ) );130 124 if ( log_level[logvoltage] ) 131 125 { … … 144 138 ua = ( 2.0* ( u1-du1 )- ( u2-du2 )- ( u3-du3 ) ) /3.0; 145 139 ub = ( ( u2-du2 )- ( u3-du3 ) ) /sq3; 146 L.log_vector ( L_optu, vec_2 ( ua,ub ) );140 log_level.store( logvoltage , vec_2 ( ua,ub ) ); 147 141 } 148 142 … … 226 220 } 227 221 228 void log_add(logger &L, const string &name="" )229 {230 L_CRB=L.add_vector(rx,"crb");231 L_err=L.add_vector(rx,"err");232 L_sec=L.add_vector(rx,"d2");233 }234 void logit(logger &L)235 {236 L.log_vector(L_err, interr);237 L.log_vector(L_CRB,diag(_R()));238 L.log_vector(L_sec,secder);239 }240 241 222 void from_setting( const Setting &root ) 242 223 { … … 310 291 } 311 292 312 void log_add(logger &L, const string &name="" )313 {314 L_CRB=L.add_vector(concat(rx,RV("Mz",1,0)),"crbz");315 }316 void logit(logger &L)317 {318 L.log_vector(L_CRB,diag(_R()));319 }320 293 321 294 void from_setting( const Setting &root )