|
|
@@ -83,8 +83,8 @@ def cal_jump(result):
|
|
|
float(result_ig[min_wrist_index]["ankle_left_angle"]), 90) * 10), 2)
|
|
|
|
|
|
re["1"] = result_ig[min_wrist_index]
|
|
|
- re["1"]["first_score"] = round(first_score, 2)
|
|
|
- re["1"]["first_score_index"] = min_wrist_index
|
|
|
+ re["1"]["score"] = round(first_score, 2)
|
|
|
+ re["1"]["index"] = min_wrist_index
|
|
|
re["1"]["is_prepared"] = is_prepared
|
|
|
# second socre
|
|
|
result_ig = is_zero(result_ig, min_hip_angle_index)
|
|
|
@@ -96,8 +96,8 @@ def cal_jump(result):
|
|
|
cal_ratio(float(result_ig[min_hip_angle_index][
|
|
|
"ankle_left_angle"]), 85) * 10), 2)
|
|
|
re["2"] = result_ig[min_hip_angle_index]
|
|
|
- re["2"]["second_score"] = round(second_score, 2)
|
|
|
- re["2"]["second_score_index"] = min_hip_angle_index
|
|
|
+ re["2"]["score"] = round(second_score, 2)
|
|
|
+ re["2"]["index"] = min_hip_angle_index
|
|
|
# third score
|
|
|
max_hip_angle = float(result[min_hip_angle_index]["knee_right_angle"])
|
|
|
max_hip_index = "1"
|
|
|
@@ -124,8 +124,8 @@ def cal_jump(result):
|
|
|
result_ig[max_hip_index]["ankle_left_angle"], 165) * 20
|
|
|
|
|
|
re["3"] = result_ig[max_hip_index]
|
|
|
- re["3"]["third_score"] = round(third_score, 2)
|
|
|
- re["3"]["third_score_index"] = max_hip_index
|
|
|
+ re["3"]["score"] = round(third_score, 2)
|
|
|
+ re["3"]["index"] = max_hip_index
|
|
|
# forth score
|
|
|
result_ig = is_zero(result_ig, highest_ankle_index)
|
|
|
forth_score = cal_ratio(result_ig[highest_ankle_index]["hip_right_angle"], 180) * 25 + cal_ratio(
|
|
|
@@ -134,8 +134,8 @@ def cal_jump(result):
|
|
|
result_ig[highest_ankle_index]["knee_left_angle"], 55) * 25
|
|
|
|
|
|
re["4"] = result_ig[highest_ankle_index]
|
|
|
- re["4"]["forth_score"] = round(forth_score, 2)
|
|
|
- re["4"]["forth_score_index"] = highest_ankle_index
|
|
|
+ re["4"]["score"] = round(forth_score, 2)
|
|
|
+ re["4"]["index"] = highest_ankle_index
|
|
|
# fifth score
|
|
|
lowest_ankle_height = float(result[reland_index]["leg_heigh"])
|
|
|
lowest_ankle_index = "1"
|
|
|
@@ -158,8 +158,8 @@ def cal_jump(result):
|
|
|
result_ig[lowest_ankle_index]["ankle_left_angle"], 90) * 10
|
|
|
|
|
|
re["5"] = result_ig[lowest_ankle_index]
|
|
|
- re["5"]["fifth_score"] = round(fifth_score, 2)
|
|
|
- re["5"]["fifth_score_index"] = lowest_ankle_index
|
|
|
+ re["5"]["score"] = round(fifth_score, 2)
|
|
|
+ re["5"]["index"] = lowest_ankle_index
|
|
|
if is_prepared:
|
|
|
re["5"]["total_score"] = round(
|
|
|
0.1 * first_score + 0.2 * second_score + 0.3 * third_score + 0.3 * forth_score + 0.1 * fifth_score, 2)
|