Text this: Indoor positioning system for wireless sensor networks based on two-stage fuzzy inference