Seeing as how I have been proving to be very adept at causing damage to my assorted dronies, I’ve been a bit reluctant to let them loose by themselves. The APM flight controllers have the ability to fly a course completely on their own(even land and take off). Setting up the course is as easy as simply clicking the points on a Google Map you want it to fly to, tell it what altitude at each point (and a few other things if you like) and then load it into the APM flight controller. To initiate the program, just throw a switch on your RC transmitter and off it goes. It might even come back, if you’re not one of the unlucky ones. So I figured it was time to take the leap with my quadcopter. Besides, if it augured in I could plausibly argue it wasn’t my fault as I wasn’t flying it.
Whenever I’m testing something sketchy I have a favorite spot on the outskirts of Moreno Valley. There’s nothing but miles of open fields and not a thing to run into but the ground or an occasional meth lab. This works well for a person of my abilities.
I loaded in a flight plan about a mile in total length with 10 waypoints the quad needed to hit. It was roughly rectangular with a lot of right angle turns. This allowed me to fly a decent number of waypoints but kept the quad close to me in case it did something wonky and I needed to take over control. Not that that ever happens. I instructed it to fly to the first three waypoints at 90′ then descend to 70′ for the rest of the waypoints, then return to its launch point and hover at 15′. I brought along three batteries so I’d have three flights.
I lifted off the first flight manually and held the quad at around 15′ getting it stable, then threw the switch. Off it headed to the south as it was supposed to, climbing nicely. I had set up my ground station to watch the quad’s video feed with the on-screen data display as it did its thing. Normally I use video goggles but I wanted to keep a physical eye on the sucker….just in case.
As it headed for the first waypoint I saw it climb past 90′ and kept right on going up. That’s not what I wanted to be seeing. I had my finger on the switch ready to take over control from this demented mechanism. But then it hit the waypoint, although at a too high 125′, and made a sharp right turn, just as it should. But it was still friggin’ climbing. I decided to let it play out and see what it was up in its beady silicon brain to as long as it followed the waypoints. The flight controller has a very sensitive barometer in it and normally holds an altitude within just a few feet, so this was very strange.
It hit waypoint 2 and made the required right turn, but it was now at 211′ and still going up. Then halfway to the third waypoint it finally ceased its climb and the altitude stabilized at 293′. WTF?
So as I’m looking back and forth between the data display screen and the quad in the distance, the mathematical part of my brain starts whispering to me, “Hey moron, do you think it’s a coincidence that it’s flying just over three times higher than you programmed it to??”. Wait….three times….Oh shit….It wasn’t 90 feet, it was 90 meters! And that, boys and girls, is how you crash a two hundred million dollar space probe into Mars. In my defense, the software which is used to set the waypoint altitudes does not specify whether it’s feet or meters. It’s a position I’ll cling to. So it was doing exactly what it was supposed to, fly at 90 meters. It didn’t do it prior to the first waypoint since there’s a maximum climb rate it will use when flying autonomously and couldn’t make it to its designated height before that waypoint. But it sorely tried.
During my metric enlightenment the quad hit waypoint 3, turned right and started for number 4. As it did so, it began descending. At this point I’m now ahead of it and am guessing it’s going to stabilize around 220′, which would be approximately, ahem, 70 meters. That it did, flattening out at 228′, and continued to hold this height rock-solid through the remaining waypoints.
On its last leg it returned to a spot immediately above its launch and started descending from 228′. These vertical descents are surprisingly rough since the quad is descending straight through its wake. If you’re flying manually it’s better to have a bit of forward motion. I manually did a very rapid descent once from high up with no forward speed and the quad suddenly rotated 90 degrees on its side without warning. I was able to punch the throttle and recover but it was sphincter-tightening.
The quad finished its descent and went into an automatic loitering mode at 15′. This is a mode where it just hovers and holds position. It is capable of autolanding but I just don’t trust the little bugger that far yet. I took over control at that point and ham-handedly brought it down to the ground. The next two flights were virtually identical. I find it especially annoying that it flew itself far better than I ever could.
When I got home I had a chance to go over all the considerable recorded data in detail. Comparing the actual flight paths to the planned path showed something strange going on. All the legs between waypoints had weird curves in them. All consistent but all curved. Turns out this appears likely to be a simple compass calibration error, with the compass being off about 25 degrees. Here’s what it looked like:
The flight controller has two ways to figure direction, a built in magnetic compass and also with its GPS. But using the GPS for direction only works if it’s in motion. When the flight controller isn’t in motion, like hovering at a waypoint, it uses the magnetic compass. So when the quad started for the next waypoint it headed off around 25 degrees to the right of where is should have gone. Then, as it started to generate a direction from the GPS readings it realized the error and started correcting back to the right point. So the compass and GPS were fighting it out. Now that I know this it’s pretty simple to calibrate the compass. Actually I thought I already had. (Update: looking at the APM flight controller I see it was acting wonky. Even though I had the proper sign in magnetic declination value, the controller reversed it. Don’t know why. This induced an error equal to twice the declination value of 12.25 degrees which would be 24.5 degrees. All fixed now….)
So this all was a great success, my metric dissonance notwithstanding. The reason this will be so useful is that the software also has the ability to do automatic flight path creation. You just click on an area you’re interested in on the Google satellite photo and make a polygon around it. Then you tell it how high you want to fly (in stinkin’ meters!) and what sort of percentage overlap you want. Then click “Generate” and it automatically generates a flight path that will cover everything you’ve selected (and do so way better that I ever could). Way too cool.
Here’s a video from one of the flights taken from the HD camera on the front of the quad. It would have looked much better if it were in fact at 90′ and 70′ up:
There you have it, cheating death one flight at a time…..