From bf1a24e6036ae5cdf8956cd3027a5a85211c0f17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A8=D0=B0=D1=80=D0=BE=D0=B2=20=D0=9A=D0=B8=D1=80=D0=B8?= =?UTF-8?q?=D0=BB=D0=BB?= Date: Sun, 29 Oct 2017 03:21:06 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=B4=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=20=D0=BA=D0=BE=D0=B4,=20=D0=B4=D0=BE=D0=B1?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=B2=D1=8B=D0=B2=D0=BE?= =?UTF-8?q?=D0=B4=D1=8B=20=D1=88=D0=B8=D1=80=D0=BE=D1=82=D1=8B=20=D0=B8=20?= =?UTF-8?q?=D0=B4=D0=BE=D0=BB=D0=B3=D0=BE=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- runge-kutta/.vs/runge-kutta/v14/.suo | Bin 37888 -> 38912 bytes runge-kutta/runge-kutta.VC.db | Bin 9015296 -> 9015296 bytes runge-kutta/runge-kutta/Source.cpp | 320 ++++++++++++++++----------- 3 files changed, 193 insertions(+), 127 deletions(-) diff --git a/runge-kutta/.vs/runge-kutta/v14/.suo b/runge-kutta/.vs/runge-kutta/v14/.suo index 3c725c41497ee8789ec3d1ba3a72436cdc4f43dd..f998beee2fe780e32d008b4be0e39fb25cbb494a 100644 GIT binary patch delta 2496 zcmc&$T})J05I*O!tg!6D3M(Q7S&M)cq^zu_3f61EYS$)W{fQ(-m-(}4iMwkcq?;ZZ!=}*E3Mq;ygdp0J8rk>?IJZAyV0!2U$Ks~lyJ{1p~I2&1GCFE76ZZ-H7AQM;v zjPJW=syIG^E~t)flmUbOqseIbKU153;<_<&jB(Vo&}Z%<_l0>1o-(Y z@Yld4;IgS3(`DK=`G0K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kutta/runge-kutta/Source.cpp @@ -14,7 +14,6 @@ #define Cx 0.3 #define K 3.5 -//#define alf 0 #define phi 0 #define d 0.5 @@ -24,11 +23,11 @@ #define I2 9e3 #define EarthR 6371000 -//#define fuel0 8.2e3 -//#define fuel01 5e3 -#define fuel01 0 -//#define fuel02 4.6e3 -#define fuel02 9.6e3 + +#define fuel01 5e3 +//#define fuel01 0 +#define fuel02 4.6e3 +//#define fuel02 9.6e3 #define m0 1.27e4 #define massVeh1 1e3 #define massVeh2 8e2 @@ -41,7 +40,9 @@ #define finalErr 1e2 double alf = 0; -//double m0 = 1.27e4; + +// азимут запуска в радианах +#define az 0 double P = 3e5; double s = 2; @@ -55,6 +56,10 @@ double tetaFunc(double v, double m, double teta, double y); double lengthFunc(double v, double teta, double y); double hightFunc(double v, double teta); double massFunc(double m); +// функция широты +double latitudeFunc(double v, double teta, double y); +// функция долготы +double longtitudeFunc(double v, double teta, double y, double lttd); double Gc(double m); double X(double ro, double v); double Y(double X); @@ -68,6 +73,8 @@ void main() { double x0 = 0, y0 = 0, v0 = 4.7, teta0 = 80; + double lttd = 55.7522200, lngttd = 37.6155600; + double t0 = 0, h = 0.0025; double maxH = -1; int count = 0; @@ -79,13 +86,14 @@ void main() map itData; map lastItter; + double tmp; vector> result; ofstream fxls("output.xls", ios::out); teta0 = teta0*M_PI/180.; - fxls << "x\t" << "y\t" << "teta\t" << "t\t" << "v\t" << "X\t" << "Y\t" << "m\t"<< "ro\t" << endl + fxls << "x\t" << "y\t" << "teta\t" << "t\t" << "v\t" << "X\t" << "Y\t" << "m\t"<< "ro\t" << "Latitude (grad.)\t" << "Longtitude (grad.)\t" << endl << x0/1000. << "\t" << y0/1000. << "\t" << teta0*180/M_PI << "\t" @@ -94,10 +102,12 @@ void main() << X(ro(y0), v0) << "\t" << Y(X(ro(y0), v0)) << "\t" << m0 << "\t" - << ro(y0) << "\t" << endl; + << ro(y0) << "\t" + << lttd << "\t" + << lngttd << "\t" << endl; -//========================================================================================================================== +//=== Код применение которому я уже не могу вспомнить ====================================================================== //double left = 0, right = 2e5; //bool maxHightAchieved = false; //bool trigger1 = false, trigger2 = false; @@ -110,6 +120,8 @@ void main() // itData["hight"] = y0; // itData["mass"] = m0; // itData["time"] = t0; + // itData["latitude"] = lttd; + // itData["longtitude"] = lngttd; // maxH = itData["hight"] - 1; // P = 3e5; @@ -174,28 +186,32 @@ void main() //} //========================================================================================================================== -//========================================================================================================================== - - //itData["velocity"] = 1700; // на 4 махах адекватные значения угла - //itData["teta"] = x0; - //itData["length"] = y0; - //itData["hight"] = 2e4; - ////itData["mass"] = m0 - fuel01; + +//=== Симуляция полёта с поддержанием постоянных высоты и скорости ========================================================= + //itData["velocity"] = 1200; // на 4 махах адекватные значения угла + //itData["teta"] = 0; + //itData["length"] = 0; + //itData["hight"] = 2.5e4; //itData["mass"] = m0; //itData["time"] = t0; + //itData["latitude"] = lttd; + //itData["longtitude"] = lngttd; //firstVehicle = false; - //constParamTrajectory(itData, shutoffH, h, fxls, &lastItter); - + //constParamTrajectory(itData, shutoffH, h, fxls, &tmp, &lastItter); //========================================================================================================================== + +//=== Симуляция полёта по баллистической траектории ======================================================================== //itData["velocity"] = v0; //itData["teta"] = teta0; //itData["length"] = x0; //itData["hight"] = y0; //itData["mass"] = m0; //itData["time"] = t0; + //itData["latitude"] = lttd; + //itData["longtitude"] = lngttd; //P = 3e5; //firstVehicle = true; @@ -204,9 +220,10 @@ void main() //count++; //ballisticTrajectory(itData, shutoffH, h, fxls, &lastItter); - //========================================================================================================================== - + + +//=== Симуляция полёта по баллистической траектории и достижением заданной дальности ======================================= //double left = 45, right = 85; //double startingTeta; //int dihotomyCount = 0; @@ -221,13 +238,15 @@ void main() // itData["hight"] = y0; // itData["mass"] = m0; // itData["time"] = t0; + // itData["latitude"] = lttd; + // itData["longtitude"] = lngttd; // P = 3e5; // firstVehicle = true; // secondVehicle = false; // fxls.open("output.xls", ios::out); - // fxls << "x\t" << "y\t" << "teta\t" << "t\t" << "v\t" << "X\t" << "Y\t" << "m\t" << "ro\t" << endl + // fxls << "x\t" << "y\t" << "teta\t" << "t\t" << "v\t" << "X\t" << "Y\t" << "m\t" << "ro\t" << "Latitude (grad.)\t" << "Longtitude (grad.)\t" << endl // << x0 / 1000. << "\t" // << y0 / 1000. << "\t" // << teta0 * 180 / M_PI << "\t" @@ -236,13 +255,20 @@ void main() // << X(ro(y0), v0) << "\t" // << Y(X(ro(y0), v0)) << "\t" // << m0 << "\t" - // << ro(y0) << "\t" << endl; + // << ro(y0) << "\t" + // << lttd << "\t" + // << lngttd << "\t" << endl; // ballisticTrajectory(itData, -1, h, fxls, &lastItter); // dihotomyCount++; // if (dihotomyCount >= 100) - // break; + // { + // std::cout << "The specified range is unreachable\n"; + // getchar(); + // fxls.close(); + // exit(1); + // } // if (fabs(lastItter["length"] - finalPoint) < finalErr) // break; @@ -256,123 +282,137 @@ void main() //} //std::cout << "StartingTeta = " << startingTeta << endl << endl; - //========================================================================================================================== - double constV = 1500; - double constH = 2.5e4; + +//=== Симуляция полёта с поддержанием постоянных высоты и скорости и достижением заданной дальности ======================== + //double constV = 1500; + //double constH = 2.5e4; - lastItter.clear(); - double maxshuoffTime; + //lastItter.clear(); + //double maxshuoffTime; - itData["velocity"] = constV; - itData["teta"] = 0; - itData["length"] = 0; - itData["hight"] = constH; - itData["mass"] = m0; - itData["time"] = t0; + //itData["velocity"] = constV; + //itData["teta"] = 0; + //itData["length"] = 0; + //itData["hight"] = constH; + //itData["mass"] = m0; + //itData["time"] = t0; + //itData["latitude"] = lttd; + //itData["longtitude"] = lngttd; - firstVehicle = false; + //firstVehicle = false; - constParamTrajectory(itData, shutoffH, h, fxls, &maxshuoffTime, &lastItter); + //constParamTrajectory(itData, shutoffH, h, fxls, &maxshuoffTime, &lastItter); - double left = 0, right = maxshuoffTime; - double shutoffT; - int dihotomyCount = 0; - lastItter.clear(); - while (true) - { - shutoffT = (left + right) / 2.; - - itData["velocity"] = constV; - itData["teta"] = 0; - itData["length"] = 0; - itData["hight"] = constH; - itData["mass"] = m0; - itData["time"] = t0; - - P = 3e5; - alf = 0; - firstVehicle = false; - secondVehicle = true; - - fxls.open("output.xls", ios::out); - fxls << "x\t" << "y\t" << "teta\t" << "t\t" << "v\t" << "X\t" << "Y\t" << "m\t" << "ro\t" << endl - << 0 / 1000. << "\t" - << constH / 1000. << "\t" - << 0 * 180 / M_PI << "\t" - << t0 << "\t" - << constV << "\t" - << X(ro(constH), constV) << "\t" - << Y(X(ro(constH), constV)) << "\t" - << m0 << "\t" - << ro(constH) << "\t" << endl; - - - - double b1, b2; - int writeCount = 1; - int writingPeriod = 1 / h - 1; - while (P > 0) - { - b1 = X(ro(itData["hight"]), itData["velocity"]); - b2 = -Y(X(ro(itData["hight"]), itData["velocity"])) + itData["mass"] * g - itData["mass"] * itData["velocity"] * itData["velocity"] * cos(itData["teta"]) / (EarthR + itData["hight"]); - alf = atan2(b2, b1) * 180 / M_PI; - P = b1 / cos(alf*M_PI / 180.); - - itData = RungeKutta(&itData, h); - - if (writeCount == writingPeriod) - { - fxls << itData["length"] / 1000. << "\t" - << itData["hight"] / 1000. << "\t" - << itData["teta"] * 180 / M_PI << "\t" - << itData["time"] << "\t" - << itData["velocity"] << "\t" - << X(ro(itData["hight"]), itData["velocity"]) << "\t" - << Y(X(ro(itData["hight"]), itData["velocity"])) << "\t" - << itData["mass"] << "\t" - << ro(itData["hight"]) << "\t" << endl; - - writeCount = 0; - } - else - writeCount++; - - if (fabs(itData["time"] - shutoffT) < h) - break; - } - secondVehicle = false; - //std::cout << "Alfa = " << alf << endl; - alf = 0; - P = 0; - ballisticTrajectory(itData, shutoffH, h, fxls, &lastItter); + //double left = 0, right = maxshuoffTime; + //double shutoffT; + //int dihotomyCount = 0; + //lastItter.clear(); + //while (true) + //{ + // shutoffT = (left + right) / 2.; + // itData["velocity"] = constV; + // itData["teta"] = 0; + // itData["length"] = 0; + // itData["hight"] = constH; + // itData["mass"] = m0; + // itData["time"] = t0; + // itData["latitude"] = lttd; + // itData["longtitude"] = lngttd; - dihotomyCount++; - if (dihotomyCount >= 100) - break; + // P = 3e5; + // alf = 0; + // firstVehicle = false; + // secondVehicle = true; - if (fabs(lastItter["length"] - finalPoint) < finalErr) - break; - else - { - if (lastItter["length"] > finalPoint) - right = shutoffT; - else - left = shutoffT; - } - } + // fxls.open("output.xls", ios::out); + // fxls << "x\t" << "y\t" << "teta\t" << "t\t" << "v\t" << "X\t" << "Y\t" << "m\t" << "ro\t" << "Latitude (grad.)\t" << "Longtitude (grad.)\t" << endl + // << x0 / 1000. << "\t" + // << y0 / 1000. << "\t" + // << teta0 * 180 / M_PI << "\t" + // << t0 << "\t" + // << v0 << "\t" + // << X(ro(y0), v0) << "\t" + // << Y(X(ro(y0), v0)) << "\t" + // << m0 << "\t" + // << ro(y0) << "\t" + // << lttd << "\t" + // << lngttd << "\t" << endl; + + + + // double b1, b2; + // int writeCount = 1; + // int writingPeriod = 1 / h - 1; + // while (P > 0) + // { + // b1 = X(ro(itData["hight"]), itData["velocity"]); + // b2 = -Y(X(ro(itData["hight"]), itData["velocity"])) + itData["mass"] * g - itData["mass"] * itData["velocity"] * itData["velocity"] * cos(itData["teta"]) / (EarthR + itData["hight"]); + // alf = atan2(b2, b1) * 180 / M_PI; + // P = b1 / cos(alf*M_PI / 180.); + + // itData = RungeKutta(&itData, h); + + // if (writeCount == writingPeriod) + // { + // fxls << itData["length"] / 1000. << "\t" + // << itData["hight"] / 1000. << "\t" + // << itData["teta"] * 180 / M_PI << "\t" + // << itData["time"] << "\t" + // << itData["velocity"] << "\t" + // << X(ro(itData["hight"]), itData["velocity"]) << "\t" + // << Y(X(ro(itData["hight"]), itData["velocity"])) << "\t" + // << itData["mass"] << "\t" + // << ro(itData["hight"]) << "\t" + // << itData["latitude"] << "\t" + // << itData["longtitude"] << "\t" << endl; + + // writeCount = 0; + // } + // else + // writeCount++; + + // if (fabs(itData["time"] - shutoffT) < h) + // break; + // } + // secondVehicle = false; + // //std::cout << "Alfa = " << alf << endl; + // alf = 0; + // P = 0; + // ballisticTrajectory(itData, shutoffH, h, fxls, &lastItter); + + + // if (dihotomyCount >= 100) + // { + // std::cout << "The specified range is unreachable\n"; + // getchar(); + // fxls.close(); + // exit(1); + // } + + // if (fabs(lastItter["length"] - finalPoint) < finalErr) + // break; + // else + // { + // if (lastItter["length"] > finalPoint) + // right = shutoffT; + // else + // left = shutoffT; + // } + //} +//========================================================================================================================== + //========================================================================================================================== std::cout << "Hight = " << lastItter["hight"] / 1000. << " km" << endl << "Length = " << lastItter["length"] / 1000. << " km" << endl << "Teta = " << lastItter["teta"] *180/M_PI << endl << "Mass = " << lastItter["mass"] << " kg" << endl - << "Time = " << lastItter["time"] << " sec" << endl - << "Iteration count = " << dihotomyCount << endl; + << "Time = " << lastItter["time"] << " sec" << endl; getchar(); @@ -438,13 +478,21 @@ double massFunc(double m) { return -Gc(m); } +double latitudeFunc(double v, double teta, double y) +{ + return (v*cos(teta)*cos(az)) / (EarthR + y); +} +double longtitudeFunc(double v, double teta, double y, double lttd) +{ + return (-v*cos(teta)*sin(az)) / ((EarthR + y)*cos(lttd*M_PI / 180.)); +} map RungeKutta(const map* data, const double step) { - double v, teta, x, y, m, t; + double v, teta, x, y, m, t, lttd, lngttd; double h = step; - vector k1(5), k2(5), k3(5), k4(5); // {v, teta, x, y, m} + vector k1(7), k2(7), k3(7), k4(7); // {v, teta, x, y, m, lttd, lngttd} map result; v = data->at("velocity"); @@ -453,6 +501,8 @@ map RungeKutta(const map* data, const double ste y = data->at("hight"); m = data->at("mass"); t = data->at("time"); + lttd = data->at("latitude"); + lngttd = data->at("longtitude"); // k1 k1[0] = h*velocityFunc(v, m, teta, y); @@ -460,6 +510,8 @@ map RungeKutta(const map* data, const double ste k1[2] = h*lengthFunc(v, teta, y); k1[3] = h*hightFunc(v, teta); k1[4] = h*massFunc(m); + k1[5] = h*latitudeFunc(v, teta, y); + k1[6] = h*longtitudeFunc(v, teta, y, lttd); // k2 k2[0] = h*velocityFunc(v + k1.at(0) / 2., m + k1.at(4) / 2., teta + k1.at(1) / 2., y + k1.at(3) / 2.); @@ -467,6 +519,8 @@ map RungeKutta(const map* data, const double ste k2[2] = h*lengthFunc(v + k1.at(0) / 2., teta + k1.at(1) / 2., y + k1.at(3) / 2.); k2[3] = h*hightFunc(v + k1.at(0) / 2., teta + k1.at(1) / 2.); k2[4] = h*massFunc(m + k1.at(4) / 2.); + k2[5] = h*latitudeFunc(v + k1.at(0) / 2., teta + k1.at(1) / 2., y + k1.at(3) / 2.); + k2[6] = h*longtitudeFunc(v + k1.at(0) / 2., teta + k1.at(1) / 2., y + k1.at(3) / 2., lttd + k1.at(5) / 2.); // k3 k3[0] = h*velocityFunc(v + k2.at(0) / 2., m + k2.at(4) / 2., teta + k2.at(1) / 2., y + k2.at(3) / 2.); @@ -474,6 +528,8 @@ map RungeKutta(const map* data, const double ste k3[2] = h*lengthFunc(v + k2.at(0) / 2., teta + k2.at(1) / 2., y + k2.at(3) / 2.); k3[3] = h*hightFunc(v + k2.at(0) / 2., teta + k2.at(1) / 2.); k3[4] = h*massFunc(m + k2.at(4) / 2.); + k3[5] = h*latitudeFunc(v + k2.at(0) / 2., teta + k2.at(1) / 2., y + k2.at(3) / 2.); + k3[6] = h*longtitudeFunc(v + k2.at(0) / 2., teta + k2.at(1) / 2., y + k2.at(3) / 2., lttd + k2.at(5) / 2.); // k4 k4[0] = h*velocityFunc(v + k3.at(0), m + k3.at(4), teta + k3.at(1), y + k3.at(3)); @@ -481,6 +537,8 @@ map RungeKutta(const map* data, const double ste k4[2] = h*lengthFunc(v + k3.at(0), teta + k3.at(1), y + k3.at(3)); k4[3] = h*hightFunc(v + k3.at(0), teta + k3.at(1)); k4[4] = h*massFunc(m + k3.at(4)); + k4[5] = h*latitudeFunc(v + k3.at(0), teta + k3.at(1), y + k3.at(3)); + k4[6] = h*longtitudeFunc(v + k3.at(0), teta + k3.at(1), y + k3.at(3), lttd + k3.at(5)); v += (k1.at(0) + 2 * k2.at(0) + 2 * k3.at(0) + k4.at(0)) / 6.; @@ -488,6 +546,8 @@ map RungeKutta(const map* data, const double ste x += (k1.at(2) + 2 * k2.at(2) + 2 * k3.at(2) + k4.at(2)) / 6.; y += (k1.at(3) + 2 * k2.at(3) + 2 * k3.at(3) + k4.at(3)) / 6.; m += (k1.at(4) + 2 * k2.at(4) + 2 * k3.at(4) + k4.at(4)) / 6.; + lttd += (k1.at(5) + 2 * k2.at(5) + 2 * k3.at(5) + k4.at(5)) / 6.; + lngttd += (k1.at(6) + 2 * k2.at(6) + 2 * k3.at(6) + k4.at(6)) / 6.; t += h; result.insert(make_pair("velocity", v)); @@ -496,6 +556,8 @@ map RungeKutta(const map* data, const double ste result.insert(make_pair("hight", y)); result.insert(make_pair("mass", m)); result.insert(make_pair("time", t)); + result.insert(make_pair("latitude", lttd)); + result.insert(make_pair("longtitude", lngttd)); return result; } @@ -552,7 +614,9 @@ void ballisticTrajectory(map itData, double shutoffH, double h, << X(ro(itData["hight"]), itData["velocity"]) << "\t" << Y(X(ro(itData["hight"]), itData["velocity"])) << "\t" << itData["mass"] << "\t" - << ro(itData["hight"]) << "\t" << endl; + << ro(itData["hight"]) << "\t" + << itData["latitude"] << "\t" + << itData["longtitude"] << "\t" << endl; writeCount = 0; } @@ -589,7 +653,9 @@ void constParamTrajectory(map itData, double shutoffH, double h, << X(ro(itData["hight"]), itData["velocity"]) << "\t" << Y(X(ro(itData["hight"]), itData["velocity"])) << "\t" << itData["mass"] << "\t" - << ro(itData["hight"]) << "\t" << endl; + << ro(itData["hight"]) << "\t" + << itData["latitude"] << "\t" + << itData["longtitude"] << "\t" << endl; writeCount = 0; }