Skip to content

Commit 4896e3a

Browse files
Copilotdfeen87
andcommitted
Move MAX_VELOCITY_M_S constant to class scope
Co-authored-by: dfeen87 <158860247+dfeen87@users.noreply.github.com>
1 parent b8c5737 commit 4896e3a

2 files changed

Lines changed: 1 addition & 1 deletion

File tree

include/PropulsionPhysicsEngine.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class PropulsionPhysicsEngine {
1010
static constexpr float MAX_THRUST_kN = 2500.0f;
1111
static constexpr float MIN_MASS_KG = 100.0f;
1212
static constexpr float MIN_VELOCITY_M_S = -20000.0f;
13+
static constexpr float MAX_VELOCITY_M_S = 20000.0f; // ~72,000 km/h
1314
static constexpr uint32_t PHYSICS_DT_MS = 10;
1415

1516
void init();

src/physics/propulsion_physics_engine.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ bool PropulsionPhysicsEngine::is_state_physically_plausible(
170170
return false;
171171

172172
// Velocity sanity check (magnitude per component)
173-
constexpr float MAX_VELOCITY_M_S = 20000.0f; // ~72,000 km/h
174173
if (std::abs(state.velocity_m_s[0]) > MAX_VELOCITY_M_S ||
175174
std::abs(state.velocity_m_s[1]) > MAX_VELOCITY_M_S ||
176175
std::abs(state.velocity_m_s[2]) > MAX_VELOCITY_M_S)

0 commit comments

Comments
 (0)