<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Combined BLE-GNSS Positioning System for Intelligent Guidance and Activity Monitoring of the Visitors to an Archaeological Site.</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Fernando J. Álvarez</string-name>
          <email>fer@unex.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Fernando J. Aranda</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Felipe Parralejo</string-name>
          <email>felipe@unex.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Teodoro Aguilera</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jorge Morera</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Sensory Systems Research Group, Universidad de Extremadura</institution>
          ,
          <addr-line>06006 Badajoz</addr-line>
          ,
          <country country="ES">Spain</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Location-Based Services (LBS) provided by mobile phones have become an instrument with great potential in cultural environments such as museums or archaeological sites. This paper presents the preliminary results obtained with a real system deployed in the archaeological site of Mértola (Portugal) that, in addition to providing visitors with an intelligent guide service, allows the managers of the environment to obtain information about the behavior of these visitors. The system is based on symbolic positioning using Bluetooth low energy beacons and GNSS positioning data obtained from visitors' cell phones. A specific application for Android devices has been developed to conduct BLE signal detection and establish a bidirectional communication with a central server.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Location-Based Services (LBS)</kwd>
        <kwd>Symbolic Positioning</kwd>
        <kwd>Bluetooth Low Energy (BLE)</kwd>
        <kwd>Activity Monitoring</kwd>
        <kwd>1</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Location-Based Services (LBS) constitute the main reason that has fostered an intense research
