void R16(std::vector<Dynamic>& __ret) { //arguments ptr<std::string> hllr__0 = ptr<std::string> (__ret.back()); __ret.pop_back(); Dynamic retval; retval = StateNoise(*hllr__0); __ret.push_back(retval); }
void R57(std::vector<Dynamic>& __ret) { //arguments Dynamic hllr__0 = __ret.back(); __ret.pop_back(); Dynamic retval; retval = StateNoise(","); __ret.push_back(retval); }
void R82(std::vector<Dynamic>& __ret) { //arguments ptr<std::string> hllr__0 = ptr<std::string> (__ret.back()); __ret.pop_back(); Dynamic retval; States x; x.push_back(ptr<State>(StateNoise(*hllr__0))); retval = x; __ret.push_back(retval); }
void R83(std::vector<Dynamic>& __ret) { //arguments ptr<std::string> hllr__1 = ptr<std::string> (__ret.back()); __ret.pop_back(); Dynamic hllr__0 = Dynamic (__ret.back()); __ret.pop_back(); Dynamic retval; States& x = (States&) hllr__0; x.push_back(ptr<State>(StateNoise(*hllr__1))); retval = hllr__0; __ret.push_back(retval); }
//--------------------------------------------------------------------------- bool observer::clock(double u1,double u2,interval d,double alpha, interval boussole) { // Au cas ou une boussole est accessible, il faut la ligne suivante // Sinon, la ligne suivante est inutile. Donc, dans tous les cas, il vaut mieux la laisser. interval sinTheta=Inter(Sin(Xhat[3]),Sin(boussole)); Csin(sinTheta,Xhat[3],-1); interval cosTheta=Inter(Cos(Xhat[3]),Cos(boussole)); Ccos(cosTheta,Xhat[3],-1); Lu1.push_back(u1); Lu2.push_back(u2); Ld.push_back(d); Lalpha.push_back(alpha); if ((int)Lu1.size()>N_window) { Lu1.pop_front(); Lu2.pop_front(); Ld.pop_front(); Lalpha.pop_front(); } if ((int)Lu1.size()==N_window) Xhat=SIVIA(Xhat,Xsecours); else { if (phase==0) Xhat=Xprior0; if (phase==1) return(false); // Cette ligne de code ne devrait jamais être atteinte. } LXhat.push_back(Xhat); if ((int)LXhat.size()>N_window-1) {LXhat.pop_front();} if (Xhat.IsEmpty()) { // An inconsistency is detected. The observer is not reliable anymore. //Form1->R1.DrawBox(Xpriork,clAqua,clAqua,bsSolid,1,2); return false; } //DrawChenille(Center(Xhat[1]),Center(Xhat[2]),Center(Xhat[3]),alpha); //DrawDiagram(); box Xhatp(4); Incremente(Xhatp[1],Xhatp[2],Xhatp[3],Xhatp[4],Xhat[1],Xhat[2],Xhat[3],Xhat[4],u1,u2); box StateNoise(4); interval Noise=interval(-0.1,0.1); StateNoise[1]=dt*Noise; StateNoise[2]=dt*Noise; StateNoise[3]=dt*Noise; StateNoise[4]=dt*Noise; Xhatp=Xhatp+StateNoise; Xhat=Xhatp; if ((Xhat.Width()>5)&(phase==1)) return false; //On ne se localise pas avec une assez bonne précision. On sort. return true; }