I recently bough the Mavic Pro from DJI; my first drone! One of the things I specifically wanted was to fly using FPV goggles; I already own a set of Fat Sharks. But the Mavic does not come with an HDMI output, so this is how I got everything to work together doing it the "hard way".
It finally stopped raining so this morning I had chance to try a real test flight. I learned two things:
It works! Well .. I suppose I knew it works, but I'd not actually tried it outside before.
It drops frames!! This is more of a concern and, as yet, I'm not what the problem is. Connected to the AppleTV over Airplay, you can see the iPhone and Goggles drop frames fairly regularly (1 .. 2 .. 3 .. drop .. 1 .. 2 .. 3 .. drop). When not connected, the iPhone video appears just fine.
So while it's dropping frames, its not really usable for flying. I need to do more investigation to see if I can work out why this is happening; is it a limitation of the network, Airplay Mirroring, the older iPhone I'm using, or something else entirely.
I was asked about latency today, so I decided I should actually measure it. The video below show the latency test. The top screen is the Airplay receiver (Apple TV), the lower left screen is the original source clock with the Mavic pointing at it, and the right screen is the display on the Mavic's controller.
So here's a question - how do I demo this? I think a video of me wearing goggles and flying a drone might be quite dull. Just wondering aloud ... while the rain outside prevents me testing it anyway ...
In the above photo you can see all the pieces connected. On the right are the goggles; the black cable provides power, the white HDMI video. The video cable connects to the HDMI port on the Apple TV. The black power cable is connected to the battery via a power splitter which also provides power to the the Apple TV. Plug the battery in, and everything power-up just as you'd expect, the Apple TV appearing on the iPhone's 'Airplay Mirroring' menu.
If you look at the back of an Apple TV you will notice that it takes mains power. Most days I'd be happy about this because it means one less power brick; but today, not so much. The thing about flying a drone is that there's not usually mains electric to be had. So the Apple TV needs to run off a battery.
Fortunately this problem has been solved before by people who own boats. This excellent blog post (http://i-marineapps.blogspot.com/2014/04/appletv-5-volt-usb-conversion.html) gives all the details of how to convert your Apple TV from mains power to one taking a battery. As they point out in the article, the hardest part of the whole conversion is getting the damn case open!
This is what my modded Apple TV looks like. I used a 5.5mm power connector to feed the DC-to-DC converted because it was the same size as the power connectors on the goggles.
There appears to be no way to get an HDMI signal out of an iPhone at the same time as getting a USB signal into it. But there is one other way to get video out - using Airplay.
Airplay is Apple's wireless video transmission protocol which is uses to send video from iPhones, iPad and Macs to it's Apple TV box. One specific option - mirroring - will display the contents of the phone screen on the TV. I'm sure there's a delay, but it's imperceptible to me. So my new plan was to use Airplay to send the DJI GO's screen over Airplay to the Fat Shark goggles.
In an ideal world, the Airplay protocol would be published and well understood - but this is Apple we're talking about so obviously that's not true. And while people have certainly reverse engineered it over the years, every major update of iOS seems to break these 3rd party options. In fact, the only reliable way I could find to received Airplay was on an Apple TV (not even another iPhone could to it).
Now fortunately I did have an old Apple TV to play with since I had recently upgraded my older Gen 3 Apple TV to the latest. So I hooked that up to the goggles, mirrored my iPhone to it, and ... drum roll ... the DJI app was displayed on the goggles!
I'm an iPhone user, so the phone i use with the Mavic's controller is an iPhone 6. The controller plugs into the lightning connector on the bottom and appears, I assume, as a USB device to the phone.
My original idea to get HDMI out was to use Apple's Lightning-to-HDMI dongle. This natty little device also has Lightning in so I reasoned that I should simply be able to plug the controller into that, the HDMI googles into the HDMI port, and the dongle into the phone.
But of course, that doesn't work (life is never that simple). I'm guessing that the Lightning input to the dongle is only for power and doesn't do USB.