Monday, October 1, 2012

To Endeavour Beyond the Hangar

High dynamic range photo of Space Shuttle Endeavour in a LAX Maintenance hangar awaiting transport to the California Science Center. 
A few days ago I was fortunate enough to take a tour of the Space Shuttle Endeavour currently resting inside of an aircraft hangar at LAX.  This has been one of my life long dreams to be able to see what, I believe, to be the greatest aircraft ever produced by man.  It is a bittersweet moment as I am disappointed to see this relatively young craft retired and relegated to a life as a static display.  For now, she rests peacefully inside an aircraft maintenance hangar awaiting a long and slow trek down the streets of Los Angeles to her final resting spot at the California Science Center.

I was fortunate enough to remember her build progress during my childhood as a result of the tragic Challenger accident.  I clearly remember watching her launch (on tv) from the Kennedy Space Center in Florida on May 7, 1992, following her 141 orbits through space, and witnessing her picture perfect landing at Edwards AFB in person.  Some key events I remember from her first landing:
Endeavour arrives for her very last landing at LAX.
  • This was the last planned Space Shuttle landing at Edwards AFB.  The shuttle landing strip at the Kennedy Space Center in Florida officially became the planned and priority landing location of all subsequent shuttle missions.
  • This was the first use of the drag chute to help shorten shuttle landing distances and make the Shuttle Landing Strip a safer place to land.
    • The dry lake beds of Edwards AFB base always gave an extra margin of safety for the powerless gliding touchdowns of the shuttle, though this safety margin was never needed.
  • A nominal break test to give extra engineering data about the new drag chute was canceled at the last minute due to somewhat high winds that day.
  • With good eyesight you can watch the Shuttle pass overhead at nearly 50,000 feet and Mach 1.0, do a 270 degree turn during the Heading Alignment Cylinder and land; it all happens in about 2 minutes.

The brick like appearance of Endeavour's
thermal protection system.
Her landing is a quick affair and it is easy to see why she is lovingly referred to as the "flying brickyard".  Her relatively poor glide performance in the thick atmosphere at low altitudes does make her seem like she is "dropping like a brick".  Even her heat resistant tiles that allow reentry speeds up to Mach 25, where the surface of the shuttle can reach 2,300 degrees Fahrenheit, give a somewhat brick-like appearance.  Though it's hard to imagine a vehicle that can fly at hypersonic speeds and use aerodynamic control surfaces to make large, sweeping 1,085 mile re-entry path adjustments to allow pinpoint landings as flying anything like a brick.

It was rather ironic to have Endeavour, now retired from flight at a young age, sit next to a B-757 in the same hangar undergoing minor routine maintenance   The much older and much more heavily used B-757 will leave the hangar shortly to fly and provide safe transportation for at least another 10 years.  The Space Shuttle will never [slip] the surly bonds of Earth again.  It is a sad day when Man's greatest aircraft will not fly again.  

Here are some interesting facts that surely make this one of the greatest flying machines ever made.  The Space Shuttle:
Endeavour with some of her felt
covering visible.
  • Is the heaviest planned glider in existence (B-747 - unplanned)
  • Is the fastest winged aircraft in existence (X-15 - non-orbital)
  • Is the most reusable manned space vehicle
  • Can launch up to 7 people and 53,600 lbs of cargo into orbit. 
  • Carries one of the most efficient rocket engines ever made that is throttable (ability to vary thrust, as needed, throughout flight).
  • Could be considered a partial fabric aircraft with it's felt reusable surface insulation (FRSI) 
Surely we will return to winged space flight again, even Wernher von Braun, one of our greatest rocket designers, repeatedly called for winged spacecraft.

Monday, June 25, 2012

Coded Integrity

Watch this entertaining video on the upcoming Mars Science Laboratory landing sequence on Mars entitled "Seven Minutes of Terror".  The five minute video easily conveys the importance of getting a series of complex systems to operate with perfection in an extreme environment.

