Spaces:
Sleeping
Sleeping
| 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)" | |