The Ant Calculator

It has been shown that Ants measure distance by counting their footsteps. In combination with directional information from the sun they are able to navigate. For example, ants will ‘know’ that from their food to the nest is 150 steps northwest.

In the desert, ground distance between two fixed locations does not remain constant. 
This is due to wind constantly reshaping the sand dunes. It is, therefore, important for desert ants to account for changes in topography. 
Wohlgemuth (et al, 2001) demonstrate that desert ants are able adjust their distance walked in accordance with changes in vertical topology (diagram). This means that desert ants are effectively approximating the cosine function as part of their navigation.

Given this information I wondered if it would be possible to make a machine that used desert ants to calculate inputed cosine values.