At the Lockheed Martin facility in Littleton, Colorado, scientists and engineers are working on the software and computer hardware that will operate on NASA's Orion spacecraft. Here, the front end of a mock Orion capsule at the Lockheed Martin facility. The company is currently conducting tests for Orion's Exploration Mission 1 (EM-1), when the spacecraft will fly (with no humans aboard) on a test flight around the moon.

LITTLETON, CO. — The Lockheed Martin facility in Littleton, Colorado, is overflowing with NASA projects, including the Orion space capsule, a possible lunar habitat and the Osirus Rex probe that will return a sample from an asteroid to Earth.

I had the chance to visit the facility while I'm in Colorado for the National Space Symposium. Lockheed's Littleton, Colorado, campus is nestled between a small mountain range and a ridge of steep rock formations. Wildlife prowls the area, regularly sharing the space with employees.

Inside the many buildings that dot the massive campus (one employee told me the company owns 4,600 acres in total), Lockheed Martin is working on lots of space missions. The company is building the software and computer hardware for Orion, which could one day help send astronauts to the moon and Mars. [More Photos: Inside Lockheed Martin's Space Projects Facility]

In addition, Lockheed is doing some early work on a habitat that would orbit the moon, and provide a sort of way station for people going to the lunar surface or beyond. And the company is getting ready to launch a space probe that will capture a sample of material from the surface of a comet, then bring it back to Earth.

Orion, NASA's next ship

The front end of a mock Orion capsule at the Lockheed Martin facility in Littleton, Colorado. (Image credit: Lockheed Martin )

The Orion space capsule is NASA's next planned human spaceflight vehicle. The software that runs all the systems on Orion — all the diagnostics for the ship and the life support — is being designed and built at Lockheed Martin, along with the computer hardware for the spacecraft.

Larry Price, Orion deputy program manager at Lockheed Martin, said there are over a million lines of code in the Orion software, and 250,000 pieces of the spacecraft that are monitored.

The team at Lockheed has a mock-up of the spacecraft that they use to test the software and hardware, to work out bugs and to make sure the various pieces come together and function as a whole. Visitors to the site have to wear jackets that diffuse static electricity, which in the dry Colorado air can create quite a strong charge that could affect the electronics on the mock spacecraft.

The setup at Lockheed Martin allows the people there to run the system as if it were actually operating during a mission to space. They're currently running real-time tests of Orion's unmanned Exploration Mission 1 (EM-1) mission, scheduled for November 2018. For the first crewed missions, Lockheed will have astronauts come and potentially spend hours doing a run-through of the mission, once again to make sure bugs in the system get worked out.

For Orion's Exploration Flight Test 1 (EFT-1), in December 2014, Price said there were 600 contingency plans in place. If any part of the system had failed, the team had a plan in place to deal with the problem. Price said the only thing that went wrong was that an external camera shut down due to high radiation, so the Lockheed Martin team got to execute at least one of those contingency plans they had worked so hard to prepare.

Living around the moon

Inside the orbiting lunar habitat mock-up built by Lockheed Martin. The hatch on the left would lead into the Orion spacecraft cockpit. The blue thing on the right is a sleeping bag. Food and other supplies would line the walls of the habitat. (Image credit: Calla Cofield/Space.com)

Another project Lockheed Martin is working on: an orbiting lunar habitat that would support four astronauts for 30 to 60 days. The company is in the early stages of researching such a habitat. Shown here, a mock up of the habitat. (Image credit: Calla Cofield/Space.com)

As part of NASA's Next Space Technologies for Exploration Partnerships (NextSTEP) program, Lockheed is starting to investigate technologies to be used in a space habitat that would be positioned in orbit around the moon. The habitat could launch with an Orion spacecraft and fly with it to the moon, and could support four astronauts for 30 to 60 days.

A mock-up of the habitat at the Lockheed facilities seems like a fairly cramped space to spend a month or two with three friends, but of course this has always been one of the trials of traveling to space. Food and supplies are strategically packed around the outside of the habitat, and the packaging would actually serve as an additional layer of radiation protection, Lockheed Martin representatives said. Sleeping bags attached to tethers around the walls would create floating sleep spaces.

Catching an asteroid

The OSIRIS-REx spacecraft, built at Lockheed Martin's Littleton, Colorado campus, will collect a sample from asteroid Bennu and return it to Earth. The spacecraft is kept in a clean room to reduce the risk of contaminating the asteroid sample with material from Earth. (Image credit: Calla Cofield/Space.com)

The awesomely named OSIRIS-REx will fly to the asteroid Bennu, pick up a sample from the space rock's surface and then return the material to Earth. The spacecraft is scheduled to launch in September and arrive at the asteroid in October 2019. OSIRIS-REx will study the asteroid for over 500 days before grabbing a sample. This is NASA's third robotic sample-return mission, and the other two (Stardust and Genesis) were both built at Lockheed Martin as well.

The spacecraft is in a clean room, because keeping the probe free of contaminants is a very high priority. If the OSIRIS-REx were covered in Earth dust and microbes, there would be a risk of contaminating the sample the craft brings back from the asteroid.

Tim Lynn, chief systems engineer for OSIRIS REx, said the asteroid mission will use a "pogo mechanism," Lynn said. The mechanism is a tube that will expel the air it contains after contacting the asteroid, causing the tube to suck up dust and dirt from the space rock. The mission will not return the entire spacecraft to Earth, just a small section of the probe containing the sample.

Lynn said that, among other things, Osiris will study asteroid Bennu's trajectory and orbit with very high precision, which will add to an overall better understanding of the movement of near-Earth asteroids. That knowledge can then help scientists better predict which asteroids might come a little too close to the planet. Bennu has a "one in 2,000 chance" of hitting Earth in the 2060s, Lynn said.

Between a rock and a hard spot

The Lockheed Martin facility in Littleton, Colorado, is nestled up against a small mountain range. (Image credit: Calla Cofield/Space.com)

The Lockheed facility is a sight to see all by itself. It's located in a gorgeous part of Colorado — not quite into the Rocky Mountains, but the land is extremely hilly and rocky. It is nestled between a rocky ridge and a small mountain range. Employees say wildlife is common: rattlesnakes, mountain goats, deer, hawks and even the occasional black bear.

The company's long history with NASA is evident throughout the facility; murals covering multiple walls celebrate past and current missions that the company built and managed. It's a place where spaceflight is celebrated.