Thursday, November 17, 2011

A Day In the Life, bSols 2778-2779: Oh how we loves the tilty goodness

In the shadow of MSL's launch, Opportunity has been trekking north as fast as the gods of solar power allow.

Well, you know, except for the week-long detour for one hell of a science target.

To put the last two weeks' worth of activities into context, it's necessary to recall an abbreviated version of the trek northward since departing Chester Lake:

1) "This way to Shoemaker Ridge A and Shoemaker Ridge B" 
The trek northward began after the intense IDD MI+APXS+MB campaign at Chester Lake in the Odyssey crater ejecta field, along the south end of Cape York. During the Chester Lake campaign, the engineering team began formulating plans for the winter; local solstice for Opportunity is on 03/31/12 Earth time. The science team agreed to begin driving northward as often as we could in order to effectively image-map the purported north-facing slopes on the north end of Cape York.

The primary reason for the trek north was, of course, to find those slopes that give us good sun angles for good power. All estimates point to Opportunity surviving the winter with plenty of margin. However, margin can easily be eaten away by the unknown unknowns. With that in mind, we tried to reason how quickly we'd need to find a parking spot. January seemed a good last-minute date to aim for, if push came to shove. With that date in mind, we considered one other major factor: The launch of the Mars Science Laboratory on November 25.

The view periods of the MSL spacecraft after launch happen to interfere with all other Mars missions. Immediate post-launch priority for DSN coverage of a spacecraft is very high; Opportunity, being much older and of a much lower status for requesting DSN time, gets the short end of the stick along with everyone else. This means that we may very well lose the time we've already scheduled with the DSN. Some more strategic analysis showed that if we did not finish mapping Cape York's northerly slopes by the time MSL launched, December and January would not provide us enough time to do that mapping because the incoming solar power would be too low.

We had made it clear: Thanksgiving or bust.

2) "Notional" hunt for veins begins

So-called "veins" are cross-cutting, exposed rocks resembling blood veins in shape. While we trekked north, the strategic path was revised to take Opportunity along the western "apron" exposed outcrop that defines Cape York while going north. The science team deemed it unlikely that we'd hit anything geologically interesting along the way, but the whole team agreed that it was worth a shot to look for veins while we're going north anyways. We began "banking meters" very quickly — meaning, we had gotten into that "haul butt across the Meridiani" mindset from the pre-Endeavour (pre-Cape York) days  and this bought us margin. We're good at making Opportunity drive. Very good.

3) First close approach to Cape York "apron" reveals "Homestake"

Once we hit the apron, we found a goodie: a rich, exposed vein, about 1cm in diameter width**:

When the science team starting thinking of names for this goodie, Squyres popped his head in: "Make it a good one, guys." They chose well — "Homestake."

Immediately, the science team got very excited. Immediately, the acronyms "MI" and "APXS" found their way into the SOWG meetings every morning. Of course, the question was not whether or not we could take a detour, but for how long we could hang out. The MSL launch date was looming. The engineering team accepted the risk after several long, fruitful, and constructive conversations.*

Then, another caveat: We needed APXS data on some surrounding material in order to know the context of Homestake. So add another three sols, boys and girls: Here's deadwood.

The problem was that we weren't satisfied with the "bump" drive from Homestake to Deadwood — a drive on the sub-meter scale, by the way. Accounting for the re-bump and IDD activities, we had eaten away all the margin we built along the way to Homestake. Things got tight.

4/5) Onward to winter haven image mapping

We did a quick dog-leg around a funny-looking dune, with some quick imaging of purported northerly slopes at the #5 label.

6/7) Some candidates for good slopes

On sols 2778 and 2779 (executing now), we drove towards label #7. Our imaging on the ground correlated well with the orbital observations of MRO's HiRISE camera. We see northerly slopes in excess of 15 degrees, and we see them in several spots. We have imaged "Turkey Haven" and "Winter Haven" and plan on doing a little more exploring. For now, here's our latest Navcam 6x1 aimed right at our feet looking south: 

