Tracking NEOWISE

How does an astronomy app work? Using the magic of sensors.

2020-07-26 Previous Home Next

During the entire month of July 2020, the comet NEOWISE has been visible in the northern hemisphere. We drove down to a local pond to try to catch a glimpse.

The weather was too hazy to see the comet close to the horizon, but we discovered that the smartphone app we used, "Skywise," was a cool and convenient way to track down planets, stars, and other objects in the sky.

Normally, you would have to consult a map of some kind showing the locations of celestial objects, so that you could locate distinctive features like the Big Dipper (Ursa Major) and use those as landmarks.

The app makes it simple. You don't need a map. You can find things just by moving the phone around, as if you were pointing a camera at the sky. In any position, the app shows an illustration of the key objects behind the phone along with their names.

For example, when I spotted a bright star over a farm house, I pointed the phone at it. The image showed that it was not a star but the planet Jupiter.

How does such an app work? It uses the sensors built into your smartphone—sensors that are increasingly used in robots.

The Hidden Superpowers of Smartphones

Through the miracle of miniaturization and mass production, today's smartphones are bristling with many built-in sensors. These devices are now accurate and compact enough to fit easily in a tiny case.

Two of these devices are essential for an astronomy app: the magnetometer and the gyroscope.

The magnetometer tells the direction, like a compass. It works on the same principle—it detects the earth's magnetic field to tell which way is north.

A gyroscope can tell the orientation of the phone: whether the phone is being held horizontally or vertically, and also at what angle it is pointing.

The gyroscope contains a tiny system of weights supported by springs. Depending on how you hold the phone, a combination of the springs stretch and compress by a certain amount. By measuring the springs, the gyroscope can calculate the roll, pitch, and yaw of the phone.

These three quantities together describe completely the orientation of the phone.

Your own inner ear has structures in it like a gyroscope, which enable your brain to keep your balance in a similar way.

The sensors in a phone are electronic devices. A typical model combines multiple sensors in a single plastic package that looks like a flat, square tile, 4 millimeters on the side—tinier than a shirt button.

The package contains micro-electromechanical systems (MEMS), tiny physical structures such as springs and weights for the gyroscope. These structures are connected to transistor-based circuits.

The circuits convert physical measurements like the lengths of the springs into pitch, yaw, and roll numbers. They send these numbers as signals on their output wires. But to interpret these numbers requires software.

Big Dipper

And a Lot of Software

Like most interesting software, the app contains some knowledge about its domain: in this case, celestial mechanics.

Mankind has been predicting the motion of the visible planets and stars for millenia. Among other things, they were useful for navigation at sea.

Celestial mechanics can predict where a star or planet is going to be. But which direction and how high up in the sky you can see it, depends on the time and date, and where on earth you are located.

If you're a sailor trying to navigate a ship, or an enthusiast looking for a comet, you traditionally needed a prepared almanac in which you could look these up, and you also needed a compass and a sextant, with which you could observe the direction and altitude of bodies in the sky.

But the app makes all this unnecessary. If you just hold the phone up, it can tell which region of the sky you are looking at.

To do this, it needs to interpret the sensor outputs.

Android-based phones contain built-in software libraries, routines that perform the following tasks:

Other phone operating systems like Apple's iOS contain similar libraries.

Using these libraries, the app figures out where you are pointing with the phone. It replaces the compass and sextant with an easy-to-use interface.

The app comes with built-in knowledge about interesting constellations and planets, to which it adds occasional objects like the NEOWISE comet through updates over the network.

Knowing what time it is and where you are located, also using Android software, the app can draw the heavenly bodies, as you would be able to see them, on the display.

The funny part? You can even point the phone down toward the ground to view the other half of the celestial sphere. The app shows you where the Sun is at night.

The Future Is Bright For Robots

Robots often need to sense their environment, in order to navigate from place to place, or to manipulate objects safely.

This sensing has traditionally been quite expensive, both in terms of hardware and electrical power, as well as in terms of the software.

Thanks to billions of smartphones and their apps, cheap, powerful sensors that use very little power are now widely available. These are a boon for robot makers everywhere.

As costs come down, novel robotic applications will doubtless become more and more feasible.