You and many will agree that NASA has embarked on complicated and arguably risky landing sequence to get a 2000 lbs, $2.5 billion rover to a precise landing spot on Mars.  If you look back toward the beginning of the video sequence (at 0:20s) you will notice NASA claims that approximately 500,000 lines of source code were used to program the landing sequence of MSL.

Now 500,000 lines of code may seem to be tremendous to the non programmer (considering it could be equivalent to approximately 125 novels).  To an individual programmer it certainly would be a daunting task.  However, compare this to Micosoft's Windows XP operating system which uses approximately 45 million lines of code or the Android Operating System, found on millions of cell phones across the world, that uses in excess of 12 million lines of code. Based on this information, a measly 500,000 lines of code seems like a relatively small project.

Now let us look at an important metric in the world of programming:  Errors per lines of source code.

In a 2011 report by the Scan Project hosted by the Department of Homeland Security and a private software analysis firm, Coverity, found that proprietary software had an average of 0.64 defects per 1000 lines of code.  Open source software had an average defect rate of 0.45 per 1000 lines of code.  Although NASA is a public institution, most of its code bases are developed in conjunction with Wind River Systems and are therefor proprietary.  Although, some of this proprietary code may include code from open source developers.

Proprietary software includes software developed by an institution were the code is not freely accessible by the public, examples include Microsoft's Windows and Microsoft's Office products.  Open source software code is made freely available to the public. Corporations, institutions, or individuals may copy, modify, and even contribute to the development of the source code.  Open source examples include the Android Operating System and Mozilla Firefox

So, considering a proprietary code failure rate of 0.64/1000 lines of code, NASA's MSL landing sequence code could be expected to have 320 points of failure, errors, or other faults.  Even in the the best examples of "good" code the Scan Project found an error rate of 0.21/1000 lines of code which would still compute to  over 100 errors.

Now that is not say NASA does not have some tricks up its sleeves to limit these errors. Often the Scan Project found errors on initial product releases (version 1.0) and NASA has certainly simulated this harsh landing sequence and therefor put the code to the test numerous times.  However, the demonstrated code error rate along with the shear complexity of the task at hand and it becomes easy to see just how dangerous this mission is.

Hopefully, NASA has learned from its past coding errors:  In 1999 NASA lost a Mars lander to an incorrect metric to imperial conversion in the orbital insertion code of the Mars Climate Orbiter.

Good luck NASA, may your code be free of faults.

Monday, June 4, 2012

Into the Shadow of the Earth

Image of a partial lunar eclipse taken from Guanajuato, Mexico on the morning of June 4, 2012.  One last spectacle created by the eclipse season that also created the spectacular annular eclipse on May 20, 2012
Just two weeks ago I was fortunate to stand in the shadow of the Moon.  Now our orbital companion, the Moon, passes through the shadow of the Earth in a partial lunar eclipse.

As the orbital mechanics of our Moon works out, a solar eclipse will always be followed by or preceded by, in two weeks time, a lunar eclipse.  The alignment of the Sun, Earth, and Moon remain favorable to eclipses for a period of time lasting 31 to 37 days called an eclipse season.  Since the Moon completes a full cycle of phases from new to full back to new in 29.5 days, referred to as a synodic month (slightly different than an actual lunar orbit or sidereal month), both a lunar and solar eclipse must occur during this time.  In-other-words, a complete synodic month will always occur within an eclipse season.

If a lunar eclipse occurs at the beginning of the eclipse season, it will be followed by a solar eclipse to then be followed by another lunar eclipse.  So a single eclipse season may include up to three eclipses.  At least two eclipse seasons will occur per year, sometimes three, which creates that mathematical possibility of having up to five solar or five lunar (not six) eclipses in one year.  This eclipse season brought us one spectacular annular solar eclipse and one partial lunar eclipse.

Friday, May 25, 2012

Chasing the Eclipse

Annular Solar Eclipse 2012 Report