activity in the field of Local Positioning Systems (LPS). They can be generally defined as
information services accessible with mobile devices through the mobile network and utilizing the
ability to make use of the mobile device location [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. These services result from the intersection
of three technologies, namely, New Information and Communication Technologies (NICTS), the
Internet, and Geographic Information Systems (GIS) with spatial databases [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Although LBS
share with GIS some common features, such as the handling of data with positional reference and
spatial analysis functions, they have different origins and different target user groups, since the
former are developed as limited services for large non-professional user groups and must deal
with the typical restrictions of the mobile computing environment, like low computational power,
small displays or limited battery run time. There is a broad range of different LBS, which can be
categorized into a variety of application fields, such as navigation (indoor routing, car park
guidance), Emergency (emergency calls, automotive assistance), Advertising (ban-ners, alerts),
Billing (road tolling, location sensitive billing), Management (facilities, fleet scheduling), Games
(mobiles games, geocatching), Tracking (people/vehicle tracking, product tracking) and
Information (shopping guides, tourist guides), among others [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>
        The work presented here falls into the last of these categories, and it is a consequence of an
attempt to transfer the technological knowledge acquired by our research group in the field of
LPS to a particular application: the development of a smartguide for archaeological sites in the
Spanish region of Extremadura and the Portuguese region of the Alentejo (The ECLIMUS project
[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]). This smartguide, intended to replace the popular audio guides should notably enhance the
visitors’ experience by providing richer multimedia information (text, sound, images, and videos)
at no rental cost, and also eliminating any health risk derived from their shared use. Although
some smartguides and services alike have been already successfully designed this is, to the
authors knowledge, the first work that proposes the development of these services in an
archaeological site and, more importantly, with the capability to provide the managers of the
environment with information on visitor behavior.
      </p>
      <p>The paper is organized as follows. Section II describes in detail the main components of the
proposed system, including BLE beacons, software architecture, detection algorithm and
monitoring services. Section III presents some experimental results obtained during the
deployment of the system in the archaeological site of Mértola, in Portugal. Finally, the main
conclusions of this work and those tasks foreseen in the short term are summarized in section IV.</p>
    </sec>
    <sec id="sec-2">
      <title>2. System description</title>
      <p>The ECLIMUS smart guide is based on a set of BLE proximity beacons which are strategically
deployed in an archeological site to tag different points of interest (POI) for the visitor. These
visitors have previously downloaded and installed a free app in their mobile terminals. When
activated, this app starts scanning the environment for nearby BLE beacons and sending global
positioning data to the central server. A nearby beacon is considered a “Beacon of interest” (BOI)
when its received signal strength meets certain criteria that will be described in detail later. The
validation of a BOI is shown to the user with a message on the screen of their mobile terminal,
and the user decides whether or not to receive the information associated with that BOI by
tapping on the message. In the first case, the phone records the time that the user is consulting
the information associated with the BOI and sends this information back to the server at the end
of this consultation.</p>
      <sec id="sec-2-1">
        <title>2.1. BLE beacons</title>
        <p>BLE is a communication protocol designed as an extension of the traditional Bluetooth. It is
specifically tailored for short, periodic, and power-efficient communications within the context
of the Internet of Things (IoT). Similar to Wi-Fi and standard Bluetooth, BLE also operates in the
2.4 GHz frequency band. The protocol encompasses two types of communication schemes:
advertising and connection. In the former, a device periodically broadcasts information that is
available to all potential receivers in the environment. Meanwhile, connection mode is reserved
for private and direct communication between two devices. BLE transmitters, commonly referred
to as beacons, are primarily designed for the advertising mode using use connection scheme only
for configuration tasks.</p>
        <p>With the widespread adoption of BLE in recent years, lightweight protocols have been
developed on top of the BLE specification to organize the format of advertisement information.
This information usually corresponds to sensor data, identification codes and URLs directions.
The two most well-known protocols are Eddystone and iBeacon frames, developed respectively
by Google and Apple to enhance compatibility between their respective systems using BLE.</p>
        <p>
          The BLE beacons used in the ECLIMUS system are the iBKS 105 from Accent Systems [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ], which
use the Nordic Semiconductors nRF51822 chipset [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. This device is powered by a single CR2477
button cell battery and is wrapped in a plastic white case. Each beacon can broadcast multiple
signals at the same time through different slots. Four slots following Eddystone specification and
two with iBeacon, using different transmission powers and advertising periods for each of them.
iBKS 105 beacon’s settings can be configured using the application provided by the manufacturer
or with a custom developed application using its Generic Attribute Profile (GATT) provided in the
system’s specifications. A picture of the beacon is shown in Figure 1.
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. Software Architecture</title>
        <p>From the highest level, the infrastructure developed to service the application can be seen in
Figure 2. This infrastructure presents two perfectly differentiated parts: the server and the app.</p>
        <p>
          The server provides the app with the data of the different exhibitions in the archaeological
site. A REST communication interface [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] is used to obtain the data. A control panel is available
for data maintenance and allows museum administrators to see different statistics about the
visitors, such as most seen exhibitions, the amount of time spent viewing an exhibition or the GPS
trajectory followed by the visitors. Both the server and the application need an Internet
connection to work together. The client app appearance can be seen in Figure 3. Its operation is
explained below.
        </p>
        <p>(a) Splash screen
(b) List of exhibitions (map)
(c) Searching for BOIs
(d) Exhibition information (e) Scanner screen</p>
        <p>Figure 3: Different screenshots of the end-user version of the ECLIMUS app.</p>
        <p>Figure 3a shows the startup screen that appears when the application is executed. At this
moment, the server associates an anonymous ID to the user ensuring that all the data collected
can never be associated with a person. After a few moments, a new screen appears on the user's
phone asking permission for the collection of location background data and informing about the
usage of this. When the user accepts or denies the sharing of data, a new screen appears with a
list of all the exhibitions allowing the user to access the information associated with each of them
at any time, without having to detect the presence of a BOI. This list can be seen over a map
(Figure 3b), or as individual items (Figure 3c). In any of these screens, the "BOI search" mode of
operation is running in the background scanning BLE beacons in the environment, and when it
validates a BOI it displays a detection warning on the screen (Figure 3c). If the user clicks on this
notification, they obtain information about the part associated with that BOI (Figure 3d), and the
app starts recording the amount of time spent in that screen. The user can rate the exhibition
from 1 to 5, and this information is sent to the server together with the view time when this screen
is closed. Otherwise, the app continues in search mode. Finally, a "scan" mode of operation
(Figure 3e) displays the signal strength (RSS) of all the beacons being detected at a given time.
This mode of operation is intended for technicians in charge of deploying and maintaining the
system, and is not available in the end-user version of the app.</p>
      </sec>
      <sec id="sec-2-3">
        <title>2.3. BOI detection algorithm</title>
        <p>Proximity solutions using BLE for LBS have been extensively explored due to two key factors:
a) BLE compatibility with most off-the-shelf smartphones and b) the widespread use of these
devices. Proximity detection algorithms with this technology are typically based on the Received
Signal Strength (RSS) which measures the signal attenuation using an integer value on a
logarithmic scale.</p>
        <p>
          When using BLE for proximity detection, the standard approach is to associate the user
position with the position of the beacon with the highest RSS. This approach proves useful when
edge or cloud computing options are unavailable since the smartphone must perform all
operations. Unfortunately, various factors affect RSS measurements, including attenuation,
multipath, and non-line-of-sight effects. These effects increase variability between consecutive
RSS measurements and disrupt the before-mentioned logarithmic relationship with distance [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ].
Different alternatives have been proposed to tackle this problem. Most notably, using machine
learning-based methods [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] to identify proximity or substituting the proximity algorithms with
more advanced positioning techniques like multilateration [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] and fingerprinting [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ].
However, these solutions require higher computational capabilities and increase the system's
complexity. Thus, an optimal proximity detection algorithm must be able to deal with
non-lineof-sight effects without having a high computational cost for the device.
        </p>
        <p>In this work, we propose a proximity-based algorithm for RSS measurement based on
thresholding the relationship between the beacons with the highest RSS. The detection algorithm
is divided into an initialization process and three tasks performed consecutively after each new
BLE detection. These stages are 1) measurement list update, 2) time control, and 3) RSS
thresholding and redundancy criteria. During the system initialization, four arrays are created,
each with a length equal to the number of available beacons (point of interest in the system).
These arrays correspond to the list of RSS values, detection timestamps, the list of MAC addresses
of each beacon, and a proximity score. The arrays are initialized with null values, except the list
with the MAC codes, which content is provided by the server.</p>
        <p>When a new beacon is detected, the RSS and timestamp lists are updated by using the index of
