Captain Crunch

I’m going to start running out of crunch-related names. I better practice my quadcopter flying.

Here’s a telemetry graph of what happens when you lose a propeller mid-flight:

Screenshot-24

(you may have to click on it to view closer) Note the brownish line, which is the motor 4 output signal. It stays synced (roughly) with the others until 16000 on the X, at which point I lost the prop and the control system pegged the motor throttle to compensate. Then it hit the ground, bounced a couple of times, etc.

On happier news, I’ve been working with RunSFM (http://nghiaho.com/?page_id=253), which is a SFM implementation made by Nghia Ho. It’s really quite nice. Here’s a link to a pointcloud of my R/C radio:

Okay, I lied. I can’t get PotreeConverter to work, and Google doesn’t reveal any other pointcloud viewers. It’s saying something about a regex_error. This’ll take some looking into.

That came from about 40 images.

For reference, here’s my timing data with RunSFM on a 4-core 8GB machine:

42 full-res images (3888px wide): 151 minutes by the clock, 343 minutes CPU time.

40 full-res images (3888px wide): 89 minutes by the clock, 214 minutes CPU time.

So a lot of variation, depending on the nature of the images I suppose.

 

Posted in Uncategorized | Leave a comment

Crunch.

Few things are as stressful as your significant other falling 45 feet and shattering her legs beyond repair. Especially when you caused it.

Let me tell you, it does not do any favors for the relationship.

Thankfully, at least in my case, only the legs broke. The rest of her is apparently happy as a clam despite suffering a more-than-8G impact. The recording instruments measured 8G, but it’s possible the impact was higher:

Screenshot-23-mod

(the chart covers 8.2 seconds of flight)

I don’t think the bouncing helped any. Ignore the blue and red lines which slope down monotonously. Those demonstrate how the GPS module has issues with rapidly dropping altitudes.

There is scant imagery from my day, since the one successful flight flew a downward-facing camera over a grassy field. Not exactly the height of interesting. At least I have lots of pictures of grass. And a few of my base station:

01-19691231170507-00

Checkout my wavy landing pad in the corner. I paid extra for wavy cardboard.

Oh well. Time to checkout the damage:

photo (2)

Okay, it’s a bit hard to see. But note just to the left of the DVD stack (under the chewing gum kit) is a pile of discarded carbon fiber plates which were the landing struts. Right above that you can see the ragged edges of some that are still attached to the arms but broke off. On the right side of the copter note that the legs broke off almost too high to notice.

photo (3)

That was a standoff that separated the two parts of a leg. Yes, those are the threads that were ripped out and are sticking out of either end. Likely not going to use this particular standoff again.

I guess I’m going to get a crash course in building landing gear.

In totally unrelated news, I went to California and had a blast (which is why I didn’t post last week or the week before). We went to an aquarium and I got a shark:

photo (1)He looks less grainy and more adorable in real life.

 

Posted in Uncategorized | Leave a comment

Speed Enforced by UAV

Got to fly (quadcopter) this weekend. Also got to fly (airplane) this weekend to New Braunfels, which took me directly over the field I fly my quadcopter in.

Speaking of my quadcopter, I’m starting to work on a new vision landing system. So far I just have test imagery of a pad:
01-19691231170528-00

Clearly a downward facing camera. The picture below will back me up on this:
uav_camera

But then where did this picture come from?
01-19691231170946-00
Note the (illegible) datestamp in the corner, which came from that webcam.

I feel like a downward facing camera wouldn’t have a picture of the sky. I always thought it was just a figure of speech to have eyes on the back of your head – apparently this webcam literally does.

Anyway, the plan is to have the Pi do image processing to detect where the copter is in relation to the pad, and then it’ll tell the Pixhawk to move to align with the pad.

Altogether the Pixhawk, Pi, GPS, 900MHz radio downlink, and webcam pull 0.8A. In case anybody’s wondering. Also, I get 190 seconds of flight time with a 3s 2200mAh. There’s relatively little literature on the web about what to expect, so that’s the number I’ll quote for people who are looking. I can get about 5m/s top speed out of it, so I can fly 950 meters on a full charge. 450 meters if I want it to come back also.

But numbers are hard to grasp, so let’s overlay it on Google Earth. The red circle is my max operational range. The yellow circle is my one-way-ticket range.

uav-range

North is oriented as up. Please don’t try to stalk me using this picture. I don’t even live here. Nobody lives here. I fly in a fake neighborhood that was constructed to scare away enemy bombers.

Anyway… The neighborhood to the Southwest very nicely fits inside the one-way circle. Coincidence? Probably not. The school district that serves this fake neighborhood has all sorts of rules about busing children more than certain distances to school. (that’s a school that I fly out of in the center, by the way. Two schools sharing a campus, actually)

So, I have a webcam on a quadcopter, what should I do with it? Obviously there’s some really cool stuff I can do. Like play with poles. Or juggle. Or something with LEAP motion. Or build stuff. If you’re taking applications, Zurich, count me in!

Anyway. Right now I just have a panorama to show off:

http://pillow.rscheme.org/uav/panorama.html

I was having resonance issues with the camera, so some images have a high frequency wobble in them which is caused by the camera shaking while the webcam’s reading out scan lines. I hadn’t had this issue before Sunday so I don’t know exactly what started causing it, although the winds were a little stronger that day, 20 mph gusting to 25. Enough to make the panorama be at a visible tilt – that tilt is the quadcopter compensating for the wind.

Notice the highway with cars on it. Observe the following two images:

01-19691231170936-00

01-19691231170937-00

The second image was taken exactly 1 second after the first one. Take special note of the white car/truck thing that’s in front of the black SUV thing that’s moving left-to-right. It’s above one tree in the first image then a different tree in the second, just to the left of center (right where the off ramp is).

According to Google Earth, the distance between the quadcopter and the highway is 277 meters as the crow flies, plus the 100 meters off the ground that I operate my copter at, and the highway goes away from the copter at about 10 degrees. My measurements indicate that the horizontal field of view of my webcam is 49 degrees.

According to GIMP, the truck moved from pixel 270 to pixel 326, or 56 pixels. I accounted for the motion of the UAV manually, but ideally that’d be automated.

The images above are 640 pixels wide, so 56 pixels is 8.75% of the field of view or 4.288 degrees. Note that the copter is 294.5 meters from the section of highway in question, so 4.288 degrees translates to 22.08 meters.

However, remember that the truck is going away from the camera at a 10 degree slant. How do we account for this? We remember Trig. Specifically, the observed motion will equal the cos(angle from perpendicular) multiplied by actual motion. In numbers, 22.08 m/s = cos(10 degrees) * velocity, so velocity = 22.42 m/s or 50.15 mph. Which the speed limit on that segment of road is something like 65 mph. So Anonymous Truck Alice was going (well under) the speed limit!

That was anti-climatic. I was kind of hoping to catch a speeder.

Point is, I could have caught a speeder. If there had been a speeder.

Sometimes there are speeders.

And I will find them.

uav-speed-enforced

Posted in Uncategorized | Leave a comment

Teensy/Pixhawk I2C Development

I haven’t gotten a chance to fly (quadcopter) since I last posted. I have, however, gotten a chance to fly (airplane) since I last posted. I think the two are related.

However, I got a Raspberry Pi! It’s running Arch. I named it Helium and put it on my quadcopter, so next week hopefully I have a pi commanding a pixhawk via I2C.

However, only time can tell.

 

Posted in Uncategorized | Leave a comment

Video Quadcopter

It’s going to be a few weeks before I talk about something other than my quadcopter.

Until then, these two videos:

http://pillow.rscheme.org/flight1.webm

http://pillow.rscheme.org/flight2.webm

It’s running a Raspberry Pi to run the camera. My plan is to connect it via I2C to the Pixhawk, and to build a servo gimbal for the camera. From there I dunno.

Also, while I was developing the ground station I ended up with this graph:Screenshot-20

A graph of altitude (centimeters vs. time). I’m unsure how to read this graph.

 

Posted in Uncategorized | Leave a comment

Every day I’m Quadcopterin’

The song “Party Rock Anthem” by LMFAO has almost 690,000,000 views. What is this world coming to?

But, I got a quadcopter last week! It’s 3D Robotics’ quadcopter kit. Which is a very nice kit, but let me warn you it includes neither a PPM R/C system nor a battery, both of which are required to make it run. So if you get one be sure to get those also, unless you can rewrite the firmware to not have that necessity.

The instructions were clear enough that I was able to put it together in a couple of evenings after work, without screwing anything up. However, getting the software stack to run on Linux took some doing (and all of Saturday). A note for future users: I had good luck with the APM Planner 2.0 software (compiled from source) running the default APM Copter firmware. My receiver is a Spektrum DX6i receiver from back when I flew model airplanes, and the satellite radio works just fine although I will be doing range tests next weekend. At the same time I put a Raspberry Pi and a webcam on it.

As for the battery, for reference, I went with the nano-tech 3 cell 2.2AH LiPo battery, which goes for just under $30 at Hobby Town.

Something to be wary of: The default APM Copter firmware doesn’t have a very good battery monitor (or maybe I misconfigured it), and LiPo batteries dislike being overdischarged. According to the internet once you get below 3V/cell (9V for a 3 cell battery), you just have to toss the battery unless you have a charger that can charge the individual cells at 5 milliamps or whatever.

Here’s what I did, which worked for me although my battery probably doesn’t have as long a life as it could have: I plugged it into my regular charger, set it in the lowest mode (1A), and started a charge cycle. It went for about a minute before it noticed the battery was undervoltaged. I reset the charger, checked the cell voltage and balance using a volt meter, and started a new cycle. This went on until eventually the battery gets back to 9V, at which point I went to the 2 amp mode on the charger and fill the battery up fine.

Of course, I kept a close eye on my battery during this process and you should too.

On a lighter note, I kept on having issues with my quadcopter flipping over:

100_6888

Hrm… The computer says it’s upside-down…

Turns out that the preflight calibration was messed up, and the onboard gyros were off by 20 degrees.

But, yesterday, I managed to get the GPS-based modes working (specifically loiter and guided). Loiter mode is rock solid, even in 10 knot wind. Kudos to the guys at APM who managed to make that work.

 

Posted in Uncategorized | Leave a comment

It’s all over…

Sort of. The great thing about college is that it just keeps on going. Like the Energizer bunny.

So this blog has turned into a place where I marvel at the high usage of my proxy. Below is a graph of the rolling 7-day average for the past couple months:

proxy-usage2

Note how a record high was hit a couple days ago, crossing 200,000 hits/day, rolling average.

Prior to this peak, I had never seen 200,000 hits in a single day. Maybe if I keep on posting links to it somebody will start using it and buy ad space (you should buy ads! Support me! Internet connections are expensive) Or just donate directly. Soon to be taking credit cards.

Alright, not much this week, but I took apart a LCD TV, cut myself several times on the glass, and got a very nice backlight:
IMG_6022

On the left is my wife’s hand. On the right are two strips of polarizing filter which I scraped off the LCD – I have a 18″x12″ sheet (with a hole in the center). I don’t know what I’m going to do with it, but I’m actively considering taking up the 3d movie theater project, if I find another projector.

And new food of the month… I haven’t been keeping up with the monthly food (or the weekly blogpost) for a number of reasons. I did have a mushroom burger (portabella mushroom between two hamburger buns) a few days ago, though. It was quite nice. It also had goat cheese on it, though, which I’ve never really been a fan of. It’s a very strong-tasting cheese, which throws me off a little. Also the burger had major structural issues, so I ended up with a lot of small bits and very little burger.

Life is full of difficulties, and we must learn to overcome the obstacles in our path.

 

Posted in Uncategorized | Leave a comment

Yay! It’s my Birthday!

One more year of being a teenager to go! I better start more raves. And drinking. And smoking. And sexing. etcetera.

No fun technical article today, sorry. Too busy making ice cream and eating yummy pizza.

 

Posted in Uncategorized | Leave a comment

Ubuntu 14.04 is out!

Happy Easter! Good hunting to all of you egg-hunters. My family raises chickens, so we get all the eggs we want.

One of the (many) things I like about Ubuntu is that when I’m doing a major OS upgrade, it runs in the background so I can blog and catch up on XKCD.

As promised, here’s some links to Pong and 2048 for LEAP: http://pillow.rscheme.org/pong/

http://pillow.rscheme.org/2048/

The 2048 version doesn’t require a LEAP device to play. The pong game does.

I was going to show off some cool graphs showing a vast number of users on my proxy, but the “vast number” was actually a temporary spike. I’m now back to pre-March levels at 50,000 hits/day (which is roughly 5,000 impressions/day or 150,000 impressions/month).

Quick background: I run an internet Glype proxy. If you Google “glype proxy” I’m the fourth hit. These users come from literally all around the globe, and visit exactly two areas of the web: Facebook and… adult websites. The graph below shows number of hits/day on a rolling 7-day average since the beginning of the year (so from January 1st 2014 to mid-April 2014). As you can see there was a major spike a few weeks ago to nearly 200,000 hits/day – equivalent to around 1 million impressions/month.

proxy-usage

With so many users, I decided to monetize it. If you want to buy ads on my website, please do so! http://buysellads.com/buy/detail/236307 Sure, there aren’t as many users now as there were, but an impression is an impression is an impression, and I’m still making lots of those.

But, more to the point. In the mid-afternoon of Monday the 14th, I opened a remote desktop connection from UT to my house to get some work done (my job now includes a Windows VM with MS Visual Studio. Oh boy). That day corresponds to the end of the spike. But that got me to thinking: How could such a small action correspond to such a large reaction? Is my base of users really that small? Was the disruption really that big?

During this spike I wrote some scripts to parse my proxy logs and dump it into a Mongo database, so that I get documents that look a little like this:

{ "status" : 200, "domain" : "www.ign.com", "server_time" : 2629821, "hour" : 7, "ip" : "xx.xx.xx.xx", "bytes" : 30570, "month" : "Apr", "method" : "GET", "second" : 0, "year" : 2014, "path" : "/boards/threads/how-to-increase-s-p-e-c-i-a-l-in-new-vegas.197299482/", "day" : 9, "minute" : 51 }
{"status" : 200, "domain" : "a.thumbs.redditmedia.com", "server_time" : 1822975, "hour" : 7, "ip" : "xx.xx.xx.xx", "bytes" : 1634, "month" : "Apr", "method" : "GET", "second" : 1, "year" : 2014, "path" : "/wXmTL_Eeu7z1iFUf.jpg", "day" : 9, "minute" : 51 }
{ "status" : 200, "domain" : "s.ytimg.com", "server_time" : 3681763, "hour" : 7, "ip" : "xx.xx.xx.xx", "bytes" : 9361, "month" : "Apr", "method" : "GET", "second" : 59, "year" : 2014, "path" : "/yts/cssbin/www-pageframe-vflycrJAA.css", "day" : 9, "minute" : 50 }

The IP addresses have been changed to protect the innocent.

Point being, I get the request, the time, and the amount of time the server spent serving the request (server_time) – i.e. microseconds between when the request came in and when I finished writing the response. I don’t have data on how long the remote server took to respond. The obvious thing to do was to start graphing things. Above was the hits/day, now here’s a graph of the average latency per hour – that is, in a given hour, the average latency of all the requests within that hour:

latency-vs-time Yup, sure enough. A spike up to 70 seconds/request about six days ago (graph goes from April 1st to April 20th, X axis is in days) – enough to make any man decide to do actual work instead of watch porn. Which while that may be good for those businesses out there, it’s bad for business here. There is no win-win scenario here.

But, sure, there was a bad spot there. And it was during my busiest time. Such a short spike, and such a large reaction, can really only mean that a large portion of users were affected during this spike. So, back to the spreadsheets! Here’s a graph of the number of unique IP addresses using the proxy on a given day: proxy-users

But this doesn’t really tell the entire story, since it could be the same IP addresses hitting my proxy every day, or it could be a whole new set of IP addresses that happen across my proxy every day. So here’s a graph showing the data above, as well as the number of IP addresses that were “gained” and the number that were “lost.” “gained” means that we had never seen this IP address before that day, and “lost” means that we have not seen that IP address between that day and today. proxy-users2

These two graphs are also collected from April’s data, which is only 20 days long as of today. So not much data, but enough to make some observations on.

The first observation to make is that early on in the month (between the 4th and the 12th, roughly speaking) we see around 300 users per day. Of them about 40 are new users which we’ve never seen before, and 40 are users we haven’t seen since. Then on the 12th we stop seeing new users – the number dips to around 15-20, and two days later on the 14th we see a massive spike of users that disappear (the yellow line). Notice however that this massive spike corresponds with a similar spike in the total number of users (the blue line). Perhaps my server is unable to handle large numbers of users? Back to the spreadsheets!

latency-vs-hits …or on second thought, maybe they’re uncorrelated and latency doesn’t go up with an increase in load. This graph shows the number of hits in a given hour on the X axis and the base-10 logarithm of the average latency in milliseconds on the Y axis. (there are a few datapoints which go above 10000ms, but I cut them off the graph for clarity) Not much correlation in this graph – it looks like an amorphous blob. Maybe a slight upward slope, going from 1,000ms latency at no load to 2,000ms latency at 18,000 hits/hour. Which is nothing to sneeze at, mind you.

But in the end, what do we know? Remarkably little, it turns out. I’ve made a bunch of graphs. They all tell me that on Monday the 14th the world decided that my proxy just wasn’t good enough for them. They hint at possibly the problem being that my latency spiked for a few hours that fateful Monday, but that doesn’t quite explain the continued drop. Maybe I used to be on some website that linked to my proxy. Maybe my proxy stopped working with popular websites. Whatever it is, I feel that the true reason will be lost forever in logs not kept and data not recorded.

This summer, though, I’m going to make a much better proxy. Better than all the others.

Trust me.

 

Posted in Uncategorized | Leave a comment

Lent

Pong, for Leap!

Stay tuned, I’ll post it on my site at some point, along with 2048 for Leap.

In other news, I’m going to give up blogging for the remainder of Lent. So far this year I’ve averaged 1 post a week, so I figure if I’m going to break that pattern I might as well come up with a good reason.

Lent is my reason.

See ya’ll

 

Posted in Uncategorized | Leave a comment