Bryce Canyon to Panguitch, Utah

I started the weekend traveling with my girlfriend Beth to Utah in chase of the annular solar eclipse occurring on May 20, 2012. The morning of the eclipse we found ourselves Cedar City, Utah with a plan to drive up to Bryce Canyon National Park.  Beth and I wanted to enjoy the sites of the park in the beginning of the day and scout out an ideal location for the eclipse at the end of the day.  I also had a back-up plan of staying near I-15 somewhere near the eclipse center-line in Kanaraville, Utah in case of any type of mountain obscuration.

I had some concerns about clouds over the mountains and canyons where the park reside.  Forecasts later in the day called for the chance of widely scattered clouds in the upper elevations, while lower elevation forecasts remained clear.  Forecasts for winds out of the southwest and some higher humidity numbers in the mountains made for a real possibility of clouds.  However, I awoke that morning to extremely clear skies.  Humidity and wind levels from weather stations in the mountains were lower than forecast.  Jet contrails were also very short (indicating a dry upper atmosphere), so I felt very confident of clear skies in or near the park. Optimistically, Beth and I made the drive into the park.

As expected, the park was crowded.  The northern section of the park has two prime viewing locations with unobstructed views of the west, but they were closed to normal vehicles and only allowed visitors to travel there by shuttle bus or foot.  This would make the small telescope I brought cumbersome to bring along.  I quickly gave up on these locations.  Further searching in the park brought up two possible locations at the southernmost end of the park.  These locations were certainly much less crowded, allowed drive up, and had been scouted out by amateur astronomers and some university students also chasing the eclipse.  I felt these locations would be ideal:  Much smaller crowds and great views of the low Sun to the west. However, the afternoon wore on and some small clouds were building to the west.

Humidity levels rose and winds from the southwest started to materialize as forecast.  The orthography of the canyon gave those southwest winds a vertical component creating Lee clouds.  The daytime heating of the ground also seemed to increase the surface winds and gave the clouds a mild vertical component.  The clouds seemed to build quickly toward the southern part of the park, while the northern part of the park seemed to be more clear.  I made the decision to leave the confines of the park, head north and stake out a position in Red Canyon, just northwest of the park (Location 1).  I felt that the north was more clear at the time and going west would get us under the clouds with a clear window low to the northwest. This would also give me the advantage of being free of the traffic and crowds in case I needed to move again for the clouds.

By the time I approached Red Canyon, the winds from the southwest had shifted to now come from the south and actually moved the cloud formation to the north edge of the park.  A fairly thick layer of alto-cumulus clouds was now blocking the Sun and time was running out.  I decided to maneuver back to the east by 5 miles and found a mildly elevated turn-off from US-12 with an unobstructed view of the west (Location 2).  The Sun was still high enough in the sky to not be blocked by the clouds.  I decided to set up my equipment:  A video camera and tripod, a super-zoom Nikon P510 camera with tripod, a telescope, and binoculars (all properly solar-filtered, of course).

Location 2 Setup

As the Sun continued to lower in the northwest sky it became obstructed by our ever-troublesome cloud-mass. I hoped that the Sun would continue to lower enough in the sky to peak below the clouds by the time annularity began.

We had joined an eclipse chasing couple in the US-12 turnout with a nice telescope setup also awaiting the eclipse in a scenic, but less crowded location.  They had also made the trip from Southern California.  They pointed their equatorially mounted telescoped down to 11 degrees above the horizon (where the Sun would be during mid-eclipse) and found that the clouds were still obstructing that view.  They were hopeful the lowering Sun along with the Moon's shadow would help dissipate the clouds enough for annularity.  

At 10 minutes to first contact, it was doubtful that the clouds would dissipate in time, and I decided to move back west past Red Canyon to a dirt road with a fairly clear view of the west (Location 3).  Arriving at this location, the clouds still blocked the Sun, but a larger clear area lower in the sky seemed to improve our chances of viewing annularity.  First contact began obscured.  The Sun and Moon made short appearances allowing us to view the fast moving Moon across the surface of the Sun.  While the Sun lowered in the sky and came closer to the “bottom” western edge of the cloud-mass, I was still not confident the Sun and Moon would appear in time for annularity.

