Geomagnetic indoor localization has emerged as a promising direction, mainly because geomagnetism is ubiquitous indoors, relatively stable and does not require external infrastructure support. Prior approaches mainly leverage temporal correlations in geomagnetic sequences for location inference. However, geomagnetic sequences in practical trial sites could be ambiguous due to environmental (e.g., similar building structures) and user factors (e.g., directions, speeds), leading to degraded localization accuracy.; AB@To address the above challenges, we propose GRETE , which injects relative trajectory encoding to enhance the localization accuracy. Our key contributions are as follows. First, we design a rotary position-based relative trajectory encoding module. By taking relative directions and distances between user's positions during walking into consideration, GRETE effectively captures the latent spatial clues in trajectories. We enhance geomagnetic temporal features with trajectory encodings. Second, we propose a fine-grained contrastive learning method, where we divide the enhanced feature sequences into multiple subsequences. This guides the model to pay more attention to detailed differences in enhanced features, consequently improving their expressiveness and discriminability. We have conducted extensive experimental evaluations with two public datasets and one self-constructed dataset. Extensive experimental results show that GRETE consistently outperforms state-of-the-art competing schemes by a large margin (reducing mean localization error from 18.4% to 74.7%).
Liu et al. (Mon,) studied this question.