What's next? More image mapping, more strategic planning. We still have some trekking to do to find all the best slopes, and to see what slopes also have good science targets. We've got plans. Oh, do we have plans. If we find a good slope with a good target, you can bet your bottom dollar that we'll place that MB on it and get a nice, fat, multi-week integration. I expect activity to dwindle down throughout December, with January-April being "hunker down" months with occasional science activities.

Might give me time to breathe.


*This is something, by the way, that is unique to rovers. The time scale over which these conversations were had is astounding: literal days. The Homestake  finding was a surprise to most everyone and it had just about the worst timing imaginable. Everyone wanted to know what Homestake is and not have to come back to it next Martin spring — late next summer for us on Earth. (Ahem, those in the northern hemisphere.) We made several well-informed, hard-fought, sweeping tactical decisions without even blinking. It's like we've done this before or something. Even though science leaned towards staying at Homestake longer and engineering leaned towards getting the hell out of there, the push-pull between the two teams worked to our advantage. The result: good science in good time.

**Ahem. :p

Saturday, November 12, 2011

On Mornings

Hi, my name is Matt Lenda, and I… this is very difficult for me to admit… and I am a morning person.

Hi, Matt.


Scott Maxwell's Twitter feed can be instructive:

"Turns out that if you start at oh-dark-frakking-thirty[*], you can finish waving the rover's arm around by jesus-please-tell-me-it's-naptime."

This is in reference to a rare early start to the day: the SOWG meeting's at 8am, not 9am. (Gives the Cornell folks a chance to tag up before lunch!) We had to pull this during our Nominal planning cycles this past week to squeeze in extra planning days. 

When I was in high school, I worked the open shift at a Starbucks. The day started at 4:30am; lights on by 5:30am. I didn't have real weekends during the school year for some two years. I averaged five hours of sleep a night — hockey practice, by the way, started at 10pm four nights a week — for nine months. I was able to add regimented naps in the summertime, but the schedule was pretty much the same: early in, early out. This turned me into a morning person, against my will as it were, and now I'm stuck in that groove. My body won't let me wake up later than 9am on the weekends unless I am up until 5am working on something; then it gets me up at 9:15am instead. 

When I was a kid I slept in until 10 or 11 on my off days just like anyone else. After working those early shifts a few years later, things had changed. I remember the first weekend I had had off in a few months: I got excited because I was going to get to sleep in for once, but my body wouldn't let me. It hasn't ever been the same since.

I am, characteristically, the first person into the room when I'm on shift. If I'm TAP/SIE, I clean my area. If I'm TUL (shadow, for now!), I clean the whole room. It's easier to admit that I have OCOS — Obsessive Compulsive Oooohhh Shiny! — than it is to admit that I'm a morning person. Somehow it seems to be the dirty word around the office. During my first week at JPL a year ago, I met another guy who had then himself only been at JPL for a year. He asked me when I planned on going into work. I answered, "7:30am, usually." He said, cynically, "Yeah, that'll change."

He didn't know the extent of my morning person-ness. They never did change, my arrival habits. In fact, getting there at 7am or earlier has been my recent thing. There are things to get done. There are spacebirds to fly. There are Mars cars to command. 12 hours later I wonder where the day went, thinking only, "Thank god I got here early."

Scott told me later that they used to allow 6:30am start times for the day. His, ermmm, distaste for such an early start aside, we have on our hands an interesting thought experiment. How do you balance the needs and desires of a tactical team? We have morning people and evening people. We have east coasters and west coasters. We have people who like light and people who like night. What's the best way to do this kind of thing?

