This idea might be patented, so it might not be suitable for a commercial project, but you can actually measure the position and orientation of one electronic device relative to another, with reasonable accuracy, using magnetic fields. This is how Polhemus and Ascension trackers work. They are used in VR motion tracking, and in surgery for tracking the position of surgical instruments during operations.
The basic concept is to have one set of coils transmitting, and another receiving. The transmitter coils emit audio frequency alternating magnetic fields, and the receiver coils then measure the amplitude of the fields in the three receiver coils.
There is some code available online for doing these calculations. You might also take a look at the guy's project page: Open source electromagnetic trackers using OpenIGTLink.
This may not be quite the system you're looking for, as it's fairly complex, and is giving you much more info than you wanted. However, a simpler algorithm could be used which just gave you distance.
A company called Sixense make a gaming controller with a 6DOF sensor in it. I don't know how easy it would be to integrate this technology into your project though.
Update:
Now that I know what your application is, I have been thinking of a very similar application. My suggestion would be this:
Use the three orthogonal coils approach. Both the mother and child have a set of coils. The child would be the transmitter. Every few seconds, the child module would transmit an acoustic frequency magnetic field on each coil in turn. The mother module would measure the amplitude of the voltage induced in its coils. If the amplitude was too low, or if no signal was heard for more than a few seconds, then the alarm sounds.
Depending on the distances involved, sensing / timing precision available at master transceiver, response speed at slave transceiver, and computational power available on the master device, Time of Flight mechanisms may be usable for distance estimation.
ToF measurement involves transmitting an identifiable, unique bitstream from the master transceiver, echoing it back either passively or actively from the slave transceiver, and measuring either the time taken for the round trip, or for shorter distances, phase differences between outgoing and incoming signals.
A useful paper that details this approach is this one by Steven Lanzisera et al, UC Berkley, June 2006.
It is noteworthy that ToF mechanisms are far more reliable than any signal strength measurement mechanism, because the impact of environmental conditions on the speed of light (or, to be precise, the speed in air of the RF frequency chosen) is marginal compared to the impact of environmental conditions on signal strength.
A point of key significance is that this sensing mechanism is severely impacted by reflection paths for the radio signal, which result in multiple longer round-trip radio paths, and thus multiple invalid distance values for the one minimal-path value. In other words, such ranging mechanisms provide poor precision indoors, compared to outdoor.
Also, the presence of (in effect) a long conductive path that would work as a sympathetic antenna would reduce the perceived time-of-flight, thus generating a shorter detected distance than in reality. For instance, measuring ToF while both transceivers are close to a long metal pipeline would significantly invalidate results.
Can RF ToF ranging be done with typical DIY electronics? The paper referenced above shows that it is feasible. That is not to say that it is simple, or that it is computationally feasible using a low-cost microcontroller development board such as used by hobbyists.
Best Answer
I have been envolved with the design of commercial systems that were either for the purpose of outright reporting a tag's position, or it needed to know that as part of a larger scheme. Among these systems there was use of IR, RF, and ultrasound. I can tell you that none of them solves the problem "nicely".
RF can be used to find location to a reasonable resolution based on triangulating with signal strength. However, various things mess up the received signal strength. If you go with RF, use a low frequency compared to things like WiFi and many other RF systems. We used 434 MHz, which is one of the ISM frequencies. On that band it is permissible to send a short message of a limited power once every 10 seconds unless the user deliberately initiates some action. Higher frequencies get diffracted and obstructed more in a indoor enviroment. Then there are issues of varying received signal strength due to polarization. There are ways to deal with that, but that would be a whole discourse on its own.
You might be tempted to try to find location by measuring time of arrival - at least until you do the math. At only a nanosecond per foot, the multiple receivers have to be very accurately synchronized. Even more difficult, they have to be able to determine some common event in the transmission to the resolution of a single carrier cycle, but of course the bandwidth limitations will only allow small changes between adjacent carrier cycles. Basically, if you have to ask here, RF time of arrival is way over your head and probably your budget.
IR does basically what you want, except for the fact that it is easily blocked by your body and clothes. It's not going to work in a pocket. It can work clipped to the shirt, but not if it gets covered by a lapel or a sweater or something. IR will generally bounce around a room nicely, but not much power makes it thru the relatively small doorway. If you can deal with the occlusion problems, it is a pretty good way to localize a tag within a room, since walls are opaque to IR.
Ultrasound also won't go thru walls, but bounces around a room less well. It can go thru a thin layer of clothing sometimes and sometimes not. There is also a lot more ambient ultrasound noise than RF or IR. Even if the tag is worn on the chest and is not covered and the transmitter is facing out (it's real easy to have a tag flip transmitter side to the chest), there is still a reasonable chance of a message not getting thru. You can do useful time of arrival triangulation with ultrasound since it is so slow (takes about 3 ms/m), but that also means the data rate is very slow. If these tags can emit a single ping, then you don't care about data rate. If you need to identify multiple tags, then you have to send some sort of information with each message. We ended up encoding information in the timing between short bursts. But, keep in mind that there is a inherent lower limit on time between bursts. You can't send a new one until the last one is done echoing around the environment else receivers will get confused. In practise, you need to wait for about 10 meters of propagation for things to die down between bursts. The customer may have filed for a patent on this, I'm not sure.
In any case, you have to consider the channel from tag to receiver as being error prone. If you attempt to send any data at all, it had better include a checksum. We actually ran into trouble with a early RF system that used only 8 bits of checksum per packet (I didn't design that packet format). There was enough bad stuff getting interpreted as good data to cause field problems. The newer packet format (which I did design) had a 20 bit CRC checksum, and that basically took care of the problem.