ambianic / fall-detection

Python ML library for people fall detection
Apache License 2.0
83 stars 16 forks source link

[BUG] fall detection: spinal vector unused for leaning angle calculations #8

Closed ivelin closed 3 years ago

ivelin commented 3 years ago

Describe the bug An LGTM bot warning revealed a legitimate issue in the code.

Minor issue is unused import:

Import of 'stacktrace' is not used.

A more potentially impactful issue is not using the spinal vector to calculate leaning angles relative to vertical axis and previous body positions.


spinalVectorEstimate = find_spinalLine()
--
  | The value assigned to local variable 'spinalVectorEstimate' is never used.

This may not have a significant impact on the heuristic algorithm results, but it does make the code confusing since we are introducing the concept of spinal vector and not making use of it as intended.

Expected behavior Let's simplify the code and replace redundant angle calculations for left and right side vectors with the single spinal vector estimate.

ivelin commented 3 years ago

fixed