The solution for a 3-month mission is easy: Shove everybody in the same location and live on Mars time. If Mars days were significantly longer or shorter than Earth days, that would very drastically change the design of the entire mission. Just as it is easy to forget that your most precious resource is time with the DSN, it is easy to forget that Opportunity literally lives and breathes by day. To say that such a thing as local time systems would entirely change a mission design is to say a very profound thing. The optimal solution is to move everybody to a single location and then adjust our finely-tuned body clocks to start cranking out sequences on Mars Time. To hell with Earth time — who says I can't have dinner at 4:33 am? MY BODY SAID IT WAS OK.

This is, by the by, our first solution: Live On Mars Time (read: "The Golden Days")

We can also call this "inconvenience everyone equally" paradigm. But, of course, Opportunity and Spirit lasted wayyyy longer than 3 months. The operational (and personal) costs of having the entire science and engineering team at one location are astronomical — but, of course, with huge payoffs if the duration of their stay is short — so the MER project had to find a new way of doing things. This is our second option:

Option 2: Modified Earth Time (read: "What we do right now you daft fool")
What do we mean by "modified"? We mean that we schedule tactical planning shifts within some convenient day time range; we can place constraints on what's allowed and what's not allowed. For instance, we can institute a rule that states, "No planning day should start before 8am," or equally, "No planning day can exceed 10 hours in length." Stuff like that.
The problem with this is that Mars and Earth rotate at speeds just different enough to be a total pain. There are many ways to show how, but the simplest is to plot local solar time in seconds for Mars and Earth — using Opportunity's longitude and the longitude of Pasadena, CA:

See how long it takes for the full cycle to go by? Total pain. We look at this drift of time well ahead of time, and when we see that the previous sol's downlink isn't going to get down to the ground in time before a reasonable start to the day, we "back off" a few days and plan multi-sol sets of commands for the rover. There are many rules and guidelines and formulae that go into determining this strategic schedule, but you get the drift. (*rimshot*)

The idiosyncrasies of this so-called "Modified Earth time" happened to hit us this week. We've been boogeying north to get to the where the north-facing slopes on Cape York happen to be. We had to get this terrain-mapping done before MSL launches because they will likely be "stealing" our uplink and downlink times with the DSN, meaning we can't command Opportunity as often as we'd like. MSL is, after all, a much higher priority spacecraft. By the time MSL stops taking our windows from us it might be too late to do a good reconnaissance of the surrounding areas. Power is dropping as we approach winter solstice; we can only support drives on the order of an hour in duration at the moment, and we can only do drives on two or three consecutive sols before we have to take a breather and let those batteries charge up.

What happened is that we banked ourselves some meters: the RPs got into "trek toward Endeavour" mode and just took off.** We had about a week of magian to get the terrain mapping done. Then: Homestake. And then: Deadwood. (More on these targets in later posts!) And then: all of our margin was gone. So the science folks gave us back the keys, saying, "Get 'er done." To do that, we had to institute a planning day today, Saturday. A weekend planning shift hasn't been necessary since, purportedly, previous Spirit winters. In that case, it was to literally save the spacecraft from certain doom. In this case, today, it was to put some more meters in the bank. Because we need ground in the loop between drive and IDD activities, a full 3-sol plan on Friday (the usual planning schedule) would have only given us one drive when we could have two or three. Damn Modified Earth Time! So, to counteract this, we came in again today to get some more driving time.

(Totally killer day. I felt like I was in the glory days, part of the prime mission, part of a team that was ecstatic to be driving cars on Mars on a Saturday morning.)

Really, everyone seems to miss the Glory Days of Mars Time. But I think everyone would be sick of being at JPL again, as nice as this place is. Which brings me to our third option for tactical operations:
Option 3: Floating. Tactical. Cruise ship. (read: "Mars Time for Winners")

Scott told me about this. The idea: Screw being spread across a continent, and screw being on land in a single stuffy building. Put everyone on a cruise ship. Travel west to make your day about 40 minutes longer than the usual Earth day.

40 minutes drift per day = 0.67 hours drift per day = 0.0278 days drift per day
0.0278 days drift per day * 360 degrees longitude per day = 10 degrees of longitude per day ~= 600 miles west every days at the equator

