Manuscript Offprint
arXiv:2611.12671GPS-Triggered Adaptive Trajectory Control and SDR-Based RF Jamming for UAV Geofencing
Muhammad Moazam Azeem Dept. of Computer Science & Eng. Qatar University Doha, Qatar Email: moazam@qu.edu.qa
Abdul Rehman Khan Tareen Dept. of Electrical Engineering University of Engineering and Technology, Taxila, Pakistan Email: khan0229508@gmail.com
Muhammad Obaid Ullah Dept. of Electrical Engineering University of Engineering and Technology, Taxila, Pakistan Email: obaid.ullah@uettaxila.edu.pk
Abstract—This paper presents a GPS-triggered geofencing and enforcement scheme that integrates real-time satellite positioning with Software-Defined Radio (SDR) based RF jamming to detect and neutralize unauthorized unmanned aerial vehicle (UAV) boundary violations. Conventional geofencing depends on onboard GPS and cooperative flight firmware. The proposed approach instead moves enforcement to a ground base station, so the response does not depend on the UAV. An ESP32-WROOM-32 microcontroller paired with a u-blox NEO-6M GPS receiver streams telemetry over Wi-Fi to a Python/GNU Radio base station. There, a lightweight Haversine boundary-violation algorithm computes the great-circle distance between the UAV and the geofence. This distance drives a piecewise-linear adaptive speed and altitude control law. The law progressively decelerates and descends the UAV inside a 1 km warning zone and brings it to a complete halt at the boundary. If the boundary is breached, a HackRF One SDR escalates to band-limited noise jamming of the 2.4 GHz control link. The hardware stack was integrated on a GoolRC S116 quadrotor with an end-to-end enforcement latency of about 1 s. Field trials achieved 95% disconnection accuracy within a 50 m radius, and u-center NMEA analysis confirmed sub-2-meter GPS positioning precision. Simulation over an 8-sector, 50 km geofence model confirms speed and altitude-invariant boundary enforcement for cruising speeds of 5 to 50 m/s and cruising altitudes up to 100 ft. A comparison against a PID baseline shows that the proposed law guarantees overshoot-free shutdown at the boundary without gain tuning. It also runs in constant time, which makes it well suited to low-cost, resource-constrained embedded platforms.
Index Terms—UAV Geofencing, Software-Defined Radio, RF Jamming, Adaptive Trajectory Control, GPS Positioning, UAV Security
I. INTRODUCTION
The rapid proliferation of unmanned aerial vehicles (UAVs) across surveillance, infrastructure monitoring, and law enforcement applications has outpaced the security frameworks designed to govern their operation. Conventional drone communication links, frequently based on unencrypted Wi-Fi or proprietary radio protocols, remain vulnerable to unauthorized access, hijacking, and operation beyond designated boundaries [1], [2], creating risks to public safety and restricted airspace integrity [3]. Existing geofencing approaches typically rely on onboard GPS alone, an assumption that introduces single-point vulnerabilities and offers limited recourse once a boundary violation is confirmed [4]. Consequently, there is increasing interest in geofence enforcement mechanisms that not only
TABLE I COMPARISON WITH EXISTING UAV GEOFENCING APPROACHES
| Feature | Proposed | Arora [4] | Souli [6] | Thomas [8] |
|---|---|---|---|---|
| Adaptive speed control | ✓ | ✗ | ✗ | ✓ |
| Adaptive altitude control | ✓ | ✗ | ✗ | ✗ |
| SDR-based jamming | ✓ | ✗ | ✓ | ✗ |
| GPS-triggered enforcement | ✓ | ✓ | ✗ | ✓ |
| Hardware validation | ✓ | ✗ | ✓ | ✗ |
| Low-cost implementation | ✓ | ✓ | ✗ | ✓ |
| UAV-independent response | ✓ | ✗ | ✓ | ✗ |
| Multi-sector geofence | ✓ | ✗ | ✗ | ✗ |
detect boundary violations but also actively mitigate unauthorized UAV operations through real-time intervention [5], [6]. By combining real-time GPS tracking with SDR-based signal control, a base station can not only detect unauthorized boundary crossings but also actively respond, without depending on cooperation from the UAV itself [6], [7]. This letter proposes a GPS-triggered geofencing and jamming scheme that integrates an ESP32-based telemetry link, a Haversine-distance boundary-violation algorithm, and a HackRF SDR transmitter to detect and neutralize UAV boundary violations in real time. Unlike static geofence alerts, the proposed scheme couples boundary detection with an adaptive speed and altitude control response that progressively decelerates and descends the UAV as it approaches the restricted zone, escalating to RF jamming if the boundary is breached.
Table I compares the proposed scheme against related works. Arora [4] detects violations but provides no active response. Souli [6] demonstrates SDR interception but requires cooperative infrastructure without adaptive trajectory control. Thomas [8] provides adaptive speed control but lacks jamming and altitude control. The proposed scheme uniquely integrates all three capabilities with hardware validation.
The contributions of this letter are fourfold: (i) a lightweight Haversine-based geofence algorithm suitable for low-cost embedded hardware; (ii) an adaptive control law that produces a smooth, bounded approach trajectory across a range of UAV speeds and altitudes; (iii) an 8-sector, 50 km simulation study confirming speed and altitude-invariant boundary enforcement and (iv) experimental validation of SDR-triggered jamming achieving 95% disconnection accuracy within a 50-meter radius, with sub-2-meter GPS precision.
II. SYSTEM MODEL AND GEOFENCE ALGORITHM
B. Geofence Violation Detection
Boundary violations are detected using the great circle (Haversine) distance between the UAV's current coordinates [4] and a reference boundary point , computed via (1).
where and denote latitude and longitude in radians, and km is the Earth's mean radius. The computed distance d is compared against two thresholds: a warning distance and a shutdown distance , with .
C. Adaptive Trajectory Control
To avoid an abrupt boundary response, the UAV's commanded speed and altitude are governed by a piecewise function of the remaining distance d to the boundary [8], [10]: The commanded speed and altitude are governed by
where and are the UAV's cruising speed and altitude, respectively. The control law (2) produces a constant velocity cruise phase for , a linear deceleration and descent phase for , and a complete halt at [8], consistent with the simulated braking and descent behavior in Section IV. The following proposition formally establishes the convergence guarantee of the proposed control law.
Proposition 1. For any and , the control law (2) guarantees and for all .
Proof: The third branch of (2) applies directly at , yielding and , since . Both expressions are well-defined for finite , , and , completing the proof.
D. Jamming Trigger
If the UAV's position satisfies and the base station confirms an unauthorized or non-compliant trajectory, the system escalates to RF jamming. The HackRF SDR, configured through GNU Radio, generates a Gaussian baseband noise signal shaped by a 20 MHz band-pass filter and up-converted to a 2.4 GHz center frequency, matching the UAV's remote-control band, at an FCC-compliant output power of -30 dBm [11], disrupting the link between the UAV and its controller [5].
III. HARDWARE IMPLEMENTATION
The onboard unit is built around an ESP32-WROOM-32 microcontroller, selected for its integrated 802.11 b/g/n Wi-Fi, line of sight communication range of up to 1 km, and low-power sleep mode (10 A), enabling sustained drone to base station connectivity within a compact, low-cost form factor. GPS telemetry is provided by a u-blox NEO-6M module interfaced to the ESP32 over UART, offering sub-2-meter positioning accuracy and compatibility with GPS, GLONASS, Galileo, and BeiDou constellations, per the module's manufacturer specification. At the base station, a HackRF One SDR provides wideband transmit/receive coverage from 1 MHz to 6 GHz, enabling both passive RF monitoring of the UAV's control link and active jamming signal generation through GNU Radio. The SDR's signal chain was validated for FM broadcast frequencies (87.6, 93.9, and 105.5 MHz) prior to jamming trials.
The full stack (ESP32, NEO-6M, circuitry) was integrated onto a GoolRC S116 quadrotor, adding 150 g and reducing flight endurance by 12%. End-to-end enforcement latency totals 1033 ms (GPS: 1000 ms, UART: 18 ms, Wi-Fi: 12 ms, evaluation: 3 ms), well within the s reaction window at maximum UAV speed.
IV. SIMULATION AND EXPERIMENTAL RESULTS
A. Hardware Jamming Validation
The SDR jamming response was evaluated through 20 field trials in which the UAV was placed at increasing distances from the HackRF transmitter while the jamming signal was active. Table II summarizes a few representative outcomes. The system achieved a 95% disconnection success rate within a 50 m operational radius [11]; the single non-disconnection case (Trial 5) arose when the UAV flew over the HackRF with the device switched off, confirming that the jamming response is bounded to the intended zone and does not trigger spuriously [12]. Disconnection success rate and false-trigger behavior correspond to the mitigation-success and false-alarm metrics used in standardized counter-drone evaluation [3]. GPS positioning accuracy was verified via U-center NMEA stream analysis across two distinct test locations, confirming sub-2-meter positioning precision consistent with the NEO-6M module's specified horizontal accuracy.
TABLE II UAV DISCONNECTION TRIALS AT VARYING DISTANCES
| Trial | Dist.(m) | Outcome | Status | HackRF |
|---|---|---|---|---|
| 1 | 17 | disconnected | On ground | On |
| 2 | 23 | partial responsea | On ground | On |
| 3 | 35 | disconnected | On ground | On |
| 4 | 50 | disconnected | Mid-air, landed | On |
| 5 | HackRF | No disturbance | Unaffected | Off |
<sup>a</sup>Connection severed; wings did not respond.

