## 1 Introduction  
Internet of Things (IoT) and Industrial Internet of Things (IIoT) applications typically consume data generated by devices that have a particular spatio-temporal context. To increase its applicability, data generated by the IoT devices need to be time-stamped (time context) and in some application cases, it also needs to be spatially contextualized. If on the one hand, the addition of time context to data (generating time-stamped series data) has no relevant additional cost, on the other hand, the addition of location context to the time-series data has some known associated costs that may be related to: (1) operational cost (infrastructure-dependent); (2) autonomy (energy consumption); (3) size (equipment, batteries, antennas); (4) price (tag/communications technology); and (5) accuracy level [1]. Moreover, location data are of extreme importance in business intelligence, with direct applications in traceability, logistics, manufacturing, Industry 4.0, among others [2, 3, 4]. Moreover, IoT technologies provide a promising opportunity to build powerful and effective industrial systems and applications [5]. IoT is built by adding communication and computation ability to devices. Many industries owners do not agree with the entrance of IoT to the industries but with the addition of communication and computation ability to different devices, we must know that IoT is already a part of our industry and life. IoT has impacts on almost all aspects of our life, for instance, in electrical power grids, oil and natural gas distribution, transportation systems, healthcare devices, household appliances, and many more. Although there are many IoT application domains, we will address four of the main relevant ambient intelligence throughout this article, namely smart healthcare, smart transportation, smart cities, and smart manufacturing. Smart healthcare and rescue systems have been improved by integrating information and communication systems into healthcare systems [6]. Smart healthcare enables Ambient Assisted Living (AAL) technology by adopting different sensors for health monitoring. The authors in [7] aim to advance the state of the art in evaluating and comparing AAL platforms and architectures by organizing an annual international competition. An important point about smart healthcare is that it needs a low-energy-consumption communication system and fast localization methods for the person(s) involved in the accident or emergency. IoT applications in smart transportation are mainly focused on parking systems, traffic, streetlights, congestion monitoring, and real-time public transportation [8]. Sensors in smart transportation (for example smart streetlights, magnetometers, and installed sensors in bikes and buses) provide the required information for effective system management. Smart transportation systems need long-range and low energy consumption communication systems and practical tracking methods. Smart cities benefit from provided information by massive densities sensors and actuators [9] to improve the quality of life, transport, traffic management, and interaction with the government. These sensors and actuators need communication technologies. The adopted communication technologies should provide communication with very low energy consumption over long distances. On the other hand, a smart city needs practical localization and tracking methods that lead to the effective use of sensor data. This can be useful to provide efficient services for IoT end nodes and efficient system management. Smart manufacturing is applied in industrial automation processes to improve monitoring and control, as well as, to increase the production efficiency in different industrial sectors (e.g., harbors, factories, etc.) [10]. As previously mentioned, long-range, low-power, and low-cost communication systems are essential in all categories of IoT-based systems. Global Navigation Satellite Systems (GNSS) are the most commonly used methods for outdoor localization.