## 5 Design and Development of Indoor AR Navigation Services Based on Geofencing  
### Location-Based Service Design Based on Geofencing  
Our experimental indoor AR navigation application employs geofencing to provide AR-based direction instructions and audio guide services. While the shape of the geofence can be arbitrary, a circular boundary shape, as depicted in Figure 4, is most commonly used due to the simplicity of the calculation process. It is straightforward to determine whether the user has entered the boundary area by calculating the Euclidean distance to the center point. When the user's location is determined using spatial tracking technologies such as GNSS, Bluetooth, or VIO, positioning errors are typical. A buffer method that expands the geofence's boundary area to account for these errors proves to be an effective error absorption mechanism, as illustrated in Figure 5. Considering the positioning oscillation, dynamically expanding the buffer area upon a user's geofence check-ins can effectively reduce check-in and check-out errors, even in worst-case scenarios. Similarly, decreasing the buffer area dynamically after checking out can prevent oscillation misfunctions.  
Figure 4: An example of a geofence with a circular boundary.  
An example of a mobile service using geofencing is audio navigation. When guiding a user along a route to a destination, push-type services such as voice instructions with directions and distances are provided at waypoints such as junctions. Figure 6 shows an example of route placement with geofencing (Figure 1, C), demonstrating appropriate geofence locations and boundary area sizes. Start \(\rightarrow\) gf\({}_{1}\rightarrow\) gf\({}_{2}\rightarrow\) gf\({}_{3}\rightarrow\) gf\({}_{4}\) (Goal) is the route, and the geofence gf\({}_{i}\) is used to represent the route. For example, voice narration can be pushed to the user when the user's position (\(p\)), which is acquired by VIO, enters the boundary area range of the geofence. Suppose that the boundary area of the geofence can be narrowed to the minimum necessary range. In this case, providing high-quality push-type services at more appropriate locations and timings becomes possible. However, a possible risk is that the geofence will not be able to capture the user's location correctly when the accumulated positioning error becomes too large. On the other hand, increasing the geofence radius will reduce the failure of user tracking, but the push-type service may be misplaced or delivered too early, which will result in inadequate and degraded service quality. The trade-off between the service quality in terms of the appropriate location or push timing and the accuracy of the geofencing check-in and check-out is essential in setting the range of the geofence's area.  
In the case of visual navigation using AR, a 3D sign pointing to the next geofence (as a waypoint) from the user's current position is overlaid on the real-world image from the camera (Figure 1, B1), as illustrated in Figure 2. When checking into the geofence (waypoint) (Figure 1, B3), the next geofence is set as the next waypoint, and the 3D sign changes to point to the next direction. In this way, various LBS applications can be designed based on the concept of geofencing.