Spaces:
Sleeping
Sleeping
File size: 430 Bytes
3af5cba |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
def decide_lbw(analysis_data):
trajectory = analysis_data["trajectory"]
if not trajectory or len(trajectory) < 2:
return "Not Out (Insufficient data)"
# Simplified logic: check trajectory alignment
start_x = trajectory[0][0]
end_x = trajectory[-1][0]
if abs(end_x - start_x) < 30:
return "Out (Straight trajectory hitting stumps)"
else:
return "Not Out (Ball missing stumps)"
|