Исследование движения центра масс межпланетных космических аппаратов
Дипломная работа - Физика
Другие дипломы по предмету Физика
232; - , ., . ., 1994.
6. . BORLAND C++ MATHLAB 4.0 FOR WINDOWS
6.1. MAIN.CPP
#include
#include
#include
#include
#include "rk5.h"
#include "sfun.h"
#include "init.h"
#include
typedef long double real;
const float g_r = M_PI/180.;
const float r_g = 180./M_PI;
real t_beg;
real t_end;
real dt;
real toler;
int Np;
int Curp;
real dTp;
real mu_z;
real mu_s;
real mu_l;
real m;
real m_t;
real W;
real w_s;
real w_z;
real w_l;
real ww_l;
real xs,ys,zs;
real xl,yl,zl;
real Fz,Fs,Fl,Fa,U20;
real J1,J2,J3;
int nomin;
real par[8];
real parn[8];
real a_p,e_p,p_p,Om_p,i_p,om_p,Rp_p,Ra_p;
real y_main[6];
real prmt[5];
int Fl_u;
real u_last;
int Fl_ka;
int Fl_kp;
int Fl_ki;
int Fl_i;
int Fl_p;
int Fl_a;
int Fl_lu;
int Fl_pkT;
real dl;
real T_vd;
real dRa;
real dRp;
int Sig;
int Sig_a;
real Tkor;
real Tkore;
real Vkor[3];
real akor[3];
int Fl_l0;
int Fl_l1;
int Fl_pki;
real dV_ps;
real dV_as;
real dV_is;
real dV_ss;
ofstream m_y ("m_y.dat");
ofstream m_f ("m_f.dat");
ofstream m_s ("m_s.dat");
ofstream m_l ("m_l.dat");
ofstream m_par ("m_par.dat");
ofstream u_f ("u_f.dat");
ofstream u_par ("u_par.dat");
ofstream k_par ("k_par.dat");
void out_p(real,real *,real*,int,int,real*);
void main()
{
clrscr();
init_m();
real dery[]={ .167, .167, .167, .167, .166, .166};
int ihlf;
int ndim = 6;
Drkgs(prmt,y_main,dery,ndim,ihlf,fct,out_p);
clrscr();
if (ihlf<11)
{
cout << \n << " " << \n;
cout << " t0 = " << t_beg << " tk = " << t_end << " dt = " << dt;
cout << \n << " =" << ihlf;
}
else
{
cout << \n << " " << \n;
cout << " t0 = " << t_beg << " tk = " << t_end << " dt = " << dt;
cout << \n << " =" << ihlf;
}
getch();
m_y.close();
m_f.close();
m_s.close();
m_l.close();
m_par.close();
u_f.close();
u_par.close();
k_par.close();
}
void out_p(real x,real *y,real*,int,int,real*)
{
if (x >= (dTp*Curp))
{
Curp++;
gotoxy(1,20);
cout << " :" << float(Curp)*100./Np << " % " << \n;
cout.precision(7);