Figure B-2 shows the model used for the development of the equation for the distance, d, as it applies to runner of the stair. The first step in determining d is to find the point of intersection between the stair runner linear equation and the line of action of the sensor, (xo, yo). As the y-axis component of this point is constrained to be at yo, xo can easily be found by solving the equation of the line. Using this as the point of origin, the distance, a, can be found to the point (x,y), which corresponds to the current location of the sensor. This distance is given as: a = (xo x) + (yo y) (B-l) Now that the distance, a, has been acquired, the perpendicular distance, f, can be found by the equation: f = a sinf (B-2) Through the similar triangles concept, the angle, P, is shown on the two locations of Figure B-2. The angle, y, is the user-defined angle of the infrared sensor. Therefore, the intermediate angle, r, may be found, which then leads to the angle, d, by the equation: 0 = 90 7 P (B-3) The distance, d, is now simply: Cd O (B-4) Figure B-3 shows the model used for the development of the equation for the distance, d, as it applies to riser of the stair. Again, the first step is to find the point of intersection, (xo, yo), between the stair riser linear equation and the line of action of the sensor. Again, as the y-axis value is constrained to be yo, xo can be found by solving the