the corresponding elements in the MAC list that match the MAC address of the newly detected
package. Following this update, the timestamp list is compared with the last timestamp added to
the list. The score of elements detected more than Ts seconds ago is set to 0 and the corresponding
RSS to null. After this correction, the RSS list is sorted and ordered from highest to lowest. Then,
the proximity score of the beacon with the highest RSS is incremented by one unit if the following
conditions are met:
§
§</p>
        <p>The RSS is above a threshold value (Th1).</p>
        <p>The absolute difference between the first and second RSS in the sorted list is below a
second threshold (Th2).</p>
        <p>The proximity score is set to zero if these conditions are not met. Once the proximity score of
a beacon reaches a value equal to Tr, it is considered as a valid proximity detection and the
algorithm outputs its MAC code to the application.</p>
        <p>The parameters of the detection algorithm, Th1, Th2, Ts, and Tr, are adjusted based on the
specific characteristics of the experimental environment and the configuration of the beacons.
Th1 and Th2 are determined by the transmission power of the beacons and the desired effective
detection area around the Point of Interest (POI). Ts is configured as a function of the beacons'
transmission period, and Tr is set as a function of the average noise level of the RSS. By adjusting
these parameters, the detection algorithm can be customized to suit the specific requirements of
the environment and the desired proximity criteria. The operation of this algorithm is shown in</p>
      </sec>
      <sec id="sec-2-4">
        <title>2.4. Server monitoring services</title>
        <p>With the permission of the user, the app is constantly collecting location and BLE RSS data in
the background and sending them to the server. Besides, information about BOI detections, view
times and ratings are also sent to the server. These data are used to provide a set of statistical
results that can be accessed by museum administrators at any time in the control panel.</p>
        <p>The currently available monitoring services in the control panel are:
