Drone My Roof Part 2

So in the last blog post I left off with wanting to do some manual editing of the waypoint file. The first thing I had to do was grab the KMZ file from the controller. The controller is an Android device, and I have two programs that are supposed to allow you to connect to Android devices on your Mac. I’ve had inconsistent results getting these connections to work. One of the programs, OpenMTP, warns you to close the background tasks from Google Drive and Dropbox and Android File Manager before it will be able to connect. And by trying various combinations of doing that, rebooting the computer, rebooting the controller, I was able to connect a few times.

The waypoint file is a KMZ file, which is actually a zip file containing two files, template.kml and waylines.kml. They’re both relatively straight forward XML files. You can figure out most of the syntax just by looking at one of the files you’ve downloaded from the controller. So after I got a connection to my controller, I grabbed one of the KMZ files, extracted the waylines.kml file to copy the first “<Placemark>” to the end of the “<Folder>” and change the “<wpml:index>” tag from 0 to 17. I refreshed the file in the KMZ file and uploaded it to the controller.

This gave me a full circle that returned to the start, which made it much closer to what I wanted. I still get a little bobble when I restart – even though it’s moving from point A to point A, it still has to turn the drone about 45 degrees and then back, for some reason. Also I decided that since I’d decided to change from shooting a hyperlapse to a sped-up video, the drone was moving too slowly. Also it looked like the gimbal angle was down too far, so the roof was not the center of the video. I made the changes to the waylines.kml file to support that – I changed all the “<wpml:waypointSpeed>" from 0.213… to 0.852 (meters/second). and I changed all the “<wpml:waypointPoiPoint>” so the third argument (the height) changed from 3.0 to 5.0 (meters above ground). But then I had a multi-hour long struggle to try to get the damn controller connected to my Mac. Eventually I gave up, and tried my ancient Windows laptop. I don’t know why, but I thought Windows had native support for Android. But before I could even try, I discovered that since the last time I used it, it’s decided that it no longer has any drivers for the WiFi or Ethernet controllers. I presume that’s something to do with the fact that it’s Windows 10, and it’s ineligible for upgrade to Windows 11. Not that I could, without a network connection. So I guess it’s going off to electronic recycling. Pity.

But as I was coming to terms with the fact that the laptop I “borrowed” from a former employer is no longer working, I glimpsed a USB A to USB C port handing off one of the front USB ports on my Linux box. I use the Linux box from the command line all the time, but I figured for this I’d probably need to be in the GUI. So I logged into KDE, and plugged the controller in. And it immediately popped up a Dolphin file manager window showing all the files in the controller. So I was able to do those changes. What a change to find something that’s easier in Linux than on the Mac.

I did a couple of test flights this morning. At first, the one bit of XML I wasn’t sure about, the command for what to do at the end of the waypoint flight, wasn’t set right. Fortunately you can do that easily on the controller. After those first two flights, I wasn’t happy with where the drone was pointing. I decided to edit the POI on the controller, and did two more circles and I think it came out just about perfect. I suppose I could make another edit and duplicate “<Placemark>“s 2-16 at the end so it can do two circles without having to restart, but I’m kind of running out of time. And what I’ve got now is pretty good, especially after I speed it up in Final Cut Pro X.

Drone My Roof

So we signed a contract last week to get a new roof done on our house. It’s going to be ridiculously expensive, and both Vicki and I have had moments of self-doubt about committing to this. But one thing I wanted to get out of this, as well as “not having water leaking inside the walls that we don’t discover until the plaster starts failing”, is a great drone video.

One thing I’ve seen before, and what I want to emulate, is a video where the drone flies circles around the house being worked on, but with it doing it as a sort of time lapse, maybe taking a flight every hour or so while the work goes on. In my mind, I see it as doing about a turn and a quarter to a turn and a half, and then fading into the next flight, and so on.

My first problem is getting it to do consistent circles. The problem is that the DJI Air 3 can do waypoint flights, but there isn’t a “do a circle at this distance from this POI” waypoint option. I found a site that would generate a bunch of points to define a flight around a point, but it ends the flight at the 16th point, rather than completing the flight back to the start. When you edit the waypoint flight on the controller, you have options for what to do at the end of the flight, and one of the options is to fly to the start point. Jackpot, you might think. But no, when it does, the drone points toward the final point, and flies towards it, instead of sidestepping to it. I got a smoother and more complete circle using the QuickShots circle, but since you have to highlight an object to circle around with your finger on the screen, I have worries about how repeatable it will be.

