Patent ID: 8775116

Claim:
A computer-implemented method for determining the direction of a moving object across a sensor having a plurality of inputs, the method comprising the steps of: a. assigning an initial value to a direction variable; b. monitoring state changes of the inputs as the moving object passes across the sensor; c. upon detection of a state change of a particular input from a lowest state to a higher state, comparing the magnitude of the state changes in the order in which a forward-moving object would cause inputs to switch to a particular state; d. for each comparison, incrementing the value of the direction variable by a fixed amount to indicate a forward-moving object, and decrementing the value of the direction variable by the fixed amount to indicate a reverse-moving object; e. monitoring the order of state changes for all inputs until all inputs return to their lowest state and thereby indicating passage of the moving object; and f. assigning a direction of movement to the moving object on the basis of the final value of the direction variable after the object has moved past the sensor.