00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00017 void sim_profile_steps1(double &Ww,bool load=false) {
00018 
00019         if (t>0.2) x[8]=1.2;    
00020         if (t>0.4) x[8]=10.8;   
00021         if (t>0.6) x[8]=25.2;  
00022 
00023         if (t>0.7) Ww=2.*M_PI*10.;
00024         if (t>1.0) x[8]=1.2;    
00025         if (t>1.2) x[8]=10.8;   
00026         if (t>1.4) x[8]=25.2;  
00027 
00028         if (t>1.6) Ww=2.*M_PI*50.;
00029         if (t>1.9) x[8]=1.2;    
00030         if (t>2.1) x[8]=10.8;   
00031         if (t>2.3) x[8]=25.2;  
00032 
00033         if (t>2.5) Ww=2.*M_PI*100;
00034         if (t>2.8) x[8]=1.2;    
00035         if (t>3.0) x[8]=10.8;   
00036         if (t>3.2) x[8]=25.2;  
00037 
00038         if (t>3.4) Ww=2.*M_PI*150;
00039         if (t>3.7) x[8]=1.2;    
00040         if (t>3.9) x[8]=10.8;   
00041         if (t>4.1) x[8]=25.2;  
00042 
00043         if (t>4.3) Ww=2.*M_PI*0;
00044         if (t>4.8) x[8]=-1.2;    
00045         if (t>5.0) x[8]=-10.8;   
00046         if (t>5.2) x[8]=-25.2;  
00047 
00048         if (t>5.4) Ww=2.*M_PI*(-10.);
00049         if (t>5.7) x[8]=-1.2;    
00050         if (t>5.9) x[8]=-10.8;   
00051         if (t>6.1) x[8]=-25.2;  
00052 
00053         if (t>6.3) Ww=2.*M_PI*(-50.);
00054         if (t>6.7) x[8]=-1.2;    
00055         if (t>6.9) x[8]=-10.8;   
00056         if (t>7.1) x[8]=-25.2;  
00057 
00058         if (t>7.3) Ww=2.*M_PI*(-100.);
00059         if (t>7.7) x[8]=-1.2;    
00060         if (t>7.9) x[8]=-10.8;   
00061         if (t>8.1) x[8]=-25.2;  
00062         if (t>8.3) x[8]=10.8;   
00063         if (t>8.5) x[8]=25.2;  
00064         
00065         if (t>9) Ww=2.*M_PI*0;
00066         
00067         if (!load) x[8]=0.0;
00068 }
00069 
00070 void sim_profile_2slowrevs(double &Ww,bool load=false) {
00071         static int k_rampa=1;
00072 
00073         if ((t>0.2)&&(t<0.8)) {
00074                 if ((t>0.4)&&(t<0.7))
00075                         Ww+=k_rampa*2.*M_PI*4e-5;    
00076                 else
00077                         Ww-=k_rampa*2.*M_PI*4e-5;    
00078         }       
00079         
00080         if (!load) x[8]=0.0;
00081 }
00082 
00083 void sim_profile_vec01t(double &Ww, vec &vecWw){
00084         static int ind=0;
00085         static double dW;
00086         if (t>=0.1*ind) {
00087                 ind++;
00088                 dW = vecWw(ind)-vecWw(ind-1);
00089         }
00090         Ww=vecWw(ind-1)+(t-0.1*(ind-1))*dW/0.1;
00091 }