#include "Satellite.h" #include "Planets.h" #include "m_time.h" int initialization(const double i_TDB, std::vector<Satellite>& sat, satellite_parameters& i_par, Kepler_elements_orbit& i_Keo, Moon* m_moon, Sun* m_sun, Earth* m_earth); //моделирование движения спутников, вхедные пармаетры: начало можуляции, шаг модуляции, конец модуляции //если rt = true, то модуляция в режиме раельлного времени //время задается в формате год:месяц:день:час:минуты:секунды (тип данных orbit_time) //шаг задается в секундах int modulation(orbit_date start_time, double step, bool rt,orbit_date end_time = {0,0,0,0,0,0}); int main() { Kepler_elements_orbit element{26559.81038, 0.01203, 56.6024, 106.997, 53.2777, 154.03184}; satellite_parameters param{ 1,3,1.5 }; modulation({ 2022, 07,19,18,20,00 }, 0.00011, false, { 2022, 07,19,18,30,00 }); return 0; } int initialization(const double i_MJB, std::vector<Satellite>& sat, satellite_parameters& i_par, Kepler_elements_orbit& i_Keo, Moon* m_moon, Sun* m_sun, Earth* m_earth) { sat.push_back(Satellite{ i_MJB, i_par, i_Keo, m_moon, m_sun, m_earth }); return 0; }; int modulation(orbit_date start_time, double step, bool rt, orbit_date end_time) { std::vector<Satellite> satellites{}; Ot _mtime{}; double start_MJD = _mtime.convert_GDs_to_MJD(start_time); double end_MJD = _mtime.convert_GDs_to_MJD(end_time); double current_MJD = start_MJD+step; satellite_parameters first_par{ 1, 1, 1.5 }; Kepler_elements_orbit first_element{ 26559.81038, 0.01203, 56.6024, 106.997, 53.2777, 154.03184 }; Earth _earth{}; Moon _moon{ start_MJD }; Sun _sun{ start_MJD }; initialization(start_MJD, satellites, first_par, first_element, &_moon, &_sun, &_earth); _earth = Earth{start_MJD, satellites.at(0).getDCS()}; while (current_MJD < end_MJD) { satellites.at(0).integration_step(current_MJD); std::cout << "********************************\n"; current_MJD += step; } return 0; }