An apparatus is provided for containing an animal in a defined area. The
apparatus comprises first and second communicating units; one operatively
associated with the animal, and the other positioned to locate the area.
At least one of the units is adapted to transmit a signal, and at least
one of the units is adapted to receive the signal. A circuit is adapted
to measure the transmission time or change in transmission time of the
signal and calculate the distance between the first and second units. At
least one of the first and second units is configured to emit an output
to contain the animal in the area when the transmission time corresponds
to the animal leaving the area.