Get Activity distance and direction from Motion Sensor?

There are a couple of systems available to do that.

If you want to do one based on the person carrying the phone around with them, probably the least expensive is the estimote location I beacons. These are used by stores and sporting arenas. They work really well, but they are based on the person carrying the phone with them everywhere.

https://estimote.com

Xandem has a patented system that tracks people within a building and doesn’t require them to carry something with them. It’s very interesting technology, although I have concerns that if deployed in a home it would interfere with some of the home automation frequencies used for the devices themselves. But it might be interesting to look at.

Other than those two, I think most of the work being done for homes at the present time is based on cameras, including cameras that have facial recognition to track specific people. But then you run into other privacy issues.