基于HarmonyOS的无人机地理围栏系统研究

    UAV geofencing system research based on HarmonyOS

    • 随着低空经济的快速发展,无人机规模化应用对空域安全监管提出了更高要求。为现场能及时了解空域内飞行信息,确保飞行的安全与合规,本文提出了一种基于HarmonyOS(鸿蒙操作系统)的便携式移动端轻量级地理围栏监控方案,系统架构包括数据通信、无人机管理、地理围栏管理及告警管理四大核心模块,采用ArkTS(方舟编译器)与C++混合开发方式,通过HarmonyOS NAPI(节点接口)实现跨语言调用,结合5G通信技术与MQTT(Message Queuing Telemetry Transport,消息队列遥测传输协议),实现无人机位置信息的低延迟传输及本地实时处理。针对多禁入区的复杂地理围栏场景,方案所设计的算法构造伪简单多边形,采用耳切三角剖分进行预处理,结合基于图结构和广度优先搜索(Breadth-First Search, BFS)的三角空间搜索算法,辅以起始点缓存机制,实现了高效且准确的越界判定。实验结果表明:该算法能够有效处理简单及复杂多边形地理围栏,判定准确率接近100%;端到端通信延迟稳定控制在1.3 s以内,适用于中小型低空无人机的监管场景,具有较高的实际应用价值。

       

      Abstract: With the rapid growth of the low-altitude economy, the large-scale deployment of unmanned aerial vehicles (UAVs) has imposed increasingly stringent demands on airspace safety and regulatory compliance. To address the need for real-time awareness of in-air UAV operations and ensure safe, rule-compliant flights, this paper proposes a lightweight, portable geofencing monitoring solution implemented on HarmonyOS-based mobile devices. The system architecture comprises four core modules: data communication, UAV management, geofence management, and alert management. It adopts a hybrid development approach using ArkTS and C++, with cross-language interoperability enabled through the HarmonyOS Native API (NAPI). By integrating 5G connectivity and the MQTT protocol, the system achieves low-latency transmission and real-time local processing of UAV positional data.To handle complex geofencing scenarios involving multiple no-fly zones, the algorithm first constructs a pseudo-simple polygon by bridging outer boundaries and inner holes. This is followed by ear-clipping triangulation as a preprocessing step. A graph-based spatial search algorithm leveraging Breadth-First Search (BFS) over the resulting triangular mesh is then employed for boundary violation detection, enhanced with a starting-point caching mechanism to improve efficiency. Experimental results demonstrate that the proposed method accurately handles both simple and complex polygonal geofences—including those with multiple holes—with a boundary violation detection accuracy approaching 100%. Moreover, end-to-end communication latency is consistently maintained below 1.3 seconds, confirming the system's suitability for regulatory applications involving small- to medium-sized low-altitude UAVs and highlighting its strong practical value.

       

    /

    返回文章
    返回