Monday, July 22, 2013

Second Flight

As the title describes, second time in the sky, trying out the new modifications.

Getting ready in the sun:

And let's jump right in to the fist flight of the day:

Pretty pictures, right? Only getting better! By the way, did anyone catch the barrel roll near the end?

The plane was quite nose heavy, which made it difficult to keep it the air, so right after take off it was decided to land at the end of first circle. Would you know, right at the end there was some more wind and for a second I didn't know if it was flying up or down, away or not. Yes, that's when the barrel roll happened.

Luckily the plane landed and after some weight redistribution and some elevator trimming was ready to try again:

Still a bit nose heavy, but much more manageable this time around.

Three laps for fun and science. And for fun, attention should be given to the last lap before landing. It takes "ages" to fly far away enough, but only seconds to fly back, causing quite a speedy landing. The answerer to this mystery is wind (flying against the wind = slow, flying with the wind = fast).

And to top it off, another pivot at the end. Turns out the landing gear takes a bit more force then expected. The first landing bent the gear in to the foam of the plane where the home made plastic mount ended and the second landing flipped over on loose gear.

Still some kinks to work out, so back to work then.

Sunday, July 21, 2013


Applying the first service pack to the new plane!

First some telemetry mystery. Actually, no mystery. Part of the code for getting data from the sensors was reused from the previous iteration. Well, previous iteration ran on Android 1.6 and 2.0, and some of the stuff, like the virtual orientation sensor is now deprecated. Onwards with rotation matrices.

For one, the old sensor doesn’t translate coordinate system rotations well:

Old and new - yaw in time.

Old and new - pitch in time.

Old and new - roll in time.

It's still not perfect. The interference from the engine still distorts telemetry somewhat (clearly visible spikes when the engine turns on and off). But for the first go, this will do. The science of hand written filters and sensor fusion will have to wait another day.

But that's not all. Upon closer inspection, it was discovered, that he motor shaft (or the motor itself) is not the straightest thing in the world. To reduce the wabble a piece of paper was placed under one side of the shaft:

Not completely removing all the vibrations, but it helped somewhat.

And now for the issue of the plane flipping over on take offs and landings. Simple, switch the gear so that the two wheels are in front and the one wheel is on the back:

And as a quick bonus, use some spare parts lying around to transferee it's function as a steering wheel:

All it takes is a few thin carbon rods and joints from a retired model, and a "slightly" more powerful servo with steel cogs to move the wheel and the rudder, which won't brake if it gets tangled in grass again.

But, does it work?


And now we're ready for the second fling session!

Thursday, July 18, 2013

Visualization and Realization

Today's challenge, visualize sensor data and find out what's wrong and how to fix it.

Step one, visualization (partial for now, other sensors and animated map in next iteration):

Well, looking at the attitude meter at the bottom left, one could see that the orientation data from the sensor is useless.

Looking at it even closer, one could see that the orientation data starts to drift as soon as the engine is turned on. Even before it's set to full power, where there are visible vibrations.

Could it be that the motor itself if distorting the magnetic field enough to skew the sensors? Do the vibrations from the motor play a part? Is there something else?

Previous incarnation worked with less capable hardware and better results.

Monday, July 1, 2013

First Flight

And here she is, officially know as AVI@TOR MK4  (Aerial Vehicle Intended @(Academic Testing) Or Research), taxing on the runway, ready for take off.

And she flew happy ever after, right? Well, let's call this one a learning experiment :P

First take off attempt:

So, what went wrong?

* Underspecified battery - not enough power for the motor to accelerate quickly and take off on a short stretch.

* Undercarriage designed for smooth surfaces - having one wheel in front and two in the back is good for maneuvering on the ground, but not so much when trying to accelerate on a grassy field.

Front wheel snagged on the grass, causing the plane to flip over. In the process breaking the steering wheel/rudder servo.

All of that was quickly resolved with a servo replacement and a beefier battery.

Or so it was thought, but the flip must have made some more damage, since on the next try the plane was vibrating a lot more, which was unnoticed until the video was revived.

First flight (but with shaky video from the first crash, the ending is still good though):

So, what went wrong this time?

Just as the plane was lining up to land, it started to loose altitude. Even with the engine set to full and elevator pushed to maximum. So last few meters off of the ground, the engine was cut off, which tilted the plane downwards, accumulating some speed and land hard short of the runway.

It felt as though the engine was loosing power again, which might mean the battery is still undersized. And the tilting downwards after the engine was cut off means the plane is nose heavy for this configuration.

But it also might be, that the (unseen) heavy vibration from the motor dislodged the battery, causing it to shift position, making the plane nose heavy and causing it to loose altitude.

All of that caused it to land hard, still almost horizontal, which would be perfect, but as with the first take off attempt, the front wheel got snagged. And with a much greater force this time, causing the front wheel to break off.

This would all be tragic if there was no data to make pretty graphs and pictures. But there is, so it's all good:

GPS data; realistic altitude estimation and position, speed & altitude from the autopilot.

Altitude and speed in graph form. It looks like the take off speed was around 40 Km/h.

Orientation data: yaw, pitch and roll. Black represents raw data and color represents data filtered with a Kalman filter. The vibrations from the engine make are too strong, so the readings are mostly noise.

What to do now? Well, we're wiser so we're going to improve it!

First redesign will be for the undercarriage. The two wheels on the back will be replaced with sturdier ones and be placed on the front. So the plane will be tail heavy is the weight of the plane is on the wheels. And the front wheel will be reused and placed on the tail, enabling it to steer the plane on the ground.

Also the engine mount, shaft and propeller (which will have to be replaced) will be expected to reduce vibrations, as will the mount for the phone/panoramic camera/autopilot module.

But before all that, some effort in to visualizing all the data with the panoramic video, since you can't post graphs on You Tube :P