Friday, February 29, 2008

It's only a millionth of the vehicle's velocity...

The Planetary Society has an article up about the "Flyby Anomaly", wherein scientists at JPL have discovered that space exploration probes that use the earth as a gravitational slingshot are gaining a tiny amount of speed that exceeds the gain expected by the maneuver.

This amount is small, "only about one millionth the velocity of the spacecraft", but that's still detectable.

(That ain't much, right? How much of an effect could that possibly have?)

According to the article, the effect was first detected when the Jupiter probe Galileo got its first gravitational assist from the Earth back in 1990. It was subsequently detected on similar maneuvers by the NEAR and ROSETTA spacecraft, to varying degrees. (Two other spacecraft, Cassini and MESSENGER, also swung by Earth as part of their trajectories, but the anomaly was not detected, though for reasons that are understood.)

So I got to thinking--exactly what does "one millionth [of] the velocity of the spacecraft" actually add up to? And is it really that likely to have any kind of significant effect?

Caveat: I'm not an astronomer or an orbital mechanics guy, so I'm just going by the numbers I found in the article and web searches. I mean, you're only going to get "so" accurate when you're going by "about a millionth" :-)

According to a ROSETTA press release, it made its March 5, 2005 Earth flyby at a speed of around 38,000 kph. I'm going to use that velocity for these calculations, knowing full well that the purpose of the flyby was to increase the speed of the spacecraft, but that number will serve for what I'm trying to show regarding the scale of the anomalous speed gain.

So what is one millionth of 38,000 kph? Well, 0.038 kph, or 38 meters/hour. In non-metric terms this converts to 0.0236 miles per hour.

That may not seem like much, especially when compared with the vast distances a spacecraft, even an interplanetary one, must travel to reach its destination. On the other hand, because of those vast distances, flight times are usually quite lengthy, which gives such small values plenty of time to grow into significant ones.

So the small ROSETTA velocity discrepancy grew within one day to 0.5664 miles. Yikes, that means it's already half a mile further along in its trajectory than it was expected to be. Within a week it's nearly 4 miles further along.

Now the destination of the ROSETTA craft is the comet 67P/Churyumov-Gerasimenko, which is itself only 5 km by 3 km size (3 x 1.8 miles), so a week after the flyby ROSETTA would already be off in its expected position by more than a full span of its target's size. And since ROSETTA is on a 10 year trajectory, this discrepancy would keep adding up with each subsequent year, at 206+ miles per year, making the "flyby anomaly" quite a significant factor in mission planning and success.

Obviously the mission planners have taken this all into account now, and we can look forward to a successful ROSETTA flight and mission.

But this certainly does demonstrate that being off by "about a millionth" can have some real consequences, despite how insignificant that sounds.

Monday, February 25, 2008

Not Your Average Cubicle Farm

Man, I think it'd be cool to go to work here:



Click on the above for a BIG version, 3008 x 1960 pixels.

Tuesday, February 19, 2008

I Want a Gravity Powered Lamp

I want one of these:


"Gravia is an LED-lit floorlamp energized by people. To light Gravia, the user places a mass approximately 48" above the ground, that, in falling, powers a mechanism, generating electricity. Gravia harnesses the potential energy imparted by the user, rather than relying on any existing electrical infrastructure."

