Skip to content

Commit 1d33bb1

Browse files
authored
Merge pull request #29 from ctu-mrs/fluid_resistance_fix
fix fluid resistance plugin drag force formula
2 parents cebd7c8 + a191d9b commit 1d33bb1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/physics_plugins/fluid_resistance_plugin.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,9 @@ void FluidResistancePlugin::ApplyResistance() {
252252
math::Vector3 force, torque;
253253
#endif
254254

255-
force.X(-1.0 * (res_x * model_mass) * now_lin_vel.X());
256-
force.Y(-1.0 * (res_y * model_mass) * now_lin_vel.Y());
257-
force.Z(-1.0 * (res_z * model_mass) * now_lin_vel.Z());
255+
force.X(-1.0 * res_x * now_lin_vel.X());
256+
force.Y(-1.0 * res_y * now_lin_vel.Y());
257+
force.Z(-1.0 * res_z * now_lin_vel.Z());
258258

259259
// Applying force to uav
260260
link_to_apply_resistance->AddRelativeForce(force);

0 commit comments

Comments
 (0)