# NXT-Spy – Some distance / height calculation

In order to create the environment in which the robot will work, we needed to know how high the robot could see based on its distance from a wall.
To do so, I did 5 measurements from 5 different distances of a wall and concluded the related linear equation.
Note: because I didn’t have a ruler at the time of the experiment (nor any of my flatmate!), I worked with objects with standard dimensions (a credit card and A4 sheets).

 Distance from the wall (cm) Visible height on the wall (cm) 29.7 16.35 59.4 24.302 89.1 34.24 118.8 43.8 148.5 51.36

So the approximate equation is : y = 0.3014x + 7.155 where y is the height on the wall and x the distance between the robot and the wall

#### Supervisor’s comment:

Cloth to cover base board and card for edges was obtained, which together with corner supports made an environment for the robot to operated within.  The environment was white so as to aid the detection of the coloured balls.

 29.7 16.35 59.4 24.302 89.1 34.24 118.8 43.8 148.5 51.36