From ab715964a0e5bb05047f83c499cf1d14805ffe5a Mon Sep 17 00:00:00 2001 From: albertNos Date: Tue, 14 Dec 2021 17:46:00 +0100 Subject: [PATCH 01/11] notebook creates data differently, ladds reads new different data --- cfg/default_cfg.yaml | 2 +- .../ConstellationGeneration.ipynb | 121 ++++++++++++------ src/ladds/io/SatelliteLoader.cpp | 25 +++- src/ladds/particle/Constellation.cpp | 47 +++---- src/ladds/particle/Constellation.h | 25 ++-- 5 files changed, 128 insertions(+), 92 deletions(-) diff --git a/cfg/default_cfg.yaml b/cfg/default_cfg.yaml index acf9a0e2..7d304eb9 100644 --- a/cfg/default_cfg.yaml +++ b/cfg/default_cfg.yaml @@ -22,7 +22,7 @@ io: #progressOutputFrequency : 50 # Frequency of writing iteration number and encounter info to std::out. vtkWriteFrequency: 1000 # Frequency of writing to vtk file [iterations] - constellationList: #AstraPhase2,100,7200 # ';'-seperated constellations consisting of path (to constellation directory), start time, duration + constellationList: #AstraPhase2 # ';'-seperated constellations consisting of the path to their directory constellationFrequency: 10 # Frequency of adding satellites to simulation [iterations] constellationCutoff: 0.1 # satellites of constellations are only inserted when there is no object within constellationCutoff range altitudeSpread: 1.0 # [km] normal distributed altitude deviations are usually smaller than this value (~99.74% chance) diff --git a/notebooks/ConstellationGeneration/ConstellationGeneration.ipynb b/notebooks/ConstellationGeneration/ConstellationGeneration.ipynb index acc8cf28..3d3fbc37 100644 --- a/notebooks/ConstellationGeneration/ConstellationGeneration.ipynb +++ b/notebooks/ConstellationGeneration/ConstellationGeneration.ipynb @@ -31,7 +31,7 @@ "id": "b8754e98", "metadata": {}, "source": [ - "# Initialize / reset planet_list and other" + "# 1. Initialize Constellation and reset planet_list and other lists" ] }, { @@ -41,6 +41,12 @@ "metadata": {}, "outputs": [], "source": [ + "#---Constellation data----------------------------------------------------------------------------------------------\n", + "constellation_name = \"AstraPhase3\"\n", + "startTime = 0\n", + "duration = 0\n", + "#-------------------------------------------------------------------------------------------------------------------\n", + "nShells = 0\n", "planet_list = []\n", "shell_list = []\n", "xparams_list = []\n", @@ -52,7 +58,7 @@ "id": "e78dc60e", "metadata": {}, "source": [ - "# Generate partial constellations by specifying shell = ( altitude, inclination, nPlanes, nSats )" + "# 2.1 Generate shell = ( altitude, inclination, nPlanes, nSats )" ] }, { @@ -66,41 +72,42 @@ "# to be stored and not get overwritten (this also concerns additional shell data shell_list, xparams_list)\n", "\n", "#---input-----------------------------------------------------------------------------------------------------------\n", - "altitude = 370\n", + "altitude = 400\n", "inclination = 55.0\n", - "nPlanes = 10\n", - "nSats = 12\n", + "nPlanes = 61\n", + "nSats = 68\n", "#-------------------------------------------------------------------------------------------------------------------\n", "#---extra-params----------------------------------------------------------------------------------------------------\n", "\n", - "#offsetM = offset for M added after each plane (relative phasing)\n", + "#offsetM = offset for Mean Anomaly added after each plane (relative phasing)\n", "# walker constellation: offsetM = F * 360 / (nPlanes * nSats) ; F element {0, ... , nPlanes - 1}\n", "offsetM = 0 # default 0\n", "\n", - "#startingM = offset for M that is not accumulating\n", - "# overlapping shells (same altitude, same inclination):\n", - "# (360 / G) / 2 ; G = smallest common multiple of the overlapping nPlanes\n", - "startingM = 0 # default 0 \n", + "#argPeriapsis = argument of periapsis\n", + "# starting point of satellite placement for each plane\n", + "# argPeriapsis = pi avoids collisions in planes that intersect at reference plane\n", + "argPeriapsis = math.pi # default math.pi \n", "\n", - "#startingW = offset for W that is not accumulating\n", + "#startingW = offset for W that is not accumulating (W = longitude of ascending node)\n", + "# formula for overlapping shells (same altitude, same inclination):\n", + "# (360 / G) / 2 ; G = smallest common multiple of the overlapping nPlanes\n", "startingW = 0 # default 0\n", "\n", - "#minimumW, maximumW: orbital planes are distributed evenly within range [minimumW,maximumW)\n", - "minimumW = 0 # default 0\n", - "maximumW = 360 # default 360\n", + "# W_area: orbital planes are distributed evenly within range [startingW,startingW + maximumW)\n", + "W_area = 360 # default 360\n", "#-------------------------------------------------------------------------------------------------------------------\n", "\n", - "minW = minimumW + startingW\n", - "maxW = maximumW + startingW\n", + "minW = startingW\n", + "maxW = W_area + startingW\n", "\n", - "a = altitude*1000 + 6371000 # in [m], earth radius included\n", + "a = altitude * 1000 + 6371000 # in [m], earth radius included\n", "e = 0\n", "i = inclination * pk.DEG2RAD\n", - "W = pk.DEG2RAD*minW\n", - "w = 0\n", - "M = pk.DEG2RAD * startingM\n", + "W = pk.DEG2RAD * minW\n", + "w = argPeriapsis * pk.DEG2RAD \n", + "M = 0 \n", "\n", - "plane_count=0\n", + "plane_count = 0\n", "\n", "when = starting_t\n", "mu_central_body = pk.MU_EARTH\n", @@ -108,21 +115,23 @@ "radius = 1\n", "safe_radius = 1\n", "\n", - "pStep = pk.DEG2RAD*(maxW-minW)/ nPlanes # W goes from minimumW to maximumW (default: 0° to 360°)\n", - "sStep = 2*math.pi/ nSats # M goes from 0° to 360°\n", + "pStep = pk.DEG2RAD * W_area / nPlanes # W goes from startingW to startingW+W_area\n", + "sStep = 2 * math.pi / nSats # M goes from 0° to 360°\n", "sExtraStep = pk.DEG2RAD*offsetM\n", "\n", "planet_list_tmp = []\n", "for x in range(nPlanes):\n", " for y in range(nSats):\n", - " planet_list_tmp.append(pk.planet.keplerian(when,[a,e,i,W,w,M], mu_central_body, mu_self,radius, safe_radius ,\"sat\"))\n", + " planet_list_tmp.append(pk.planet.keplerian(when,[a,e,i,W,w,M],mu_central_body,mu_self,radius,safe_radius,\"sat\"))\n", " M = M + sStep\n", " plane_count = plane_count + 1\n", " W = W + pStep\n", - " M = startingM + plane_count*sExtraStep #equals 0 + count*0 = 0 in the usual case\n", + " M = plane_count * sExtraStep #equals 0 + count*0 = 0 in the usual case\n", " \n", "shell = (altitude,inclination,nPlanes,nSats)\n", - "xparams = (offsetM,startingM,startingW,minimumW,maximumW)\n", + "xparams = (offsetM,argPeriapsis,startingW,W_area)\n", + "\n", + "nShells += 1\n", "\n", "print(\"Added \" + str(len(planet_list_tmp)) + \" planets\")" ] @@ -132,7 +141,7 @@ "id": "6a4e87f4", "metadata": {}, "source": [ - "## Append to planet_list and other" + "# 2.2 Append to planet_list and other" ] }, { @@ -154,7 +163,7 @@ "id": "8cd629fd", "metadata": {}, "source": [ - "## Plot some examples" + "## Plot current shell" ] }, { @@ -175,7 +184,7 @@ "id": "dbd01df1", "metadata": {}, "source": [ - "## Propagate all objects to t and discard too low and high ones" + "# 3. Propagate all objects to t and discard too low and high ones" ] }, { @@ -219,7 +228,7 @@ " \n", "extraParams = \"\"\n", "for i in range(len(xparams_list)):\n", - " for j in range(5):\n", + " for j in range(4):\n", " extraParams += str(xparams_list[i][j]) + \" \"\n", " extraParams += \"\\n\"" ] @@ -229,7 +238,7 @@ "id": "5c77e85b", "metadata": {}, "source": [ - "## Plot and store results" + "# 4. Plot and store results" ] }, { @@ -241,10 +250,37 @@ "source": [ "fig = plt.figure(figsize=(6,6),dpi=100)\n", "ax = plt.axes(projection='3d');\n", - "\n", + "# pos , v (.csv)\n", "positions = np.array([pos for pos,_ in objects])\n", "velocities = np.array([v for _,v in objects])\n", - "ax.scatter(positions[:,0],positions[:,1],positions[:,2],\".\",alpha=0.25)" + "ax.scatter(positions[:,0],positions[:,1],positions[:,2],\".\",alpha=0.25)\n", + "# parameters (.yaml)\n", + "constellation_yaml = \"\"\n", + "constellation_yaml += \"constellation:\\n\"\n", + "constellation_yaml += \" name: \" + constellation_name + \"\\n\"\n", + "constellation_yaml += \" startTime: \" + str(startTime) + \"\\n\"\n", + "constellation_yaml += \" duration: \" + str(duration) + \"\\n\"\n", + "constellation_yaml += \" nShells: \" + str(nShells) + \"\\n\\n\"\n", + "for i in range(nShells):\n", + " constellation_yaml += \"shell\" + str(i+1) + \":\\n\"\n", + " constellation_yaml += \" altitude: \" + str(shell_list[i][0]) + \"\\n\"\n", + " constellation_yaml += \" inclination: \" + str(shell_list[i][1]) + \"\\n\"\n", + " constellation_yaml += \" nPlanes: \" + str(shell_list[i][2]) + \"\\n\"\n", + " constellation_yaml += \" nSats: \" + str(shell_list[i][3]) + \"\\n\\n\"\n", + "for i in range(nShells):\n", + " constellation_yaml += \"special\" + str(i+1) + \":\\n\"\n", + " constellation_yaml += \" offsetM: \" + str(xparams_list[i][0]) + \"\\n\"\n", + " constellation_yaml += \" argPeriapsis: \" + str(xparams_list[i][1]) + \"\\n\"\n", + " constellation_yaml += \" startingW: \" + str(xparams_list[i][2]) + \"\\n\"\n", + " constellation_yaml += \" W_area: \" + str(xparams_list[i][3]) + \"\\n\\n\"" + ] + }, + { + "cell_type": "markdown", + "id": "91f07380", + "metadata": {}, + "source": [ + "# 5. Save Constellation as files in directory" ] }, { @@ -256,20 +292,23 @@ "source": [ "# creates directory named as the constellation_name value within the data folder and stores output there\n", "\n", - "constellation_name = \"Constellation\"\n", "os.mkdir(\"../../data/\" + constellation_name);\n", "\n", "np.savetxt(\"../../data/\" + constellation_name + \"/pos_\"+constellation_name+\".csv\",positions,delimiter=\",\")\n", "np.savetxt(\"../../data/\" + constellation_name + \"/v_\"+constellation_name+\".csv\",velocities,delimiter=\",\")\n", "\n", - "f1 = open(\"../../data/\" + constellation_name + \"/shells_\"+constellation_name+\".txt\",\"w\")\n", - "f1.write(shells)\n", - "f1.close()\n", - "\n", - "f2 = open(\"../../data/\" + constellation_name + \"/xparams_\"+constellation_name+\".txt\",\"w\")\n", - "f2.write(extraParams)\n", - "f2.close()" + "f1 = open(\"../../data/\" + constellation_name + \"/shells_\"+constellation_name+\".yaml\",\"w\")\n", + "f1.write(constellation_yaml)\n", + "f1.close()" ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c2328ea2", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { diff --git a/src/ladds/io/SatelliteLoader.cpp b/src/ladds/io/SatelliteLoader.cpp index f6991e41..e8b2cefa 100644 --- a/src/ladds/io/SatelliteLoader.cpp +++ b/src/ladds/io/SatelliteLoader.cpp @@ -53,14 +53,25 @@ std::vector SatelliteLoader::loadConstellations(const YAML::Node // parse constellation info constellations.reserve(nConstellations); for (int i = 0; i < nConstellations; ++i) { - unsigned long offset = constellationDataStr.find(';', 0); - if (offset == 0) { - constellations.emplace_back(Constellation(constellationDataStr, insertionFrequency, altitudeDeviation)); - break; - } else { - constellations.emplace_back(Constellation(constellationDataStr.substr(0, offset), insertionFrequency, altitudeDeviation)); - constellationDataStr.erase(0, offset + 1); + unsigned long offset = (i == nConstellations-1)? + constellationDataStr.size() : + constellationDataStr.find(';', 0); + std::string constellationDir = constellationDataStr.substr(0,offset); + + YAML::Node constellationConfig; + try { + constellationConfig = YAML::LoadFile(std::string(DATADIR) + constellationDir + "/shells_" + constellationDir + ".yaml"); + } catch (YAML::Exception &e) { + std::cout << e.msg << std::endl; + logger.log(Logger::Level::warn, "Error loading cfg, Exiting..."); + exit(1); + } + + constellations.emplace_back(Constellation(constellationConfig, insertionFrequency, altitudeDeviation)); + if(i != nConstellations-1){ + constellationDataStr.erase(0, offset + 1); } + } size_t constellationTotalNumSatellites = 0; diff --git a/src/ladds/particle/Constellation.cpp b/src/ladds/particle/Constellation.cpp index 12041f25..ad08cf16 100644 --- a/src/ladds/particle/Constellation.cpp +++ b/src/ladds/particle/Constellation.cpp @@ -14,24 +14,15 @@ int Constellation::seed = 10; -Constellation::Constellation(const std::string &constellation_data_str, size_t interval, double altitudeDeviation) +Constellation::Constellation(const YAML::Node &constellationConfig, size_t interval, double altitudeDeviation) : interval(interval), altitudeDeviation(altitudeDeviation) { - // split the 3 comma seperated arguments - auto seperator1 = constellation_data_str.find(',', 0); - auto seperator2 = constellation_data_str.find(',', seperator1 + 1); - - // argDirPath s1 argStartTime s2 argDuration // n: 4 - // a b c d , e f , g h i // n: 7-4-1=2 - // 0 1 2 3 4 5 6 7 8 9 10 // n: 11-7-1=3 - std::string argConstellationName = constellation_data_str.substr(0, seperator1); - std::string argStartTime = constellation_data_str.substr(seperator1 + 1, seperator2 - seperator1 - 1); - std::string argDuration = - constellation_data_str.substr(seperator2 + 1, constellation_data_str.size() - seperator2 - 1); + + std::string constellationName = constellationConfig["constellation"]["name"].as(); // set variables using 3 args std::vector sats = - readDatasetConstellation(std::string(DATADIR) + argConstellationName + "/pos_" + argConstellationName + ".csv", - std::string(DATADIR) + argConstellationName + "/v_" + argConstellationName + ".csv"); + readDatasetConstellation(std::string(DATADIR) + constellationName + "/pos_" + constellationName + ".csv", + std::string(DATADIR) + constellationName + "/v_" + constellationName + ".csv"); generator.seed(seed++); distribution = std::normal_distribution(0, this->altitudeDeviation); @@ -42,24 +33,18 @@ Constellation::Constellation(const std::string &constellation_data_str, size_t i satellites.push_back(sats[i]); } - startTime = std::stoi(argStartTime); - duration = std::stoi(argDuration); - - std::ifstream shellParameters(std::string(DATADIR) + argConstellationName + "/shells_" + argConstellationName + - ".txt"); - std::string tmp_string; - std::getline(shellParameters, tmp_string); - double altitude, inclination, nPlanes, satsPerPlane; - while (!tmp_string.empty()) { - std::istringstream numStream(tmp_string); - numStream >> altitude; - numStream >> inclination; - numStream >> nPlanes; - numStream >> satsPerPlane; - shells.emplace_back>({altitude, inclination, nPlanes, satsPerPlane}); - std::getline(shellParameters, tmp_string); + + startTime = constellationConfig["constellation"]["startTime"].as(); + duration = constellationConfig["constellation"]["duration"].as(); + + int nShells = constellationConfig["constellation"]["nShells"].as(); + for(int i = 1; i<=nShells;i++) { + std::string attribute = "shell" + std::to_string(i); + shells.emplace_back>({constellationConfig[attribute]["altitude"].as(), + constellationConfig[attribute]["inclination"].as(), + constellationConfig[attribute]["nPlanes"].as(), + constellationConfig[attribute]["nSats"].as()}); } - shellParameters.close(); // determine times when each shell has its deployment started double timestamp = 0; diff --git a/src/ladds/particle/Constellation.h b/src/ladds/particle/Constellation.h index b1878808..c5a5db05 100644 --- a/src/ladds/particle/Constellation.h +++ b/src/ladds/particle/Constellation.h @@ -11,27 +11,28 @@ #include #include +#include + #include "ladds/particle/Particle.h" /** - * The Constellation class contains a collection of Particles that inserts these particles to - * the simulation over time based on parameters a Constellation object is constructed with. - * The object is constructed from a data string that consists of the comma seperated - * arguments: directory path (directory with constellation information files), start time - * (time when constellation is inserted), duration (time span of insertion) + * The Constellation class contains a collection of Particles that inserts these particles into + * the simulation over time based on .csv files and a .yaml file as created by the + * ConstellationGeneration notebook */ class Constellation { public: /** * Constructs a constellation object - * @param constellation : string formatted as a comma seperated 3-tuple containing - * a path to a directory with constellation information, the time the constellation - * deployment is started, and the duration of the duration + * @param constellationConfig : YAML::Node object with the constellation data. Valid + * constellation data can be created using the ConstellationGeneration notebook + * and must be in the projects data folder * @param interval : the interval of satellites being added to the simulation is * passed for internal logic - * @param variance : + * @param altitudeDeviation : used to create satellites with normally distributed + * altitudes. Equals the standard deviation of a normal distribution */ - Constellation(const std::string &constellation_data_str, size_t interval, double altitudeDeviation); + Constellation(const YAML::Node &constellationConfig, size_t interval, double altitudeDeviation); /** * determines which satellites are being added to the simulation by adding each shell * within a time span proportional to the shells size. shells are added plane by plane @@ -144,7 +145,7 @@ class Constellation { /** * deviation parameter of the normal distribution that determines the deviation - * of the satellites base altitude + * of the satellites base altitude. Equals the standard deviation of a normal distribution */ double altitudeDeviation; @@ -163,7 +164,7 @@ class Constellation { std::mt19937 generator; /** - * normal distribution that determines the deviation of the satellites base + * normal distribution that determines the random deviation from the satellites base * altitude. uses altitudeDeviation as parameter */ std::normal_distribution distribution; From c6f0d63559f6c7a2bc428be451f0da9dc06ce3cb Mon Sep 17 00:00:00 2001 From: albertNos Date: Tue, 14 Dec 2021 17:48:56 +0100 Subject: [PATCH 02/11] reworked constellation data created by updated notebook --- data/Amazon/pos_Amazon.csv | 4 ++-- data/Amazon/shells_Amazon.txt | 3 --- data/Amazon/v_Amazon.csv | 2 +- data/Amazon/xparams_Amazon.txt | 3 --- data/AstraPhase1/pos_AstraPhase1.csv | 4 ++-- data/AstraPhase1/shells_AstraPhase1.txt | 3 --- data/AstraPhase1/v_AstraPhase1.csv | 2 +- data/AstraPhase1/xparams_AstraPhase1.txt | 3 --- data/AstraPhase2/pos_AstraPhase2.csv | 4 ++-- data/AstraPhase2/shells_AstraPhase2.txt | 3 --- data/AstraPhase2/v_AstraPhase2.csv | 4 ++-- data/AstraPhase2/xparams_AstraPhase2.txt | 3 --- data/AstraPhase3/pos_AstraPhase3.csv | 4 ++-- data/AstraPhase3/shells_AstraPhase3.txt | 3 --- data/AstraPhase3/v_AstraPhase3.csv | 4 ++-- data/AstraPhase3/xparams_AstraPhase3.txt | 3 --- data/GuoWang/pos_GuoWang.csv | 4 ++-- data/GuoWang/shells_GuoWang.txt | 3 --- data/GuoWang/v_GuoWang.csv | 4 ++-- data/GuoWang/xparams_GuoWang.txt | 3 --- data/OneWebPhase1/pos_OneWebPhase1.csv | 4 ++-- data/OneWebPhase1/shells_OneWebPhase1.txt | 3 --- data/OneWebPhase1/v_OneWebPhase1.csv | 4 ++-- data/OneWebPhase1/xparams_OneWebPhase1.txt | 3 --- data/OneWebPhase2/pos_OneWebPhase2.csv | 4 ++-- data/OneWebPhase2/shells_OneWebPhase2.txt | 3 --- data/OneWebPhase2/v_OneWebPhase2.csv | 4 ++-- data/OneWebPhase2/xparams_OneWebPhase2.txt | 3 --- data/StarlinkGen1/pos_StarlinkGen1.csv | 4 ++-- data/StarlinkGen1/shells_StarlinkGen1.txt | 3 --- data/StarlinkGen1/v_StarlinkGen1.csv | 2 +- data/StarlinkGen1/xparams_StarlinkGen1.txt | 3 --- data/StarlinkGen2/pos_StarlinkGen2.csv | 4 ++-- data/StarlinkGen2/shells_StarlinkGen2.txt | 3 --- data/StarlinkGen2/v_StarlinkGen2.csv | 4 ++-- data/StarlinkGen2/xparams_StarlinkGen2.txt | 3 --- data/Telesat/pos_Telesat.csv | 4 ++-- data/Telesat/shells_Telesat.txt | 3 --- data/Telesat/v_Telesat.csv | 4 ++-- data/Telesat/xparams_Telesat.txt | 3 --- 40 files changed, 37 insertions(+), 97 deletions(-) delete mode 100644 data/Amazon/shells_Amazon.txt delete mode 100644 data/Amazon/xparams_Amazon.txt delete mode 100644 data/AstraPhase1/shells_AstraPhase1.txt delete mode 100644 data/AstraPhase1/xparams_AstraPhase1.txt delete mode 100644 data/AstraPhase2/shells_AstraPhase2.txt delete mode 100644 data/AstraPhase2/xparams_AstraPhase2.txt delete mode 100644 data/AstraPhase3/shells_AstraPhase3.txt delete mode 100644 data/AstraPhase3/xparams_AstraPhase3.txt delete mode 100644 data/GuoWang/shells_GuoWang.txt delete mode 100644 data/GuoWang/xparams_GuoWang.txt delete mode 100644 data/OneWebPhase1/shells_OneWebPhase1.txt delete mode 100644 data/OneWebPhase1/xparams_OneWebPhase1.txt delete mode 100644 data/OneWebPhase2/shells_OneWebPhase2.txt delete mode 100644 data/OneWebPhase2/xparams_OneWebPhase2.txt delete mode 100644 data/StarlinkGen1/shells_StarlinkGen1.txt delete mode 100644 data/StarlinkGen1/xparams_StarlinkGen1.txt delete mode 100644 data/StarlinkGen2/shells_StarlinkGen2.txt delete mode 100644 data/StarlinkGen2/xparams_StarlinkGen2.txt delete mode 100644 data/Telesat/shells_Telesat.txt delete mode 100644 data/Telesat/xparams_Telesat.txt diff --git a/data/Amazon/pos_Amazon.csv b/data/Amazon/pos_Amazon.csv index 8726d4a0..31a82e21 100644 --- a/data/Amazon/pos_Amazon.csv +++ b/data/Amazon/pos_Amazon.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aee1ae27e638b20925a0a2d8e5f0ccf64bdbff6709e1948d73977ae5ce356463 -size 247453 +oid sha256:dd758395867ab0aeddcb18a824ca5f6dcd3f4d7beee784fe236756a96f698ed7 +size 247554 diff --git a/data/Amazon/shells_Amazon.txt b/data/Amazon/shells_Amazon.txt deleted file mode 100644 index e8ac8731..00000000 --- a/data/Amazon/shells_Amazon.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5403822fbe445101a739f5ceb11456339a66dd83221118fe433b0bbd33790020 -size 48 diff --git a/data/Amazon/v_Amazon.csv b/data/Amazon/v_Amazon.csv index 492b38d5..1ef57505 100644 --- a/data/Amazon/v_Amazon.csv +++ b/data/Amazon/v_Amazon.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9451660ab6dfb7831e0ff024bc8fe64d351947ccb96afdab850f780a8bf92a1c +oid sha256:1257cfc582b63b46771c1caf4a52b2a2ab2f7b252094fe758ad45bfc3ac1d1cd size 247554 diff --git a/data/Amazon/xparams_Amazon.txt b/data/Amazon/xparams_Amazon.txt deleted file mode 100644 index 6c2cd15e..00000000 --- a/data/Amazon/xparams_Amazon.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:48b39eb3e7eb500f5775360e5c88d2439a033427fdd910f47b632dc7dd4dd8d1 -size 39 diff --git a/data/AstraPhase1/pos_AstraPhase1.csv b/data/AstraPhase1/pos_AstraPhase1.csv index 9ef11387..3190b924 100644 --- a/data/AstraPhase1/pos_AstraPhase1.csv +++ b/data/AstraPhase1/pos_AstraPhase1.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f072686e28a9394615e490aa459cfd2c07906fa2a6c449f5e97e5ce91c1f1d8f -size 3039 +oid sha256:47a8d8a79ec0d70a85195b0aa4f346fc7717f001ee56a1b6218031cd0f32bbd8 +size 3040 diff --git a/data/AstraPhase1/shells_AstraPhase1.txt b/data/AstraPhase1/shells_AstraPhase1.txt deleted file mode 100644 index 8fe88075..00000000 --- a/data/AstraPhase1/shells_AstraPhase1.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:357fb00e5db1a789c7378c2dc64e7818666fcd8c23665e8087adb26ae9b35627 -size 12 diff --git a/data/AstraPhase1/v_AstraPhase1.csv b/data/AstraPhase1/v_AstraPhase1.csv index c6c01ae6..192f050a 100644 --- a/data/AstraPhase1/v_AstraPhase1.csv +++ b/data/AstraPhase1/v_AstraPhase1.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:166012654ae2b918a68a084c811cd91e6e31f931bb1145fe983b5cb3e16fe124 +oid sha256:48ea4d57ce9bfe3cd1204ec1bf4ee6fdfc9945a2e96f6d5f02930cb5dd59250c size 3040 diff --git a/data/AstraPhase1/xparams_AstraPhase1.txt b/data/AstraPhase1/xparams_AstraPhase1.txt deleted file mode 100644 index c16f190b..00000000 --- a/data/AstraPhase1/xparams_AstraPhase1.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8677c6e3b2b0e4f52426781ab184ed1fe092ceff238bf4587cf4bd8c6a4182bd -size 13 diff --git a/data/AstraPhase2/pos_AstraPhase2.csv b/data/AstraPhase2/pos_AstraPhase2.csv index a2c90dc9..465851a2 100644 --- a/data/AstraPhase2/pos_AstraPhase2.csv +++ b/data/AstraPhase2/pos_AstraPhase2.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:82fe4c811e25f6ca2e902695861ae7b713348fd027483b2ff1e8cf6c3bb4b574 -size 175628 +oid sha256:7a0cf9318c63b228c72939f98681e40813c538709a7df99836e1bb7ba38b1200 +size 175644 diff --git a/data/AstraPhase2/shells_AstraPhase2.txt b/data/AstraPhase2/shells_AstraPhase2.txt deleted file mode 100644 index 61f29496..00000000 --- a/data/AstraPhase2/shells_AstraPhase2.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:62abd9db8720f5549565022402aa758f85a949452480fce9d721a382db90b976 -size 32 diff --git a/data/AstraPhase2/v_AstraPhase2.csv b/data/AstraPhase2/v_AstraPhase2.csv index defd9ae8..5863d3f5 100644 --- a/data/AstraPhase2/v_AstraPhase2.csv +++ b/data/AstraPhase2/v_AstraPhase2.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:814eba5c6b3df0c81b6e0fac366b20533190d1f8af8d2bfe62034847556ed6c1 -size 175588 +oid sha256:c43c9678edaae951e88072c8bbf9bd1b65f613b459aa6695d596ffc477ec9300 +size 175644 diff --git a/data/AstraPhase2/xparams_AstraPhase2.txt b/data/AstraPhase2/xparams_AstraPhase2.txt deleted file mode 100644 index e830951c..00000000 --- a/data/AstraPhase2/xparams_AstraPhase2.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a172028e5ea33d53b072113a563764bb26ab2cd2c5879b95a43b5e9470581768 -size 26 diff --git a/data/AstraPhase3/pos_AstraPhase3.csv b/data/AstraPhase3/pos_AstraPhase3.csv index 94990d7e..60e6cf2c 100644 --- a/data/AstraPhase3/pos_AstraPhase3.csv +++ b/data/AstraPhase3/pos_AstraPhase3.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:952d2ed7e315e86dceb09c90a265189fc7413e7b366ef7b7557cc69e9e968d1d -size 863152 +oid sha256:37dbfbce72ae40241aa7aea8dd414c3bd5dda22cb8ba21b3a6d75599decda76c +size 863226 diff --git a/data/AstraPhase3/shells_AstraPhase3.txt b/data/AstraPhase3/shells_AstraPhase3.txt deleted file mode 100644 index dbdd87bb..00000000 --- a/data/AstraPhase3/shells_AstraPhase3.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c8c43557cb080d40613204c82a51f88eb006421beb0e3eb05c8840a2f5463026 -size 49 diff --git a/data/AstraPhase3/v_AstraPhase3.csv b/data/AstraPhase3/v_AstraPhase3.csv index f4100604..b3fe95a0 100644 --- a/data/AstraPhase3/v_AstraPhase3.csv +++ b/data/AstraPhase3/v_AstraPhase3.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f0a72f00f7408b11ad4090c06594cac46c7c6bf879387b3279a4b7d0a899e3a0 -size 863111 +oid sha256:441ac1466bd1752b77afce1f84df5478608fae9a9bd7869b91fed41e48a43362 +size 863226 diff --git a/data/AstraPhase3/xparams_AstraPhase3.txt b/data/AstraPhase3/xparams_AstraPhase3.txt deleted file mode 100644 index 6c2cd15e..00000000 --- a/data/AstraPhase3/xparams_AstraPhase3.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:48b39eb3e7eb500f5775360e5c88d2439a033427fdd910f47b632dc7dd4dd8d1 -size 39 diff --git a/data/GuoWang/pos_GuoWang.csv b/data/GuoWang/pos_GuoWang.csv index 7b903dbe..f13200ac 100644 --- a/data/GuoWang/pos_GuoWang.csv +++ b/data/GuoWang/pos_GuoWang.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6a78c1894d7abc5c4e1e8547bbce2190d7e094e988c88dd0efe1f71d52afae64 -size 993886 +oid sha256:cacde824670c0e9d2bd15f9bbfd8d150808809d062e91fb507de0d2e12b0ef79 +size 993888 diff --git a/data/GuoWang/shells_GuoWang.txt b/data/GuoWang/shells_GuoWang.txt deleted file mode 100644 index 95fe235a..00000000 --- a/data/GuoWang/shells_GuoWang.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dd817489dccfc294b85d72face00a22900b9674b0b4a90157b04b9704a0d9c19 -size 115 diff --git a/data/GuoWang/v_GuoWang.csv b/data/GuoWang/v_GuoWang.csv index dc43ddfc..34c95f26 100644 --- a/data/GuoWang/v_GuoWang.csv +++ b/data/GuoWang/v_GuoWang.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ffcd503af30977f0a2a5912132e04d9af31f3402ba3e5c393445e40053ad22ac -size 993883 +oid sha256:6338abf2b07905e8e1cd4f7bc85bd7920e06e4ffed07b5f8fb9b411979740064 +size 993888 diff --git a/data/GuoWang/xparams_GuoWang.txt b/data/GuoWang/xparams_GuoWang.txt deleted file mode 100644 index 106f96cd..00000000 --- a/data/GuoWang/xparams_GuoWang.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fddd95572955ca1884c2816ae246c76f375cf45ac8105e4ccba04a772abce752 -size 91 diff --git a/data/OneWebPhase1/pos_OneWebPhase1.csv b/data/OneWebPhase1/pos_OneWebPhase1.csv index 0c83b265..6bd47a8b 100644 --- a/data/OneWebPhase1/pos_OneWebPhase1.csv +++ b/data/OneWebPhase1/pos_OneWebPhase1.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4ef94e637ef5c37cda2605936a5a958ed96b039209c769e8a8fff899af43709c -size 54758 +oid sha256:5cb02cfaec2497b8f6aa753fd72dc11fee6f5d9c115993de88e600c203d78fe9 +size 54768 diff --git a/data/OneWebPhase1/shells_OneWebPhase1.txt b/data/OneWebPhase1/shells_OneWebPhase1.txt deleted file mode 100644 index 78e73768..00000000 --- a/data/OneWebPhase1/shells_OneWebPhase1.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9b40001efc33eae2080b1ba2361df7de158eec7b9bf689efc42930f0ca4c2d1a -size 33 diff --git a/data/OneWebPhase1/v_OneWebPhase1.csv b/data/OneWebPhase1/v_OneWebPhase1.csv index b5cceeb9..bf1a54a9 100644 --- a/data/OneWebPhase1/v_OneWebPhase1.csv +++ b/data/OneWebPhase1/v_OneWebPhase1.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4891bcde85db1d131393bb00103d0a734c007a9981f6e2256d683f55848f6532 -size 54768 +oid sha256:34a4d25a90f03550514b2bee5f7037e6bfde73c9ef2462c33a2876bd636bdbbe +size 54780 diff --git a/data/OneWebPhase1/xparams_OneWebPhase1.txt b/data/OneWebPhase1/xparams_OneWebPhase1.txt deleted file mode 100644 index e830951c..00000000 --- a/data/OneWebPhase1/xparams_OneWebPhase1.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a172028e5ea33d53b072113a563764bb26ab2cd2c5879b95a43b5e9470581768 -size 26 diff --git a/data/OneWebPhase2/pos_OneWebPhase2.csv b/data/OneWebPhase2/pos_OneWebPhase2.csv index 18145428..80cb1c1d 100644 --- a/data/OneWebPhase2/pos_OneWebPhase2.csv +++ b/data/OneWebPhase2/pos_OneWebPhase2.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9103aad2dd222e2ef49bd341f14fc8e8aaa18932b62dfa6401792dcc6de12f9e -size 487375 +oid sha256:a5c4f1c31d1456fe937d5d5c07b411976f3a7803edfd7db5985b58a98a6da56d +size 487440 diff --git a/data/OneWebPhase2/shells_OneWebPhase2.txt b/data/OneWebPhase2/shells_OneWebPhase2.txt deleted file mode 100644 index 82281ec2..00000000 --- a/data/OneWebPhase2/shells_OneWebPhase2.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0b674ed311355df794a1d2550608b78212dfc30b9f8752271106bf8bb06ad792 -size 51 diff --git a/data/OneWebPhase2/v_OneWebPhase2.csv b/data/OneWebPhase2/v_OneWebPhase2.csv index 6f7c9bfe..dac0a4b5 100644 --- a/data/OneWebPhase2/v_OneWebPhase2.csv +++ b/data/OneWebPhase2/v_OneWebPhase2.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:81fc1d2add4f78cd31972864593940e2925f6a067156a8403aae835373081c7a -size 487438 +oid sha256:a7905f11172dde899b644cb1602089031595eaad3b90cbf1edd78c32e6b14e4f +size 487476 diff --git a/data/OneWebPhase2/xparams_OneWebPhase2.txt b/data/OneWebPhase2/xparams_OneWebPhase2.txt deleted file mode 100644 index 7479c3f3..00000000 --- a/data/OneWebPhase2/xparams_OneWebPhase2.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:08955d0b02e3371b058928deab5ae2202ff416185c9eaab69777634ad4ca96fc -size 51 diff --git a/data/StarlinkGen1/pos_StarlinkGen1.csv b/data/StarlinkGen1/pos_StarlinkGen1.csv index cb40e55b..0f79868a 100644 --- a/data/StarlinkGen1/pos_StarlinkGen1.csv +++ b/data/StarlinkGen1/pos_StarlinkGen1.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2aa2a44d07e3d5f3fc8a852b41f3e7b6bd1a8f29a59681313bf45838ab0b3d10 -size 915367 +oid sha256:7af6f517b8b551cdc565f196b15856dfa811dc8a25fe99e5cd558c0b2d06526b +size 915550 diff --git a/data/StarlinkGen1/shells_StarlinkGen1.txt b/data/StarlinkGen1/shells_StarlinkGen1.txt deleted file mode 100644 index 446b14b6..00000000 --- a/data/StarlinkGen1/shells_StarlinkGen1.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:42bbe2dbb16f9423645858556040a5c4d6c3e71ded1e12f0ce960f64405da65d -size 126 diff --git a/data/StarlinkGen1/v_StarlinkGen1.csv b/data/StarlinkGen1/v_StarlinkGen1.csv index ac952f14..d77a5657 100644 --- a/data/StarlinkGen1/v_StarlinkGen1.csv +++ b/data/StarlinkGen1/v_StarlinkGen1.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7b10568f724694f6cbbf0b7b3301b909aa7565921638450eb8de2c7b09e71a19 +oid sha256:6d7f15c2f0176aa2adbe78d675f2a4f7e70c7cce13293b45e1deaac939ab7438 size 915550 diff --git a/data/StarlinkGen1/xparams_StarlinkGen1.txt b/data/StarlinkGen1/xparams_StarlinkGen1.txt deleted file mode 100644 index 98277063..00000000 --- a/data/StarlinkGen1/xparams_StarlinkGen1.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:428f4615bbf23b0add9d0f5018a349b2d24c7888acdb90d514843f1905d1c9d4 -size 109 diff --git a/data/StarlinkGen2/pos_StarlinkGen2.csv b/data/StarlinkGen2/pos_StarlinkGen2.csv index 87e05504..8417b526 100644 --- a/data/StarlinkGen2/pos_StarlinkGen2.csv +++ b/data/StarlinkGen2/pos_StarlinkGen2.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:60f5b5845107ced8058f03dfaa7b0ef51bea9214bac06f0336e18ed62a7afd58 -size 2294967 +oid sha256:84c35d0f42f67fcaaf298687765e838dbf5bc8de11e76793ca48cf952812c4b0 +size 2294998 diff --git a/data/StarlinkGen2/shells_StarlinkGen2.txt b/data/StarlinkGen2/shells_StarlinkGen2.txt deleted file mode 100644 index 1fb60b31..00000000 --- a/data/StarlinkGen2/shells_StarlinkGen2.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b89d4dc61f6de4ac496e70bf8a01ec043e0fd24543688c415e351f2547d89879 -size 135 diff --git a/data/StarlinkGen2/v_StarlinkGen2.csv b/data/StarlinkGen2/v_StarlinkGen2.csv index 774829f2..5ab560ef 100644 --- a/data/StarlinkGen2/v_StarlinkGen2.csv +++ b/data/StarlinkGen2/v_StarlinkGen2.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:31056ac3c35ce54a8963f84d642645edf018e0083953bb6fa65ac48133880f07 -size 2294992 +oid sha256:9543056ae8b3794b1235caa8f669ecb42d0f847217ba0725bf0fe965585b5cf2 +size 2295002 diff --git a/data/StarlinkGen2/xparams_StarlinkGen2.txt b/data/StarlinkGen2/xparams_StarlinkGen2.txt deleted file mode 100644 index 9547d16d..00000000 --- a/data/StarlinkGen2/xparams_StarlinkGen2.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:82846ee51c230c151e949836aa1a4f071a9ad500cf7cf4c6c41a6f5d80c8e521 -size 173 diff --git a/data/Telesat/pos_Telesat.csv b/data/Telesat/pos_Telesat.csv index 1cbb08aa..31eca5a0 100644 --- a/data/Telesat/pos_Telesat.csv +++ b/data/Telesat/pos_Telesat.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:064602f9e8bab34e803955a69dacdd5cf615f022bd76a3521e8374aea483649f -size 127799 +oid sha256:bff48d19f5e3171317dcb93300cb8ca41b8ae6228dfd8d6519d15c3ef250e62c +size 127802 diff --git a/data/Telesat/shells_Telesat.txt b/data/Telesat/shells_Telesat.txt deleted file mode 100644 index a201c0fb..00000000 --- a/data/Telesat/shells_Telesat.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:35834cb54500cdf1f4b6520691fb2a70f8c27b63e3754dd6ba1e551f6055cfcd -size 36 diff --git a/data/Telesat/v_Telesat.csv b/data/Telesat/v_Telesat.csv index eb12f1ad..f99780c2 100644 --- a/data/Telesat/v_Telesat.csv +++ b/data/Telesat/v_Telesat.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1327317703f21426da0c142aaf774ca4654e49c1ca29775e12e2bb399f12bdcc -size 127799 +oid sha256:26d04175dcca2086962a89291d0a01f95e616d8aeb11070dc54df222ede08e44 +size 127840 diff --git a/data/Telesat/xparams_Telesat.txt b/data/Telesat/xparams_Telesat.txt deleted file mode 100644 index e830951c..00000000 --- a/data/Telesat/xparams_Telesat.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a172028e5ea33d53b072113a563764bb26ab2cd2c5879b95a43b5e9470581768 -size 26 From 82c47923b85d7db52def6878e0cfca695b9316a0 Mon Sep 17 00:00:00 2001 From: albertNos Date: Tue, 14 Dec 2021 18:29:35 +0100 Subject: [PATCH 03/11] quick guide in README,clang format --- README.md | 14 + .../ConstellationGeneration.ipynb | 14 +- src/ladds/Simulation.cpp | 26 +- src/ladds/Simulation.h | 2 +- src/ladds/io/SatelliteLoader.cpp | 24 +- src/ladds/particle/Constellation.cpp | 234 +++++++------- src/ladds/particle/Constellation.h | 297 +++++++++--------- tests/testladds/SimulationTest.cpp | 42 ++- 8 files changed, 333 insertions(+), 320 deletions(-) diff --git a/README.md b/README.md index 83f14c3c..4ccca8d7 100644 --- a/README.md +++ b/README.md @@ -52,3 +52,17 @@ the `yaml` file. See `default_cfg.yaml` for the syntax. ## Processing TLE Input Data on current satellites etc. is often found [online](https://www.space-track.org/) in the [TLE format](https://en.wikipedia.org/wiki/Two-line_element_set). We include a Jupyter notebook which can be used to process TLE data with pykep to create and analyze suitable datasets. Detailed instructions can be found in the notebook in `notebooks/Data Processing.ipynb`. + +## Generating Constellation Input +Satellite constellations (e.g. Starlink, OneWeb) are usually described by a list of orbital shells. +An orbital shell is described by a 4-tuple with information about `altitude`, `inclination`, `number of +planes`, and `number of satellites` per plane. We provide a notebook +`notebooks/ConstellationGeneration/ConstellationGeneration.ipynb` that can be used +to generate constellation data which can be processed by LADDS from orbital shells. + +Quick guide: +* `Initialize` the constellation by executing the first cell and providing metadata in the second cell +* `create a shell` by providing the 4 shell arguments, and further parameters (extra params) if necessary (2.1). +Store the temporary shell data by executing the cell (2.2) +* turn satellites into position and velocity vectors by executing cell (3) +* write the files by executing cell (4) and save them by executing cell (5) \ No newline at end of file diff --git a/notebooks/ConstellationGeneration/ConstellationGeneration.ipynb b/notebooks/ConstellationGeneration/ConstellationGeneration.ipynb index 3d3fbc37..d2f6df4e 100644 --- a/notebooks/ConstellationGeneration/ConstellationGeneration.ipynb +++ b/notebooks/ConstellationGeneration/ConstellationGeneration.ipynb @@ -218,19 +218,7 @@ " \n", "print(\"Successfully propagated \",len(objects),\" objects.\")\n", "print(count_too_low,\" had a too small altitude\")\n", - "print(count_too_high,\" had a too high altitude\")\n", - "\n", - "shells = \"\"\n", - "for i in range(len(shell_list)):\n", - " for j in range(4):\n", - " shells += str(shell_list[i][j]) + \" \"\n", - " shells += \"\\n\"\n", - " \n", - "extraParams = \"\"\n", - "for i in range(len(xparams_list)):\n", - " for j in range(4):\n", - " extraParams += str(xparams_list[i][j]) + \" \"\n", - " extraParams += \"\\n\"" + "print(count_too_high,\" had a too high altitude\")" ] }, { diff --git a/src/ladds/Simulation.cpp b/src/ladds/Simulation.cpp index 73c2e5d6..d1555868 100644 --- a/src/ladds/Simulation.cpp +++ b/src/ladds/Simulation.cpp @@ -123,20 +123,20 @@ Simulation::initIntegrator(AutoPas_t &autopas, const YAML::Node &config) { } void Simulation::updateConstellation(AutoPas_t &autopas, - std::vector& constellations, + std::vector &constellations, std::vector &delayedInsertionTotal, double constellationCutoff) { - // first insert delayed particles from previous insertion and collect the repeatedly delayed - delayedInsertionTotal = checkedInsert(autopas, delayedInsertionTotal, constellationCutoff); - // container collecting delayed particles from one constellation at a time in order to append them to - // totalDelayedInsertion - std::vector delayedInsertion; - for (auto &constellation : constellations) { - // new satellites are gradually added to the simulation according to their starting time and operation duration - auto newSatellites = constellation.tick(); - delayedInsertion = checkedInsert(autopas, newSatellites, constellationCutoff); - delayedInsertionTotal.insert(delayedInsertionTotal.end(), delayedInsertion.begin(), delayedInsertion.end()); - } + // first insert delayed particles from previous insertion and collect the repeatedly delayed + delayedInsertionTotal = checkedInsert(autopas, delayedInsertionTotal, constellationCutoff); + // container collecting delayed particles from one constellation at a time in order to append them to + // totalDelayedInsertion + std::vector delayedInsertion; + for (auto &constellation : constellations) { + // new satellites are gradually added to the simulation according to their starting time and operation duration + auto newSatellites = constellation.tick(); + delayedInsertion = checkedInsert(autopas, newSatellites, constellationCutoff); + delayedInsertionTotal.insert(delayedInsertionTotal.end(), delayedInsertion.begin(), delayedInsertion.end()); + } } void Simulation::collisionDetection(size_t iteration, @@ -190,7 +190,7 @@ void Simulation::simulationLoop(AutoPas_t &autopas, timers.constellationInsertion.start(); // new satellites from constellations inserted over time if (i % constellationInsertionFrequency == 0) { - updateConstellation(autopas, constellations, delayedInsertion,constellationCutoff); + updateConstellation(autopas, constellations, delayedInsertion, constellationCutoff); } timers.constellationInsertion.stop(); diff --git a/src/ladds/Simulation.h b/src/ladds/Simulation.h index 1dc00e8b..d3c90ef1 100644 --- a/src/ladds/Simulation.h +++ b/src/ladds/Simulation.h @@ -73,7 +73,7 @@ class Simulation { * of constellationCutoff to any other object the insertion is delayed instead */ void updateConstellation(AutoPas_t &autopas, - std::vector& constellations, + std::vector &constellations, std::vector &delayedInsertion, double constellationCutoff); diff --git a/src/ladds/io/SatelliteLoader.cpp b/src/ladds/io/SatelliteLoader.cpp index e8b2cefa..6cd4faf4 100644 --- a/src/ladds/io/SatelliteLoader.cpp +++ b/src/ladds/io/SatelliteLoader.cpp @@ -36,7 +36,8 @@ void SatelliteLoader::loadSatellites(AutoPas_t &autopas, const YAML::Node &confi std::vector SatelliteLoader::loadConstellations(const YAML::Node &config, const Logger &logger) { std::vector constellations; - auto constellationList = config["io"]["constellationList"].IsNull() ? "" : config["io"]["constellationList"].as(); + auto constellationList = + config["io"]["constellationList"].IsNull() ? "" : config["io"]["constellationList"].as(); auto altitudeDeviation = config["io"]["altitudeSpread"].as() / 3.0; if (!constellationList.empty()) { const auto insertionFrequency = @@ -53,25 +54,24 @@ std::vector SatelliteLoader::loadConstellations(const YAML::Node // parse constellation info constellations.reserve(nConstellations); for (int i = 0; i < nConstellations; ++i) { - unsigned long offset = (i == nConstellations-1)? - constellationDataStr.size() : - constellationDataStr.find(';', 0); - std::string constellationDir = constellationDataStr.substr(0,offset); + unsigned long offset = + (i == nConstellations - 1) ? constellationDataStr.size() : constellationDataStr.find(';', 0); + std::string constellationDir = constellationDataStr.substr(0, offset); YAML::Node constellationConfig; try { - constellationConfig = YAML::LoadFile(std::string(DATADIR) + constellationDir + "/shells_" + constellationDir + ".yaml"); + constellationConfig = + YAML::LoadFile(std::string(DATADIR) + constellationDir + "/shells_" + constellationDir + ".yaml"); } catch (YAML::Exception &e) { - std::cout << e.msg << std::endl; - logger.log(Logger::Level::warn, "Error loading cfg, Exiting..."); - exit(1); + std::cout << e.msg << std::endl; + logger.log(Logger::Level::warn, "Error loading cfg, Exiting..."); + exit(1); } constellations.emplace_back(Constellation(constellationConfig, insertionFrequency, altitudeDeviation)); - if(i != nConstellations-1){ - constellationDataStr.erase(0, offset + 1); + if (i != nConstellations - 1) { + constellationDataStr.erase(0, offset + 1); } - } size_t constellationTotalNumSatellites = 0; diff --git a/src/ladds/particle/Constellation.cpp b/src/ladds/particle/Constellation.cpp index ad08cf16..6ff88e73 100644 --- a/src/ladds/particle/Constellation.cpp +++ b/src/ladds/particle/Constellation.cpp @@ -15,137 +15,135 @@ int Constellation::seed = 10; Constellation::Constellation(const YAML::Node &constellationConfig, size_t interval, double altitudeDeviation) - : interval(interval), altitudeDeviation(altitudeDeviation) { - - std::string constellationName = constellationConfig["constellation"]["name"].as(); - - // set variables using 3 args - std::vector sats = - readDatasetConstellation(std::string(DATADIR) + constellationName + "/pos_" + constellationName + ".csv", - std::string(DATADIR) + constellationName + "/v_" + constellationName + ".csv"); - - generator.seed(seed++); - distribution = std::normal_distribution(0, this->altitudeDeviation); - // convert vector to deque - constellationSize = sats.size(); - for (size_t i = 0ul; i < constellationSize; ++i) { - sats[i].setPosition(randomDisplacement(sats[i].getPosition())); - satellites.push_back(sats[i]); - } - - - startTime = constellationConfig["constellation"]["startTime"].as(); - duration = constellationConfig["constellation"]["duration"].as(); - - int nShells = constellationConfig["constellation"]["nShells"].as(); - for(int i = 1; i<=nShells;i++) { - std::string attribute = "shell" + std::to_string(i); - shells.emplace_back>({constellationConfig[attribute]["altitude"].as(), - constellationConfig[attribute]["inclination"].as(), - constellationConfig[attribute]["nPlanes"].as(), - constellationConfig[attribute]["nSats"].as()}); - } - - // determine times when each shell has its deployment started - double timestamp = 0; - timestamps.push_back(0); - for (auto [alt, i, planes, nSats] : shells) { - timestamp += (planes * nSats / static_cast(constellationSize)) * duration; - timestamps.push_back(timestamp); - } - - // for each shell determine the interval a new plane is added, each shell has its own timestep - for (size_t i = 0ul; i < timestamps.size() - 1; ++i) { - timeSteps.push_back((timestamps[i + 1] - timestamps[i]) / shells[i][2]); // = duration_i / nPlanes_i - } + : interval(interval), altitudeDeviation(altitudeDeviation) { + std::string constellationName = constellationConfig["constellation"]["name"].as(); + + // set variables using 3 args + std::vector sats = + readDatasetConstellation(std::string(DATADIR) + constellationName + "/pos_" + constellationName + ".csv", + std::string(DATADIR) + constellationName + "/v_" + constellationName + ".csv"); + + generator.seed(seed++); + distribution = std::normal_distribution(0, this->altitudeDeviation); + // convert vector to deque + constellationSize = sats.size(); + for (size_t i = 0ul; i < constellationSize; ++i) { + sats[i].setPosition(randomDisplacement(sats[i].getPosition())); + satellites.push_back(sats[i]); + } + + startTime = constellationConfig["constellation"]["startTime"].as(); + duration = constellationConfig["constellation"]["duration"].as(); + + int nShells = constellationConfig["constellation"]["nShells"].as(); + for (int i = 1; i <= nShells; i++) { + std::string attribute = "shell" + std::to_string(i); + shells.emplace_back>({constellationConfig[attribute]["altitude"].as(), + constellationConfig[attribute]["inclination"].as(), + constellationConfig[attribute]["nPlanes"].as(), + constellationConfig[attribute]["nSats"].as()}); + } + + // determine times when each shell has its deployment started + double timestamp = 0; + timestamps.push_back(0); + for (auto [alt, i, planes, nSats] : shells) { + timestamp += (planes * nSats / static_cast(constellationSize)) * duration; + timestamps.push_back(timestamp); + } + + // for each shell determine the interval a new plane is added, each shell has its own timestep + for (size_t i = 0ul; i < timestamps.size() - 1; ++i) { + timeSteps.push_back((timestamps[i + 1] - timestamps[i]) / shells[i][2]); // = duration_i / nPlanes_i + } } std::vector Constellation::tick() { - std::vector particles{}; - switch (status) { - case Status::deployed: - // do nothing + std::vector particles{}; + switch (status) { + case Status::deployed: + // do nothing + break; + case Status::inactive: + // check time and activate if startTime is reached + if (simulationTime >= startTime) { + status = Status::active; + } else { + break; + } + case Status::active: + + while (static_cast(timeActive) >= + timestamps[currentShellIndex] + planesDeployed * timeSteps[currentShellIndex]) { + int planeSize = static_cast(shells[currentShellIndex][3]); + particles.reserve(planeSize); + for (int i = 0; i < planeSize; i++) { + particles.push_back(satellites[0]); + satellites.pop_front(); + } + planesDeployed++; + + // if all planes of the shell are done increment currentShell and set planesDeployed to 0 + if (planesDeployed >= shells[currentShellIndex][2]) { + currentShellIndex++; + // end the operation, if every shell has been deployed = set constellation to 'd' = deployed + if (currentShellIndex >= shells.size()) { + status = Status::deployed; break; - case Status::inactive: - // check time and activate if startTime is reached - if (simulationTime >= startTime) { - status = Status::active; - } else { - break; - } - case Status::active: - - while (static_cast(timeActive) >= - timestamps[currentShellIndex] + planesDeployed * timeSteps[currentShellIndex]) { - int planeSize = static_cast(shells[currentShellIndex][3]); - particles.reserve(planeSize); - for (int i = 0; i < planeSize; i++) { - particles.push_back(satellites[0]); - satellites.pop_front(); - } - planesDeployed++; - - // if all planes of the shell are done increment currentShell and set planesDeployed to 0 - if (planesDeployed >= shells[currentShellIndex][2]) { - currentShellIndex++; - // end the operation, if every shell has been deployed = set constellation to 'd' = deployed - if (currentShellIndex >= shells.size()) { - status = Status::deployed; - break; - } - - planesDeployed = 0; - } - } - timeActive += interval; - break; - } - simulationTime += interval; - return particles; + } + + planesDeployed = 0; + } + } + timeActive += interval; + break; + } + simulationTime += interval; + return particles; } size_t Constellation::getConstellationSize() const { - return constellationSize; + return constellationSize; } std::vector Constellation::readDatasetConstellation(const std::string &position_filepath, const std::string &velocity_filepath) { - CSVReader pos_csvReader{position_filepath, false}; - CSVReader vel_csvReader{velocity_filepath, false}; - std::vector particleCollection; - - auto positions = pos_csvReader.getLines(); - auto velocities = vel_csvReader.getLines(); - - if (positions.size() != velocities.size()) { - std::cout << "Error: Position and velocity file have different number of lines." << std::endl; - return particleCollection; - } - - particleCollection.reserve(positions.size()); - - size_t particleId = 0; - std::transform(positions.begin(), - positions.end(), - velocities.begin(), - std::back_insert_iterator>(particleCollection), - [&](const auto &pos, const auto &vel) { - const auto &[x, y, z] = pos; - const auto &[vx, vy, vz] = vel; - - const std::array posArray = {x, y, z}; - const std::array velArray = {vx, vy, vz}; - return Particle(posArray, velArray, particleId++); - }); + CSVReader pos_csvReader{position_filepath, false}; + CSVReader vel_csvReader{velocity_filepath, false}; + std::vector particleCollection; + + auto positions = pos_csvReader.getLines(); + auto velocities = vel_csvReader.getLines(); + + if (positions.size() != velocities.size()) { + std::cout << "Error: Position and velocity file have different number of lines." << std::endl; return particleCollection; + } + + particleCollection.reserve(positions.size()); + + size_t particleId = 0; + std::transform(positions.begin(), + positions.end(), + velocities.begin(), + std::back_insert_iterator>(particleCollection), + [&](const auto &pos, const auto &vel) { + const auto &[x, y, z] = pos; + const auto &[vx, vy, vz] = vel; + + const std::array posArray = {x, y, z}; + const std::array velArray = {vx, vy, vz}; + return Particle(posArray, velArray, particleId++); + }); + return particleCollection; } std::array Constellation::randomDisplacement(std::array pos) { - // the position pos is already the same as the direction vector from origin to pos - // u = 1/length*pos - std::array unitVector = autopas::utils::ArrayMath::normalize(pos); - // - double offset = distribution(generator); - // npos = pos + offset * u - return autopas::utils::ArrayMath::add(pos, autopas::utils::ArrayMath::mulScalar(unitVector, offset)); + // the position pos is already the same as the direction vector from origin to pos + // u = 1/length*pos + std::array unitVector = autopas::utils::ArrayMath::normalize(pos); + // + double offset = distribution(generator); + // npos = pos + offset * u + return autopas::utils::ArrayMath::add(pos, autopas::utils::ArrayMath::mulScalar(unitVector, offset)); } \ No newline at end of file diff --git a/src/ladds/particle/Constellation.h b/src/ladds/particle/Constellation.h index c5a5db05..c3760fce 100644 --- a/src/ladds/particle/Constellation.h +++ b/src/ladds/particle/Constellation.h @@ -6,13 +6,12 @@ #pragma once #include #include +#include #include #include #include -#include - #include "ladds/particle/Particle.h" /** @@ -21,151 +20,151 @@ * ConstellationGeneration notebook */ class Constellation { -public: - /** - * Constructs a constellation object - * @param constellationConfig : YAML::Node object with the constellation data. Valid - * constellation data can be created using the ConstellationGeneration notebook - * and must be in the projects data folder - * @param interval : the interval of satellites being added to the simulation is - * passed for internal logic - * @param altitudeDeviation : used to create satellites with normally distributed - * altitudes. Equals the standard deviation of a normal distribution - */ - Constellation(const YAML::Node &constellationConfig, size_t interval, double altitudeDeviation); - /** - * determines which satellites are being added to the simulation by adding each shell - * within a time span proportional to the shells size. shells are added plane by plane - * and linearly over time - * @return std::vector : satellites to be added to the simulation - */ - std::vector tick(); - - /** - * getter for constellationSize = number of satellites in constellation - * @return int : constellationSize - */ - [[nodiscard]] size_t getConstellationSize() const; - -private: - /** - * stores the satellites of the constellation that have not been added to the simulation - */ - std::deque satellites{}; - - /** - * Reads the passed position and velocity csv files. Returns a vector of particles. - */ - static std::vector readDatasetConstellation(const std::string &position_filepath, - const std::string &velocity_filepath); - - /** - * changes the pos vector by adding a random, normal distributed offset to the altitude - * (offset dependent on altitudeVariance) - * @param pos input position - * @return new position with random altitude - */ - std::array randomDisplacement(std::array pos); - - /** - * iteration from which constellation starts being added to the simulation - */ - int startTime = 0; - - /** - * time span over which satellites of the constellation are being added - */ - int duration = 0; - - /** - * internal clock that determines which satellites are added to the simulation, - * starts the count when constellation is set to 'a' = active - */ - size_t timeActive = 0; - - /** - * the interval of satellites being added to the simulation is - * passed for internal logic - */ - size_t interval = 0; - - /** - * multiples of interval. the constellations state is set to 'a' = active whenever - * simulationTime reaches startTime - */ - size_t simulationTime = 0; - - /** - * The three different possible internal states of a constellation object: - * inactive: startTime has not been reached yet - * active: the constellation is currently being added to the simulation - * deployed: the constellation is fully deployed, and tick becomes a NOOP - */ - enum Status { inactive, active, deployed }; - - /** - * variable that holds the internal state of the constellation object that determines - * the behaviour of tick(). There are 3 different states: - * inactive: startTime has not been reached yet - * active: the constellation is currently being added to the simulation - * deployed: the constellation is fully deployed, and tick becomes a NOOP - */ - Status status = Status::inactive; // active , inactive ,deployed - - /** - * size of the constellation for internal use - */ - size_t constellationSize = 0ul; - - /** - * contains information of a shell: altitude, inclination, #planes, #satellitesPerPlane - */ - std::vector> shells{}; - - /** - * contains the time shell i begins its deployment at vector index i - */ - std::vector timestamps{}; - - /** - * contains the time steps of shell i to enable adding each plane of - * shell i linearly over time at vector index i - */ - std::vector timeSteps{}; - - /** - * keeps track of which shell will be added next - */ - size_t currentShellIndex = 0ul; - - /** - * keeps track of which plane will be added next - */ - int planesDeployed = 0; - - /** - * deviation parameter of the normal distribution that determines the deviation - * of the satellites base altitude. Equals the standard deviation of a normal distribution - */ - double altitudeDeviation; - - /** - * seed determining the behaviour of the (pseudo-) random number generator of - * the constellation. Constellations share the seed variable and increment - * the value during construction so that each constellation is seeded - * differently - */ - static int seed; - - /** - * seeded/deterministic random number generator used to add noise to the - * altitudes of satellites - */ - std::mt19937 generator; - - /** - * normal distribution that determines the random deviation from the satellites base - * altitude. uses altitudeDeviation as parameter - */ - std::normal_distribution distribution; + public: + /** + * Constructs a constellation object + * @param constellationConfig : YAML::Node object with the constellation data. Valid + * constellation data can be created using the ConstellationGeneration notebook + * and must be in the projects data folder + * @param interval : the interval of satellites being added to the simulation is + * passed for internal logic + * @param altitudeDeviation : used to create satellites with normally distributed + * altitudes. Equals the standard deviation of a normal distribution + */ + Constellation(const YAML::Node &constellationConfig, size_t interval, double altitudeDeviation); + /** + * determines which satellites are being added to the simulation by adding each shell + * within a time span proportional to the shells size. shells are added plane by plane + * and linearly over time + * @return std::vector : satellites to be added to the simulation + */ + std::vector tick(); + + /** + * getter for constellationSize = number of satellites in constellation + * @return int : constellationSize + */ + [[nodiscard]] size_t getConstellationSize() const; + + private: + /** + * stores the satellites of the constellation that have not been added to the simulation + */ + std::deque satellites{}; + + /** + * Reads the passed position and velocity csv files. Returns a vector of particles. + */ + static std::vector readDatasetConstellation(const std::string &position_filepath, + const std::string &velocity_filepath); + + /** + * changes the pos vector by adding a random, normal distributed offset to the altitude + * (offset dependent on altitudeVariance) + * @param pos input position + * @return new position with random altitude + */ + std::array randomDisplacement(std::array pos); + + /** + * iteration from which constellation starts being added to the simulation + */ + int startTime = 0; + + /** + * time span over which satellites of the constellation are being added + */ + int duration = 0; + + /** + * internal clock that determines which satellites are added to the simulation, + * starts the count when constellation is set to 'a' = active + */ + size_t timeActive = 0; + + /** + * the interval of satellites being added to the simulation is + * passed for internal logic + */ + size_t interval = 0; + + /** + * multiples of interval. the constellations state is set to 'a' = active whenever + * simulationTime reaches startTime + */ + size_t simulationTime = 0; + + /** + * The three different possible internal states of a constellation object: + * inactive: startTime has not been reached yet + * active: the constellation is currently being added to the simulation + * deployed: the constellation is fully deployed, and tick becomes a NOOP + */ + enum Status { inactive, active, deployed }; + + /** + * variable that holds the internal state of the constellation object that determines + * the behaviour of tick(). There are 3 different states: + * inactive: startTime has not been reached yet + * active: the constellation is currently being added to the simulation + * deployed: the constellation is fully deployed, and tick becomes a NOOP + */ + Status status = Status::inactive; // active , inactive ,deployed + + /** + * size of the constellation for internal use + */ + size_t constellationSize = 0ul; + + /** + * contains information of a shell: altitude, inclination, #planes, #satellitesPerPlane + */ + std::vector> shells{}; + + /** + * contains the time shell i begins its deployment at vector index i + */ + std::vector timestamps{}; + + /** + * contains the time steps of shell i to enable adding each plane of + * shell i linearly over time at vector index i + */ + std::vector timeSteps{}; + + /** + * keeps track of which shell will be added next + */ + size_t currentShellIndex = 0ul; + + /** + * keeps track of which plane will be added next + */ + int planesDeployed = 0; + + /** + * deviation parameter of the normal distribution that determines the deviation + * of the satellites base altitude. Equals the standard deviation of a normal distribution + */ + double altitudeDeviation; + + /** + * seed determining the behaviour of the (pseudo-) random number generator of + * the constellation. Constellations share the seed variable and increment + * the value during construction so that each constellation is seeded + * differently + */ + static int seed; + + /** + * seeded/deterministic random number generator used to add noise to the + * altitudes of satellites + */ + std::mt19937 generator; + + /** + * normal distribution that determines the random deviation from the satellites base + * altitude. uses altitudeDeviation as parameter + */ + std::normal_distribution distribution; }; diff --git a/tests/testladds/SimulationTest.cpp b/tests/testladds/SimulationTest.cpp index 54159d2f..8a4daaad 100644 --- a/tests/testladds/SimulationTest.cpp +++ b/tests/testladds/SimulationTest.cpp @@ -62,35 +62,40 @@ TEST_F(SimulationTest, testInsertionOverlap) { ASSERT_EQ(autopas->getNumberOfParticles(), 2) << "Container initialized wrong!"; // 0 - std::vector delayedInsertion = simulation.checkedInsert(*autopas, newSatellites, config["io"]["constellationCutoff"].as()); + std::vector delayedInsertion = + simulation.checkedInsert(*autopas, newSatellites, config["io"]["constellationCutoff"].as()); EXPECT_EQ(delayedInsertion.size(), 2); EXPECT_EQ(autopas->getNumberOfParticles(), 2); // 1 integrator->integrate(); escapedParticles = autopas->updateContainer(); EXPECT_EQ(escapedParticles.size(), 0); - delayedInsertion = simulation.checkedInsert(*autopas, delayedInsertion, config["io"]["constellationCutoff"].as()); + delayedInsertion = + simulation.checkedInsert(*autopas, delayedInsertion, config["io"]["constellationCutoff"].as()); EXPECT_EQ(delayedInsertion.size(), 1); EXPECT_EQ(autopas->getNumberOfParticles(), 3); // 2 integrator->integrate(); escapedParticles = autopas->updateContainer(); EXPECT_EQ(escapedParticles.size(), 0); - delayedInsertion = simulation.checkedInsert(*autopas, delayedInsertion, config["io"]["constellationCutoff"].as()); + delayedInsertion = + simulation.checkedInsert(*autopas, delayedInsertion, config["io"]["constellationCutoff"].as()); EXPECT_EQ(delayedInsertion.size(), 1); EXPECT_EQ(autopas->getNumberOfParticles(), 3); // 3 integrator->integrate(); escapedParticles = autopas->updateContainer(); EXPECT_EQ(escapedParticles.size(), 0); - delayedInsertion = simulation.checkedInsert(*autopas, delayedInsertion, config["io"]["constellationCutoff"].as()); + delayedInsertion = + simulation.checkedInsert(*autopas, delayedInsertion, config["io"]["constellationCutoff"].as()); EXPECT_EQ(delayedInsertion.size(), 0); EXPECT_EQ(autopas->getNumberOfParticles(), 4); // 4 integrator->integrate(); escapedParticles = autopas->updateContainer(); EXPECT_EQ(escapedParticles.size(), 0); - delayedInsertion = simulation.checkedInsert(*autopas, delayedInsertion, config["io"]["constellationCutoff"].as()); + delayedInsertion = + simulation.checkedInsert(*autopas, delayedInsertion, config["io"]["constellationCutoff"].as()); EXPECT_EQ(delayedInsertion.size(), 0); EXPECT_EQ(autopas->getNumberOfParticles(), 4); } @@ -130,7 +135,8 @@ TEST_F(SimulationTest, testCriticalRangeInsertion1) { std::vector newSatellites; newSatellites.push_back(p1); - std::vector delayedInsertion = simulation.checkedInsert(*autopas, newSatellites, config["io"]["constellationCutoff"].as()); + std::vector delayedInsertion = + simulation.checkedInsert(*autopas, newSatellites, config["io"]["constellationCutoff"].as()); EXPECT_EQ(autopas->getNumberOfParticles(), 2); EXPECT_EQ(delayedInsertion.size(), 0); } @@ -172,7 +178,8 @@ TEST_F(SimulationTest, testCriticalRangeInsertion2) { std::vector newSatellites; newSatellites.push_back(p2); - std::vector delayedInsertion = simulation.checkedInsert(*autopas, newSatellites, config["io"]["constellationCutoff"].as()); + std::vector delayedInsertion = + simulation.checkedInsert(*autopas, newSatellites, config["io"]["constellationCutoff"].as()); EXPECT_EQ(autopas->getNumberOfParticles(), 1); EXPECT_EQ(delayedInsertion.size(), 1); } @@ -214,7 +221,8 @@ TEST_F(SimulationTest, testCriticalRangeInsertion3) { std::vector newSatellites; newSatellites.push_back(p3); - std::vector delayedInsertion = simulation.checkedInsert(*autopas, newSatellites, config["io"]["constellationCutoff"].as()); + std::vector delayedInsertion = + simulation.checkedInsert(*autopas, newSatellites, config["io"]["constellationCutoff"].as()); EXPECT_EQ(autopas->getNumberOfParticles(), 2); EXPECT_EQ(delayedInsertion.size(), 0); } @@ -256,7 +264,8 @@ TEST_F(SimulationTest, testCriticalRangeInsertion4) { std::vector newSatellites; newSatellites.push_back(p4); - std::vector delayedInsertion = simulation.checkedInsert(*autopas, newSatellites, config["io"]["constellationCutoff"].as()); + std::vector delayedInsertion = + simulation.checkedInsert(*autopas, newSatellites, config["io"]["constellationCutoff"].as()); EXPECT_EQ(autopas->getNumberOfParticles(), 1); EXPECT_EQ(delayedInsertion.size(), 1); } @@ -298,7 +307,8 @@ TEST_F(SimulationTest, testCriticalRangeInsertion5) { std::vector newSatellites; newSatellites.push_back(p5); - std::vector delayedInsertion = simulation.checkedInsert(*autopas, newSatellites, config["io"]["constellationCutoff"].as()); + std::vector delayedInsertion = + simulation.checkedInsert(*autopas, newSatellites, config["io"]["constellationCutoff"].as()); EXPECT_EQ(autopas->getNumberOfParticles(), 1); EXPECT_EQ(delayedInsertion.size(), 1); } @@ -340,7 +350,8 @@ TEST_F(SimulationTest, testCriticalRangeInsertion6) { std::vector newSatellites; newSatellites.push_back(p6); - std::vector delayedInsertion = simulation.checkedInsert(*autopas, newSatellites, config["io"]["constellationCutoff"].as()); + std::vector delayedInsertion = + simulation.checkedInsert(*autopas, newSatellites, config["io"]["constellationCutoff"].as()); EXPECT_EQ(autopas->getNumberOfParticles(), 1); EXPECT_EQ(delayedInsertion.size(), 1); } @@ -381,7 +392,8 @@ TEST_F(SimulationTest, testCriticalRangeInsertion7) { std::vector newSatellites; newSatellites.push_back(p7); - std::vector delayedInsertion = simulation.checkedInsert(*autopas, newSatellites, config["io"]["constellationCutoff"].as()); + std::vector delayedInsertion = + simulation.checkedInsert(*autopas, newSatellites, config["io"]["constellationCutoff"].as()); EXPECT_EQ(autopas->getNumberOfParticles(), 1); EXPECT_EQ(delayedInsertion.size(), 1); } @@ -422,7 +434,8 @@ TEST_F(SimulationTest, testCriticalRangeInsertion8) { std::vector newSatellites; newSatellites.push_back(p8); - std::vector delayedInsertion = simulation.checkedInsert(*autopas, newSatellites, config["io"]["constellationCutoff"].as()); + std::vector delayedInsertion = + simulation.checkedInsert(*autopas, newSatellites, config["io"]["constellationCutoff"].as()); EXPECT_EQ(autopas->getNumberOfParticles(), 1); EXPECT_EQ(delayedInsertion.size(), 1); } @@ -463,7 +476,8 @@ TEST_F(SimulationTest, testCriticalRangeInsertion9) { std::vector newSatellites; newSatellites.push_back(p9); - std::vector delayedInsertion = simulation.checkedInsert(*autopas, newSatellites, config["io"]["constellationCutoff"].as()); + std::vector delayedInsertion = + simulation.checkedInsert(*autopas, newSatellites, config["io"]["constellationCutoff"].as()); EXPECT_EQ(autopas->getNumberOfParticles(), 2); EXPECT_EQ(delayedInsertion.size(), 0); } From 980abdccdb3b9f1b8fe11074871c1ff97bebf2a3 Mon Sep 17 00:00:00 2001 From: albertNos Date: Wed, 15 Dec 2021 17:11:06 +0100 Subject: [PATCH 04/11] documentation for notebook usage + removed discard objects --- README.md | 10 +- .../ConstellationGeneration.ipynb | 17 +-- notebooks/ConstellationGeneration/README.md | 105 ++++++++++++++++++ 3 files changed, 114 insertions(+), 18 deletions(-) create mode 100644 notebooks/ConstellationGeneration/README.md diff --git a/README.md b/README.md index 4ccca8d7..0035c07b 100644 --- a/README.md +++ b/README.md @@ -58,11 +58,13 @@ Satellite constellations (e.g. Starlink, OneWeb) are usually described by a list An orbital shell is described by a 4-tuple with information about `altitude`, `inclination`, `number of planes`, and `number of satellites` per plane. We provide a notebook `notebooks/ConstellationGeneration/ConstellationGeneration.ipynb` that can be used -to generate constellation data which can be processed by LADDS from orbital shells. +to generate constellation data from orbital shell parameters. Quick guide: -* `Initialize` the constellation by executing the first cell and providing metadata in the second cell -* `create a shell` by providing the 4 shell arguments, and further parameters (extra params) if necessary (2.1). +* Initialize the constellation by executing the first cell and providing metadata in the second cell (1) +* create a shell by providing the 4 shell arguments, and further parameters (extra params) if necessary (2.1). Store the temporary shell data by executing the cell (2.2) * turn satellites into position and velocity vectors by executing cell (3) -* write the files by executing cell (4) and save them by executing cell (5) \ No newline at end of file +* write the files by executing cell (4) and save them by executing cell (5) + +A detailed guide is located in the directory of the notebook. \ No newline at end of file diff --git a/notebooks/ConstellationGeneration/ConstellationGeneration.ipynb b/notebooks/ConstellationGeneration/ConstellationGeneration.ipynb index d2f6df4e..1fae494a 100644 --- a/notebooks/ConstellationGeneration/ConstellationGeneration.ipynb +++ b/notebooks/ConstellationGeneration/ConstellationGeneration.ipynb @@ -21,9 +21,7 @@ "import math\n", "import os\n", "\n", - "starting_t = pk.epoch_from_string('2022-01-01 00:00:00.000')\n", - "lower_cutoff_in_km = 6371 + 200 # Earth radius + ...\n", - "higher_cutoff_in_km = 6371 + 2000" + "starting_t = pk.epoch_from_string('2022-01-01 00:00:00.000')" ] }, { @@ -184,7 +182,7 @@ "id": "dbd01df1", "metadata": {}, "source": [ - "# 3. Propagate all objects to t and discard too low and high ones" + "# 3. Create position and velocity vectors" ] }, { @@ -204,21 +202,12 @@ " # convert to km and numpy\n", " pos = np.asarray(pos) / 1000.0 \n", " v = np.asarray(v) / 1000.0\n", - " altitude = np.linalg.norm(pos)\n", - " if altitude < lower_cutoff_in_km:\n", - " count_too_low += 1\n", - " continue\n", - " if altitude > higher_cutoff_in_km:\n", - " count_too_high += 1\n", - " continue\n", " \n", " objects.append((pos,v))\n", " except RuntimeError as e:\n", " print(e, \" propagating \",planet.name)\n", " \n", - "print(\"Successfully propagated \",len(objects),\" objects.\")\n", - "print(count_too_low,\" had a too small altitude\")\n", - "print(count_too_high,\" had a too high altitude\")" + "print(\"Successfully propagated \",len(objects),\" objects.\")" ] }, { diff --git a/notebooks/ConstellationGeneration/README.md b/notebooks/ConstellationGeneration/README.md new file mode 100644 index 00000000..89b8c6d1 --- /dev/null +++ b/notebooks/ConstellationGeneration/README.md @@ -0,0 +1,105 @@ +# Detailed guide +Satellite constellations (e.g. Starlink, OneWeb) are usually described by a list of orbital shells. +An orbital shell is described by a 4-tuple with information about `altitude`, `inclination`, `number of +planes`, and `number of satellites` per plane. The notebook +`ConstellationGeneration.ipynb` can be used to generate position and +velocity vectors for each satellite as well as metadata in a .yaml file. +The file contains further information needed by LADDS +and it logs the parameters that have been used to create the vectors. + +--- + +## Detailed guide: + +### 0. Execute the first cell to import libraries and initialize variables + +### 1. Initialize Constellation and reset planet_list and other lists +Provide the constellation name, the time of launch as well as +the time it takes to fully deploy the constellation and execute the cell. +### 2.1 Generate shell = ( altitude, inclination, nPlanes, nSats ) +The execution of this cell creates a single shell ( planet_list_tmp ) that is not yet a part of the constellation. It is possible +to visualize the generated satellites by executing the cell `Plot current shell` +before adding it to the constellation. Append the shell to the constellation +by executing cell `2.2`. Each time the code of `2.1` is run, the temporary data is +overridden. + +Create a shell by specifying the parameters of an orbital shell which are the +following: +* `altitude` the altitude of each satellite in kilometers, relative to the +earths surface +* `inclination` the inclination of each orbital plane in degrees +* `nPlanes` the number of orbital planes +* `nSats` the number of satellites in each plane + +In some cases it is necessary to specify more parameters: `offsetM`, `argPeriapsis`, +`startingW`, and `W_area`. It is best to modify them only if necessary and to use +the default values otherwise. Refer to the end of the file to see their usage +information (additional parameters). + +### 2.2 Append to planet_list and other +Append the temporary set of satellites/planets (planet_list_tmp) to the +constellation (planet_list). The same happens to lists with the shells +meta information. + +### 3. Create position and velocity vectors +Execute the code in order to create position and velocity vectors that will +be stored in the 'objects' variable. + +### 4. Plot and store results +Prepare .csv and .yaml output and simultaneously plot the constellation by +executing this cell. + +### 5. Save Constellation as files in directory +Create a directory with the same name that was specified in `1` in the variable +constellation_name in the `data` directory of the project. It contains three +files: Two .csv files with positions and velocities and a .yaml file with the +metadata of the constellation. + +--- + +### Additional parameters +### OffsetM +`offsetM` offset for the mean anomaly parameter of an orbital element set that is +accumulating (relative phasing). +The mean anomaly of the first satellite of any plane is always bigger by +offsetM than the first satellite of the previous plane. In a Walker Constellation, +which is a typical model for constellations, the parameter follows the formula with F +being a natural number in {0,...,nPlanes-1}: + +`offsetM = F * 360 / (nPlanes*nSats)` + +Note: F is a natural number: F is element of {0, ... , nPlanes - 1} + +Note: the property of a set phasing difference +between neighboring planes gets lost if the shell is added over time + + + +### argPeriapsis +`argPeriapsis` argument of periapsis is another parameter of the orbital element +set. The base to which the Mean Anomaly is added. Choosing an irrational number +prevents satellites from two symmetrical planes to have the same position. + +### startingW +A set of planes that span 360° are created by adding the stepsize `360/nPlanes` +the orbital element W (Longitude of ascending node). `startingW` determines +the base this offset is added to. For shells with the same +altitude and the same or similar inclination, a way to prevent +the overlap exists: + +The first of the overlapping shells holds the value 0 for startingW. + +The other shells should follow the formula: + +`(360/G)*(i/N)` + +Note: G stands for the smallest common denominator of the nPlanes parameters of +each shell + +Note: N is the number of planes overlapping + +Note: i is an index in {1,...,N-1}. each shell should have a distinct i + +### W_area +this parameter determines which degree the planes of the shell span. + From 078926dbd16ee528199f03af46baf74dae7f6abc Mon Sep 17 00:00:00 2001 From: albertNos Date: Wed, 22 Dec 2021 15:20:47 +0100 Subject: [PATCH 05/11] unused include, string->auto --- src/ladds/Simulation.cpp | 2 -- src/ladds/particle/Constellation.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ladds/Simulation.cpp b/src/ladds/Simulation.cpp index 8923fefd..8af25ce4 100644 --- a/src/ladds/Simulation.cpp +++ b/src/ladds/Simulation.cpp @@ -7,8 +7,6 @@ #include "Simulation.h" #include -#include -#include #include #include diff --git a/src/ladds/particle/Constellation.cpp b/src/ladds/particle/Constellation.cpp index 568d1bbf..b7de03e9 100644 --- a/src/ladds/particle/Constellation.cpp +++ b/src/ladds/particle/Constellation.cpp @@ -16,7 +16,7 @@ std::mt19937 Constellation::generator{42}; Constellation::Constellation(const YAML::Node &constellationConfig, size_t interval, double altitudeDeviation) : interval(interval), altitudeDeviation(altitudeDeviation) { - std::string constellationName = constellationConfig["constellation"]["name"].as(); + auto constellationName = constellationConfig["constellation"]["name"].as(); // set variables using 3 args std::vector sats = From b4271074813f7032dab86fce86034d1650d27ecd Mon Sep 17 00:00:00 2001 From: albertNos Date: Wed, 22 Dec 2021 17:02:21 +0100 Subject: [PATCH 06/11] SimulationTest + Sat IDs in Constellation --- src/ladds/particle/Constellation.cpp | 8 +- src/ladds/particle/Constellation.h | 5 + tests/testladds/CMakeLists.txt | 4 +- tests/testladds/SimulationTest.cpp | 149 +++++++++++++++++++++++++++ tests/testladds/SimulationTest.h | 30 +++--- 5 files changed, 178 insertions(+), 18 deletions(-) diff --git a/src/ladds/particle/Constellation.cpp b/src/ladds/particle/Constellation.cpp index b7de03e9..05bc974a 100644 --- a/src/ladds/particle/Constellation.cpp +++ b/src/ladds/particle/Constellation.cpp @@ -12,6 +12,8 @@ #include #include +size_t Constellation::particleID = 1000000; + std::mt19937 Constellation::generator{42}; Constellation::Constellation(const YAML::Node &constellationConfig, size_t interval, double altitudeDeviation) @@ -55,6 +57,9 @@ Constellation::Constellation(const YAML::Node &constellationConfig, size_t inter for (size_t i = 0ul; i < timestamps.size() - 1; ++i) { timeSteps.push_back((timestamps[i + 1] - timestamps[i]) / shells[i][2]); // = duration_i / nPlanes_i } + + //prepare next ID base for next constellation (C1 starts at 1M, C2 starts at 2M ...) + particleID = particleID + 1000000 - constellationSize; } std::vector Constellation::tick() { @@ -121,7 +126,6 @@ std::vector Constellation::readDatasetConstellation(const std::string particleCollection.reserve(positions.size()); - size_t particleId = 0; std::transform(positions.begin(), positions.end(), velocities.begin(), @@ -132,7 +136,7 @@ std::vector Constellation::readDatasetConstellation(const std::string const std::array posArray = {x, y, z}; const std::array velArray = {vx, vy, vz}; - return Particle(posArray, velArray, particleId++); + return Particle(posArray, velArray, particleID++); }); return particleCollection; } diff --git a/src/ladds/particle/Constellation.h b/src/ladds/particle/Constellation.h index 3babc94c..dfbed400 100644 --- a/src/ladds/particle/Constellation.h +++ b/src/ladds/particle/Constellation.h @@ -160,4 +160,9 @@ class Constellation { * altitude. uses altitudeDeviation as parameter */ std::normal_distribution distribution; + + /** + * variable used to give every satellite that is part of a constellation an id + */ + static size_t particleID; }; diff --git a/tests/testladds/CMakeLists.txt b/tests/testladds/CMakeLists.txt index 88361670..0d9751e6 100644 --- a/tests/testladds/CMakeLists.txt +++ b/tests/testladds/CMakeLists.txt @@ -40,11 +40,11 @@ target_include_directories( PUBLIC ${LADDS_SOURCE_DIR}/src ) - +#NOTE: DATADIR changed from ... /data/ to .../tests/data/ target_compile_definitions(${TEST_EXECUTABLE_NAME} PUBLIC SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_${LADDS_MAX_LOGLVL} - DATADIR=\"${PROJECT_SOURCE_DIR}/data/\" + DATADIR=\"${PROJECT_SOURCE_DIR}/tests/data/\" CFGDIR=\"${PROJECT_SOURCE_DIR}/cfg/\" CFGDIRTEST=\"${PROJECT_SOURCE_DIR}/cfg/\" ) diff --git a/tests/testladds/SimulationTest.cpp b/tests/testladds/SimulationTest.cpp index 8a4daaad..9a103918 100644 --- a/tests/testladds/SimulationTest.cpp +++ b/tests/testladds/SimulationTest.cpp @@ -14,6 +14,7 @@ #include "ladds/Simulation.h" #include "ladds/io/Logger.h" #include "ladds/particle/Particle.h" +#include "ladds/io/SatelliteLoader.h" /** * Tests whether particles are correctly inserted into the simulation, when a particle @@ -481,3 +482,151 @@ TEST_F(SimulationTest, testCriticalRangeInsertion9) { EXPECT_EQ(autopas->getNumberOfParticles(), 2); EXPECT_EQ(delayedInsertion.size(), 0); } + +/** + * simple scenario with three constellations that are inserted at the same time. Tests + * whether insertion of multiple overlapping constellations are correctly delayed and + * if two very close (but not with identical position) particles lead to + * delayed insertion and two particles that are apart by a distance larger than the + * constellationCutoff are inserted. + * The test structure imitates simulationLoop + */ +TEST_F(SimulationTest, SimulationTestScenario1) { + Logger logger{"SimulationTestLogger"}; + logger.get()->set_level(Logger::Level::trace); + Simulation simulation(logger); + config["io"]["altitudeSpread"] = 0; + config["io"]["constellationList"] = "TestConstellationA;TestConstellationAPrime;TestConstellationAPrime"; + // run + auto autopas = simulation.initAutoPas(config); + auto [csvWriter, accumulator, integrator] = simulation.initIntegrator(*autopas, config); + SatelliteLoader::loadSatellites(*autopas, config, logger); + auto constellations = SatelliteLoader::loadConstellations(config, logger); + const auto constellationCutoff = + config["io"]["constellationCutoff"].IsDefined() ? config["io"]["constellationCutoff"].as() : 0.1; + // three (almost) identical constellations are added at time = 0 (exceptions tagged with ¹ / ²) + // 1 2 3 + //---o--- | ---o¹-- | ---o¹-- + //--o-o-- | --o-o²- | --o-o²- + //---o--- | ---o--- | ---o--- + //¹: offset smaller that constellationCutoff, ²: offset greater than constellationCutoff (see pos.csv) + + std::vector delayedInsertion; + ASSERT_EQ(autopas->getNumberOfParticles(), 0); + + integrator->integrate(false); + simulation.updateConstellation(*autopas, constellations, delayedInsertion, constellationCutoff); + auto escapedParticles = autopas->updateContainer(); + ASSERT_EQ(autopas->getNumberOfParticles(), 5); + integrator->integrate(false); + simulation.updateConstellation(*autopas, constellations, delayedInsertion, constellationCutoff); + escapedParticles = autopas->updateContainer(); + ASSERT_EQ(autopas->getNumberOfParticles(), 9); + integrator->integrate(false); + simulation.updateConstellation(*autopas, constellations, delayedInsertion, constellationCutoff); + escapedParticles = autopas->updateContainer(); + ASSERT_EQ(autopas->getNumberOfParticles(), 12); + integrator->integrate(false); + simulation.updateConstellation(*autopas, constellations, delayedInsertion, constellationCutoff); + escapedParticles = autopas->updateContainer(); + ASSERT_EQ(autopas->getNumberOfParticles(), 12); +} +/** + * scenario with small constellations that tests simultaneous insertion + * in different planes over time (duration of a constellation does NOT + * equal zero). Time step is chosen in a way that a natural number of + * iterations (16000) simulates one revolution exactly (mathematically + * exact but with significant rounding errors based on size of deltaT). + * The test structure imitates simulationLoop + */ +TEST_F(SimulationTest, SimulationTestScenario2) { + Logger logger{"SimulationTestLogger"}; + logger.get()->set_level(Logger::Level::trace); + Simulation simulation(logger); + // one sixteenth of a revolution time for a 400km altitude satellite (*100) + config["sim"]["deltaT"] = 3.465534435; + config["io"]["altitudeSpread"] = 0; + config["io"]["constellationList"] = + "TestConstellationB;TestConstellationB11;TestConstellationB12;TestConstellationB21;TestConstellationB21;" + "TestConstellationB21;TestConstellationB21;TestConstellationB21;TestConstellationB21;TestConstellationB21;" + "TestConstellationB21;TestConstellationB21"; + config["io"]["constellationFrequency"] = 100; + config["autopas"]["cutoff"] = 80.0; + config["autopas"]["skin"] = 160.0; + auto constellationInsertionFrequency = config["io"]["constellationFrequency"].as(); + // run + auto autopas = simulation.initAutoPas(config); + auto [csvWriter, accumulator, integrator] = simulation.initIntegrator(*autopas, config); + SatelliteLoader::loadSatellites(*autopas, config, logger); + auto constellations = SatelliteLoader::loadConstellations(config, logger); + const auto constellationCutoff = 100.0; + + /* + * the test simulation was supposed to be simulated in 21 iterations, but a + * deltaT of 346.5534435 seconds created a rounding error that destroyed the + * property of 16 iterations simulating exactly one revolution. DeltaT was + * therefore divided by 100 which is compensated by 100 times more integration + * steps and a big constellationCutoff + * + * since the time step is chosen so that a satellite with a 400km altitude + * moves by 1/16 in 100 iterations the simulation can be visualized as an + * array of 16 possible areas for a satellite. Checked insertion is tested + * at two orbital planes, so there are two seperate 16-size-arrays + * + * First plane: + * ConstellationB (Plane 1, inserted at t = 0): + * o-o-o-o-o-o-o-o- + * ConstellationB11 (inserted at t = 2) + * o-------o------- + * ConstellationB12 (inserted at t = 4) + * o---o---o---o--- + * + * Second plane: + * ConstellationB (Plane 2, inserted at t = 3): + * o-o-o-o-o-o-o-o- + * ConstellationB21 (inserted 9 times at t = 3): + * o--------------- + */ + + /* + * o = satellite, 0 = satellite inserted at this iteration + * visualization: timetable of first plane, expected: + * 0 : O-O-O-O-O-O-O-O- s: 8 + * 1 : Oo-o-o-oOo-o-o-o s:10 + * 2 : ooo-o-o-ooo-o-o- s:10 + * 3 : -ooo-o-o-ooo-o-o s:10 + * 4 : o-ooo-o-o-ooo-o- s:10 + * 5 : Oo-ooo-oOo-ooo-o s:12 + * 6 : ooo-ooo-ooo-ooo- s:12 + * 7 : -oooOooo-oooOooo s:14 + * + * visualization: timetable of second plane, expected: + * 0 : ---------------- s: 0 11: ooooooooo-o-o-o- s:12 + * 1 : ---------------- s: 0 12: Oooooooooo-o-o-o s:13 + * 2 : ---------------- s: 0 13: ooooooooooo-o-o- s:13 + * 3 : O-O-O-O-O-O-O-O- s: 8 14: Oooooooooooo-o-o s:14 + * 4 : Oo-o-o-o-o-o-o-o s: 9 15: ooooooooooooo-o- s:14 + * 5 : ooo-o-o-o-o-o-o- s: 9 16: Oooooooooooooo-o s:15 + * 6 : Oooo-o-o-o-o-o-o s:10 17: ooooooooooooooo- s:15 + * 7 : ooooo-o-o-o-o-o- s:10 18: Oooooooooooooooo s:16 + * 8 : Oooooo-o-o-o-o-o s:11 19: oooooooooooooooo s:16 + * 9 : ooooooo-o-o-o-o- s:11 20: oooooooooooooooo s:16 + * 10: Oooooooo-o-o-o-o s:12 21: oooooooooooooooo s:16 + */ + std::vector delayedInsertion; + ASSERT_EQ(autopas->getNumberOfParticles(), 0); + std::vector escapedParticles; + std::vector expectedSeries = {8 + 0, 10 + 0, 10 + 0, 10 + 8, 10 + 9, 12 + 9, 12 + 10, + 14 + 10, 14 + 11, 14 + 11, 14 + 12, 14 + 12, 14 + 13, 14 + 13, + 14 + 14, 14 + 14, 14 + 15, 14 + 15, 14 + 16, 14 + 16, 14 + 16}; + for (int i = 0; i < 2100; i++) { + integrator->integrate(false); + if (i % constellationInsertionFrequency == 0) { + simulation.updateConstellation(*autopas, constellations, delayedInsertion, constellationCutoff); + } + escapedParticles = autopas->updateContainer(); + if (i % constellationInsertionFrequency == 0) { + ASSERT_EQ(autopas->getNumberOfParticles(), expectedSeries[i / 100]); + } + } +} \ No newline at end of file diff --git a/tests/testladds/SimulationTest.h b/tests/testladds/SimulationTest.h index c1e988ce..b30848af 100644 --- a/tests/testladds/SimulationTest.h +++ b/tests/testladds/SimulationTest.h @@ -10,19 +10,21 @@ #include class SimulationTest : public testing::Test { - public: - SimulationTest() { - // initialize a minimal default configuration - config["sim"]["maxAltitude"] = 85000.; - config["sim"]["deltaT"] = 1.0; - config["autopas"]["cutoff"] = 0.02; - config["autopas"]["skin"] = 0.2; - config["autopas"]["rebuildFrequency"] = 20; - config["autopas"]["desiredCellsPerDimension"] = 32; - config["io"]["output_file"] = "test"; - config["io"]["constellationCutoff"] = 0.04; - config["sim"]["prop"]["useKEPComponent"] = true; - } +public: + SimulationTest() { + // initialize a minimal default configuration + config["sim"]["maxAltitude"] = 85000.; + config["sim"]["deltaT"] = 1.0; + config["autopas"]["cutoff"] = 0.02; + config["autopas"]["skin"] = 0.2; + config["autopas"]["rebuildFrequency"] = 20; + config["autopas"]["desiredCellsPerDimension"] = 32; + config["io"]["output_file"] = "test"; + config["io"]["constellationCutoff"] = 0.04; + config["io"]["posFileName"] = "pos_test.csv"; + config["io"]["velFileName"] = "v_test.csv"; + config["sim"]["prop"]["useKEPComponent"] = true; + } - YAML::Node config; + YAML::Node config; }; From e7ca12cd8d62de914cf5405012710e13d6166d36 Mon Sep 17 00:00:00 2001 From: albertNos Date: Wed, 22 Dec 2021 17:07:30 +0100 Subject: [PATCH 07/11] small changes --- src/ladds/particle/Constellation.cpp | 2 +- src/ladds/particle/Constellation.h | 2 +- tests/testladds/SimulationTest.cpp | 274 +++++++++++++-------------- tests/testladds/SimulationTest.h | 32 ++-- 4 files changed, 155 insertions(+), 155 deletions(-) diff --git a/src/ladds/particle/Constellation.cpp b/src/ladds/particle/Constellation.cpp index 05bc974a..7d9568ef 100644 --- a/src/ladds/particle/Constellation.cpp +++ b/src/ladds/particle/Constellation.cpp @@ -58,7 +58,7 @@ Constellation::Constellation(const YAML::Node &constellationConfig, size_t inter timeSteps.push_back((timestamps[i + 1] - timestamps[i]) / shells[i][2]); // = duration_i / nPlanes_i } - //prepare next ID base for next constellation (C1 starts at 1M, C2 starts at 2M ...) + // prepare next ID base for next constellation (C1 starts at 1M, C2 starts at 2M ...) particleID = particleID + 1000000 - constellationSize; } diff --git a/src/ladds/particle/Constellation.h b/src/ladds/particle/Constellation.h index dfbed400..b8db527e 100644 --- a/src/ladds/particle/Constellation.h +++ b/src/ladds/particle/Constellation.h @@ -164,5 +164,5 @@ class Constellation { /** * variable used to give every satellite that is part of a constellation an id */ - static size_t particleID; + static size_t particleID; }; diff --git a/tests/testladds/SimulationTest.cpp b/tests/testladds/SimulationTest.cpp index 9a103918..33b0d870 100644 --- a/tests/testladds/SimulationTest.cpp +++ b/tests/testladds/SimulationTest.cpp @@ -13,8 +13,8 @@ #include "ladds/Simulation.h" #include "ladds/io/Logger.h" -#include "ladds/particle/Particle.h" #include "ladds/io/SatelliteLoader.h" +#include "ladds/particle/Particle.h" /** * Tests whether particles are correctly inserted into the simulation, when a particle @@ -22,7 +22,7 @@ */ TEST_F(SimulationTest, testInsertionOverlap) { Logger logger{"SimulationTestLogger"}; - logger.get()->set_level(Logger::Level::trace); + logger.get()->set_level(Logger::Level::off); Simulation simulation(logger); auto autopas = simulation.initAutoPas(config); @@ -109,7 +109,7 @@ TEST_F(SimulationTest, testInsertionOverlap) { */ TEST_F(SimulationTest, testCriticalRangeInsertion1) { Logger logger{"SimulationTestLogger"}; - logger.get()->set_level(Logger::Level::trace); + logger.get()->set_level(Logger::Level::off); Simulation simulation(logger); auto autopas = simulation.initAutoPas(config); @@ -150,7 +150,7 @@ TEST_F(SimulationTest, testCriticalRangeInsertion1) { */ TEST_F(SimulationTest, testCriticalRangeInsertion2) { Logger logger{"SimulationTestLogger"}; - logger.get()->set_level(Logger::Level::trace); + logger.get()->set_level(Logger::Level::off); Simulation simulation(logger); auto autopas = simulation.initAutoPas(config); @@ -193,7 +193,7 @@ TEST_F(SimulationTest, testCriticalRangeInsertion2) { */ TEST_F(SimulationTest, testCriticalRangeInsertion3) { Logger logger{"SimulationTestLogger"}; - logger.get()->set_level(Logger::Level::trace); + logger.get()->set_level(Logger::Level::off); Simulation simulation(logger); auto autopas = simulation.initAutoPas(config); @@ -236,7 +236,7 @@ TEST_F(SimulationTest, testCriticalRangeInsertion3) { */ TEST_F(SimulationTest, testCriticalRangeInsertion4) { Logger logger{"SimulationTestLogger"}; - logger.get()->set_level(Logger::Level::trace); + logger.get()->set_level(Logger::Level::off); Simulation simulation(logger); auto autopas = simulation.initAutoPas(config); @@ -279,7 +279,7 @@ TEST_F(SimulationTest, testCriticalRangeInsertion4) { */ TEST_F(SimulationTest, testCriticalRangeInsertion5) { Logger logger{"SimulationTestLogger"}; - logger.get()->set_level(Logger::Level::trace); + logger.get()->set_level(Logger::Level::off); Simulation simulation(logger); auto autopas = simulation.initAutoPas(config); @@ -322,7 +322,7 @@ TEST_F(SimulationTest, testCriticalRangeInsertion5) { */ TEST_F(SimulationTest, testCriticalRangeInsertion6) { Logger logger{"SimulationTestLogger"}; - logger.get()->set_level(Logger::Level::trace); + logger.get()->set_level(Logger::Level::off); Simulation simulation(logger); auto autopas = simulation.initAutoPas(config); @@ -365,7 +365,7 @@ TEST_F(SimulationTest, testCriticalRangeInsertion6) { */ TEST_F(SimulationTest, testCriticalRangeInsertion7) { Logger logger{"SimulationTestLogger"}; - logger.get()->set_level(Logger::Level::trace); + logger.get()->set_level(Logger::Level::off); Simulation simulation(logger); auto autopas = simulation.initAutoPas(config); @@ -407,7 +407,7 @@ TEST_F(SimulationTest, testCriticalRangeInsertion7) { */ TEST_F(SimulationTest, testCriticalRangeInsertion8) { Logger logger{"SimulationTestLogger"}; - logger.get()->set_level(Logger::Level::trace); + logger.get()->set_level(Logger::Level::off); Simulation simulation(logger); auto autopas = simulation.initAutoPas(config); @@ -449,7 +449,7 @@ TEST_F(SimulationTest, testCriticalRangeInsertion8) { */ TEST_F(SimulationTest, testCriticalRangeInsertion9) { Logger logger{"SimulationTestLogger"}; - logger.get()->set_level(Logger::Level::trace); + logger.get()->set_level(Logger::Level::off); Simulation simulation(logger); auto autopas = simulation.initAutoPas(config); @@ -492,44 +492,44 @@ TEST_F(SimulationTest, testCriticalRangeInsertion9) { * The test structure imitates simulationLoop */ TEST_F(SimulationTest, SimulationTestScenario1) { - Logger logger{"SimulationTestLogger"}; - logger.get()->set_level(Logger::Level::trace); - Simulation simulation(logger); - config["io"]["altitudeSpread"] = 0; - config["io"]["constellationList"] = "TestConstellationA;TestConstellationAPrime;TestConstellationAPrime"; - // run - auto autopas = simulation.initAutoPas(config); - auto [csvWriter, accumulator, integrator] = simulation.initIntegrator(*autopas, config); - SatelliteLoader::loadSatellites(*autopas, config, logger); - auto constellations = SatelliteLoader::loadConstellations(config, logger); - const auto constellationCutoff = - config["io"]["constellationCutoff"].IsDefined() ? config["io"]["constellationCutoff"].as() : 0.1; - // three (almost) identical constellations are added at time = 0 (exceptions tagged with ¹ / ²) - // 1 2 3 - //---o--- | ---o¹-- | ---o¹-- - //--o-o-- | --o-o²- | --o-o²- - //---o--- | ---o--- | ---o--- - //¹: offset smaller that constellationCutoff, ²: offset greater than constellationCutoff (see pos.csv) - - std::vector delayedInsertion; - ASSERT_EQ(autopas->getNumberOfParticles(), 0); - - integrator->integrate(false); - simulation.updateConstellation(*autopas, constellations, delayedInsertion, constellationCutoff); - auto escapedParticles = autopas->updateContainer(); - ASSERT_EQ(autopas->getNumberOfParticles(), 5); - integrator->integrate(false); - simulation.updateConstellation(*autopas, constellations, delayedInsertion, constellationCutoff); - escapedParticles = autopas->updateContainer(); - ASSERT_EQ(autopas->getNumberOfParticles(), 9); - integrator->integrate(false); - simulation.updateConstellation(*autopas, constellations, delayedInsertion, constellationCutoff); - escapedParticles = autopas->updateContainer(); - ASSERT_EQ(autopas->getNumberOfParticles(), 12); - integrator->integrate(false); - simulation.updateConstellation(*autopas, constellations, delayedInsertion, constellationCutoff); - escapedParticles = autopas->updateContainer(); - ASSERT_EQ(autopas->getNumberOfParticles(), 12); + Logger logger{"SimulationTestLogger"}; + logger.get()->set_level(Logger::Level::off); + Simulation simulation(logger); + config["io"]["altitudeSpread"] = 0; + config["io"]["constellationList"] = "TestConstellationA;TestConstellationAPrime;TestConstellationAPrime"; + // run + auto autopas = simulation.initAutoPas(config); + auto [csvWriter, accumulator, integrator] = simulation.initIntegrator(*autopas, config); + SatelliteLoader::loadSatellites(*autopas, config, logger); + auto constellations = SatelliteLoader::loadConstellations(config, logger); + const auto constellationCutoff = + config["io"]["constellationCutoff"].IsDefined() ? config["io"]["constellationCutoff"].as() : 0.1; + // three (almost) identical constellations are added at time = 0 (exceptions tagged with ¹ / ²) + // 1 2 3 + //---o--- | ---o¹-- | ---o¹-- + //--o-o-- | --o-o²- | --o-o²- + //---o--- | ---o--- | ---o--- + //¹: offset smaller that constellationCutoff, ²: offset greater than constellationCutoff (see pos.csv) + + std::vector delayedInsertion; + ASSERT_EQ(autopas->getNumberOfParticles(), 0); + + integrator->integrate(false); + simulation.updateConstellation(*autopas, constellations, delayedInsertion, constellationCutoff); + auto escapedParticles = autopas->updateContainer(); + ASSERT_EQ(autopas->getNumberOfParticles(), 5); + integrator->integrate(false); + simulation.updateConstellation(*autopas, constellations, delayedInsertion, constellationCutoff); + escapedParticles = autopas->updateContainer(); + ASSERT_EQ(autopas->getNumberOfParticles(), 9); + integrator->integrate(false); + simulation.updateConstellation(*autopas, constellations, delayedInsertion, constellationCutoff); + escapedParticles = autopas->updateContainer(); + ASSERT_EQ(autopas->getNumberOfParticles(), 12); + integrator->integrate(false); + simulation.updateConstellation(*autopas, constellations, delayedInsertion, constellationCutoff); + escapedParticles = autopas->updateContainer(); + ASSERT_EQ(autopas->getNumberOfParticles(), 12); } /** * scenario with small constellations that tests simultaneous insertion @@ -540,93 +540,93 @@ TEST_F(SimulationTest, SimulationTestScenario1) { * The test structure imitates simulationLoop */ TEST_F(SimulationTest, SimulationTestScenario2) { - Logger logger{"SimulationTestLogger"}; - logger.get()->set_level(Logger::Level::trace); - Simulation simulation(logger); - // one sixteenth of a revolution time for a 400km altitude satellite (*100) - config["sim"]["deltaT"] = 3.465534435; - config["io"]["altitudeSpread"] = 0; - config["io"]["constellationList"] = - "TestConstellationB;TestConstellationB11;TestConstellationB12;TestConstellationB21;TestConstellationB21;" - "TestConstellationB21;TestConstellationB21;TestConstellationB21;TestConstellationB21;TestConstellationB21;" - "TestConstellationB21;TestConstellationB21"; - config["io"]["constellationFrequency"] = 100; - config["autopas"]["cutoff"] = 80.0; - config["autopas"]["skin"] = 160.0; - auto constellationInsertionFrequency = config["io"]["constellationFrequency"].as(); - // run - auto autopas = simulation.initAutoPas(config); - auto [csvWriter, accumulator, integrator] = simulation.initIntegrator(*autopas, config); - SatelliteLoader::loadSatellites(*autopas, config, logger); - auto constellations = SatelliteLoader::loadConstellations(config, logger); - const auto constellationCutoff = 100.0; - - /* - * the test simulation was supposed to be simulated in 21 iterations, but a - * deltaT of 346.5534435 seconds created a rounding error that destroyed the - * property of 16 iterations simulating exactly one revolution. DeltaT was - * therefore divided by 100 which is compensated by 100 times more integration - * steps and a big constellationCutoff - * - * since the time step is chosen so that a satellite with a 400km altitude - * moves by 1/16 in 100 iterations the simulation can be visualized as an - * array of 16 possible areas for a satellite. Checked insertion is tested - * at two orbital planes, so there are two seperate 16-size-arrays - * - * First plane: - * ConstellationB (Plane 1, inserted at t = 0): - * o-o-o-o-o-o-o-o- - * ConstellationB11 (inserted at t = 2) - * o-------o------- - * ConstellationB12 (inserted at t = 4) - * o---o---o---o--- - * - * Second plane: - * ConstellationB (Plane 2, inserted at t = 3): - * o-o-o-o-o-o-o-o- - * ConstellationB21 (inserted 9 times at t = 3): - * o--------------- - */ - - /* - * o = satellite, 0 = satellite inserted at this iteration - * visualization: timetable of first plane, expected: - * 0 : O-O-O-O-O-O-O-O- s: 8 - * 1 : Oo-o-o-oOo-o-o-o s:10 - * 2 : ooo-o-o-ooo-o-o- s:10 - * 3 : -ooo-o-o-ooo-o-o s:10 - * 4 : o-ooo-o-o-ooo-o- s:10 - * 5 : Oo-ooo-oOo-ooo-o s:12 - * 6 : ooo-ooo-ooo-ooo- s:12 - * 7 : -oooOooo-oooOooo s:14 - * - * visualization: timetable of second plane, expected: - * 0 : ---------------- s: 0 11: ooooooooo-o-o-o- s:12 - * 1 : ---------------- s: 0 12: Oooooooooo-o-o-o s:13 - * 2 : ---------------- s: 0 13: ooooooooooo-o-o- s:13 - * 3 : O-O-O-O-O-O-O-O- s: 8 14: Oooooooooooo-o-o s:14 - * 4 : Oo-o-o-o-o-o-o-o s: 9 15: ooooooooooooo-o- s:14 - * 5 : ooo-o-o-o-o-o-o- s: 9 16: Oooooooooooooo-o s:15 - * 6 : Oooo-o-o-o-o-o-o s:10 17: ooooooooooooooo- s:15 - * 7 : ooooo-o-o-o-o-o- s:10 18: Oooooooooooooooo s:16 - * 8 : Oooooo-o-o-o-o-o s:11 19: oooooooooooooooo s:16 - * 9 : ooooooo-o-o-o-o- s:11 20: oooooooooooooooo s:16 - * 10: Oooooooo-o-o-o-o s:12 21: oooooooooooooooo s:16 - */ - std::vector delayedInsertion; - ASSERT_EQ(autopas->getNumberOfParticles(), 0); - std::vector escapedParticles; - std::vector expectedSeries = {8 + 0, 10 + 0, 10 + 0, 10 + 8, 10 + 9, 12 + 9, 12 + 10, - 14 + 10, 14 + 11, 14 + 11, 14 + 12, 14 + 12, 14 + 13, 14 + 13, - 14 + 14, 14 + 14, 14 + 15, 14 + 15, 14 + 16, 14 + 16, 14 + 16}; - for (int i = 0; i < 2100; i++) { - integrator->integrate(false); - if (i % constellationInsertionFrequency == 0) { - simulation.updateConstellation(*autopas, constellations, delayedInsertion, constellationCutoff); - } - escapedParticles = autopas->updateContainer(); - if (i % constellationInsertionFrequency == 0) { - ASSERT_EQ(autopas->getNumberOfParticles(), expectedSeries[i / 100]); - } + Logger logger{"SimulationTestLogger"}; + logger.get()->set_level(Logger::Level::off); + Simulation simulation(logger); + // one sixteenth of a revolution time for a 400km altitude satellite (*100) + config["sim"]["deltaT"] = 3.465534435; + config["io"]["altitudeSpread"] = 0; + config["io"]["constellationList"] = + "TestConstellationB;TestConstellationB11;TestConstellationB12;TestConstellationB21;TestConstellationB21;" + "TestConstellationB21;TestConstellationB21;TestConstellationB21;TestConstellationB21;TestConstellationB21;" + "TestConstellationB21;TestConstellationB21"; + config["io"]["constellationFrequency"] = 100; + config["autopas"]["cutoff"] = 80.0; + config["autopas"]["skin"] = 160.0; + auto constellationInsertionFrequency = config["io"]["constellationFrequency"].as(); + // run + auto autopas = simulation.initAutoPas(config); + auto [csvWriter, accumulator, integrator] = simulation.initIntegrator(*autopas, config); + SatelliteLoader::loadSatellites(*autopas, config, logger); + auto constellations = SatelliteLoader::loadConstellations(config, logger); + const auto constellationCutoff = 100.0; + + /* + * the test simulation was supposed to be simulated in 21 iterations, but a + * deltaT of 346.5534435 seconds created a rounding error that destroyed the + * property of 16 iterations simulating exactly one revolution. DeltaT was + * therefore divided by 100 which is compensated by 100 times more integration + * steps and a big constellationCutoff + * + * since the time step is chosen so that a satellite with a 400km altitude + * moves by 1/16 in 100 iterations the simulation can be visualized as an + * array of 16 possible areas for a satellite. Checked insertion is tested + * at two orbital planes, so there are two seperate 16-size-arrays + * + * First plane: + * ConstellationB (Plane 1, inserted at t = 0): + * o-o-o-o-o-o-o-o- + * ConstellationB11 (inserted at t = 2) + * o-------o------- + * ConstellationB12 (inserted at t = 4) + * o---o---o---o--- + * + * Second plane: + * ConstellationB (Plane 2, inserted at t = 3): + * o-o-o-o-o-o-o-o- + * ConstellationB21 (inserted 9 times at t = 3): + * o--------------- + */ + + /* + * o = satellite, 0 = satellite inserted at this iteration + * visualization: timetable of first plane, expected: + * 0 : O-O-O-O-O-O-O-O- s: 8 + * 1 : Oo-o-o-oOo-o-o-o s:10 + * 2 : ooo-o-o-ooo-o-o- s:10 + * 3 : -ooo-o-o-ooo-o-o s:10 + * 4 : o-ooo-o-o-ooo-o- s:10 + * 5 : Oo-ooo-oOo-ooo-o s:12 + * 6 : ooo-ooo-ooo-ooo- s:12 + * 7 : -oooOooo-oooOooo s:14 + * + * visualization: timetable of second plane, expected: + * 0 : ---------------- s: 0 11: ooooooooo-o-o-o- s:12 + * 1 : ---------------- s: 0 12: Oooooooooo-o-o-o s:13 + * 2 : ---------------- s: 0 13: ooooooooooo-o-o- s:13 + * 3 : O-O-O-O-O-O-O-O- s: 8 14: Oooooooooooo-o-o s:14 + * 4 : Oo-o-o-o-o-o-o-o s: 9 15: ooooooooooooo-o- s:14 + * 5 : ooo-o-o-o-o-o-o- s: 9 16: Oooooooooooooo-o s:15 + * 6 : Oooo-o-o-o-o-o-o s:10 17: ooooooooooooooo- s:15 + * 7 : ooooo-o-o-o-o-o- s:10 18: Oooooooooooooooo s:16 + * 8 : Oooooo-o-o-o-o-o s:11 19: oooooooooooooooo s:16 + * 9 : ooooooo-o-o-o-o- s:11 20: oooooooooooooooo s:16 + * 10: Oooooooo-o-o-o-o s:12 21: oooooooooooooooo s:16 + */ + std::vector delayedInsertion; + ASSERT_EQ(autopas->getNumberOfParticles(), 0); + std::vector escapedParticles; + std::vector expectedSeries = {8 + 0, 10 + 0, 10 + 0, 10 + 8, 10 + 9, 12 + 9, 12 + 10, + 14 + 10, 14 + 11, 14 + 11, 14 + 12, 14 + 12, 14 + 13, 14 + 13, + 14 + 14, 14 + 14, 14 + 15, 14 + 15, 14 + 16, 14 + 16, 14 + 16}; + for (int i = 0; i < 2100; i++) { + integrator->integrate(false); + if (i % constellationInsertionFrequency == 0) { + simulation.updateConstellation(*autopas, constellations, delayedInsertion, constellationCutoff); + } + escapedParticles = autopas->updateContainer(); + if (i % constellationInsertionFrequency == 0) { + ASSERT_EQ(autopas->getNumberOfParticles(), expectedSeries[i / 100]); } + } } \ No newline at end of file diff --git a/tests/testladds/SimulationTest.h b/tests/testladds/SimulationTest.h index b30848af..8820992e 100644 --- a/tests/testladds/SimulationTest.h +++ b/tests/testladds/SimulationTest.h @@ -10,21 +10,21 @@ #include class SimulationTest : public testing::Test { -public: - SimulationTest() { - // initialize a minimal default configuration - config["sim"]["maxAltitude"] = 85000.; - config["sim"]["deltaT"] = 1.0; - config["autopas"]["cutoff"] = 0.02; - config["autopas"]["skin"] = 0.2; - config["autopas"]["rebuildFrequency"] = 20; - config["autopas"]["desiredCellsPerDimension"] = 32; - config["io"]["output_file"] = "test"; - config["io"]["constellationCutoff"] = 0.04; - config["io"]["posFileName"] = "pos_test.csv"; - config["io"]["velFileName"] = "v_test.csv"; - config["sim"]["prop"]["useKEPComponent"] = true; - } + public: + SimulationTest() { + // initialize a minimal default configuration + config["sim"]["maxAltitude"] = 85000.; + config["sim"]["deltaT"] = 1.0; + config["autopas"]["cutoff"] = 0.02; + config["autopas"]["skin"] = 0.2; + config["autopas"]["rebuildFrequency"] = 20; + config["autopas"]["desiredCellsPerDimension"] = 32; + config["io"]["output_file"] = "test"; + config["io"]["constellationCutoff"] = 0.04; + config["io"]["posFileName"] = "pos_test.csv"; + config["io"]["velFileName"] = "v_test.csv"; + config["sim"]["prop"]["useKEPComponent"] = true; + } - YAML::Node config; + YAML::Node config; }; From d50505e87dbaf6e8845d3509b48b868a38a41164 Mon Sep 17 00:00:00 2001 From: albertNos Date: Thu, 23 Dec 2021 09:52:44 +0100 Subject: [PATCH 08/11] added ignored test files --- .../pos_TestConstellationA.csv | 4 ++++ .../shells_TestConstellationA.yaml | 18 ++++++++++++++++++ .../v_TestConstellationA.csv | 4 ++++ .../pos_TestConstellationAPrime.csv | 4 ++++ .../shells_TestConstellationAPrime.yaml | 18 ++++++++++++++++++ .../v_TestConstellationAPrime.csv | 4 ++++ .../pos_TestConstellationB.csv | 16 ++++++++++++++++ .../shells_TestConstellationB.yaml | 18 ++++++++++++++++++ .../v_TestConstellationB.csv | 16 ++++++++++++++++ .../pos_TestConstellationB11.csv | 2 ++ .../shells_TestConstellationB11.yaml | 18 ++++++++++++++++++ .../v_TestConstellationB11.csv | 2 ++ .../pos_TestConstellationB12.csv | 4 ++++ .../shells_TestConstellationB12.yaml | 18 ++++++++++++++++++ .../v_TestConstellationB12.csv | 4 ++++ .../pos_TestConstellationB21.csv | 1 + .../shells_TestConstellationB21.yaml | 18 ++++++++++++++++++ .../v_TestConstellationB21.csv | 1 + tests/data/pos_test.csv | 1 + tests/data/v_test.csv | 1 + 20 files changed, 172 insertions(+) create mode 100644 tests/data/TestConstellationA/pos_TestConstellationA.csv create mode 100644 tests/data/TestConstellationA/shells_TestConstellationA.yaml create mode 100644 tests/data/TestConstellationA/v_TestConstellationA.csv create mode 100644 tests/data/TestConstellationAPrime/pos_TestConstellationAPrime.csv create mode 100644 tests/data/TestConstellationAPrime/shells_TestConstellationAPrime.yaml create mode 100644 tests/data/TestConstellationAPrime/v_TestConstellationAPrime.csv create mode 100644 tests/data/TestConstellationB/pos_TestConstellationB.csv create mode 100644 tests/data/TestConstellationB/shells_TestConstellationB.yaml create mode 100644 tests/data/TestConstellationB/v_TestConstellationB.csv create mode 100644 tests/data/TestConstellationB11/pos_TestConstellationB11.csv create mode 100644 tests/data/TestConstellationB11/shells_TestConstellationB11.yaml create mode 100644 tests/data/TestConstellationB11/v_TestConstellationB11.csv create mode 100644 tests/data/TestConstellationB12/pos_TestConstellationB12.csv create mode 100644 tests/data/TestConstellationB12/shells_TestConstellationB12.yaml create mode 100644 tests/data/TestConstellationB12/v_TestConstellationB12.csv create mode 100644 tests/data/TestConstellationB21/pos_TestConstellationB21.csv create mode 100644 tests/data/TestConstellationB21/shells_TestConstellationB21.yaml create mode 100644 tests/data/TestConstellationB21/v_TestConstellationB21.csv create mode 100644 tests/data/pos_test.csv create mode 100644 tests/data/v_test.csv diff --git a/tests/data/TestConstellationA/pos_TestConstellationA.csv b/tests/data/TestConstellationA/pos_TestConstellationA.csv new file mode 100644 index 00000000..95bd5837 --- /dev/null +++ b/tests/data/TestConstellationA/pos_TestConstellationA.csv @@ -0,0 +1,4 @@ +6.760824201728221851e+03,2.757629244281244496e+02,2.482980524224828685e+02 +-3.710756167224535034e+02,5.024271521476663111e+03,4.523874397588048851e+03 +-6.760824201728221851e+03,-2.757629244281238243e+02,-2.482980524224823284e+02 +3.710756167224527076e+02,-5.024271521476663111e+03,-4.523874397588048851e+03 diff --git a/tests/data/TestConstellationA/shells_TestConstellationA.yaml b/tests/data/TestConstellationA/shells_TestConstellationA.yaml new file mode 100644 index 00000000..49e337dd --- /dev/null +++ b/tests/data/TestConstellationA/shells_TestConstellationA.yaml @@ -0,0 +1,18 @@ +constellation: + name: TestConstellationA + startTime: 0 + duration: 0 + nShells: 1 + +shell1: + altitude: 400 + inclination: 42.0 + nPlanes: 1 + nSats: 4 + +special1: + offsetM: 0 + argPeriapsis: 3.141592653589793 + startingW: 0 + W_area: 360 + diff --git a/tests/data/TestConstellationA/v_TestConstellationA.csv b/tests/data/TestConstellationA/v_TestConstellationA.csv new file mode 100644 index 00000000..e7d8b92e --- /dev/null +++ b/tests/data/TestConstellationA/v_TestConstellationA.csv @@ -0,0 +1,4 @@ +-4.204865271471474042e-01,5.693282954482521419e+00,5.126254997548017833e+00 +-7.661067882461768619e+00,-3.124823868323621245e-01,-2.813604048757009091e-01 +4.204865271471464050e-01,-5.693282954482521419e+00,-5.126254997548017833e+00 +7.661067882461768619e+00,3.124823868323614584e-01,2.813604048757002984e-01 diff --git a/tests/data/TestConstellationAPrime/pos_TestConstellationAPrime.csv b/tests/data/TestConstellationAPrime/pos_TestConstellationAPrime.csv new file mode 100644 index 00000000..135631cb --- /dev/null +++ b/tests/data/TestConstellationAPrime/pos_TestConstellationAPrime.csv @@ -0,0 +1,4 @@ +6.760863201728221851e+03,2.757629244281244496e+02,2.482980524224828685e+02 +-3.711166167224535034e+02,5.024271521476663111e+03,4.523874397588048851e+03 +-6.760824201728221851e+03,-2.757629244281238243e+02,-2.482980524224823284e+02 +3.710756167224527076e+02,-5.024271521476663111e+03,-4.523874397588048851e+03 diff --git a/tests/data/TestConstellationAPrime/shells_TestConstellationAPrime.yaml b/tests/data/TestConstellationAPrime/shells_TestConstellationAPrime.yaml new file mode 100644 index 00000000..47bbcd32 --- /dev/null +++ b/tests/data/TestConstellationAPrime/shells_TestConstellationAPrime.yaml @@ -0,0 +1,18 @@ +constellation: + name: TestConstellationAPrime + startTime: 0 + duration: 0 + nShells: 1 + +shell1: + altitude: 400 + inclination: 42.0 + nPlanes: 1 + nSats: 4 + +special1: + offsetM: 0 + argPeriapsis: 3.141592653589793 + startingW: 0 + W_area: 360 + diff --git a/tests/data/TestConstellationAPrime/v_TestConstellationAPrime.csv b/tests/data/TestConstellationAPrime/v_TestConstellationAPrime.csv new file mode 100644 index 00000000..e7d8b92e --- /dev/null +++ b/tests/data/TestConstellationAPrime/v_TestConstellationAPrime.csv @@ -0,0 +1,4 @@ +-4.204865271471474042e-01,5.693282954482521419e+00,5.126254997548017833e+00 +-7.661067882461768619e+00,-3.124823868323621245e-01,-2.813604048757009091e-01 +4.204865271471464050e-01,-5.693282954482521419e+00,-5.126254997548017833e+00 +7.661067882461768619e+00,3.124823868323614584e-01,2.813604048757002984e-01 diff --git a/tests/data/TestConstellationB/pos_TestConstellationB.csv b/tests/data/TestConstellationB/pos_TestConstellationB.csv new file mode 100644 index 00000000..63d99a2c --- /dev/null +++ b/tests/data/TestConstellationB/pos_TestConstellationB.csv @@ -0,0 +1,16 @@ +6.760824201728221851e+03,2.842604141671835123e+02,2.385228086859845860e+02 +4.518234554534726158e+03,3.863173406170501949e+03,3.241587380291543468e+03 +-3.710756167224535034e+02,5.179091810638205061e+03,4.345774028139788243e+03 +-5.043014724369580108e+03,3.461168473209477270e+03,2.904265189312501207e+03 +-6.760824201728221851e+03,-2.842604141671828870e+02,-2.385228086859840460e+02 +-4.518234554534727067e+03,-3.863173406170501949e+03,-3.241587380291543468e+03 +3.710756167224527076e+02,-5.179091810638205061e+03,-4.345774028139788243e+03 +5.043014724369579199e+03,-3.461168473209478179e+03,-2.904265189312502116e+03 +4.579622172971640794e+03,4.981627105932664563e+03,2.385228086859845860e+02 +4.631981801001904273e+02,5.926550404905578034e+03,3.241587380291543468e+03 +-3.924561024607415220e+03,3.399780854772562634e+03,4.345774028139788243e+03 +-6.013365607460847968e+03,-1.118534210989826761e+03,2.904265189312501207e+03 +-4.579622172971641703e+03,-4.981627105932664563e+03,-2.385228086859840460e+02 +-4.631981801001913936e+02,-5.926550404905578034e+03,-3.241587380291543468e+03 +3.924561024607414765e+03,-3.399780854772563089e+03,-4.345774028139788243e+03 +6.013365607460847968e+03,1.118534210989825397e+03,-2.904265189312502116e+03 diff --git a/tests/data/TestConstellationB/shells_TestConstellationB.yaml b/tests/data/TestConstellationB/shells_TestConstellationB.yaml new file mode 100644 index 00000000..dc257cfe --- /dev/null +++ b/tests/data/TestConstellationB/shells_TestConstellationB.yaml @@ -0,0 +1,18 @@ +constellation: + name: TestConstellationB + startTime: 0 + duration: 500 + nShells: 1 + +shell1: + altitude: 400 + inclination: 40.0 + nPlanes: 2 + nSats: 8 + +special1: + offsetM: 0 + argPeriapsis: 3.141592653589793 + startingW: 0 + W_area: 90 + diff --git a/tests/data/TestConstellationB/v_TestConstellationB.csv b/tests/data/TestConstellationB/v_TestConstellationB.csv new file mode 100644 index 00000000..10cf4688 --- /dev/null +++ b/tests/data/TestConstellationB/v_TestConstellationB.csv @@ -0,0 +1,16 @@ +-4.204865271471474042e-01,5.868718479717115244e+00,4.924439511813917036e+00 +-5.714521925562509708e+00,3.922043501606831128e+00,3.290985255659539810e+00 +-7.661067882461768619e+00,-3.221113675274692167e-01,-2.702835296903086659e-01 +-5.119864176075853202e+00,-4.377577766158722739e+00,-3.673223889033644607e+00 +4.204865271471464050e-01,-5.868718479717115244e+00,-4.924439511813917036e+00 +5.714521925562509708e+00,-3.922043501606832461e+00,-3.290985255659540254e+00 +7.661067882461768619e+00,3.221113675274684951e-01,2.702835296903080553e-01 +5.119864176075854090e+00,4.377577766158722739e+00,3.673223889033644163e+00 +-4.447139508626105631e+00,3.852481759139448680e+00,4.924439511813917036e+00 +-6.814080760899280165e+00,-1.267473648709634304e+00,3.290985255659539810e+00 +-5.189425918543235206e+00,-5.644960183095125927e+00,-2.702835296903086659e-01 +-5.248757540350207362e-01,-6.715705601279601922e+00,-3.673223889033644607e+00 +4.447139508626104742e+00,-3.852481759139449569e+00,-4.924439511813917036e+00 +6.814080760899280165e+00,1.267473648709633860e+00,-3.290985255659540254e+00 +5.189425918543236982e+00,5.644960183095125039e+00,2.702835296903080553e-01 +5.248757540350220685e-01,6.715705601279601922e+00,3.673223889033644163e+00 diff --git a/tests/data/TestConstellationB11/pos_TestConstellationB11.csv b/tests/data/TestConstellationB11/pos_TestConstellationB11.csv new file mode 100644 index 00000000..bc0d0245 --- /dev/null +++ b/tests/data/TestConstellationB11/pos_TestConstellationB11.csv @@ -0,0 +1,2 @@ +6.760824201728221851e+03,2.842604141671835123e+02,2.385228086859845860e+02 +-6.760824201728221851e+03,-2.842604141671828870e+02,-2.385228086859840460e+02 diff --git a/tests/data/TestConstellationB11/shells_TestConstellationB11.yaml b/tests/data/TestConstellationB11/shells_TestConstellationB11.yaml new file mode 100644 index 00000000..0e7e77a8 --- /dev/null +++ b/tests/data/TestConstellationB11/shells_TestConstellationB11.yaml @@ -0,0 +1,18 @@ +constellation: + name: TestConstellationB11 + startTime: 0 + duration: 0 + nShells: 1 + +shell1: + altitude: 400 + inclination: 40.0 + nPlanes: 1 + nSats: 2 + +special1: + offsetM: 0 + argPeriapsis: 3.141592653589793 + startingW: 0 + W_area: 90 + diff --git a/tests/data/TestConstellationB11/v_TestConstellationB11.csv b/tests/data/TestConstellationB11/v_TestConstellationB11.csv new file mode 100644 index 00000000..718ec7b0 --- /dev/null +++ b/tests/data/TestConstellationB11/v_TestConstellationB11.csv @@ -0,0 +1,2 @@ +-4.204865271471474042e-01,5.868718479717115244e+00,4.924439511813917036e+00 +4.204865271471464050e-01,-5.868718479717115244e+00,-4.924439511813917036e+00 diff --git a/tests/data/TestConstellationB12/pos_TestConstellationB12.csv b/tests/data/TestConstellationB12/pos_TestConstellationB12.csv new file mode 100644 index 00000000..fa6aec8e --- /dev/null +++ b/tests/data/TestConstellationB12/pos_TestConstellationB12.csv @@ -0,0 +1,4 @@ +6.760824201728221851e+03,2.842604141671835123e+02,2.385228086859845860e+02 +-3.710756167224535034e+02,5.179091810638205061e+03,4.345774028139788243e+03 +-6.760824201728221851e+03,-2.842604141671828870e+02,-2.385228086859840460e+02 +3.710756167224527076e+02,-5.179091810638205061e+03,-4.345774028139788243e+03 diff --git a/tests/data/TestConstellationB12/shells_TestConstellationB12.yaml b/tests/data/TestConstellationB12/shells_TestConstellationB12.yaml new file mode 100644 index 00000000..90b8749b --- /dev/null +++ b/tests/data/TestConstellationB12/shells_TestConstellationB12.yaml @@ -0,0 +1,18 @@ +constellation: + name: TestConstellationB12 + startTime: 400 + duration: 0 + nShells: 1 + +shell1: + altitude: 400 + inclination: 40.0 + nPlanes: 1 + nSats: 4 + +special1: + offsetM: 0 + argPeriapsis: 3.141592653589793 + startingW: 0 + W_area: 90 + diff --git a/tests/data/TestConstellationB12/v_TestConstellationB12.csv b/tests/data/TestConstellationB12/v_TestConstellationB12.csv new file mode 100644 index 00000000..eb3f0893 --- /dev/null +++ b/tests/data/TestConstellationB12/v_TestConstellationB12.csv @@ -0,0 +1,4 @@ +-4.204865271471474042e-01,5.868718479717115244e+00,4.924439511813917036e+00 +-7.661067882461768619e+00,-3.221113675274692167e-01,-2.702835296903086659e-01 +4.204865271471464050e-01,-5.868718479717115244e+00,-4.924439511813917036e+00 +7.661067882461768619e+00,3.221113675274684951e-01,2.702835296903080553e-01 diff --git a/tests/data/TestConstellationB21/pos_TestConstellationB21.csv b/tests/data/TestConstellationB21/pos_TestConstellationB21.csv new file mode 100644 index 00000000..420c3bb2 --- /dev/null +++ b/tests/data/TestConstellationB21/pos_TestConstellationB21.csv @@ -0,0 +1 @@ +4.579622172971640794e+03,4.981627105932664563e+03,2.385228086859845860e+02 diff --git a/tests/data/TestConstellationB21/shells_TestConstellationB21.yaml b/tests/data/TestConstellationB21/shells_TestConstellationB21.yaml new file mode 100644 index 00000000..aa1cd4ac --- /dev/null +++ b/tests/data/TestConstellationB21/shells_TestConstellationB21.yaml @@ -0,0 +1,18 @@ +constellation: + name: TestConstellationB21 + startTime: 300 + duration: 0 + nShells: 1 + +shell1: + altitude: 400 + inclination: 40.0 + nPlanes: 1 + nSats: 1 + +special1: + offsetM: 0 + argPeriapsis: 3.141592653589793 + startingW: 45 + W_area: 90 + diff --git a/tests/data/TestConstellationB21/v_TestConstellationB21.csv b/tests/data/TestConstellationB21/v_TestConstellationB21.csv new file mode 100644 index 00000000..3d88caf7 --- /dev/null +++ b/tests/data/TestConstellationB21/v_TestConstellationB21.csv @@ -0,0 +1 @@ +-4.447139508626105631e+00,3.852481759139448680e+00,4.924439511813917036e+00 diff --git a/tests/data/pos_test.csv b/tests/data/pos_test.csv new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/tests/data/pos_test.csv @@ -0,0 +1 @@ + diff --git a/tests/data/v_test.csv b/tests/data/v_test.csv new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/tests/data/v_test.csv @@ -0,0 +1 @@ + From b53502d7a693eca95eeb5e18d2ca8fb2c1b0e11a Mon Sep 17 00:00:00 2001 From: albertNos Date: Thu, 23 Dec 2021 10:02:54 +0100 Subject: [PATCH 09/11] tests/data/.gitattributes --- tests/data/.gitattributes | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 tests/data/.gitattributes diff --git a/tests/data/.gitattributes b/tests/data/.gitattributes new file mode 100644 index 00000000..ee7335b6 --- /dev/null +++ b/tests/data/.gitattributes @@ -0,0 +1,5 @@ +pos_test.csv filter=lfs diff=lfs merge=lfs -text +v_test.csv filter=lfs diff=lfs merge=lfs -text +*/pos_*.csv filter=lfs diff=lfs merge=lfs -text +*/v_*.csv filter=lfs diff=lfs merge=lfs -text +*/shells_*.txt filter=lfs diff=lfs merge=lfs -text From 21c0b78260bb046f41b52cb39cef2410a5c59957 Mon Sep 17 00:00:00 2001 From: albertNos Date: Thu, 23 Dec 2021 10:39:09 +0100 Subject: [PATCH 10/11] small fix --- tests/data/.gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/data/.gitattributes b/tests/data/.gitattributes index ee7335b6..32d8cd89 100644 --- a/tests/data/.gitattributes +++ b/tests/data/.gitattributes @@ -2,4 +2,4 @@ pos_test.csv filter=lfs diff=lfs merge=lfs -text v_test.csv filter=lfs diff=lfs merge=lfs -text */pos_*.csv filter=lfs diff=lfs merge=lfs -text */v_*.csv filter=lfs diff=lfs merge=lfs -text -*/shells_*.txt filter=lfs diff=lfs merge=lfs -text +*/shells_*.yaml filter=lfs diff=lfs merge=lfs -text From 88975171bf5f633e05d55e8925d6389ca49e04eb Mon Sep 17 00:00:00 2001 From: albertNos Date: Thu, 23 Dec 2021 10:54:20 +0100 Subject: [PATCH 11/11] lfs should work now --- .../pos_TestConstellationA.csv | 7 +++---- .../shells_TestConstellationA.yaml | 21 +++---------------- .../v_TestConstellationA.csv | 7 +++---- .../pos_TestConstellationAPrime.csv | 7 +++---- .../shells_TestConstellationAPrime.yaml | 21 +++---------------- .../v_TestConstellationAPrime.csv | 7 +++---- .../pos_TestConstellationB.csv | 19 +++-------------- .../shells_TestConstellationB.yaml | 21 +++---------------- .../v_TestConstellationB.csv | 19 +++-------------- .../pos_TestConstellationB11.csv | 5 +++-- .../shells_TestConstellationB11.yaml | 21 +++---------------- .../v_TestConstellationB11.csv | 5 +++-- .../pos_TestConstellationB12.csv | 7 +++---- .../shells_TestConstellationB12.yaml | 21 +++---------------- .../v_TestConstellationB12.csv | 7 +++---- .../pos_TestConstellationB21.csv | 4 +++- .../shells_TestConstellationB21.yaml | 21 +++---------------- .../v_TestConstellationB21.csv | 4 +++- tests/data/pos_test.csv | 4 +++- tests/data/v_test.csv | 4 +++- 20 files changed, 60 insertions(+), 172 deletions(-) diff --git a/tests/data/TestConstellationA/pos_TestConstellationA.csv b/tests/data/TestConstellationA/pos_TestConstellationA.csv index 95bd5837..3898e6d2 100644 --- a/tests/data/TestConstellationA/pos_TestConstellationA.csv +++ b/tests/data/TestConstellationA/pos_TestConstellationA.csv @@ -1,4 +1,3 @@ -6.760824201728221851e+03,2.757629244281244496e+02,2.482980524224828685e+02 --3.710756167224535034e+02,5.024271521476663111e+03,4.523874397588048851e+03 --6.760824201728221851e+03,-2.757629244281238243e+02,-2.482980524224823284e+02 -3.710756167224527076e+02,-5.024271521476663111e+03,-4.523874397588048851e+03 +version https://git-lfs.github.com/spec/v1 +oid sha256:a971114bf827f98fffe72cf4fdbe4c554c07d70d70dd982fa7c4a7e896a08fdc +size 306 diff --git a/tests/data/TestConstellationA/shells_TestConstellationA.yaml b/tests/data/TestConstellationA/shells_TestConstellationA.yaml index 49e337dd..31891702 100644 --- a/tests/data/TestConstellationA/shells_TestConstellationA.yaml +++ b/tests/data/TestConstellationA/shells_TestConstellationA.yaml @@ -1,18 +1,3 @@ -constellation: - name: TestConstellationA - startTime: 0 - duration: 0 - nShells: 1 - -shell1: - altitude: 400 - inclination: 42.0 - nPlanes: 1 - nSats: 4 - -special1: - offsetM: 0 - argPeriapsis: 3.141592653589793 - startingW: 0 - W_area: 360 - +version https://git-lfs.github.com/spec/v1 +oid sha256:8995e44e546807f637630666e6d7b33e7284d6fb33916e31da485d25248e7e32 +size 241 diff --git a/tests/data/TestConstellationA/v_TestConstellationA.csv b/tests/data/TestConstellationA/v_TestConstellationA.csv index e7d8b92e..70a3a260 100644 --- a/tests/data/TestConstellationA/v_TestConstellationA.csv +++ b/tests/data/TestConstellationA/v_TestConstellationA.csv @@ -1,4 +1,3 @@ --4.204865271471474042e-01,5.693282954482521419e+00,5.126254997548017833e+00 --7.661067882461768619e+00,-3.124823868323621245e-01,-2.813604048757009091e-01 -4.204865271471464050e-01,-5.693282954482521419e+00,-5.126254997548017833e+00 -7.661067882461768619e+00,3.124823868323614584e-01,2.813604048757002984e-01 +version https://git-lfs.github.com/spec/v1 +oid sha256:99dddc6a5cc0d4ab460a33823c526c978bbd9ff502aecd313a72f0a5e35b6b6c +size 306 diff --git a/tests/data/TestConstellationAPrime/pos_TestConstellationAPrime.csv b/tests/data/TestConstellationAPrime/pos_TestConstellationAPrime.csv index 135631cb..c735b524 100644 --- a/tests/data/TestConstellationAPrime/pos_TestConstellationAPrime.csv +++ b/tests/data/TestConstellationAPrime/pos_TestConstellationAPrime.csv @@ -1,4 +1,3 @@ -6.760863201728221851e+03,2.757629244281244496e+02,2.482980524224828685e+02 --3.711166167224535034e+02,5.024271521476663111e+03,4.523874397588048851e+03 --6.760824201728221851e+03,-2.757629244281238243e+02,-2.482980524224823284e+02 -3.710756167224527076e+02,-5.024271521476663111e+03,-4.523874397588048851e+03 +version https://git-lfs.github.com/spec/v1 +oid sha256:25d57d74da6b1198c27b2cd25208b2097191cd5cc97a658c63f7874d067d18cd +size 306 diff --git a/tests/data/TestConstellationAPrime/shells_TestConstellationAPrime.yaml b/tests/data/TestConstellationAPrime/shells_TestConstellationAPrime.yaml index 47bbcd32..f70d093e 100644 --- a/tests/data/TestConstellationAPrime/shells_TestConstellationAPrime.yaml +++ b/tests/data/TestConstellationAPrime/shells_TestConstellationAPrime.yaml @@ -1,18 +1,3 @@ -constellation: - name: TestConstellationAPrime - startTime: 0 - duration: 0 - nShells: 1 - -shell1: - altitude: 400 - inclination: 42.0 - nPlanes: 1 - nSats: 4 - -special1: - offsetM: 0 - argPeriapsis: 3.141592653589793 - startingW: 0 - W_area: 360 - +version https://git-lfs.github.com/spec/v1 +oid sha256:95e8b3b8efc2c261b0cb5cca3cc2c36657e7c6652de601b2cdb6e8808698cab9 +size 246 diff --git a/tests/data/TestConstellationAPrime/v_TestConstellationAPrime.csv b/tests/data/TestConstellationAPrime/v_TestConstellationAPrime.csv index e7d8b92e..70a3a260 100644 --- a/tests/data/TestConstellationAPrime/v_TestConstellationAPrime.csv +++ b/tests/data/TestConstellationAPrime/v_TestConstellationAPrime.csv @@ -1,4 +1,3 @@ --4.204865271471474042e-01,5.693282954482521419e+00,5.126254997548017833e+00 --7.661067882461768619e+00,-3.124823868323621245e-01,-2.813604048757009091e-01 -4.204865271471464050e-01,-5.693282954482521419e+00,-5.126254997548017833e+00 -7.661067882461768619e+00,3.124823868323614584e-01,2.813604048757002984e-01 +version https://git-lfs.github.com/spec/v1 +oid sha256:99dddc6a5cc0d4ab460a33823c526c978bbd9ff502aecd313a72f0a5e35b6b6c +size 306 diff --git a/tests/data/TestConstellationB/pos_TestConstellationB.csv b/tests/data/TestConstellationB/pos_TestConstellationB.csv index 63d99a2c..6cc7bd77 100644 --- a/tests/data/TestConstellationB/pos_TestConstellationB.csv +++ b/tests/data/TestConstellationB/pos_TestConstellationB.csv @@ -1,16 +1,3 @@ -6.760824201728221851e+03,2.842604141671835123e+02,2.385228086859845860e+02 -4.518234554534726158e+03,3.863173406170501949e+03,3.241587380291543468e+03 --3.710756167224535034e+02,5.179091810638205061e+03,4.345774028139788243e+03 --5.043014724369580108e+03,3.461168473209477270e+03,2.904265189312501207e+03 --6.760824201728221851e+03,-2.842604141671828870e+02,-2.385228086859840460e+02 --4.518234554534727067e+03,-3.863173406170501949e+03,-3.241587380291543468e+03 -3.710756167224527076e+02,-5.179091810638205061e+03,-4.345774028139788243e+03 -5.043014724369579199e+03,-3.461168473209478179e+03,-2.904265189312502116e+03 -4.579622172971640794e+03,4.981627105932664563e+03,2.385228086859845860e+02 -4.631981801001904273e+02,5.926550404905578034e+03,3.241587380291543468e+03 --3.924561024607415220e+03,3.399780854772562634e+03,4.345774028139788243e+03 --6.013365607460847968e+03,-1.118534210989826761e+03,2.904265189312501207e+03 --4.579622172971641703e+03,-4.981627105932664563e+03,-2.385228086859840460e+02 --4.631981801001913936e+02,-5.926550404905578034e+03,-3.241587380291543468e+03 -3.924561024607414765e+03,-3.399780854772563089e+03,-4.345774028139788243e+03 -6.013365607460847968e+03,1.118534210989825397e+03,-2.904265189312502116e+03 +version https://git-lfs.github.com/spec/v1 +oid sha256:0ce51e848fb57fd2fc35f9a1e96d0ab5475c4df4481ed27b8b99d8019fb7e3c8 +size 1224 diff --git a/tests/data/TestConstellationB/shells_TestConstellationB.yaml b/tests/data/TestConstellationB/shells_TestConstellationB.yaml index dc257cfe..8174bc90 100644 --- a/tests/data/TestConstellationB/shells_TestConstellationB.yaml +++ b/tests/data/TestConstellationB/shells_TestConstellationB.yaml @@ -1,18 +1,3 @@ -constellation: - name: TestConstellationB - startTime: 0 - duration: 500 - nShells: 1 - -shell1: - altitude: 400 - inclination: 40.0 - nPlanes: 2 - nSats: 8 - -special1: - offsetM: 0 - argPeriapsis: 3.141592653589793 - startingW: 0 - W_area: 90 - +version https://git-lfs.github.com/spec/v1 +oid sha256:0aadc385571941fc21dd865f09aae9a288d918b8076b7ec52051bf84c3f2c37d +size 242 diff --git a/tests/data/TestConstellationB/v_TestConstellationB.csv b/tests/data/TestConstellationB/v_TestConstellationB.csv index 10cf4688..e2dc2de7 100644 --- a/tests/data/TestConstellationB/v_TestConstellationB.csv +++ b/tests/data/TestConstellationB/v_TestConstellationB.csv @@ -1,16 +1,3 @@ --4.204865271471474042e-01,5.868718479717115244e+00,4.924439511813917036e+00 --5.714521925562509708e+00,3.922043501606831128e+00,3.290985255659539810e+00 --7.661067882461768619e+00,-3.221113675274692167e-01,-2.702835296903086659e-01 --5.119864176075853202e+00,-4.377577766158722739e+00,-3.673223889033644607e+00 -4.204865271471464050e-01,-5.868718479717115244e+00,-4.924439511813917036e+00 -5.714521925562509708e+00,-3.922043501606832461e+00,-3.290985255659540254e+00 -7.661067882461768619e+00,3.221113675274684951e-01,2.702835296903080553e-01 -5.119864176075854090e+00,4.377577766158722739e+00,3.673223889033644163e+00 --4.447139508626105631e+00,3.852481759139448680e+00,4.924439511813917036e+00 --6.814080760899280165e+00,-1.267473648709634304e+00,3.290985255659539810e+00 --5.189425918543235206e+00,-5.644960183095125927e+00,-2.702835296903086659e-01 --5.248757540350207362e-01,-6.715705601279601922e+00,-3.673223889033644607e+00 -4.447139508626104742e+00,-3.852481759139449569e+00,-4.924439511813917036e+00 -6.814080760899280165e+00,1.267473648709633860e+00,-3.290985255659540254e+00 -5.189425918543236982e+00,5.644960183095125039e+00,2.702835296903080553e-01 -5.248757540350220685e-01,6.715705601279601922e+00,3.673223889033644163e+00 +version https://git-lfs.github.com/spec/v1 +oid sha256:fc641f4cba7daa6a8d2ac7dcf14f57b6acfc1d64fbea08b47d24b0b8b87e1397 +size 1224 diff --git a/tests/data/TestConstellationB11/pos_TestConstellationB11.csv b/tests/data/TestConstellationB11/pos_TestConstellationB11.csv index bc0d0245..0b41f587 100644 --- a/tests/data/TestConstellationB11/pos_TestConstellationB11.csv +++ b/tests/data/TestConstellationB11/pos_TestConstellationB11.csv @@ -1,2 +1,3 @@ -6.760824201728221851e+03,2.842604141671835123e+02,2.385228086859845860e+02 --6.760824201728221851e+03,-2.842604141671828870e+02,-2.385228086859840460e+02 +version https://git-lfs.github.com/spec/v1 +oid sha256:4cb5fcf41273859ce2f44f52c9a468deb889f6b0acf6d1b56d684adec165bd91 +size 153 diff --git a/tests/data/TestConstellationB11/shells_TestConstellationB11.yaml b/tests/data/TestConstellationB11/shells_TestConstellationB11.yaml index 0e7e77a8..7c1e7c29 100644 --- a/tests/data/TestConstellationB11/shells_TestConstellationB11.yaml +++ b/tests/data/TestConstellationB11/shells_TestConstellationB11.yaml @@ -1,18 +1,3 @@ -constellation: - name: TestConstellationB11 - startTime: 0 - duration: 0 - nShells: 1 - -shell1: - altitude: 400 - inclination: 40.0 - nPlanes: 1 - nSats: 2 - -special1: - offsetM: 0 - argPeriapsis: 3.141592653589793 - startingW: 0 - W_area: 90 - +version https://git-lfs.github.com/spec/v1 +oid sha256:99414cf6cd24185c2fd724b5e87630f89493d71ef07287ba82a7f33ff8882a14 +size 242 diff --git a/tests/data/TestConstellationB11/v_TestConstellationB11.csv b/tests/data/TestConstellationB11/v_TestConstellationB11.csv index 718ec7b0..ef01b3f2 100644 --- a/tests/data/TestConstellationB11/v_TestConstellationB11.csv +++ b/tests/data/TestConstellationB11/v_TestConstellationB11.csv @@ -1,2 +1,3 @@ --4.204865271471474042e-01,5.868718479717115244e+00,4.924439511813917036e+00 -4.204865271471464050e-01,-5.868718479717115244e+00,-4.924439511813917036e+00 +version https://git-lfs.github.com/spec/v1 +oid sha256:865c79e3a465af406593549f0a11566117be054080fc0b079616fa57ae0a391e +size 153 diff --git a/tests/data/TestConstellationB12/pos_TestConstellationB12.csv b/tests/data/TestConstellationB12/pos_TestConstellationB12.csv index fa6aec8e..4ddb906a 100644 --- a/tests/data/TestConstellationB12/pos_TestConstellationB12.csv +++ b/tests/data/TestConstellationB12/pos_TestConstellationB12.csv @@ -1,4 +1,3 @@ -6.760824201728221851e+03,2.842604141671835123e+02,2.385228086859845860e+02 --3.710756167224535034e+02,5.179091810638205061e+03,4.345774028139788243e+03 --6.760824201728221851e+03,-2.842604141671828870e+02,-2.385228086859840460e+02 -3.710756167224527076e+02,-5.179091810638205061e+03,-4.345774028139788243e+03 +version https://git-lfs.github.com/spec/v1 +oid sha256:6e88e8a7997b4d66f5a0a8422a87830cffb69c425dedcc16d2635a45b9b3cbd5 +size 306 diff --git a/tests/data/TestConstellationB12/shells_TestConstellationB12.yaml b/tests/data/TestConstellationB12/shells_TestConstellationB12.yaml index 90b8749b..c06e26b5 100644 --- a/tests/data/TestConstellationB12/shells_TestConstellationB12.yaml +++ b/tests/data/TestConstellationB12/shells_TestConstellationB12.yaml @@ -1,18 +1,3 @@ -constellation: - name: TestConstellationB12 - startTime: 400 - duration: 0 - nShells: 1 - -shell1: - altitude: 400 - inclination: 40.0 - nPlanes: 1 - nSats: 4 - -special1: - offsetM: 0 - argPeriapsis: 3.141592653589793 - startingW: 0 - W_area: 90 - +version https://git-lfs.github.com/spec/v1 +oid sha256:c6d0431bebc2a305793694afce475604dc7ff96084056b8e144585972064d310 +size 244 diff --git a/tests/data/TestConstellationB12/v_TestConstellationB12.csv b/tests/data/TestConstellationB12/v_TestConstellationB12.csv index eb3f0893..c8c66232 100644 --- a/tests/data/TestConstellationB12/v_TestConstellationB12.csv +++ b/tests/data/TestConstellationB12/v_TestConstellationB12.csv @@ -1,4 +1,3 @@ --4.204865271471474042e-01,5.868718479717115244e+00,4.924439511813917036e+00 --7.661067882461768619e+00,-3.221113675274692167e-01,-2.702835296903086659e-01 -4.204865271471464050e-01,-5.868718479717115244e+00,-4.924439511813917036e+00 -7.661067882461768619e+00,3.221113675274684951e-01,2.702835296903080553e-01 +version https://git-lfs.github.com/spec/v1 +oid sha256:3d7874243dd009ec87f1d9b9afd2c71f5c0e583029639e49f710de1f6a67e4b9 +size 306 diff --git a/tests/data/TestConstellationB21/pos_TestConstellationB21.csv b/tests/data/TestConstellationB21/pos_TestConstellationB21.csv index 420c3bb2..420c0c6f 100644 --- a/tests/data/TestConstellationB21/pos_TestConstellationB21.csv +++ b/tests/data/TestConstellationB21/pos_TestConstellationB21.csv @@ -1 +1,3 @@ -4.579622172971640794e+03,4.981627105932664563e+03,2.385228086859845860e+02 +version https://git-lfs.github.com/spec/v1 +oid sha256:46dd988032e7754a593c1d8aaf482ee1ea3f1292d0a06f9db8a73c40942dc984 +size 75 diff --git a/tests/data/TestConstellationB21/shells_TestConstellationB21.yaml b/tests/data/TestConstellationB21/shells_TestConstellationB21.yaml index aa1cd4ac..a0b1214c 100644 --- a/tests/data/TestConstellationB21/shells_TestConstellationB21.yaml +++ b/tests/data/TestConstellationB21/shells_TestConstellationB21.yaml @@ -1,18 +1,3 @@ -constellation: - name: TestConstellationB21 - startTime: 300 - duration: 0 - nShells: 1 - -shell1: - altitude: 400 - inclination: 40.0 - nPlanes: 1 - nSats: 1 - -special1: - offsetM: 0 - argPeriapsis: 3.141592653589793 - startingW: 45 - W_area: 90 - +version https://git-lfs.github.com/spec/v1 +oid sha256:0138fc17006f8cddb9182dd0db1584a43fea609bcc5133ccf274670fdaf4822e +size 245 diff --git a/tests/data/TestConstellationB21/v_TestConstellationB21.csv b/tests/data/TestConstellationB21/v_TestConstellationB21.csv index 3d88caf7..d0228545 100644 --- a/tests/data/TestConstellationB21/v_TestConstellationB21.csv +++ b/tests/data/TestConstellationB21/v_TestConstellationB21.csv @@ -1 +1,3 @@ --4.447139508626105631e+00,3.852481759139448680e+00,4.924439511813917036e+00 +version https://git-lfs.github.com/spec/v1 +oid sha256:830f599f2be3eee25f4f2fd5d353ddb7914fb4cbcb12e44bbb059d0ad9ffde7b +size 76 diff --git a/tests/data/pos_test.csv b/tests/data/pos_test.csv index 8b137891..fd481aab 100644 --- a/tests/data/pos_test.csv +++ b/tests/data/pos_test.csv @@ -1 +1,3 @@ - +version https://git-lfs.github.com/spec/v1 +oid sha256:01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b +size 1 diff --git a/tests/data/v_test.csv b/tests/data/v_test.csv index 8b137891..fd481aab 100644 --- a/tests/data/v_test.csv +++ b/tests/data/v_test.csv @@ -1 +1,3 @@ - +version https://git-lfs.github.com/spec/v1 +oid sha256:01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b +size 1