Hello ArduPilot Developers and Community,
My name is Ryota, and our team is developing a collision avoidance system based on a P2P mesh network using LoRa (likely based on Meshtastic).
Our architecture consists of:
- Companion Computer (Commander): A Raspberry Pi / CM4 running C# (.NET) on Linux. This is the “high-level” layer.
- LoRa Module (Artisan): A “low-level” nRF52840-based module connected via UART/USB to the Companion Computer. This module handles the raw P2P mesh networking.
- Flight Controller (FC): ArduPilot (e.g., Pixhawk, Cube, or ArduPilot on Linux).
The Companion Computer (C# app) will receive the position/vector of other aircraft via the P2P LoRa mesh.
Our Question Is:
What is the “best practice” (most ArduPilot-native way) to feed this external aircraft position data from our Companion Computer (C#) into the FC, specifically to integrate with ArduPilot’s standard Proximity Avoidance feature (AVOID_ENABLE)?
We want to choose the “cleanest” method that avoids modifying the ArduPilot C++ core if possible.
- Option A: Should our C# app generate and stream
OBSTACLE_DISTANCEmessages (perhaps at high frequency) to the FC? - Option B: Should our C# app generate and stream
ADSB_VEHICLEmessages (spoofing them, as if from an ADS-B receiver) to the FC? - Option C: Is there a better, more standard message we should be using (e.g.,
TRAFFIC_DATA,COLLISION)? - Option D (Worst Case): Is our initial idea correct—that we must define a new custom MAVLink message (like
P2P_MESH_NODE.xml) and submit a patch to the ArduPilot core to interpret it?
We are trying to build this the “right way” to be a good citizen of the ArduPilot ecosystem. Any architectural advice on the cleanest MAVLink path (A, B, C, or D) would be greatly appreciated.
Thank you,
Ryota