A system for tracking entry to and exit from a confined space, the system comprising: a portable radio beacon placed proximate to but outside the confined space, and configured to transmit a first radio signal with a portable radio beacon identifier that is associated with the confined space; a mobile device configured to receive the first radio signal, measure a first real-time value of a first measure of received signal strength or quality from the portable radio beacon, and transmit a second radio signal with the portable radio beacon identifier and the first real-time value; and a base station configured to receive the second radio signal, measure a second real-time value of a second measure of received signal strength or quality from the mobile device, the second measure of received signal strength or quality being the same as or different from the first measure of received signal strength or quality, and transmit data including the portable radio beacon identifier, and real-time values including the first real-time value and the second real-time value, the base station being configured to transmit the data to cause a computer in receipt of the data to determine, from the portable radio beacon identifier, proximity of the mobile device to the confined space, and wherein the real-time values are described by a real-time value vector, and the base station is configured to transmit the data to cause the computer in receipt of the data to perform a similarity match between the real-time value vector and a database of feature vectors that describe corresponding values of the mobile device outside and inside the confined space, the computer thereby caused to determine whether the mobile device is outside or inside the confined space from the real-time values. a portable radio beacon placed proximate to but outside the confined space, and configured to transmit a first radio signal with a portable radio beacon identifier that is associated with the confined space; a mobile device configured to receive the first radio signal, measure a first real-time value of a first measure of received signal strength or quality from the portable radio beacon, and transmit a second radio signal with the portable radio beacon identifier and the first real-time value; and a base station configured to receive the second radio signal, measure a second real-time value of a second measure of received signal strength or quality from the mobile device, the second measure of received signal strength or quality being the same as or different from the first measure of received signal strength or quality, and transmit data including the portable radio beacon identifier, and real-time values including the first real-time value and the second real-time value, the base station being configured to transmit the data to cause a computer in receipt of the data to determine, from the portable radio beacon identifier, proximity of the mobile device to the confined space, and wherein the real-time values are described by a real-time value vector, and the base station is configured to transmit the data to cause the computer in receipt of the data to perform a similarity match between the real-time value vector and a database of feature vectors that describe corresponding values of the mobile device outside and inside the confined space, the computer thereby caused to determine whether the mobile device is outside or inside the confined space from the real-time values.