How to fly DJI drones autonomously indoors?

It is easy to track DJI drones indoor. However, to fly DJI drones autonomously indoors is a less straightforward task.

In this article, we focus on DJI drones only, because they have their own specifics. If you want to learn more about autonomous drones indoor in general, check our main Drone page.

Problems with DJI drones

Closed ecosystem:

  • DJI has built the company similar to Apple: “walled garden”, “take or leave it”. Difficult or impossible to connect non-DJI equipment to DJI drones
  • Consumer drones like DJI Mavic or DJI Phantom do not have external GPS inputs. Thus, it is impossible to easily connect an external GPS source or indoor RTLS source like Marvelmind Indoor “GPS”
  • More expensive DJI drones, such as Matrice have external GPS inputs, but those are designed for DJI GPS trackers, i.e. not clear whether protocols are available or open or can be used commercially

Not designed for autonomous indoor flights:

  • DJI drones have magnetometer/compass inside, which good for outdoors, but terrible for indoors. There is always metal around, currents producing magnetic field distorting the Earth’s magnetic field. As a result, it is simply difficult to start flying the drone, because it can’t complete the compass calibration
  • It is impossible or difficult to disable the compass

Basic indoor tracking of DJI drones is easy

To track DJI drone or any drone indoors is easy:

  • Take Marvelmind Indoor “GPS”, for example, Starter Set Super-MP
  • Install stationary beacons in the room with line of sight between them and distances up to 30m
  • Install a mobile beacon on the drone
  • The system is up and running in 10 seconds or so
  • Fly the drone in manual mode
  • Enjoy the precise track

See the examples below for indoor and outdoor tracking. There is no difference between indoor and outdoor tracking for these examples – the same technology, the same approach. Simply, we show that it is possible to use the system indoor and outdoor and not rely on GPS in both cases.

Potential solution for DJI drones indoor

Using DJI Developer SDKs, it may be possible to make DJI drones flying autonomously indoors. There is unverified information that it is possible to use the DJI drones in this way:

  • A DJI drone (or any drone) carries a mobile beacon or two mobile beacons, if you want Location + Direction
  • Location of the mobile beacon (and its drone) is determined by the system
  • The location data is fed into an external computer or autopilot that knows the required waypoints and the current drone’s location
  • Control signals from autopilot is fed back into the drone via the DJI SDK, i.e. the drone thinks it is controlled by a human via the SDK, but, in fact, it flies automatically

This can work.  We have done a similar approach a long time ago with another basic drone:

Notice, that we have done it not with DJI, but another basic drone, but the approach was very similar. The drone wasn’t even aware that is automatically controlled. The drone believed that it is manually controlled by an operator.

Other options to make DJI drones flying indoor autonomously

Hacking internal GPS protocol:

  • It is possible to hack the hardware and internal GPS protocol and to feed the data inside the drone. Drone won’t be able to realize whether it is getting the data from the real GPS or from Marvelmind Indoor “GPS”. There is unverified information that such hacks are not too difficult to do, the protocols are available

Hacking remote control:

  • It is possible to hack the DJI drone remote control physically. So, instead of manual control by fingers, it is possible to feed voltages from digital to analog converters connected to an external control system. In this way, the drone and even the remote control won’t know that it is controlled by a human. The external autopilot will fly the the drone between the waypoints based on the coordinates from the mobile beacon. While the internal control system of the drone will keep in steady flying position – the best of two worlds

Alternatives to DJI for autonomous flight indoor

Build drone based on PixHawk and similar:

  • This is the most proven and the most working solution
  • Too many hardware and software variants: many HW versions of PixHawk from different manufacturers
  • Several SW platforms: PX4 vs. ArduPilot. Too easy to be lost of confused with settings
  • Nearly complete flexibility with inputs, settings, etc. It is even possible to edit the SW because it is open-sourced mostly
  • For mid- and advanced users
  • Marvelmind tested and support several configurations. Most lately: PX4 + PixHawk 4: https://youtu.be/52e6eTZapJ8

Integrate with other types of drones:

 
These and similar drones are potentially more open than DJI drones. Use them and adapt them for autonomous flight indoor using Marvelmind Indoor “GPS” instead of GPS.
Scroll to Top