you need to use euclidean distances to calculate the distance from wall, inverse cosine and sine formulas to calculate wall distance at different angles