loom
1// Решение ДУ полета
2
3nxt = Knx * (Vc - sqrt(Vx ^ 2 + Vy ^ 2 + Vz ^ 2));
4
5dH = Hz - y;
6
7Vyz = Kdh * dH;
8
9Vyz = (Vyz > 25.0) ? 25.0 : ((Vyz < -15.0) ? -15.0 : Vyz);
10
11nyt = 1 + Kny * (Vyz - Vy);
12
13nzt = Knz * (Vx * (Zz - z) - Vz * (Xz - x));
14nzt = (nzt > 5.0) ? 5.0 : ((nzt < -5.0) ? -5.0 : nzt);
15
16//x = 1;
17
18x' = Vx;
19y' = Vy;
20z' = Vz;
21Vx' = (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);
22Vy' = (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;
23Vz' = (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);
24