A thought about EVs (Electric Vehicles)

It’s probably going to be 5 years before we need to buy a new car, but Vicki and I were talking about the new Nissan Leaf and other EVs. With our current driving pattern, we could definitely get by with a two seater EV with 75 miles or so of range, as well as a hybrid or whatever they’re calling the Volt these days. Obviously the state of the art will have advanced by then, but in theory we could get by with what’s available now.

But one thing that gives me pause is heating the cabin. Hybrids and gas engined cars get worse mileage in the winter here in the temperate zone. Part of that is that engines aren’t as efficient in the cold, but also in the case in hybrids, they run the gas engine more often to heat up the engine and the cabin. But EVs are on a pretty limited power budget, and electric heaters suck up electricity like nobody’s business. So what I’m wondering is if EVs currently have the option, or whether I’ve just invented it, to use house power to heat the cabin up before you use it. So if you plug your EV in overnight, it charges the battery, and then an hour or so before you’re scheduled to drive it somewhere, it starts using house power to heat up the cabin. That would save the power in the battery for the important stuff, like driving the wheels and powering your iPod.

Hey, you could even use a peltier cooler to use the house power to cool it in the summer, come to think of it.

I guess for the drive home from work, you’d be stuck using the battery. But no idea is perfect.

A tale of two MacBook Airs

I have a little netbook that I borrowed from my step-daughter for our trip to England and haven’t bothered to give back yet. (I don’t think she uses it much) I love the portability since my main computer, a MacBook Pro 17″ is kind of tethered down most of the time, but the tiny screen size is hurting my back (I kind of crane forward to read things, and it hurts after a while). So when Apple announced the new MacBook Air (MBA), I had two thoughts:

  1. A computer that’s lighter than a netbook but with a decent sized screen would be great for that sort of use
  2. A new MacBook Air should drive down the resale value of older MacBook Airs, making them affordable

So I contacted a few frieds I knew who had the old ones to see if they were selling and upgrading. Two of them were, one with an older one with a hard drive, but the other with year old one with a SSD. If I’m going for portability, the SSD was obviously the way to go. Obviously Apple agrees, since the new ones don’t have a hard drive option. But here’s the age old problem with Apple products – just because there is a brand new model, the resale price as seen on recent eBay auctions has not come down much, if at all, on the SSD ones.

So my options are currently

  • Buy a perfectly good 1 year old MBA with 2 years of Apple Care on it
  • Buy a brand new MBA with exactly the same options (RAM, SSD size, etc), slightly smaller and with much better battery life and with 3 years of Apple Care but for $450 more
  • Buy a brand new MBA with 4Gb of RAM instead of 2Gb, for $550 more than the used one.

I’m wracked with indecision on this one. I probably don’t need 4Gb of RAM on the computer I use when I’m not at my main computer, since it won’t be doing as many tasks (I’m currently got 21 Chrome tabs open, plus iTunes, Terminal, Skype, Word, and Remote Desktop) but that’s the sort of thing I’m likely to throw in just for future proofing if I buy one new. The difference in specs between the old one and the new one are pretty minor, except the battery life. And is that really worth the extra $450? That’s what I can’t decide.

Oh yeah, and there’s always option 4 – forget about buying a MBA, put the money away, and when my shoulder heals up a bit buy a SpeedStroke kayak ergometer. It’s about twice as much, but it would probably do me a lot more good.

That was worrisome

For reasons I don’t remember, I did a “mdadm –detail /dev/md0” on my home Linux server and noticed that the RAID was busy quietly rebuilding itself. That prompted me to try the same command on my dom0 on my colo box, and what I discovered there was even worse – the second disk on my RAID-1 (mirror) was marked as a “spare” and some other status that indicated that it wasn’t rebuilding, and the mirror disk was marked as missing.

I removed the second disk from the RAID and re-added it, and it went to the status “spare, rebuilding” and the RAID status was “active, degraded, rebuilding”, and some hours later it was back up and happy.

During that time, I discovered that there had been a few emails about SMARTD problems and RAID problems, but because I had set up exim wrong, they weren’t getting delivered. I tried a few things to get exim set up, and then when they didn’t work I decided that since I know how to set up postfix just fine, I uninstalled exim, installed postfix, and got it configured in less time than it took for the RAID to rebuild.

The fact that the RAID degraded in the first place gives me pause, but the fact that I was able to recover it without any downtime makes me happy that I choose to do a RAID in the first place. I’ll keep and eye on it and maybe order a replacement disk or two so I’m ready if something fails again.

More geo coding

I got the airport data nailed down, at least all the stuff I need for iPhone CoPilot (which unlike the other databases I provide doesn’t care about communications frequencies or runways). And now I’m looking at “waypoints”, the points in space, sometimes defined by the intersection of a specific radial or bearing from this navigation aid and a specific radial or bearing from that navigation aid, sometimes a distance and radial from one navigation aid, or in the case of GPS instrument approaches and air routes, just points in space.

The difficulty with waypoints is that their definition in the file doesn’t have any sort of location information other than latitude and longitude, which means I have to hit the geonames server for every one (and so far I’ve gone over my hourly limit with them multiple times while testing this code), and that sometimes they, unlike airports, can be out in the middle of the ocean somewhere. So the geonames “countrySubdivision” service just says “I have no idea what country this is in”.

Unfortunately, my code doesn’t like it when a point isn’t in a country. I need to assign every point a 2 letter country code (I use the FIPS 10.4 code instead of ISO-3166-1 because my first world data came from DAFIF, which used FIPS 10.4 and I stuck with it. I’d probably switch to ISO-3166-1 except I have no idea how to do it painlessly.)

In my program to load FAA data, I do some messing around trying to map the country names they use to FIPS 10.4, and sometimes I’ve done some things I’m not proud of, like mapping “French West Indies” to “GP” (the code for Guadeloupe, which is just one of the four territories that make up the French West Indies) or “Trust Territories” to “JQ” (the code for Johnston Atoll) – that one is really dodgy because the “Trust Territories” were broken down into the Republic of the Marshall Islands (“RM”), the Federated States of Micronesia (“FM”), The Commonwealth of the Northern Mariana Islands (“CQ”) and the Republic of Palau (“PS”). Actually if I looked through the FAA data these days, I’d probably find they never use the name “Trust Territories” any more. Another one that comes up is the United States Minor Outlying Islands, which has an ISO-3166-1 code “UM”, but which consists of 9 separate “insular areas” that have their own FIPS 10.4 codes.

So my thought was to ask the geonames “ocean” service what body of water these points is, and then make up a phoney country code for each ocean. Unfortunately there aren’t just a few oceans, there are are dozens of them – everything from the Arabian Sea to the South Pacific Ocean. So many that I can’t come up with semi-mnemonic identifiers for them. So using the fact that FIPS 10.4 codes never start with O or X, I just went though and assigned anything with “Ocean” in the name a code starting with “O” and anything else a code starting with “X”. It sucks, but it will work. Sort of. I hope.

The long term solution is that separate the code I use for iPhone CoPilot further away from the other navaid.com code, and not require a non-null country code in iPhone CoPilot. Also try to migrate to ISO-3166-1 country codes.