Changeset 40 for simulator_zdenek/demo_example
- Timestamp:
- 03/19/08 15:32:40 (17 years ago)
- Location:
- simulator_zdenek/demo_example
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
simulator_zdenek/demo_example/simulator.cpp
r38 r40 54 54 static double us[2]={0.,0.}; // format us={us_alfa, us_beta} 55 55 56 // output for EKF (voltages and measured currents, which are fed to Kalman )57 static double Kalman [4]={0.,0.,0.,0.}; // usx, usy, Isx, Isy56 // output for EKF (voltages and measured currents, which are fed to KalmanObs) 57 static double KalmanObs[4]={0.,0.,0.,0.}; // usx, usy, Isx, Isy 58 58 59 59 // real-time … … 258 258 259 259 ////////////////////////////////////////////////////////////////////////////////////////////////////// 260 void eval(double Ww) // you must link array Kalman [] to EKF modul260 void eval(double Ww) // you must link array KalmanObs[] to EKF modul 261 261 { 262 262 double Umk, ua, ub; … … 273 273 ua=Umk*cos(*(u+1)); 274 274 ub=Umk*cos(*(u+1)-2./3.*M_PI); 275 Kalman [0]=ua; // usx276 Kalman [1]=(ua+2.*ub)/sqrt(3.); // usy277 Kalman [2]=Isx;278 Kalman [3]=Isy;275 KalmanObs[0]=ua; // usx 276 KalmanObs[1]=(ua+2.*ub)/sqrt(3.); // usy 277 KalmanObs[2]=Isx; 278 KalmanObs[3]=Isy; 279 279 280 280 vektor_regulace(0,0,Urm_max,Ww,u,Isx,Isy,theta,speed,U_modulace,Uc,Ucn,REZIM_REGULACE); // rezim=1 ... reg. rychlosti, rezim=0 ... reg. momentu -
simulator_zdenek/demo_example/simulator.h
r38 r40 15 15 extern void eval(double Ww); 16 16 17 extern double x[9]; 17 extern double x[9]; 18 extern double KalmanObs[4];