loom
1import "../modules/support.s-script" : s
2
3nxt = Knx * (Vc - sqrt(Vx ^ 2 + Vy ^ 2 + Vz ^ 2))
4
5dH = Hz - y
6
7Vyz = Kdh * dH
8Vyz = s.limit(Vyz, -15.0, 25.0)
9
10nyt = 1 + Kny * (Vyz - Vy)
11
12nzt = Knz * (Vx * (Zz - z) - Vz * (Xz - x))
13nzt = s.limit(nzt, -5.0, 5.0)
14
15//x = 1;
16
17x' = Vx
18y' = Vy
19z' = Vz
20Vx' = (g/sqrt((Vx)^2+(Vy)^2+(Vz)^2))*Vx*(nxt-Vy*nyt/sqrt((Vx)^2+(Vz)^2))-g*Vz*nzt/sqrt((Vx)^2+(Vz)^2)
21Vy' = (g/sqrt((Vx)^2+(Vy)^2+(Vz)^2))*Vy*nxt+(g/sqrt((Vx)^2+(Vy)^2+(Vz)^2))*nyt*sqrt((Vx)^2+(Vz)^2)-g
22Vz' = (g/sqrt((Vx)^2+(Vy)^2+(Vz)^2))*Vz*(nxt-Vy*nyt/sqrt((Vx)^2+(Vz)^2))+g*Vx*nzt/sqrt((Vx)^2+(Vz)^2)
23