When the final space shuttle mission launches later this year, two iPhone 4s will be on board.

The iPhones will be running an experimental app called SpaceLab for iOS, designed by Odyssey Space Research. Once the space shuttle Atlantis docks with the International Space Station, crew members will use the iPhones to conduct four experiments, using the iPhones’ cameras, gyroscopes, and other sensors. In addition, the step-by-step instructions for each experiment are contained within the app, so astronauts won’t need printed instructions to direct them.

“I’m pretty sure this is the very first iPhone to go into space,” said Odyssey CEO Brian Rishikof.

The iPhone 4 has been certified for spaceflight and will be shipped to space by NanoRacks, a Houston-based company that provides hardware services for the U.S. National Laboratory, which is part of the ISS.

The inspiration to create an iPhone-based space experiment came when the iPhone 4 debuted in 2010, Rishikof said. The new model includes a gyroscope.

“For the kind of work we do, that suddenly made it a far more interesting platform,” Rishikof said. That’s because Houston-based Odyssey’s business is developing software and simulations for guidance and navigation used in several spacecraft; a gyroscope meant that the iPhone could potentially be used to determine a vehicle’s orientation in space as well as its position.

Rishikof emphasized that the iPhones were being used as an experiment, not for any mission-critical guidance systems.

SpaceLab’s four experiments:

A “limb tracker,” which lets astronauts take a picture of the Earth’s limb (its curved edge). The app then estimates the iPhone’s altitude.

Latitude and longitude estimation using photos of the Earth and matching them to wireframes of coastlines.

A test to see if space radiation affects computer memory by watching for unintended changes to single bits in the iPhones’ RAM.

SpaceLab for iOS is also available for Earthbound civilians. In the public version, some features of the app will be simulated, since we unfortunately suffer from the effects of gravity. The app is $1.