That's, like, a Colorado and a half every day. Totally feasible.***

Not only would this mean that we're on the Mars clock — ahem, Opportunity's clock — but we would also have the "normal" daylight hours where the sun rises in our mornings and sets in our evenings. Walking outside wouldn't totally mess with our fragile brains.


*"oh-dark-frakking thirty" is, by the by, an actual time, though one that's not institutionally accepted. We have to translate between this colloquial clock and UTC pretty regularly. I find it unfortunate that the rover's command language does not accept colloquial times as parameters: "Start APXS integration at cold-as-crap thirty-seven, wait for god-knows-how-long, shut your face, and salute me. Dang it."

**Days Is Almost Gone" by the Derek Trucks Band is currently blasting on my record player. It has grabbed my attention at this moment for two reasons: first, it seems apt for the pre-Endeavour attitude that was all about putting back the miles and having to shirk it this mindset when we hit Cape York; and second, it reminds me that my record player's needle isn't of very high quality and is making all of my 180-gram records hiss on the high ends, like vocals and drum cymbals. This is unnerving — having music of such high audio quality that it actually sounds worse. 

***I'm leaving the logistics of such an operations architecture as an exercise for the reader. Suckers. Also, I didn't check my math. Also, I have to go flip the record… Also, nobody is allowed to point it out if I screwed the math up. 

Sunday, November 6, 2011

I know geeks

Quickly! A sidebar!

I graduated with her at CU, working with her on both our senior design and graduate degree programs. She decided to take what's known as the "icky ew nasty" route of aerospace engineering, that of aerodynamics and fluid mechanics. I mean, fluids are cool and all, but if they're not loaded with caffeine and being injected into my bloodstream by the unfortunately roundabout way of having to drink them (god forbid) first, then you've lost me.

Anyways, go read! She listens to vinyl! She uses phrases like "create an incubator for portable, cheap, and effective educational programs"! She is a supporter of the Oxford Comma! She digs science! Her boyfriend is a math major! Her dog can do backflips and triple integrals*!


*Not yet tested in clinical trials.

Thursday, November 3, 2011

This is why we can't have nice things

Well, official title: "A Lesson In DSN View Periods")

(Secondary Title: "Where Has All My Time Gone Because I Have Like Seven Posts In the Queue and I Haven't Posted A Single One Yet")

My mother told me that I could always have nice things. In fact, she still gives me nice things, like giant jars of homemade salsa straight from Colorado. It keeps up the illusion that reality isn't cruel and that it will give you salsa if you call her every once in a while.

And, it turns out, we actually can have nice things. Take Opportunity, for example. She's a nice thing*. She is the proverbial cake. But we can't always eat the cake. This is for several reasons. First, because I'm always one to remind people that the sugar in the cake — proverbial or otherwise — is bad for your blood sugar and makes your insulin response weaker over time. This warning usually disappears into the conversational ether, because, hey, I'd ignore me, too. The second reason is that operating a spacecraft is hard. Very hard.**

It's all about resources, resources, resources. I like to ask people, "What do you think the most precious commodity is for a spacecraft?" The answers are the usual: "Power" (not incidentally, from the power engineer); "Heaters" (also not incidentally, from the thermal engineer); "attitude control thrusters" (also not incidentally, from the guidance and navigation engineer). I've even asked lay people the same questions. The responses are roughly the same.

I disagree with these "average" answers, and many of the folks on both the uplink and downlink sides of operations at JPL would, too. Nay, the most precious resource, we would say, is this:

Time with the Deep Space Network
As we'll come to see, the DSN is an over-subscribed resource, constantly untangling the web of requests of several dozen spacecraft, each with different requirement and desires and idiosyncrasies. I'm going to show some neat-o fun things about the DSN being able to "see" each piece of floating metal (and more) out there.

Learning hats, engaged.