Fig. 1. Radar-based geofence visualization showing the eight-sector boundary, SE corridor, and proximity risk along the flight path
B. Geofence Boundary Detection
The Haversine algorithm was validated against a square geofence defined by four GPS coordinates (violation threshold 50 m). Case 1 (distance below threshold) correctly flagged the drone as within bounds; Case 2 (distance exceeded threshold) triggered the jamming pipeline. Both were confirmed via the Python GUI, validating the end-to-end pipeline from GPS acquisition to jamming trigger.
C. Geofence Simulation Results
The adaptive control law in (2) was evaluated using an 8-sector, 50 km geofence simulation model centered on the drone's starting position, with a 1 km warning threshold and a 0 km shutdown threshold . Fig. 1 shows the radar-based geofence visualization. The drone's starting position is at the center (green), and eight geofence boundaries are defined at a constant 50 km radius across the cardinal and intercardinal directions (N, NE, E, SE, S, SW, W, NW). The south-east (SE) corridor is selected as the target direction; the yellow shaded

Fig. 2. 3-D geofence risk surface with drone flight path overlaid from start (green) to boundary (red).
region indicates the chosen flight corridor, and the red line represents the drone's actual traversed path.
The color intensity along the path encodes proximity-based risk, increasing as the drone approaches the boundary, demonstrating that the boundary-detection logic in (1) correctly resolves the drone's position relative to all eight sectors simultaneously.
Fig. 2 presents the three-dimensional risk surface over the geofence boundary, where the horizontal plane represents geographic position (latitude/longitude) and the vertical axis encodes risk level. The surface is nearly flat and low-valued at the drone's starting position, rising monotonically toward a sharp peak directly above the geofence boundary. The drone's flight path (black curve) departs from the low-risk flat area and arrives at the high-risk peak, confirming that the proximity-based risk metric is spatially consistent with the linear control law in (2) rather than exhibiting a step discontinuity at the boundary. Fig. 3 compares distance-to-boundary trajectories for initial speeds of 5-50 m/s.
Each curve shows a constant-slope cruise phase for , followed by reduced-slope deceleration engaging at the 1 km threshold. All curves converge to regardless of initial speed, confirming consistent shutdown enforcement. Higher speeds reduce the available reaction window, motivating the 1 km warning-zone design. Fig.4 shows altitude profiles for the same speed range, each maintaining 100 ft cruise altitude while , then descending linearly to zero at the boundary.
Faster drones descend at a steeper temporal rate but all arrive at zero altitude precisely at the geofence boundary, confirming speed-invariant spatial behavior of (2). Fig. 5 evaluates the altitude control law across various cruising altitudes (20, 40, 60, 80, 90, and 100 ft).
In all cases, altitude remains constant while the drone is
Drone Distance to Bended Region over Time for Various Speeds
| Speed: 5 m/s | Speed: 10 m/s | Speed: 15 m/s | Speed: 20 m/s | Speed: 25 m/s | Speed: 30 m/s | Speed: 35 m/s | Speed: 40 m/s | Speed: 45 m/s | Speed: 50 m/s | Warning Distance (1 km) | Shutdown Distance (0 km) | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Distance to Bended Region (km) | 50 | 45 | 40 | 35 | 30 | 25 | 20 | 15 | 10 | 5 | 0 | 0 |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Fig. 3. Distance to boundary vs. time for UAV speeds of 5-50 m/s. Warning (1 km) and shutdown (0 km) thresholds shown as dashed lines.

