Données ------- g constante de gravitation k coefficient de frottement dt intervalle de temps de la simulation wnd vitesse du vent x0, y0 position initiale v0 vitesse initiale alpha angle de tir Variables --------- fx(t) composante x de la force de frottement à l'instant t fy(t) composante y de la force de frottement à l'instant t ax(t) composante x de l'accélération à l'instant t ay(t) composante y de l'accélération à l'instant t x(t) composante x de la position à l'instant t y(t) composante y de la position à l'instant t vx(t) composante x de la vitesse à l'instant t vy(t) composante y de la vitesse à l'instant t vrx(t) composante x de la vitesse relative à l'instant t = vx(t) - wnd vry(t) composante y de la vitesse relative à l'instant t = vy(t) |vr(t)| vitesse relative à l'instant t = SQRT(vrx(t)^2 + vry(t)^2) Initialisation -------------- ax(0) = 0 ay(0) = 0 x(0) = x0 y(0) = y0 vx(0) = v0 cos(alpha) vy(0) = v0 sin(alpha) Mise à jour ----------- |f(t)| = -k |vr(t)| vr(t) fx(t) = -k |vr(t)| vrx(t) = -k |vr(t)| (vx(t) - wnd) = -k SQRT((vx(t) - wnd)^2 + vy(t)^2) (vx(t) - wnd) fy(t) = -k vr(t) vry(y) = -k vr(t) vy(t) = -k SQRT((vx(t) - wnd)^2 + vy(t)^2) vy(t) ax(t) = fx(t) = -k SQRT((vx(t) - wnd)^2 + vy(t)^2) (vx(t) - wnd) ay(t) = fy(t) - g = -k SQRT((vx(t) - wnd)^2 + vy(t)^2) vy(t) - g x(t+1) = x(t) + vx(t) dt y(t+1) = y(t) + vy(t) dt vx(t+1) = vx(t) + ax(t) dt vy(t+1) = vy(t) + ay(t) dt Algorithme ---------- Données x0 x(t) y0 y(t) vx0 vx(t) vy0 vy(t) Résultats x1 x(t+1) y1 y(t+1) vx1 vx(t+1) vy1 vy(t+1) Intermédiaires vxr vx(t) - wnd kvr - k × vr(t) ax ax(t) ay ay(t) Algorithme vxr <- vx0 - wnd kvr <- -k × SQRT(vxr × vxr + vy0 × vy0) ax <- kvr × vxr ay <- kvr × vy0 - g x1 <- x0 + vx0 × dt y1 <- y0 + vy0 × dt vx1 <- vx0 + ax0 × dt vy1 <- vy0 + ay0 × dt