treeandsea / DroneController

A service for controlling quadrocopters with various inputs.
GNU General Public License v3.0
2 stars 0 forks source link

Negative square roots #64

Closed Segelzwerg closed 4 years ago

Segelzwerg commented 4 years ago

Describe the bug I's possible that the sqrt() method gets negative input which is not allowed here:

  File "/home/marcel/PycharmProjects/DroneController/drone_controller/input_layer/request_handler.py", line 80, in keyboard_input
    expected_state = state_mapper.keyboard(previous_future_state, user_input)
  File "/home/marcel/PycharmProjects/DroneController/drone_controller/input_layer/drone_state_mapper.py", line 32, in keyboard
    'Acceleration'], rotation_normalized)
  File "/home/marcel/PycharmProjects/DroneController/drone_controller/input_layer/drone_state_mapper.py", line 67, in acceleration
    math.pow(acceleration[1], 2)))
ValueError: math domain error
github-actions[bot] commented 4 years ago

Stale issue message