Skip to content

Commit

Permalink
Merge pull request #388 from ut-issl/hotfix/fix-relative-info-log-header
Browse files Browse the repository at this point in the history
[Hotfix] Fix log header for relative information
  • Loading branch information
200km authored Apr 13, 2023
2 parents e1aa993 + fdf4ef3 commit da89310
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_policy(SET CMP0048 NEW)
project(S2E
LANGUAGES CXX
DESCRIPTION "S2E: Spacecraft Simulation Environment"
VERSION 6.0.1
VERSION 6.0.2
)

cmake_minimum_required(VERSION 3.13)
Expand Down
14 changes: 8 additions & 6 deletions src/simulation/multiple_spacecraft/relative_information.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,29 @@ std::string RelativeInformation::GetLogHeader() const {
std::string str_tmp = "";
for (size_t target_spacecraft_id = 0; target_spacecraft_id < dynamics_database_.size(); target_spacecraft_id++) {
for (size_t reference_spacecraft_id = 0; reference_spacecraft_id < target_spacecraft_id; reference_spacecraft_id++) {
str_tmp += WriteVector("sat" + std::to_string(target_spacecraft_id) + " pos from sat" + std::to_string(reference_spacecraft_id), "i", "m", 3);
str_tmp += WriteVector(
"satellite" + std::to_string(target_spacecraft_id) + "_position_from_satellite" + std::to_string(reference_spacecraft_id), "i", "m", 3);
}
}

for (size_t target_spacecraft_id = 0; target_spacecraft_id < dynamics_database_.size(); target_spacecraft_id++) {
for (size_t reference_spacecraft_id = 0; reference_spacecraft_id < target_spacecraft_id; reference_spacecraft_id++) {
str_tmp +=
WriteVector("sat" + std::to_string(target_spacecraft_id) + " velocity from sat" + std::to_string(reference_spacecraft_id), "i", "m/s", 3);
str_tmp += WriteVector(
"satellite" + std::to_string(target_spacecraft_id) + "_velocity_from_satellite" + std::to_string(reference_spacecraft_id), "i", "m/s", 3);
}
}

for (size_t target_spacecraft_id = 0; target_spacecraft_id < dynamics_database_.size(); target_spacecraft_id++) {
for (size_t reference_spacecraft_id = 0; reference_spacecraft_id < target_spacecraft_id; reference_spacecraft_id++) {
str_tmp += WriteVector("sat" + std::to_string(target_spacecraft_id) + " pos from sat" + std::to_string(reference_spacecraft_id), "rtn", "m", 3);
str_tmp += WriteVector(
"satellite" + std::to_string(target_spacecraft_id) + "_position_from_satellite" + std::to_string(reference_spacecraft_id), "rtn", "m", 3);
}
}

for (size_t target_spacecraft_id = 0; target_spacecraft_id < dynamics_database_.size(); target_spacecraft_id++) {
for (size_t reference_spacecraft_id = 0; reference_spacecraft_id < target_spacecraft_id; reference_spacecraft_id++) {
str_tmp +=
WriteVector("sat" + std::to_string(target_spacecraft_id) + " velocity from sat" + std::to_string(reference_spacecraft_id), "rtn", "m/s", 3);
str_tmp += WriteVector(
"satellite" + std::to_string(target_spacecraft_id) + "_velocity_from_satellite" + std::to_string(reference_spacecraft_id), "rtn", "m/s", 3);
}
}

Expand Down

0 comments on commit da89310

Please sign in to comment.