Improved wireless localization of mobile devices in smart indoor scenarios