Raspberry FPiV – Flight 1 (Line of Sight)


Having established from my tests with gstreamer that a low latency video stream over WiFi could be achieved from the Raspberry Pi and that a usable range could be achieved,  I decided to mount the system on an aircraft for some line of sight testing.  In order to extend the range test, I added an Adafruit Ultimate GPS Breakout Board.

The results were mixed: the video stream remained consistent throughout the flight although with higher latency than expected and the GPS accuracy was poor.   The reasons for the problems have been identified and fixed, so the overall results are still promising.

Computing Setup

To save booting from a thumb drive every time, I resized the Windows partition on my laptop and installed Lubuntu to the end of the hard disk.  This was fine for a while, but then an update to gstreamer made it impossible to install the bad and ugly plugin packages together.  In the end I gave up on Lubuntu and installed Arch Linux on both the Laptop and the RPi.  The driving force for this was that version 1.2 of gstreamer was available on both platforms.  Having never used Arch Linux before it took me most of the Christmas holidays to get everything running properly.

To save a bit of weight I replaced the Raspberry Pi model B with a model A.  The SD card can be moved between the two boards without changes.  An  Adafruit Ultimate GPS Breakout board was added to extend the range testing.  This was connected to the Pi’s UART pins.  I didn’t solder on the battery holder for the real time clock.

The board was mounted in a bright raspberry pink case, so it would be easier to find should it become detached from the plane.  I trimmed the plastic around the SD card slot so the camera cable could be run out above the card.  The camera was mounted in a PiBow holder and bolted to the case.  As the PiBow holder clips together, I glued the joints to secure everything.

Finally, I created some scripts to get everything configured and talking.

Aircraft Setup

I retrieved my old “Sorcerer” slope soaring trainer from the loft.  This design dates from 1969, although mine was built during the eighties.  It’s not pretty, but it is tough.  The radio system was a Futaba Attack 4 channel system on 35MHz and so wouldn’t interfere with the 2.4GHz WiFi signal.  As it hadn’t been used for 25-30 years, I replaced the transmitter battery, but apart from that everything worked fine.

As this was a glider, I built a power pod from birch and lite plywood to sit in place of the hatch.  Having the motor up front put the centre of gravity in the right place without adding additional weight.  The flight battery was replaced with a 1300 mAh LiPo which powered the receiver and servos through the ESC’s Battery Eliminator Circuit (BEC). I used a propeller that had previously been used on a multirotor that was well balanced.

2014-01-10 13.28.19

The Pi was powered by a dedicated 5V 3A BEC connected to the LiPo battery’s balance connector.  Everything was held on with rubber bands.

2014-01-10 13.28.28

The Flight

The first launch turned into a powered glide.  I hadn’t allowed enough throttle for the extra weight and drag.   The second launch had it climbing and zig-zagging up the field.  The Sorcerer has a huge rudder on a fin that is little more than a post.  With the added prop wash over the rudder, turbulence from the everything strapped on top of the wing and the gusting wind, it was difficult to keep it straight and smooth.  Once some height had been achieved and the throttle reduced everything settled down. I flew for about 5 minutes doing big circuits of our local playing field, before bringing it in to land.



As I was flying without a spotter, I didn’t look at the laptop screen until the flight was finished.

After retrieving the glider, I found the stream was still running which was a good start.  I hadn’t checked the latency with the new system before the flight, so it was disappointing to find it was running noticeably higher than I had achieved in my earlier tests.  I still had the original Raspian SD card and Lubuntu Thumb drive and a quick check showed that that setup still ran with low latency.  Research suggests the higher latency is due to incompatibilities between Arch Linux and the particular Intel chipset in the laptop.  It could also be that the hard drive speed is slower than the thumb drive, especially as the linux partition is at the end of the available drive space.

The next check was the GPS track.   I used WinSCP to get the video and gpx files off the RPi.  I found a really useful website that animated the track in real-time: www.gpsanimator.com/StarTraX.   I did a video capture from the screen using Applian Replay Video Capture which I then synced with the on-board and head camera footage in Sony Movie Studio 11.  As well as producing the video, this also allowed me to get frame grabs to calculate the gps error.

The animation showed the track jumping all over the place.   If it is to be believed, most of the flight was spent on the wrong side of the trees and I was flying behind where I was standing.  When synchronized with the video it is easy to see the inaccuracy.

Here is an example.  This image shows the glider crossing left to right in front of me.  In the bottom right hand corner is a tree.



Now look at the GPS track. I’ve marked on where I was stood, the position of the tree and the observed track.  The recorded track shows aircraft moving right to left, well behind me and over a small wood. The error is about 60 metres.



An even clearer example is the landing.  The error is about 130 metres.  Seeing as the current maximum tested range is only 240 metres, this is not good.  After being stationary for a little while, the GPS eventually caught up.





I’ve got a Crius CN-06 V2 U-Blox based GPS which has a much larger antenna as the picture below demonstrates.  I also have the high gain remote antenna for the Ultimate GPS breakout, which is the same size as the Crius.  Finally, I’m going to add the real time clock battery holder, which should improve the warm start times.  At least one of these should improve things. 



GPS Size



While there were issues with the latency and the GPS, as a first flight the main purpose was achieved.  The streaming from air to ground worked and remained stable throughout the flight.  There is certainly enough promise to keep the project moving forward.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s