L D[AR2P#0.0]
Lifetime Supporting Member
The diagram shows every possibility. For example when the ball starts in the middle it may somehow end up in the goal without going through the field sensor - this would still be a goal but you can't show speed.
Specifically:
You can only arrive in state 3 if the ball has gone from F1 to G1 and stays there for a time. From here you can calculate the speed as you store the times when F1 and G2 are activated. You also increment the goal count.
You can only arrive in state 5 if the ball is in the centre of the pitch but then arrives in the goal. You increment the goal count but you cannot show a speed.
etc. etc.
Specifically:
You can only arrive in state 3 if the ball has gone from F1 to G1 and stays there for a time. From here you can calculate the speed as you store the times when F1 and G2 are activated. You also increment the goal count.
You can only arrive in state 5 if the ball is in the centre of the pitch but then arrives in the goal. You increment the goal count but you cannot show a speed.
etc. etc.