Module 1/10 · Weeks 1–2 · 14 h

Operations in GNSS-denied environments

UAT 458 Indoor Autonomous UAS and Navigation Technology

About 80 minDraft, awaiting reviewLast updated 24 October 2026

Lesson

By the end of this module you will be able to

  1. Explain what the autopilot's state estimator lacks when GNSS is gone, and what must replace it
  2. Compute how many seconds an IMU-only position stays within a tolerance
  3. Identify hazards specific to indoor flight, from magnetic interference to failsafe settings that ignore the ceiling
  4. Survey a site and divide it into zones to choose the position, height and heading sources for each

Prerequisites: UAT 205 Sensors and Instrumentation Systems (IMU, barometer and GNSS) · UAT 305 Autopilot and Control Technology (EKF and failsafes)

Why this matters

Most drones know where they are mainly from GNSS (global navigation satellite systems such as GPS). Fly under the steel roof of a building and the satellite signals become very weak or vanish, and what does arrive has often bounced off a wall. A drone set up for outdoor flight starts to wander from where it should be, circles, or is forced into another mode by the autopilot in mid-air, with walls, pipes and workers all around it.

Yet indoor drone work grows every year: inspecting steel roof trusses, crane rails, pipework and tank walls that are out of reach and used to need scaffolding or a cherry picker. This course teaches how to make a drone fly autonomously indoors and safely, from the flight system and operations side: configuring PX4 and ArduPilot to fly without GNSS, switching the estimator’s data sources, checking hover quality, avoiding obstacles, planning routes and testing step by step. The principles and deeper mathematics of positioning sensors, such as UWB and sensor fusion, belong to modules 6–10 of this course (Indoor Navigation Technology).

Modules 1 to 5 of this course follow one fictional case through all of them: a water treatment plant in central Thailand wants to inspect the inside of its buildings with a drone instead of scaffolding. The site has a filter hall 96 × 30 m and 12 m high with eight open filter beds along its centre, a pump hall 48 × 20 m and 10 m high with six pumps and large steel pipes, and a covered clear-water reservoir. The aircraft is a multicopter 0.9 m wide including propeller guards, running ArduPilot Copter 4.7.1 (PX4 equivalents are given each time) with a companion computer. All figures and data are fictional. The Python code can be downloaded from /downloads/uat-458/.

What the autopilot lacks without GNSS

The autopilot uses a state estimator, an extended Kalman filter (EKF), to fuse many sensors into estimates of position, velocity and attitude (Groves, 2013). PX4 uses EKF2 and ArduPilot uses EKF3; their mechanics were covered in UAT 305. Indoors you must answer four questions.

  1. Where does horizontal position or velocity come from without GNSS?
  2. What is the height reference: barometer, rangefinder or an external system?
  3. Can heading (yaw) come from the compass in a building full of steel?
  4. Where is the origin of the local coordinate frame?

The last one is easy to forget. The ArduPilot documentation states that most non-GPS navigation systems need the EKF origin set manually, from a ground station or a Lua script; otherwise position modes such as Loiter and Auto cannot be used. From ArduPilot 4.7, AHRS_OPTIONS bit 3 records the origin once it becomes valid and bit 4 restores it at boot when no GPS is used (ArduPilot Dev Team, n.d.). PX4 has a dead-reckoning mode (EKF2_GPS_MODE = 1) for flying through intermittent GNSS loss, such as from outdoors into a building, but its documentation marks it experimental in v1.17 and requires reliable GNSS before arming, so it does not suit purely indoor flight (PX4 Autopilot, n.d.).

The IMU alone does not get you far

Why not keep integrating the IMU (gyros and accelerometers) for position? Because of the double integration. If the accelerometer has a residual bias that is not fully compensated, velocity drifts by and position by (a simple one-axis model ignoring noise and attitude error). It is like walking with your eyes closed and counting steps that are each a little too long: the longer you walk, the more lost you are, and the faster it gets worse. Woodman (2007) tested a simple inertial navigation system built on a small IMU and found the average position error exceeded 150 m after only 60 seconds, with gyro errors that corrupt attitude as the main cause. The ArduPilot documentation says plainly that the low-cost IMUs in autopilots drift too quickly to estimate position without an external velocity or position source.

Example 1 How many seconds can the IMU keep the drone on the walkway?

The inspection walkway in the filter hall tolerates a position error of at most m. The team wants to know how long the IMU could carry on if the indoor position source dropped out, for three residual bias levels (assumed values).

