It can even tell others on which floor of a building you are located
It's the Broadcom 4752 chip
It takes signals from global navigation satellites, cell phone towers, and Wi-Fi hot spots, coupled with input from gyroscopes, accelerometers, step counters, and altimeters
The company calls abilities like this "ubiquitous navigation," and the idea is that it will enable a new kind of e-commerce predicated on the fact that shopkeepers will know the moment you walk by their front door, or when you are looking at a particular product, and can offer you coupons at that instant."
Link to Original Source