Reader, DSN. DSN, reader.

Notice the nice placement of these complexes: They are each separated by about 120 degrees of longitude, giving us petty humans the ability to continuously watch one part of the sky. Just as an object is approaching the horizon of, say, an antenna at Goldstone, it's coming into view at Canberra. These so-called "view periods" overlap by a considerable amount of time. Each complex consists of several individual and independent antennas. Because each antenna at each complex is located in a different spot, these overlap periods are slightly different at every location. However, for our concerns, it's all the same for a given complex.

Right. So. Remember SPICE? Open-source geometric awesomeness? Well, SPICE is still our friend. I've got a slew of knowledge about the DSN that I can't share, but all the SPICE stuff? Yeah, fair game! It's great. So let's use it. You know, get the nasty icky mathy stuff out of the way. We'll stick to basic view parameters, since that's all that matters to first order. 

Now, who remembers the right-hand rule?

This provides a "coordinate frame" for the antenna. Once you've established a coordinate frame and where its center is in space (literally, in space!), you can use a number of different ways to express the position of other stuff. One way is a three-dimensional vector: "Stuff is this much along the A axis, that much along the B axis, and a little along the C axis". Another way, most common for an antenna fixed on the ground, is the azimuth-elevation-range parameter set. Say you're standing straight up and you see a star somewhere in the sky. You can know everything about its position relative to you if you know its azimuth, elevation, and range in your coordinate frame. 

Usually, azimuth is measured from the North; it's also known as the "right ascension". Elevation is how high the out of the "plane" made by the horizon the stuff is. Range is simply distance to the stuff. Easy. We'll be using these terms quite a bit here.

The reader can imagine that if there are a lots of things in the same place in the sky, things can get complicated for the DSN even though there are multiple antennas at each complex. So, just how crowded is it? Let's use azimuth and elevation to find out. 