import math
# how fast does an IMU-only position estimate drift? (one-axis model, constant residual bias, assumed values)
TOL = 0.5                                   # position error the walkway can tolerate (m)
for b in (0.02, 0.05, 0.10):                # residual accelerometer bias (m/s^2)
    t_lim = math.sqrt(2 * TOL / b)          # time until 1/2*b*t^2 reaches TOL
    p10, p30 = 0.5 * b * 10 ** 2, 0.5 * b * 30 ** 2
    print(f"bias {b:.2f} m/s^2: {TOL} m reached after {t_lim:4.1f} s, error at 10 s {p10:4.1f} m, at 30 s {p30:5.1f} m")

# how often must an aiding source correct the estimate to keep the drift below 5 cm?
b, keep = 0.05, 0.05
print(f"correction needed at least every {math.sqrt(2 * keep / b):.2f} s")
bias 0.02 m/s^2: 0.5 m reached after  7.1 s, error at 10 s  1.0 m, at 30 s   9.0 m
bias 0.05 m/s^2: 0.5 m reached after  4.5 s, error at 10 s  2.5 m, at 30 s  22.5 m
bias 0.10 m/s^2: 0.5 m reached after  3.2 s, error at 10 s  5.0 m, at 30 s  45.0 m
correction needed at least every 1.41 s

Even a bias of only 0.02 m/s² takes the position past half a metre within 7.1 seconds and to 9 m within half a minute, because the error grows with the square of time: three times the time, nine times the error. The last line says that to keep the drift between corrections under 5 cm, aiding data must arrive at least every 1.41 seconds. Real external systems send far more often; PX4, for example, recommends 30 to 50 Hz, as module 2 will show.

Three curves of position error against time from 0 to 12 seconds for biases of 0.02 (green), 0.05 (blue) and 0.10 metres per second squared (purple). A dashed pink line at 0.5 metres marks the limit; the curves cross it at 7.1, 4.5 and 3.2 seconds respectively
Figure 1 Position error from the IMU alone over time

The practical conclusion is that the IMU bridges short gaps between measurements from other sources; it is not a position source. If the indoor position source is lost for more than a few seconds, the drone must stop relying on position and either land or be flown by the pilot in a mode that does not need position.

Hazards specific to indoor flight

Besides the missing GNSS, buildings bring hazards that outdoor flight rarely meets.

  • Magnetic interference. Steel frames, pipes and large electric motors make the compass point the wrong way. ArduPilot explains that magnetic interference causes circling (“toilet bowling”) in Loiter, RTL and Auto (ArduPilot Dev Team, n.d.). In the pump hall, heading may have to come from the external system instead.
  • Confined space and no escape route. Outdoors you can climb away from trouble; indoors there is a roof, walls and a crane in every direction.
  • Failsafe settings designed for outdoors. In ArduPilot 4.7.1, RTL first climbs to at least RTL_ALT_M above home before returning (ArduPilot Dev Team, n.d.). If that is higher than the ceiling, the drone climbs into the roof trusses. Indoor failsafe actions are therefore usually Land, or Brake then Land.
  • Light, floors and water surfaces. Cameras need light and surface texture. Plain shiny floors and the water in the filter beds defeat optical flow and confuse rangefinders (modules 2 and 4).
  • The aircraft’s own recirculating air. Downwash rebounds off the floor and walls, and near the floor it also disturbs the barometer for a moment (module 4).
  • People, equipment and plant operations. Doors opening and closing, ventilation fans, a moving crane and staff walking through.

Survey the site and divide it into zones

Before touching any setting, the team must walk the real site and divide it into zones with different characteristics, then decide zone by zone what to use for position, height and heading. Things that are easy to measure on the walk are: the number of satellites received, light level (lux), floor texture, water or shiny surfaces below, magnetic field deviation from normal (read from the autopilot or a phone), and any confined spaces.

Plan of the fictional water treatment plant. A yellow box at bottom left is zone A, the apron outside with GNSS, with arrows into the buildings. At the top, the blue filter hall, 96 by 30 metres and 12 metres high, contains zone B, the green inspection walkway, and eight purple filter beds forming zone C over open water. At bottom centre is zone D, the orange pump hall of 48 by 20 metres with six pumps, and at bottom right zone E, the pink covered reservoir, dark and a confined space
Figure 2 Plan of the fictional water treatment plant and zones A to E

Example 2 Choosing data sources zone by zone

The team records its survey of five zones and writes its own criteria as code (all criteria belong to this case and are assumed): use GNSS with at least 12 satellites; use LiDAR SLAM with at least 50 lux, and add optical flow as a backup where the floor is textured, there is no water below and light is at least 100 lux; use the compass where the magnetic field deviates by no more than 15%.

