Skip to content

Commit

Permalink
Merge pull request #455 from ut-issl/hotfix/fix-warning-showing-in-or…
Browse files Browse the repository at this point in the history
…bit-setting

[hotfix] Fix warning message in orbit setting
  • Loading branch information
200km authored Jul 18, 2023
2 parents c74a458 + 7f7b3a6 commit 5cb727e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/dynamics/orbit/initialize_orbit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,7 @@ libra::Vector<6> InitializePosVel(std::string initialize_file, double current_ti
kepler_orbit.CalcOrbit(current_time_jd);
position_i_m = kepler_orbit.GetPosition_i_m();
velocity_i_m_s = kepler_orbit.GetVelocity_i_m_s();
} else if (initialize_mode == OrbitInitializeMode::kInertialPositionAndVelocity) {
conf.ReadVector<3>(section_, "initial_position_i_m", position_i_m);
conf.ReadVector<3>(section_, "initial_velocity_i_m_s", velocity_i_m_s);
} else {
std::cerr << "WARNINGS: orbit initialize mode is not defined!" << std::endl;
std::cerr << "The orbit is automatically initialized as default mode" << std::endl;

conf.ReadVector<3>(section_, "initial_position_i_m", position_i_m);
conf.ReadVector<3>(section_, "initial_velocity_i_m_s", velocity_i_m_s);
}
Expand Down
2 changes: 2 additions & 0 deletions src/dynamics/orbit/orbit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ OrbitInitializeMode SetOrbitInitializeMode(const std::string initialize_mode) {
} else if (initialize_mode == "ORBITAL_ELEMENTS") {
return OrbitInitializeMode::kOrbitalElements;
} else {
std::cerr << "WARNINGS: orbit initialize mode is not defined!" << std::endl;
std::cerr << "The orbit is automatically initialized as default mode" << std::endl;
return OrbitInitializeMode::kDefault;
}
}
Expand Down

0 comments on commit 5cb727e

Please sign in to comment.