## 5 Design and Development of Indoor AR Navigation Services Based on Geofencing
### Indoor Geofence Space Design  
This subsection discusses how to determine the location and size of a geofence. In an ideal scenario in which indoor positioning is error-free, the geofence should be centered at the optimal location for push services, such as the audio guides, and its radius should be set to ensure that the service remains consistently available as the user moves within  
Figure 5: An example of a geofence with a buffering region.  
Figure 6: An example of a navigation route defined by geofences with appropriate positions and sizes.  
the geofence. In practice, however, the placement and size of a geofence are influenced by several elements, including the spatial structure of the building, the intended function of the geofence, the user's moving speed, the positioning sample rate, human dimensions, and the inherent positioning error.  
1. **Building space structure**: In general, when placing a geofence at a corridor or entrance for a waypoint, its diameter should match the width of the corridor or entrance. When deploying a geofence for an exhibit, it should ideally be triggered as soon as the user sees it.
2. **The geofence's function**: A geofence designed to trigger the introduction of an exhibit typically aligns its center with the exhibit's location. Conversely, a geofence intended to provide direction updates at a waypoint should be positioned in advance of the location.
3. **The user's moving speed and sampling rate**: The geofence should be designed to ensure that at least one sampled trajectory point falls within its range when the user passes by. For instance, when providing direction updates at a waypoint, such as a turn at a junction, and assuming notification is required one second before reaching the junction, the geofence's center point should be placed approximately a one-second walking distance ahead of the junction (based on an average walking speed of roughly one meter per second), as illustrated in Figure 7.
4. **Human dimension**: As VIO-based positioning can achieve centimeter-level accuracy, the dimensions of the human body cannot be overlooked when designing geofences. Considering a typical human shoulder width (including clothing) of 0.6 m, the radius of a geofence covering the width of a corridor could theoretically be reduced by 0.3 m (i.e., half the shoulder width), as shown in Figure 8. This adjustment accounts for the smartphone being held at the center of the body, ensuring it remains within the geofence.
5. **Positioning error**: As mentioned in Section 5.1, the radius of the geofence should be enlarged to accommodate the expected positioning error. If the periodical calibration described in Section 4.3 is effective and the error is generally maintained below 0.3 m, the geofence radius may be increased by 0.3 m. This increment aligns with the reduction of 0.3 m, accounting for half the human shoulder width.  
Figure 8: Indoor positioning error relative to the size of a human and the geofence’s diameter.  
Figure 7: The center of a geofence is set at 1.0 m ahead of a junction point when the walking speed is 1.0 m/sec for the guidance narration to be provided 1.0 sec in advance.  
When developing the experimental application, the geofence size was determined empirically through extensive on-site experiments. Various settings were tested to assess whether entry into a geofence triggers the optional start of audio narration and simultaneously updates the virtual 3D arrow icon pointing toward the next waypoint. Although a smaller geofence radius might offer a more precise location and timing for push notifications, the impact of spatial tracking errors was also considered. Consequently, a decision was made to incorporate the five aforementioned elements to determine each geofence radius at a level that avoids user discomfort without compromising functionality.