Fig. 4. Altitude vs. time for speeds 5-50 m/s: constant cruise phase followed by linear descent upon entering the 1 km warning zone.

Fig. 5. Altitude vs. distance for initial altitudes of 0-100 ft showing consistent linear descent profiles.
beyond the warning threshold, then decreases linearly with distance once , converging to zero at the boundary regardless of starting altitude. The curves are uniformly linear in the descent phase, indicating that the control law in (2) produces a consistent deceleration gradient independent of initial altitude. This confirms the adaptive altitude controller
TABLE III PERFORMANCE COMPARISON: CONTROL LAW VS. PID BASELINE
| Metric | Proposed | PID Baseline |
|---|---|---|
| Convergence guarantee | Analytical (Prop. 1) | Gain-dependent |
| Overshoot at boundary | None | Possible |
| Gain tuning required | No | Yes |
| Computational overhead | ||
| Embedded deployment | Direct | Re-tune per UAV |
| Boundary stop: speed | always | Approximate |
| Boundary stop: altitude | always | Approximate |
is reliable across heterogeneous UAV flight profiles without per-platform retuning.
D. Discussion
Hardware experiments confirmed 95% SDR disconnection within 50 m without false triggering. Simulation results across Figs. 1-6 collectively validate: (i) spatial correctness of the Haversine algorithm across all 8 sectors; (ii) speed-invariant enforcement ( m/s converging to ); and (iii) altitude-invariant descent ( ft, linear profile). The proposed law generalizes across UAV platforms without per-platform calibration.
E. Comparison with PID Baseline
To further validate the proposed control law, we compare it against a PID controller on the same distance error , with gains , , selected to minimise overshoot over m/s, evaluated under identical geofence conditions ( km, km), and initial altitude ft.
Fig. 6 compares the speed, altitude, and distance-to-boundary profiles of both controllers, with the PID law given by (3)-(4). The proposed linear law produces a monotonically decreasing, overshoot-free trajectory that converges exactly to at the boundary. In contrast, the PID controller exhibits mild oscillation near the warning threshold due to integral wind-up, and its convergence rate depends on the gain settings, requiring per-platform re-tuning. Table III summarises the quantitative performance metrics for both schemes.
The proposed law offers three advantages over PID for embedded geofencing: (i) Guaranteed convergence: Proposition 1 proves analytically for all ; PID offers no closed-form guarantee and is subject to integral wind-up near the boundary. (ii) Parameter-free deployment: the law depends only on geofence parameters and , requiring no per-platform gain tuning. (iii) Deterministic latency: the piecewise linear structure (2) executes in time (3 ms, Section III), whereas (3)-(4) accumulates numerical state across time steps; PID integration introduces variable latency under