My second problem is that originally I was thinking in terms of doing a hyperlapse. The waypoint editor in the Hyperlapse is simpler than the main waypoint editor for some stupid reason – you can’t define a POI to point the camera at, for instance. The instructions for the site that generates the waypoint file involve you connecting the controller to your computer and copying the KML file on top of another waypoint file. But I haven’t seen any instructions on how to do that with the waypoint editor in Hyperlapse. So I’ve been experimenting with the timed exposure mode where it just takes a photo every two seconds and then I combine them into a video in Final Cut Pro X. For my first several tests, I was trying to use manual exposure so I could use a really slow shutter speed to get a tiny bit of motion blur. But yesterday when I was doing these experiments it was partially cloudy, and every time the sun peaked out from behind a cloud the exposure blew out. I even tried pre-processing all the frames through Adobe Photoshop Elements and that helped, but that didn’t fix the blow out. In retrospect I probably should have set the exposure when the sun was out.

Today I tried again, but this time I used automatic exposure. I think the results were better. But again, today was sunny with a few clouds, so it was probably a simpler exposure problem. When clouds came over, it did get a bit darker.

The third problem was that when you create a hyperlapse in Final Cut Pro, the video isn’t stabilized. Weirdly, in Final Cut Pro X you can’t stabilize a compound clip, you have to export it as a video, re-import it, and then stabilize the newly imported video. And it’s been pretty windy while I’ve been doing these tests, so even with the stabilization, the resulting video was not very stable. I was starting to get less in love with the idea of a hyperlapse. I’m starting to think that what I want to do is shoot a video, and then speed it up. I tried that out (with a QuickShots circle) and I really like the result – the video is very smooth, and it had much more consistent exposure.

So all I have to do is solve the problem of making a waypoint file with a double circle, and make it repeatable. I’m hoping I might be able to edit the XML of the KML file manually. I guess that’s tomorrow’s testing.

Everything’s going wrong at once

The Truck

When we first bought the truck, there were a couple of small niggles – the sunroof doesn’t open and there is a bit of trim hanging off. Actually, there was a near disaster which we didn’t discover until we’d towed our new travel trailer home, which is that there was no power coming through the 7 pin plug to the trailer’s brake lights and one of the turn signals. Turns out that was just a couple of fuses, and now I carry a bunch of spare fuses in the truck for both the truck and the trailer.

At the time I bought it, I told them repeatedly that I didn’t care about the sunroof as long as they got it fixed before spring. Well, it’s summer and it’s still not fixed, but again I haven’t been bugging them. That should change.

My truck has these neat little boxes on the sides called “RamBoxes”. They’re kind of like saddlebags where you can toss tools and parts and stuff. They lock and unlock with the key fob, but I’ve discovered twice now that the locking mechanism uses these little plastic pivot points to transfer the movement of the servos from one direction to the other, and they’re fragile as hell. First one broke I think because I tried to unlock it when it was frozen, and the second one I might have hit the fob and pushed the button at the same time. First one I fixed by buying a replacement from the dealer – which took some faffing around and visiting two dealers. There are plenty of videos showing how to do this. Second one, I discovered a Reddit post saying you could use a metal throttle linkage instead of the fragile plastic, and that’s what I tried. So far, it’s working.

Last week, I had to replace both rear tires, when it appears an old patch that nobody told me about seemed to let go.

Today, I noticed that there was a cable hanging down. I had no idea what it was, so I posted it on Facebook and my brother identified it as the emergency brake cable. And lo and behold, there are literally dozens of videos, reddit posts and Ram forum questions about this, and it appears that there is a part of the emergency brake that seizes and needs to be freed by hand. One video I watched suggested using penetrating oil, another suggested baby oil from freshly squeezed babies, and my brother suggested lithium grease. I’ll have to give it a try.

The Leaf

We’ve had a problem, it started off intermittently and now it seems to be permanent. When you plug in the charger, it would beep and flash the charging lights in groups of 3. Googling found dozens of hits that suggest this only happens with Nissan Leafs. But some people were blaming the chargers, and some were blaming the Leafs. A lot of suggestions to take the charging handle apart to make sure the clamp is working right. The clamp on our charger didn’t seem to failing, and there wasn’t any way to take the handle apart.

We tried charging it once using the trickle charger plugged into the plug socket in the garage. Vicki was not satisfied with the speed, because in about 16 hours it only charged about 3/4 the way. Which is about right, because the manual says it should take 24 hours for a full charge. So we were looking at a future of having to charge it every day or every time we used it, instead of once every 3 or 4 days. But the second time we tried, we discovered that there was no power anywhere in the garage. More about that later.

After some reading and some experimentation, I discovered that if I put the charger handle in, then go into the car settings and change the “EV Charging Lock” from “Automatic” to “Locked”. It appears I’ll have to change it to “Unlocked” when it’s done charging so I can remove the charger handle again.

That’s a work-around for now, but I really want to fix this. And my research suggests that the problem is that there are some plastic bits in the locking mechanism that can wear out. And some suggest Nissan will admit that there’s a problem and replace them, but others suggest Nissan will charge up to $700 to fix it. And one person provided some files to 3d print replacements. If only I had a 3d printer, and knew how to replace those parts. Sigh.

The Garage

