Skip to content

Commit

Permalink
Minor bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Cowan committed Nov 8, 2024
1 parent 73eb855 commit f39fd81
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/kep3/leg/sf_checks.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// These checks are used for the low- and high-fidelity legs (in sims_flanagan.cpp and sims_flanagan_hf.cpp)

void _check_tof(double tof);
void _check_throttles(const std::vector<double> &throttles, unsigned nseg);
void _check_throttles(const std::vector<double> &throttles);
void _check_max_thrust(double max_thrust);
void _check_isp(double isp);
void _check_mu(double mu);
Expand Down
3 changes: 1 addition & 2 deletions src/leg/sims_flanagan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ void sims_flanagan::set_ms(double mass)
}
void sims_flanagan::set_throttles(const std::vector<double> &throttles)
{
auto nseg = static_cast<unsigned>(throttles.size()) / 3u;
_check_throttles(throttles, nseg);
_check_throttles(throttles);
m_throttles = std::move(throttles);
m_nseg = static_cast<unsigned>(m_throttles.size()) / 3u;
m_nseg_fwd = static_cast<unsigned>(static_cast<double>(m_nseg) * m_cut);
Expand Down
3 changes: 1 addition & 2 deletions src/leg/sims_flanagan_hf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,7 @@ void sims_flanagan_hf::set_ms(double mass)
}
void sims_flanagan_hf::set_throttles(const std::vector<double> &throttles)
{
auto nseg = static_cast<unsigned>(throttles.size()) / 3u;
_check_throttles(throttles, nseg);
_check_throttles(throttles);
m_throttles = std::move(throttles);
m_nseg = static_cast<unsigned>(m_throttles.size()) / 3u;
m_nseg_fwd = static_cast<unsigned>(static_cast<double>(m_nseg) * m_cut);
Expand Down

0 comments on commit f39fd81

Please sign in to comment.