ระบบระบุตำแหน่งภายในอาคาร

UWB, motion capture, optical flow and fiducial markers

Last updated:

Why it matters

Indoors, GNSS signals are very weak or absent, and what does arrive is often reflected by walls, giving false positions. Drones in warehouses, factories, tunnels or under bridges must find their position another way. Three questions follow: which method, how accurate, and how to feed it to the flight controller. Siegwart et al. describe the two basic families for mobile robots: dead reckoning (odometry), which estimates motion from the robot's own sensors and drifts over time, and measurement against external references, which does not drift but needs references. Practical indoor systems usually combine both.

Four main methods

MethodPrincipleStrengthsLimitations
Motion captureSeveral infrared cameras around the room track reflective markers on the droneVery high accuracy and rateExpensive; works only inside the camera volume
UWBRadio ranging with very wide bandwidth to anchors at known positionsCovers large areas; independent of lightAnchors must be installed and surveyed; obstructions lengthen ranges
Optical flowDownward camera measures image motion, with a height sensorCheap, light, no installationGives velocity, not position; fails on plain or dark floors
Fiducial markersCoded visual tags such as AprilTag at known positionsCheap, unambiguous IDsTags must be visible; corrects drift only at intervals

Visual-inertial odometry (VIO) uses an onboard camera and IMU to estimate motion. It needs no installation but drifts with distance, so it is often paired with UWB or markers.

How UWB works

Ultra-wideband (UWB) uses very short radio pulses spread over a very wide band. The review by Alarifi et al. (2016) explains that short pulses allow fine timing of the arrival and better separation of the direct path from reflections than narrowband radio. IEEE 802.15.4z-2020 added enhanced UWB physical layers and ranging techniques; that amendment is now consolidated into IEEE 802.15.4-2024, which supersedes it.

  • Two-way ranging (TWR): the tag and an anchor exchange messages. One-way flight time = (round-trip time − reply time) / 2, multiplied by the speed of light.
  • Time difference of arrival (TDoA): synchronised anchors receive one transmission from the tag and use arrival-time differences to locate it. It scales well to many tags.

With ranges to three or more anchors in a plane, position is solved by least squares (see UAT 363 Module 3). Anchor geometry matters: anchors in a line or on one side of the area inflate the error in one direction. Anchors should surround the flight area and sit at several heights if altitude is needed.

Worked example: nanoseconds become metres

Light travels 299,792,458 m/s, so 1 ns corresponds to about 0.30 m. In TWR the round trip is halved, so a 1 ns round-trip error gives about 0.15 m of range error.

The hidden problem is that the two clocks run at slightly different rates. In single-sided TWR the one-way timing error is roughly half the product of the clock-rate difference and the reply time. Assume a 300 µs reply time:

  • 20 ppm clock difference: 300 × 10−6 × 20 × 10−6 / 2 = 3 ns, about 0.90 m of range error.
  • 2 ppm: 0.3 ns, about 0.09 m.

This is why real systems use double-sided TWR or estimate the clock offset, and keep reply times short. These figures exclude non-line-of-sight effects, where metal racks force the signal around obstacles and the measured range becomes longer than the true one.

Optical flow and markers

Optical flow is the apparent motion of floor texture in a downward camera, measured as an angular rate (rad/s). After removing the aircraft's own rotation using the gyro, horizontal speed is roughly v ≈ ω × h, where h is height above the floor. At h = 2.0 m, a flow of 0.5 rad/s means about 1.0 m/s. Height error passes straight into speed: 0.2 m of error at 2 m gives 10% speed error. Plain, glossy or dark floors leave the camera with nothing to track.

Fiducial markers such as AprilTag (Olson, 2011) are black-and-white patterns designed to be detected and decoded reliably even at an angle or in poor light. With the tag's true size and position known, the camera computes the drone's position and heading relative to it. Tags reset VIO drift or guide precise landing on a charging pad.

Feeding the flight controller

The PX4 guide describes sending vision or motion-capture poses to the EKF2 estimator via MAVLink and recommends 30–50 Hz. Three settings must be right:

  • Frames: PX4 uses NED (north, east, down) axes; many external systems use others. A wrong conversion makes the drone move against commands. Test by carrying the aircraft by hand and watching the reported values.
  • Latency: tell the estimator how late the pose arrives (EKF2_EV_DELAY in PX4). At 1.5 m/s, 40 ms of uncompensated delay is 6 cm of error.
  • Trust: send realistic variances and define behaviour when data stops, such as landing immediately, because GNSS-based return-to-home cannot work indoors.

Common pitfalls

  • Flying GNSS-dependent modes indoors, or setting a GNSS return-to-home failsafe.
  • Mounting UWB anchors in a line or not surveying their positions accurately.
  • Forgetting that metal racks and people block UWB and lengthen ranges.
  • Using optical flow over plain floors or in the dark.
  • Getting frame conversion wrong and not testing before flight.
  • Trusting VIO for too long without references to reset drift.

Continue in the lessons

Key references

  1. Siegwart, R., Nourbakhsh, I. R., & Scaramuzza, D. (2011). Introduction to autonomous mobile robots (2nd ed.). MIT Press. link
  2. PX4 Autopilot. Using vision or motion capture systems for position estimation. PX4 guide (main). link
  3. IEEE. (2020). IEEE standard for low-rate wireless networks — Amendment 1: Enhanced ultra wideband (UWB) physical layers (PHYs) and associated ranging techniques (IEEE Std 802.15.4z-2020). link
  4. Alarifi, A., Al-Salman, A., Alsaleh, M., Alnafessah, A., Al-Hadhrami, S., Al-Ammar, M. A., & Al-Khalifa, H. S. (2016). Ultra wideband indoor positioning technologies: Analysis and recent advances. Sensors, 16(5), 707. link
  5. Olson, E. (2011). AprilTag: A robust and flexible visual fiducial system. In 2011 IEEE International Conference on Robotics and Automation (pp. 3400–3407). IEEE. link
  6. IEEE. (2024). IEEE standard for low-rate wireless networks (IEEE Std 802.15.4-2024). link

Used in courses

How to cite this page

Drone Institute, Rangsit University. (2026). ระบบระบุตำแหน่งภายในอาคาร. In UAS Technology Knowledge Hub (B.Tech.). https://rsu-uat.pk-research.work/en/kb/new/indoor-positioning/