Home > Back-end >  How to set the output generated to TXT file ah (on behalf of the height, h c [I] represents the decl
How to set the output generated to TXT file ah (on behalf of the height, h c [I] represents the decl

Time:09-25

#include
using namespace std;
Int main ()
{

Float Hp, Vcas, P, P, CL, f1, f2, f3, f4, a1, a2, a3, a4, a5, a6, a7, a8, Thr, ROCD, Cpowred, fnom, fmin, f, m, n, Vtas1, Vstall;
Float M, Vtas, F, h, T, a, z2, z3, z4, z5, z6, T1, P1, P1, CDS, and D, Thrdeslow, Thrdesapp, Thrdesld, Thrmaxclimb, Thrdeshigh;
Double const Mdes=0.78, Vdes1=290, Vdes2=290, B=0.0065, g=9.80665;
Double const Cvmin=1.3, VDES1=5, VDES2=10, VDES3=20, VDES4=50, mref=150000, S=283.3;
Double const R=287.05287, P0=101325, P0=1.225, T0=288.15, u=1/3.5, k=1.4, R=6325766;
Double const Cd0cr=0.014, Cd2cr=0.049, Cd0ap=0.035, Cd2ap=0.045, Cd0ldg=0.057, Cd2ldg=0.04, Cd0dtldg=0.018;
Double const Ctc1=296000, Ctc2=50900, Ctc3=0.0000000000419, Ctdeslow=0.013, Ctdesapp=0.14, Ctdesld=0.28, Ctdeshigh=0.074;
Double const mmin=89900, mmax=181400, Cf1=0.763, Cf2=1430, Cf3=18.8 and Cf4=69400;
Float wendu (float e, float e1);
Float XZkongsu float (k);
Float qiya (float b, float b1);
Float Zkongsu float (cas);

Int const dt=0;
int i;
Double m [8]={150000, 0};
Double f [8]={0};
Double c [8]={1};//representative ROCD
For (I=1; i <=8; I++)//43000-29000
{
H=43000-2000 * (I - 1);

M=[I] m [I - 1) + (2000/(c/I - 1)) * f [I - 1);

//cin & gt;> h;

Vcas=XZkongsu (h)/1.9438445;
P=qiya (h, dt);
T=wendu (h, dt);
P=p/(R * T);
Hp=(h * r)/(h + r);
T1=wendu (Hp, dt);
P1=qiya (Hp, dt);
P1=p1/(R * T1);
If (h & gt; 36089)
{
M=Mdes,
F=1;
Vtas=M * SQRT (k * R * T);
Vtas1=Vtas * 1.94384449;
}
Else if (h & gt; 30877.37)
{
M=Mdes;
F2=* 287.05287 * 1.4 * 0.78 * 0.78 (0.0065)/(9.80665 * 2);
F3=1 - dt/(288.15-0.0019812 * Hp + dt);
F=1/(1 + f2 * f3);
Vtas=M * SQRT (k * R * T);
Vtas1=Vtas * 1.94384449;
}
The else
{

Z3=(101325/P) * Zkongsu (Vcas);
(1 + z3, 1/3.5) z4=pow - 1;
Z5=7 * P * z4/P;
Vtas=SQRT (z5);
Vtas1=Vtas * 1.94384449;
Z6=SQRT (k * R * T);
M=Vtas/z6;
F2=1 + (1.4 * 287 * (0.0065) * M * M)/(2 * 9.80665) * ((dt) T/T);
F3=pow (1 + 0.2 * M * M, 1/0.4) (-);
F4=pow (1 + 0.2 * M * M, (1.4/0.4)) - 1;
F=1/(f2 and f3 * f4);
}

CL=(2 * m [I] * g)/(p1 * Vtas Vtas * * S);//weight iteration
Thrmaxclimb=Ctc1 * (1 - Hp/Ctc2 + Hp Ctc3 * * Hp);
If ((Vcas & lt; 115.493) & amp; & (Hp & gt; 3000 & amp; & Hp & lt; 8000))
{
CD=Cd0ap + CL Cd2ap * * CL;
Thrdesapp=Ctdesapp * Thrmaxclimb;
Thr=Thrdesapp;

}
Else if ((Vcas & gt; 86.735 & amp; & Vcas & lt; 115.493) & amp; & (Hp & lt; 3000))
{

CD=Cd0ap + CL Cd2ap * * CL;
Thrdesapp=Ctdesapp * Thrmaxclimb;
Thr=Thrdesapp;
}
Else if ((Vcas & lt; 86.735) & amp; & (Hp & lt; 3000))
{
CD=Cd0ldg + CL Cd2ldg * * CL + Cd0dtldg;
Thrdesld=Ctdesld * Thrmaxclimb;
Thr=Thrdesld;
}
Else if (Hp & gt; 10000)
{
CD=Cd0cr + CL Cd2cr * * CL;
Thrdeshigh=Ctdeshigh * Thrmaxclimb;
Thr=Thrdeshigh;

}
The else
{

CD=Cd0cr + CL Cd2cr * * CL;
Thrdeslow=Ctdeslow * Thrmaxclimb;
Thr=Thrdeslow;

}
D=Vtas Vtas p1 CD * * * * S/2;
//Cpowred=1-0.15 * [I] (181400 - m)/(mmax - mmin); Down does not need to reduce thrust coefficient
[I] c=((dt) T/T) * ((Thr) - D * Vtas/(m) [I] * g) * F * 196.848;//unit of m/s
N=Cf1 * (1 + Vtas/Cf2);
If ((Vcas & lt; 115.493) & amp; & (Hp & gt; 3000 & amp; & Hp & lt; 8000))
{
Fmin=Cf3 * (1 - Hp/Cf4);
Fnom=n * Thr;
If (fnom & gt; Fmin) f [I]=fnom;
The else f [I]=fmin;


}
Else if ((Vcas & gt; 86.735 & amp; & Vcas & lt; 115.493) & amp; & (Hp & lt; 3000))
{
Fmin=Cf3 * (1 - Hp/Cf4);
Fnom=n * Thr;
If (fnom & gt; Fmin) {f [I]=fnom; }
The else f [I]=fmin;

}
Else if ((Vcas & lt; 86.735) & amp; & (Hp & lt; 3000))
{
Fmin=Cf3 * (1 - Hp/Cf4);
Fnom=n * Thr;
If (fnom & gt; Fmin) f [I]=fnom;
The else f [I]=fmin;
}
The else
{
Fmin=Cf3 * (1 - Hp/Cf4);
[I] f=fmin;
}
Cout & lt; <"H=" & lt; Cout & lt; <"Vtas=" & lt; Cout & lt; <[" c "& lt; & lt; I & lt; & lt;"]="& lt; Cout & lt; <"F [& lt; & lt;" I & lt; & lt; "]="& lt;
}

return 0;
}
Float XZkongsu (float k)
{
Float a;
Double const Mdes=0.78 Vstall=113, Vdes1=290, Vdes2=290;
Double const Cvmin=1.3, VDES1=5, VDES2=10, VDES3=20, VDES4=50, mref=150000;
If (k & gt; 30877.37) {a=Mdes; }
Else if (k & gt; nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related