Skip to content

Commit

Permalink
Merge pull request #34 from mchawa/fix_rot_drag_quadx
Browse files Browse the repository at this point in the history
Fix rot drag quadx
  • Loading branch information
jjshoots committed Apr 30, 2024
2 parents a1e3084 + 907b4fc commit cac8bd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PyFlyt/core/drones/quadx.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def update_physics(self):
self.motors.physics_update(self.pwm)

# simulate rotational damping
drag_pqr = -self.drag_coef_pqr * (np.array(self.state[0]) ** 2)
drag_pqr = -np.sign(self.state[0]) * self.drag_coef_pqr * (np.array(self.state[0]) ** 2)

# warning, the physics is funky for bounces
if len(self.p.getContactPoints()) == 0:
Expand Down

0 comments on commit cac8bd9

Please sign in to comment.