Update: This may not actually work. Damn :-(

Monday, February 18, 2008

Smoked Jumpers

Consider what happens when you attempt to jumpstart a vehicle with a dead, dead, dead battery and, unbeknownst to you at the time, this vehicle is now experiencing a rather sturdy short in its electrical system (which is why the battery is so very dead).

With such a short there is no electrical load on the circuit and so lots of amps start pouring through the jumper cables. Here's what can happen:


















Not surprisingly much smoke is generated as well in this particular electrical scenario (which transpired in my garage). The elimination of which is the reason why God invented high volume industrial fans.

All turned out well, though, as far as the vehicles were concerned anyways. The cables...well...it all led to a blog post, so it wasn't a total loss.

Monday, February 11, 2008

Concretizing Static Typing Metadata

Well, that's a pretentious title, doncha think?

Steve Yegge writes in Portrait of a Noob that static typing is effectively meta-data ("we also know that static types are just metadata"), like comments, and so isn't strictly required for the compilation and execution of software. He's right in a limited context. If static typing is being used for nothing more than ensuring "type matching", and really doesn't add anything beyond that, then it is effectively just a stronger form of commenting, with the compiler acting in the role of object compatibility inspector.

This does get at why the argument for "type safety" has never achieved much success as a compelling reason for using a strongly typed language. Merely making sure your objects are compatible is a good thing, but it does constrain flexibility, extensibility, and adds type management overhead (to the programmer).

If strong typing is going to be seriously valuable it has to do more than merely ensure type safety, it needs to actually add concrete information to the software.

Take a programming language like Ada, considered one of the paragons of strongly typed programming languages. It does all the type safety stuff, and Ada advocates are more than happy to promote that as one of its great virtues for creating and delivering reliable, safety-critical software. All true, but obviously type safety, accompanied by its supporting syntax and semantics, was not sufficiently compelling to drive any significant adoption outside the defense and aerospace industries (and in those fields, of course, much of the initial impetus was mandate-driven anyway).

What most of the Ada programming language advocates overlooked was the productivity gain possible by the language's specific implementation of strong typing. When its advocates talked about strong typing aiding productivity, it was nearly always in terms of error avoidance. Again, true, and a good thing, but hardly sexy. After all, how many programmers are going to willingly admit that they write buggy code and that maybe they should look into using a programming language that would help them avoid errors?

I went into some detail about this in The Fundamental Theory of Ada, describing how the specifics of Ada's "type model" allows the Ada programmer to implicitly embed scads of additional information with no effort beyond that of defining a type. The language specifies all the additional programmatic information directly accessible to the programmer pertaining to that type. In a sense, user-defined type definitions implicitly declare an associated class instance with information relevant to that type. Here's an excerpt from Ada:
type Speed_Range is range 0 .. 1000;

With nothing more than a reference to an object of that type:

Speed : Speed_Range;

One can know its minimum value (Speed_Range'First), maximum value (Speed_Range'Last), the minimum number of bits needed to represent all possible values of the type (Speed_Range'Size), the actual number of bits representing a variable of that type (Speed'Size, which is often larger than the type size since objects almost always occupy a whole number of bytes), the number of characters needed to represent the longest possible string representation of values of that type (Speed_Range'Width), etc. You can convert values to and from strings (Speed_Range'Image, Speed_Range'Value), do min/max comparisons (Speed_Range'Min(100, Speed), Speed_Range'Max(Current_Max, Speed)), and use the type as a loop controller ("for S in Speed_Range loop" and "while S in Speed_Range loop"), and more. And none of this information needs to be explicitly programmed by a developer, it is all implicitly provided by the mere definition of the type.
This is where strong typing is far more than disposable metadata, like comments. This "aggressive" approach to strong typing, whether in Ada or a similarly conceived programming language, "concretizes" the metadata into practical use to not merely aid error avoidance, but to actively increase programmer productivity.

Wednesday, February 6, 2008

Pandora Plug

I'm not exactly on the leading edge of technology. It was literally years after DVDs became available that I finally got a DVD player. And the one I did get cost $1 as it came as part of a cell phone sign up bonus. And the cell phone is a bare bones phone.

So this is hardly breaking technology news, but I wanted to put in a plug for Pandora internet radio.

The way it works is that it initially asks you for a "seed" artist or song, and then it picks songs based on that seed and streams them to you. You can set up separate radio stations seeded with different songs and artists, and a given station can have multiple seeds, and I just love it. As songs play you can "thumbs up" or "thumbs down" them, which will alter the parameters and tune the playlist to more what you want for that station.

I've got 8 stations so far, tailored for styles from Bruce Cockburn to Sonic Youth to Edgar Winter ("Frankenstein"!).

Pandora solved a vexing problem for me. I like music, but I despise commercial radio with its mass merchandized playlists and juvenile DJs. I literally gave up on it over 6 years ago. Public radio is overwhelmingly classical, except for Philadelphia's WXPN, which I enjoyed when I lived up there (they're on the Web, but I was looking for more variety).

So I could buy songs I knew from artists I knew, but how am I going to hear anything new then? I could catch the musical guests on the late night talk shows or SNL, but that's only a very limited number of venues.

With Pandora, though, having access to music old and new, they give me the exposure to the new artists and songs that fit my tastes; and conversely give those artists exposure to a potential new fan.

Highly recommended!

Saturday, February 2, 2008

I'm With Tuscaloosa On This One

I will be voting in this week's "Super Tuesday" primary here in Alabama. I encourage everyone to take an active role in their caucus or primary, whether it's part of Super Tuesday or takes place subsequent to that.

Liberal, conservative, or moderate, Democrat or Republican, take part in the process. This is your country, so it's up to you to cast your vote for the direction you want to see us go.

The Tuscaloosa News has endorsed Barack Obama and John McCain in Tuesday's primary, and they happen to agree with me on this, so I endorse their endorsement :-) I don't agree with either of them on everything, but I have confidence that both possess the faith in, and respect for, this country and what it had always stood for.

I'll be voting for Obama Tuesday, and I hope again in the fall. I wouldn't dread a McCain presidency, which is why I'd like to see him on the Republican ticket, but I'd really like to see Obama in the Oval office.

YMMV.