Two iPhone 4s will be hitching a ride to the International Space Station in July when Space Shuttle Orbiter Atlantis blasts off for the last time from Kennedy Space Center.

No, the Apple devices won't be beta testing iOS 5's new Twitter integration to tweet cool space photos back to us Earthlings.

Instead, the spacefarers are going to use the handsets as research tools utilizing the iPhone 4's three-axis gyroscope, accelerometer, and cameras. Just like a Star Trek-style Tricorder, the devices will collect data to estimate altitude, position in space, and attempt to detect radiation.

Before boldly going where no smartphone has gone before, the handsets will be preloaded with the SpaceLab for iOS iPhone app developed by Odyssey Space Research. Space geeks can download the app from the App Store for 99 cents to check out the experiments the astronauts will be doing. You can even go through a simulated version of the experiments here on Terra firma. The experiments use iPhone 4-specific hardware features such as the three-axis gyroscope, but any iPhone running iOS 4 or newer can download the app.

The data collected by the iPhones won't make its way back to Earth until next fall, but here's a look at the four experiments the app can run and how you can participate:

Limb Tracker

Astronauts will use the iPhone 4's camera to take a picture of the Earth's curvature (the limb) and use the image to measure altitude above the Earth's surface.

For this experiment, you need the current altitude of the ISS and an image of the Earth's limb (Google search).

Estimated Experiment Duration: Less than 5 minutes.

Sensor Calibration

This experiment helps astronauts calibrate the iPhone 4's camera, accelerometer, and three-axis gyroscope by taking a series of photographs of a large QR code. The information from this experiment will help create an autocalibration function for future flights. You can get the QR code here.

Estimated Experiment Duration: 5 minutes.

State Acquisition

Astronauts use this to figure out where they are positioned in space and estimate longitude and latitude. To achieve this they take photos of the Earth and line them up with coastline models from the National Oceanic and Atmospheric Administration (NOAA).

You can do the same thing with a photo of the Earth's coastline from space (Google search) and the QR code from the experiment above. Make sure you know where your image of the coast is located on a map before starting this experiment.

Estimated Experiment Duration: 20 minutes.

Lifecycle Flight Instrumentation

This experiment will help determine how well an iPhone functions after space flight by attempting to detect and measure radiation exposure. You can go through the motions of this experiment on Earth, but it will not generate any output -- probably because you have to leave the experiment running for two weeks for it to work.

Approximate Experiment Duration: 1 minute to set up, but leave the device running for two weeks or until the battery runs out.

Using the iPhone in space to run experiments is an interesting idea, but it's not the first time an Apple handset has reached for the stars. In October, a father and son team used a weather balloon to blast an iPhone 4 into the Earth's upper stratosphere about 19 miles above the Earth's surface.

Atlantis' mission, designated STS-135, is the final planned flight for the Space Shuttle fleet.

Connect with Ian Paul (@ianpaul) and Today@PCWorld on Twitter for the latest tech news and analysis.