As stated above, we’ve got no electricity in the garage. This is unfortunate because we’ve got an electric lawnmower to charge up, plus when we bring the trailer home to load up, we plug it in so we can run the air conditioner. (We don’t have a big enough inverter or enough battery to run the A/C off the batteries.) And we’d still like to keep the trickle charger as an option for the Leaf if our current work-around stops working.

Of course, I tried resetting the breaker for the garage service. Also one of the outlets on the outside of the garage was a GFCI, so Vicki tried resetting that as well. I’ve done all these things multiple times, and no luck. Our next step is to call an electrician, which in Vicki’s mind means “invite an electrician she knows, his wife and children over for a special halal dinner” which I’m sure means there will be lots of productive work being done towards our problem.

Shameful Confession

Several years ago when I was working from home completely, I decided I needed a really good chair. I did a bit of research and bought a chair that was advertising how much they customize it and how ergonomic it was and all that. It cost more than a Herman Miller Aeron Chair, even if you didn’t buy it from a 90s era startup that had gone bust, but I thought if it saved my back it would be worth it.

Ok, first problem was their amazing customization was basically asking you three questions and then picking either a small, medium or large lumbar pad. I was expecting bespoke and I basically got off the rack. And it wasn’t very adjustable after it was delivered. I was lead to believe there would be a call with a consultant on how to set it up or a comprehensive manual, and I got none of that.

Second problem was that they insisted it had to be delivered via an 18 wheeler, like this was a major selling point or something. This chair was no bigger than any other office chair and it could have been delivered by a panel van, but they insisted. And so I get a phone call from a delivery driver who doesn’t know how he’s getting his gigantic rig down our tree covered residential neighborhood streets. I tell him to deliver it with a panel van, he says he can’t and suggests I come out to meet him somewhere and he can give it to me. I say there’s no f-ing way I’m going to do his job for him. So lo and behold a little while later this truck comes down the street, slapping tree branches all the way, and delivers this package that’s no bigger than other things UPS has delivered in the past.

So anybody, I spent way too much on a not very comfortable chair, and I was embarrassed to admit it, so I’ve kept this chair for about 8 years. And if this lockdown continues for much longer, I’m not sure if my back can take it. And I’m not sure I want to order a chair without trying it, and that’s not going to be possible.

Browncroft Neighborhood Garage Sale

Every two years, the Browncroft Neighborhood holds its world famous garage sale. This year, after nearly 6 years in this neighborhood, we finally got our shit together enough to sell some of our junk.

It also happened to be the day when we had company coming over for dinner, as well as a previous occupant of the house coming by during the day, so I got to spend the entire day out minding the store while Vicki dealt with all that stuff.

It was a beautiful day. Widget likes to be outside with me when I’m out sitting out front, so he came along to keep me company. I swear we had more people stopping to pet Widget and tell me about their Shih t’zu or Lhasa than we did looking at the merchandise. A couple of times I noticed Widget trembling when a dog was sniffing him, but I didn’t pay any attention to it.

The most important item we had to sell was my old bed. It had been my queen size water bed in Ottawa, then Vicki and I used it with a special spring mattress insert designed to go into waterbeds, then it was Laura’s. It went to a girl about Laura’s age who had just moved into her own apartment, so that was nice. When I was taking it apart I realized it was all Robertson screws, and nobody in the US uses Robertson screws, so I had to throw in the screw driver with it.

I managed to sell my old Series 2 TiVo to a guy who was really only interested in the hard drive inside it (since I’d upgraded it to 180Gb). I found another 250Gb IDE drive in my office and sold that to him too. I’m 99% sure I’d wiped it already, but even if I haven’t, I use my laptop to pay bills and log into bank accounts and the like, so I don’t think he’d be able to find anything useful on it. I totally forgot to offer him my broken Humax TiVo, since it has an upgraded hard drive as well. I also forgot to keep the remote control since he wasn’t going to use it. Oh well.

I managed to get away for a few minutes and scored a circular saw that was in its original box with no sawdust on it for $15. I can finally ditch Vicki’s dad’s old circular saw with the electrical tape around the cord and the screaming bearings. I didn’t want the guilt of handing that thing to anybody, so I left it at the end of the driveway, and pretended not to notice when somebody grabbed it.

The sale was more than half over when I realized I was probably getting some sun, so I went and got a hat. But it wasn’t until it was all over just had badly sun burned I got. I’m going to be using a lot of aloe today.

But there was a sadder story. Soon after I’d packed up the remaining books and came in, Widget suddenly fell down on the floor. First I thought he’d just lost his footing on the slick wooden floor, but he started trembling uncontrollably. He continued to have motor control problems for a good 10 minutes or more afterwards. He wasn’t totally out of it, and he could sort of look at you if you called his name. If you’re a facebook friend of mine, you can see a video.

He had a couple of similar seizures last summer, but none since September. I suspect he got overheated and possibly dehydrated from being out in the sun all day. He looks and acts fine today, so there doesn’t appear to be any lasting damage. We’ll have to be more careful with him.