§
§
§</p>
        <p>Daily statistics: a table with the exhibitions visited in the selected period. The mean visit
time, number of visitors and mean rate is displayed in this table.</p>
        <p>Heatmap: the information of the mean visit time and number of visitors available in the
daily statistics is shown in the map of the museum for easier analysis.</p>
        <p>GPS trajectory: the location data collected by the app is filtered by user and its trajectory
in the museum is reconstructed and shown in a figure containing the exhibitions’
locations.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Experimental Results</title>
      <p>The system described in the previous section has been deployed in the archaeological site of the
city of Mértola, in Portugal, during the last week of May, 2023. This archaeological site has three
distinct but close to each other areas, namely the castle, the citadel and the mosque. A total of 22
points of interest have been identified in this environment, each of which has been assigned a BLE
beacon. Figure 5 shows a Google Earth image of this archaeological environment together with a
map of the environment, where the location of the 22 beacons have been labeled.
(a)
(b)</p>
      <p>Once the system was deployed, its performance was evaluated for one day in order to present
some results in this paper. It is important to note that the system will remain installed in the
archaeological site throughout the month of June, so that more conclusive results are expected to
be available during the conference.</p>
      <p>Figure 6 shows information on the number of visitors to each of the 22 POIs, as well as the
average time spent by these visitors at each of these points, which is expected to be correlated
with their interest in the information presented in that point. The number of visitors to a POI is
proportional to the radius of the circle that marks each point, while the average time of the visit
is indicated by the color scale on the right of the image. As we can see in this figure, POI #1
(entrance to the citadel) was the most visited one, with a total of 19 visits, while PO1 #14 (the
Keep) is the one with the longest average visit time (668 seconds), although this POI was only
visited by 3 people. On the other hand, Figure 7 shows the trajectory followed by a particular
visitor within the archaeological site This information is shown with circles whose color changes
with time according to the time scale on the right of the image. As this figure shows, the app user
started his visit at the entrance of the citadel (POI #1), approached the second Baptistery (POI
#8), entered the citadel and once there visited the Andalusi quarter (POI #12) and the Andalusi
house (POI #11), to stay later at the wall, probably enjoying the magnificent views of the city from
there.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusions</title>
      <p>This work has presented a combined BLE-GNSS positioning system for intelligent guidance and
activity monitoring of the visitors to an archaeological site. The system is based on BLE symbolic
positioning to provide the user with useful information related to the nearest point of interest
and to determine the number of visits and the average time of visit to each POI. It also gathers the
users’ GNSS data to analyze their trajectory within the environment. All this information is
presented to the managers of the environment through map-based graphs.</p>
      <p>The real system has been deployed in the archeological site of Mértola, in Portugal, during the
last week of May, 2023 and for this reason only some preliminary results are presented in this
work. Since the system will be installed in this site throughout the whole month of June, more
realistic and rich results are expected to be presented at the conference.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgements</title>
      <p>This work has been supported by project 0794_ECLIMUS_4_E funded by the European
Commission through the INTERREG-POCTEP programme, and by project TED2021-129310BI00
funded by MCIN/AEI/10.13039/501100011033 and by the European Union
NextGenerationEU/PRTR, project PID2021-122642OB-C42 funded by
MCIN/AEI/10.13039/501100011033/.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Virrantaus</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Markkula</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Garmash</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Terziyan</surname>
            ,
            <given-names>Y. Developing</given-names>
          </string-name>
          <string-name>
            <surname>GIS-Supported LocationBased Services</surname>
          </string-name>
          .
          <source>First International Workshop onWeb Geographical Information Systems (WGIS</source>
          <year>2001</year>
          );
          <year>2001</year>
          ; p.
          <fpage>423</fpage>
          -
          <lpage>432</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Shiode</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Li</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Batty</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Longley</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Maguire</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <article-title>Telegeoinformatics: location-based computing</article-title>
          and services; CRC Press,
          <year>2004</year>
          ; pp.
          <fpage>349</fpage>
          -
          <lpage>366</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Steiniger</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ; Neun,
          <string-name>
            <given-names>M.</given-names>
            ;
            <surname>Edwardes</surname>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          .
          <source>Foundations of Location Based Services, CartouCHe - Lecture Notes on LBS, V. 1.0.</source>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Sensory</given-names>
            <surname>Systems</surname>
          </string-name>
          Research Group. University of Extremadura.
          <article-title>Presentation of the ECLIMUS Project</article-title>
          . https://www.camertola.pt/info/extensão-e
          <article-title>-capitalização-dos-resultados-doprojeto-</article-title>
          <string-name>
            <surname>limus</surname>
          </string-name>
          ,
          <year>2023</year>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <source>[5] iBKS 105 · Accent Systems</source>
          . https://accent-systems.com/es/producto/ibks-105/.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <fpage>nRF51822</fpage>
          -
          <article-title>Nordic semiconductor</article-title>
          . https://www.nordicsemi.com/Products/
          <article-title>Low-power-shortrange-wireless/nRF51822</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Fielding</surname>
            ,
            <given-names>R.T.</given-names>
          </string-name>
          ; Taylor,
          <string-name>
            <surname>R.N.</surname>
          </string-name>
          <article-title>Architectural Styles and the Design of Network-Based Software Architectures</article-title>
          ; Vol.
          <volume>7</volume>
          , University of California,
          <source>Irvine Doctoral dissertation</source>
          ,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Faragher</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ; Harle,
          <string-name>
            <surname>R.</surname>
          </string-name>
          <article-title>Location fingerprinting with Bluetooth Low Energy beacons</article-title>
          .
          <source>IEEE Journal on Selected Areas in Communications</source>
          <year>2015</year>
          ,
          <volume>33</volume>
          ,
          <fpage>1</fpage>
          -
          <lpage>1</lpage>
          . doi:
          <volume>10</volume>
          .1109/JSAC.
          <year>2015</year>
          .
          <volume>2430281</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Koutris</surname>
            , Aristotelis, Theodoros Siozos, Yannis Kopsinis, Aggelos Pikrakis, Timon Merk, Matthias Mahlig, Stylianos Papaharalabos, and
            <given-names>Peter</given-names>
          </string-name>
          <string-name>
            <surname>Karlsson</surname>
          </string-name>
          .
          <year>2022</year>
          .
          <article-title>"Deep Learning-Based Indoor Localization Using Multi-View BLE Signal" Sensors 22, no. 7: 2759</article-title>
          . https://doi.org/10.3390/s22072759
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>C. S.</given-names>
            <surname>Mouhammad</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Allam</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Abdel-Raouf</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Shenouda</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Elsabrouty</surname>
          </string-name>
          ,
          <article-title>"</article-title>
          <source>BLE Indoor Localization based on Improved RSSI and Trilateration," 2019 7th International Japan-Africa Conference on Electronics, Communications, and Computations</source>
          ,
          <string-name>
            <surname>(JAC-ECC</surname>
            <given-names>)</given-names>
          </string-name>
          , Alexandria, Egypt,
          <year>2019</year>
          , pp.
          <fpage>17</fpage>
          -
          <lpage>21</lpage>
          , doi: 10.1109/JAC-ECC48896.
          <year>2019</year>
          .
          <volume>9051304</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Fernando</surname>
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Aranda</surname>
            , Felipe Parralejo,
            <given-names>Fernando J.</given-names>
          </string-name>
          <string-name>
            <surname>Álvarez</surname>
          </string-name>
          , José A.
          <string-name>
            <surname>Paredes</surname>
          </string-name>
          ,
          <article-title>Performance analysis of fingerprinting indoor positioning methods with BLE, Expert Systems with Applications</article-title>
          , Volume
          <volume>202</volume>
          ,
          <year>2022</year>
          , 117095, ISSN 0957-4174, https://doi.org/10.1016/j.eswa.
          <year>2022</year>
          .
          <volume>117095</volume>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>