# zone survey of the plant: choose position, height and yaw sources per zone (team criteria, assumed values)
zones = [
    # name, GNSS satellites, light (lux), floor texture, water below, magnetic deviation (%), confined space
    ("A apron",            18, 20000, "good", False,  3, False),
    ("B filter walkway",    0,   180, "good", False,  8, False),
    ("C over filter beds",  0,   150, "none", True,   6, False),
    ("D pump hall",         0,   250, "good", False, 42, False),
    ("E covered reservoir", 0,     2, "none", True,   4, True),
]
for name, sats, lux, tex, water, mag, confined in zones:
    if confined:
        print(f"{name:20s} -> no flight this phase (confined space, needs a separate plan)")
        continue
    if sats >= 12:
        pos = "GNSS"
    elif lux >= 50:
        pos = "LiDAR SLAM (ExtNav)" + (" + optical flow backup" if tex == "good" and not water and lux >= 100 else "")
    else:
        pos = "LiDAR SLAM only, add lighting"
    hgt = "baro" if water else "baro + rangefinder check"
    yaw = "ExtNav yaw" if mag > 15 else "compass"
    print(f"{name:20s} -> pos: {pos}; height: {hgt}; yaw: {yaw}")
A apron              -> pos: GNSS; height: baro + rangefinder check; yaw: compass
B filter walkway     -> pos: LiDAR SLAM (ExtNav) + optical flow backup; height: baro + rangefinder check; yaw: compass
C over filter beds   -> pos: LiDAR SLAM (ExtNav); height: baro; yaw: compass
D pump hall          -> pos: LiDAR SLAM (ExtNav) + optical flow backup; height: baro + rangefinder check; yaw: ExtNav yaw
E covered reservoir  -> no flight this phase (confined space, needs a separate plan)

The result sets the work of the next modules straight away. Over the filter beds there is no optical-flow backup, because water offers no texture the camera can track, and the rangefinder should not control height because the water level differs from the walkway. In the pump hall the magnetic field deviates by 42%, so heading must come from the external system. The reservoir is too dark for cameras and is a confined space, so it gets its own plan and is not flown in this phase.

A zone table like this is used throughout the course: module 2 uses it to set the EKF source sets, module 4 to choose height sources, and module 5 to decide which route segments must be flown slowly or not entered.

Law and safety at the workplace

Flying inside a plant needs the owner’s permission and comes under that workplace’s safety system. Thailand’s Occupational Safety, Health and Environment Act B.E. 2554 (2011) requires employers to provide safe working conditions, so a drone team working on site follows the plant’s permit-to-work procedure like any other contractor. If the mission includes outdoor flight, for example from the apron in through the main door, that part is in the airspace and must comply with the CAAT notification in force since 17 May 2026 (Civil Aviation Authority of Thailand, 2026).

The covered clear-water reservoir is a confined space. The ministerial regulation on confined spaces of B.E. 2562 (2019) forbids employers to let workers enter unless they are authorised by the person responsible for permits, trained, and the atmosphere has been measured and assessed before entry. This matters directly to the drone team: if the drone falls into the tank, whoever retrieves it must go through all of these steps. Flights in such spaces must therefore plan drone recovery before take-off.

Risk controls should follow the NIOSH hierarchy of controls, from most to least effective: eliminate the hazard, substitute something less hazardous, engineering controls, administrative controls and personal protective equipment (National Institute for Occupational Safety and Health, 2024). In this case:

  • Eliminate: keep people out from under the flight path and move crane work to another time
  • Substitute: use the smallest drone that can still carry the required camera
  • Engineering: propeller guards, nets around test areas, an emergency motor stop and a virtual fence below the ceiling
  • Administrative: permit to work, a flight plan, briefing staff on every shift and pre-flight checklists
  • Protective equipment: helmets and eye protection for the team in the area

Module lab

Lab: survey a building and build a zone table

  1. Choose one large building on campus, such as a sports hall or workshop. Get the building manager’s permission first, then sketch the plan with ceiling heights and major obstacles.
  2. Divide the building into at least four zones. In each, measure the number of satellites with a phone app, light with a light meter or app, floor texture (photograph it) and magnetic deviation.
  3. Connect the autopilot to a ground station with the propellers removed first, carry the drone through each zone and record the satellite count, EKF status and compass readings.
  4. Adapt the code in Example 2 to the group’s data and explain the result for each zone.
  5. Use the code in Example 1 to find how long the IMU could carry the drone for the tolerance of the narrowest space in the building.
  6. List the hazards and controls for that building following the hierarchy of controls, and state which failsafe settings must change from their outdoor values.

Common mistakes

