First implementation of tank position algorithm