Let's stick with just azimuth. We can get a rough idea of how the view angles of some certain objects vary over the course of the year. Remember that the DSN antennas are attached to the Earth, which is tilted relative to the plane created by the orbits of the planets. Also remember that this plane is only notional and ill-defined because the planets are all slightly out of this plane. Pluto's orbit (well, I guess I'll include small bodies!), not necessarily the tilt of the body itself, has a very significant tilt with respect to the orbits of the other planets. Mercury's is also very pronounced. However, those of the 8 primary planets are roughly the same, so it goes to say that if a particular antenna sees the same azimuth for several different bodies, the antenna sees close to the same elevation for these bodies, as well.

Note: I'm going to stick with planets and not be spacecraft specific. I do this mostly because we can get a good sense of the complexity by only knowing where planets are. That's where most of the spacecraft are anyways — and, really, if you want to know where any Mars rover or orbiter is, all you need to know is where Mars is. Anything else is in the details and you don't need that precision anyways. Cassini is basically at Saturn, MESSENGER is basically Mercury, etc. Planets are proxies for many of our spacecraft. Lastly, I'm keeping the list of objects to to watch for short because there are just too many deep space spacecraft to make sense of them all in one plot. Not enough colors or plot symbols.

Let's get an initial sense of things with a plot of azimuth from each DSN complex of all the inner planets through Saturn, but ignoring Jupiter and instead looking for the Juno spacecraft. Let's grab a point in time every hour, and only plot the azimuth if the elevation is greater than 0 — i.e., the object is visible in the first place.

Ew. Busy plot. Let's dissect it. By virtue of the Goldstone and Madrid stations being in the Northern Hemisphere, we would expect that their azimuthal plots of each major body to be roughly the same, offset only by the some "phasing" or spacing in time of a given body. For Canberra, we would expect something different. indeed, most of the bodies cross the 0-azimuth (or 360, same thing) point because they are in the northern sky for Canberra antennas. The azimuth of a body, if it's visible, "flips" over when it crosses 360/0, and that's the behavior we see there.

The major thing to glean is this: Things are going on, and they're going on all the time. When one thing falls out of visibility, another one jumps in. The antenna has to constantly jump back and forth between objects, depending on who wants what and when they want it and for how long they want it.

Well, really, that didn't tell us much. I can think of two instructive ways to tell the story a little better. We'll start with a time-lapse video of the position of the planets with respect to Earth. A while back, I made just a time-lapse: I plotted the positions of all the planets relative to Earth, but not fixed to a particular point on the earth (we call this an inertial frame), every few days for a few years. Our predictions of planetary orbits are quite good, so the positions are reliable to an extraordinary degree. (*rimshot*)

I'm only capturing direction here, and making the size of the arrows the same for convenience. See how the outer planets move much slower? Look at Mercury and Venus: they move so fast that they actually have a significant "going the other way" deal as they hit the other side of their orbit and move in the other direction relative to Earth. What we are looking for here are overlaps: When Mars and Saturn overlap, the DSN has to deal with talking to rovers and orbits of all different kinds at imperceptibly different parts of the sky for several hours. Sometimes, the overlap isn't so bad. Sometimes it is. Sometimes it's in between. The DSN has to deal with this constantly — and for other things in the sky not close to the planets, as well. 

From this video, the major idea to glean is this: The planets' relationship to each other is cyclic, sometimes working to your advantage and sometimes not. Mostly not. Especially mostly almost always not. Long-term planning folks like to use representations like this just to get a good idea of what their DSN "coverage" is going to look like when they, say, want to land a spacecraft on another planet. Because if you can't talk to your spacecraft (when it's most critical to do so) because of conflicts with 17 other missions, why try to? You plan around major conflicts like this. Everything can be just perfect about a mission, and a lack of DSN coverage can totally hose you.

The second instructive way to represent this is with a combined azimuth-elevation polar plot. If you've got one of those old-school GPS units, or even a new one that isn't meant for giving you driving instructions, you might notice a similar kind of plot: Azimuth going around in a circle with elevation represented as concentric circles, increase in value as you approach a view straight overhead. An object directly above you in your local-level coordinate frame will be in the middle of this kind of plot. Take this example: it's the azimuth-elevation plot for the aforementioned bodies from the view of DSS-63, a 70-meter dish at the Madrid complex. (Combined azimuth-elevation plots for antennas at Goldstone and Canberra tell us the same story.)

The red "+" is the first point at which the object is visible over the timeframe specified in the plot title. I have also appended the time of day (UTC, of course) at which this occurs, as this plot has no way of effectively conveying the direction or start of time.

What do we see? Mercury, Venus, and Saturn are all very close in the sky on this particular day (and they will continue to be so for quite some time…). Although their so-called "rise times" (when they first appear on the horizon) are separated by a few minutes, they are close enough to be a pain. 

When accounting for handovers between stations or complexes, having multi-antenna assignments for a single spacecraft, or any other number of a dozen things I can think of, we can easily see how crowded it gets. (And remember: I'm only counting planets as proxies for spacecraft, not even mentioning the ones not close to planets.) And, just because something is visible, doesn't mean it was assigned (or "allocated," as we say) the time with that antenna. 

Let that sink in. Let that soak into your brain. Think about all the things you don't know, all the things that make that DSN engine run. 


And that, folks, is why we can't have nice things. At least, not all the time. The DSN is a monumental achievement of humanity, providing not only communication but also precision navigation services to several dozen spacecraft whose voices are but faint whispers in a background of nothingness. To place Opportunity in this picture is easy, really: She's just another player, just another bidder in a vast landscape of missions with equally crucial requirements to check in on their birds, asking them a simple question:

Hey, are you ok? Let's chat.


*A billion-dollar nice thing, but I fail to see how that makes a difference.

**Once upon a time, my roommates and I decided to play a board game. I didn't know the game, so I asked if it was hard. One of them said, "You fly spaceships, and you're asking if the board game is hard?!"