Watch out

  • Assuming the IMU can hold position for long. The error grows with the square of time; a few seconds is enough to leave a narrow walkway.
  • Forgetting to set the EKF origin, then wondering why Loiter or Auto will not engage.
  • Keeping outdoor failsafe settings, especially an RTL that climbs before returning, which indoors means hitting the roof.
  • Trusting the compass next to steel frames and motors until the drone circles in a spiral.
  • Using one positioning method for the whole building, although walkways, water and machine rooms need different sources.
  • No recovery plan for confined spaces, so someone has to go in unprepared.

Summary

  • Indoors, the EKF needs horizontal position or velocity, height, heading and an origin from sources other than GNSS.
  • The IMU-only error is and the time to reach the tolerance is , usually only a few seconds.
  • Indoor hazards include magnetic interference, confined space, failsafes that climb, light and water surfaces, recirculating air and plant activity.
  • Survey and zone the site before configuring anything, then choose data sources zone by zone.
  • Work within the workplace safety system, control risk by the hierarchy of controls and plan drone recovery from confined spaces.

Check your understanding

  1. A residual bias of 0.04 m/s² and a tolerance of 0.5 m: how many seconds can the IMU alone hold the drone?
  2. A bias of 0.02 m/s² and 20 seconds without aiding: roughly how large is the position error?
  3. Why is an outdoor RTL setting dangerous in a 12 m high building, and what should it become?
  4. A zone has no GNSS, 30 lux of light, a textured floor and a 20% magnetic deviation. Under the criteria in Example 2, which position and heading sources apply?
  5. If the drone falls into the covered reservoir, what must happen before a worker goes in to retrieve it?
Answers
  1. seconds
  2. m
  3. RTL climbs to at least RTL_ALT_M above home before returning; if that is above the ceiling the drone hits the roof trusses, and “home” indoors may have no safe straight path. Set the failsafe action to Land, or Brake then Land.
  4. Light is below 50 lux, so only LiDAR SLAM applies and more lighting should be added; there is no optical-flow backup. Heading must come from the external system (ExtNav) because the magnetic deviation exceeds 15%.
  5. The tank is a confined space: entry needs authorisation from the person responsible for permits, the worker must be trained, the atmosphere must be measured and assessed before entry, and a rescuer with equipment must be present under the 2019 regulation. All of this belongs in the plan before flight.

Key formulas

Position error from a constant acceleration bias (one axis)
Time until the error reaches the tolerance

Key references

  1. Groves, P. D. (2013). Principles of GNSS, inertial, and multisensor integrated navigation systems (2nd ed.). Artech House. link
  2. Woodman, O. J. (2007). An introduction to inertial navigation (Technical Report UCAM-CL-TR-696). University of Cambridge, Computer Laboratory. link
  3. ArduPilot Dev Team. Non-GPS navigation. ArduPilot Copter documentation. link
  4. PX4 Autopilot. GNSS-degraded and denied flight (dead-reckoning mode). PX4 guide (main). link
  5. ArduPilot Dev Team. Magnetic interference. ArduPilot Copter documentation. link
  6. ArduPilot Dev Team. Parameter list (Copter stable V4.7.1). ArduPilot Copter documentation. link
  7. พระราชบัญญัติความปลอดภัย อาชีวอนามัย และสภาพแวดล้อมในการทำงาน พ.ศ. 2554. (2554). ราชกิจจานุเบกษา, 128(4 ก). link
  8. กฎกระทรวงกำหนดมาตรฐานในการบริหาร จัดการ และดำเนินการด้านความปลอดภัย อาชีวอนามัย และสภาพแวดล้อมในการทำงานเกี่ยวกับที่อับอากาศ พ.ศ. 2562. (2562). ราชกิจจานุเบกษา. link
  9. National Institute for Occupational Safety and Health. (2024). About hierarchy of controls. Centers for Disease Control and Prevention. link
  10. สำนักงานการบินพลเรือนแห่งประเทศไทย. (2569). ประกาศ กพท. เรื่อง หลักเกณฑ์และวิธีการในการอนุญาตให้ผู้บังคับหรือปล่อยอากาศยานซึ่งไม่มีนักบิน ประเภทอากาศยานที่ควบคุมการบินจากภายนอก ที่มีน้ำหนักไม่เกิน 25 กิโลกรัม ปฏิบัติแตกต่างไปจากเงื่อนไขที่กำหนด พ.ศ. 2569 (มีผล 17 พฤษภาคม 2569). link

Further reading

Study the assigned knowledge units in advance, review media and take the module quiz

In class / field

Lab or field practice from worksheets with a safety checklist

Learning evidence: Checked worksheets and quiz results

Module quiz

This is a formative self-check, not a graded exam

Knowledge domain: Delivery, indoor operations and warehousing · Control, autopilot and navigation · Mission planning, flight and simulation · Law, safety and risk