Location 3: Clouds in the Way

At 25 minutes to second contact I decided to move again.  This time a distance of nearly 6.5 miles to the west and north.  Beth and I ran the risk of finding ourselves in low terrain with the Sun being obscured by the mountains to the west.  Parts of our drive were certainly in the shadow of the mountains, but luckily we rounded an elevated bend in the road just to the west of Panguitch, Utah, along US-89, with a great view of the west: This time cloud free! (Location 4.) With just 12 minutes to second contact to go, we stopped on the side of the road.

Time to set up my equipment was extremely limited.  I quickly erected the Nikon camera and tripod along with the telescope and decided to forgo using the video camera, instead just using the video capabilities of the Nikon camera.  I found the telescope setup troublesome on the inclined and uneven shoulder of the road and decided to give up on that, as well.  We're here to enjoy the eclipse and I do not want miss it setting up equipment.

Besides being somewhat of a dangerous location on the shoulder of US-89, the location was actually fairly ideal.  Clouds were no longer an issue.  We had a nice view of the city of Panguitch and farmland to the west.  We could easily notice the darkening of the land, the sky turned an ever darkening blue, and temperatures dropped.  The chirps of crickets increased in volume and lowered in frequency as the temperatures and light continued to diminish.  Another eclipse chasing couple had also pulled to the side of the road just a few minutes after our arrival, happy to see clear skies ahead.

Location 4: Free of Clouds!

I handed Beth the solar-filtered binoculars and took charge of videoing the start of annularity with the camera along with using eclipse glasses to just watch the show.  As the Moon obscured the middle of the Sun, a great spectacle of Baily's beads came into view (even through the unaided view of eclipse glasses).  Just before second contact, rays of sunlight shine through the rough, cratered, and valleyed surface of the Moon.  It looked like a very small toothy grin of a Halloween pumpkin.  View the video here.

Annularity begins:  Only 4 minutes to enjoy it! We noticed the darker and strangely lit landscape.  The shadows cast by the ring of sunlight created odd silhouettes on the pavement.  We also attempted to make “ring-shadows” with our hands.  

As quick as it began, it was nearly over.  I took over the binoculars for third contact and asked Beth to take some still imagery.  As annularity ended, Baily's beads came into view again, the Sun turned back into a crescent shape and the day quickly began to brighten.

I breathed a great sigh of relief as our chase was a success.  I was finally able to get the telescope up and running and view a deeply eclipsed Sun.  I reflected upon our success and a seemingly self-fulfilling prophecy I created:

In preparation for this eclipse I developed a mobile web app that used my phone's GPS, along with a solar eclipse formula to calculate the circumstances (exact timings) of the eclipse from any location I may decide to go.  In the event of clouds, I felt it would be useful to know where I was in relationship to the eclipse path and the exact timing of the eclipse.  This app proved to be most useful and the timings it calculated seemed to be nearly dead on.  So if I had not created the app, might there not have been clouds?

With an hour left until the end of the eclipse, Beth and I headed back to location 2.  It was now cloud free and our fellow eclipse-chasing couple was starting to pack up their equipment.  I found out this location was indeed clouded-out and they had missed annularity.  I had made the correct decision to move.  However, I later found out that all locations in the park were indeed favorable and cloud free during the entire eclipse.  I was a little disappointed about this, I would have preferred staying in one location, where I could just sit back and enjoy the show.  However, in retrospect we had a great adventure and witnessed the majority of the eclipse. The park crowd had an abundance of children (with parents, understandably, not willing to chase the eclipse), who were able to enjoy an astronomical spectacle, hopefully creating an interest in astronomy and science in general.

More pictures:

-Josh and Beth