Fig. 6. Comparison of proposed linear control law vs. PID baseline for and . (a) Speed profile. (b) Altitude profile. (c) Distance-to-boundary convergence. The proposed law achieves monotonic, overshoot-free shutdown at the boundary without gain tuning.
high update rates. These properties make the proposed law particularly suited to low-cost, real-time geofence enforcement on resource-constrained embedded hardware, where gain retuning per deployment is impractical.
V. CONCLUSION
This paper presented a GPS-triggered, SDR-based geofence enforcement framework for UAVs. It combines Haversine boundary detection, an adaptive speed and altitude control law, and escalating RF jamming within a single low-cost architecture. An ESP32 and NEO-6M onboard unit provides real-time telemetry to a HackRF One and GNU Radio base station. As a result, boundary enforcement does not depend on the cooperation or firmware of the UAV itself.
Hardware experiments on a GoolRC S116 quadrotor confirmed 95% SDR disconnection accuracy within a 50 m operational radius, with no spurious triggering when the transmitter was inactive. GPS precision was below 2 m across two test locations. The measured end-to-end enforcement latency of 1033 ms lies well within the 20 s reaction window available at the maximum simulated speed. Simulation over an 8-sector, 50 km geofence model showed that the proposed control law enforces the boundary independently of speed and altitude across m/s and ft. In every case the UAV decelerated and descended linearly within the 1 km warning zone and reached zero speed and altitude exactly at the boundary. Compared with a PID baseline, the proposed law offers an analytical convergence guarantee, overshoot-free shutdown, constant-time evaluation, and deployment without per-platform gain tuning. These properties make it well suited to resource-constrained embedded hardware.
The current implementation has several limitations. The Wi-Fi telemetry link restricts the operating range to about 1 km with clear line of sight. In addition, the GPS module updates only once per second, which accounts for about 1000 ms of the 1033 ms end-to-end enforcement latency. The adaptive control law has so far been validated in simulation, while hardware trials focused on the detection and jamming stages. RF jamming is also subject to strict regulatory constraints and must be restricted to authorized operators and test environments. Future work will address multi-UAV detection and
interception, cellular or dedicated long-range RF telemetry, multi-constellation GNSS fusion with higher update rates, resilience to GPS spoofing, and in-flight validation of the adaptive trajectory controller on the hardware platform.
VI. ACKNOWLEDGEMENT
This work was made possible by a research grant funded by Qatar University and Sultan Qaboos University under research grant No. QUICG-CENG-26/27-1148. The findings herein are solely the responsibility of the authors.
REFERENCES
[1] J. Gaspar, R. Ferreira, P. Sebastião, and N. Souto, “Capture of UAVs Through GPS Spoofing Using Low-Cost SDR Platforms,” Wireless Personal Communications, vol. 115, no. 4, pp. 2729–2754, 2020.
[2] P.-Y. Kong, “A Survey of Cyberattack Countermeasures for Unmanned Aerial Vehicles,” IEEE Access, vol. 9, pp. 148 244–148 263, 2021.
[3] G. De Cubber, D. Doroftei, P. Petsioti, A. Koniaris, K. Brewczynski, M. Życzkowski et al., “Standardized evaluation of counter-drone systems: Methods, technologies, and performance metrics,” Drones, vol. 9, no. 5, p. 354, 2025.
[4] P. Arora and S. Deswal, “Geofence-Based Boundary Violation Detection Algorithms in Unmanned Aerial Vehicles,” International Journal of Communication Systems, vol. 38, no. 4, p. e6035, 2025.
[5] Z. Wang, R. Liu, Q. Liu, L. Han, and W. Mu, “Controllable Positioning Service With UAV-Enabled Cooperative Jamming,” IEEE Wireless Communications Letters, vol. 10, no. 9, pp. 1929–1933, 2021.
[6] N. Souli, P. Kolios, and G. Ellinas, “Multi-Agent System for Rogue Drone Interception,” IEEE Robotics and Automation Letters, vol. 8, no. 4, pp. 2221–2228, 2023.
[7] N. Souli, P. Kolios, and G. Ellinas, “An Enhanced Autonomous Counter-Drone System with Jamming and Relative Positioning Capabilities,” Robotics and Autonomous Systems, vol. 194, p. 105160, 2025.
[8] P. R. Thomas and P. Sarhadi, “Geofencing Motion Planning for Unmanned Aerial Vehicles Using an Anticipatory Range Control Algorithm,” Machines, vol. 12, no. 1, p. 36, 2024.
[9] P. Valianti, K. Malialis, P. Kolios, and G. Ellinas, “Cooperative Multi-Agent Jamming of Multiple Rogue Drones Using Reinforcement Learning,” IEEE Transactions on Mobile Computing, vol. 23, no. 12, pp. 12345–12359, 2024.
[10] S. A. M. Abdul, A. Ratnoo, and D. Ghose, “Dynamic Geofence Design for Unmanned Aircraft System Path Following in Urban Airspace,” Journal of Guidance, Control, and Dynamics, vol. 49, no. 5, 2026.
[11] J. Yang, D. Bai, X. Yuan, and D. Li, “Anti-Jamming UAV Relaying Based on Joint Geographic-Electromagnetic Domain Optimization,” IEEE Access, vol. 12, pp. 53928–53943, 2024.
[12] Y. Li, J. Pawlak, J. Price, K. A. Shamaileh, Q. Niyaz, S. Paheding, and V. Devabhaktuni, “Jamming Detection and Classification in OFDM-Based UAVs via Feature and Spectrogram-Tailored Machine Learning,” IEEE Access, vol. 10, pp. 16859–16870, 2022.