Sensing the Sky: How Spacecraft Know Their Orientation


This post is part of my journey back into the space sector. As I explore the Attitude Determination and Control Subsystem (ADCS), I’m learning how spacecraft know where they’re pointing—and how they stay that way.
This article focuses on the sensors that help determine a spacecraft’s attitude: sun sensors (coarse and fine), magnetometers, GPS receivers, star trackers, Earth horizon sensors, and gyros. I’m still wrapping my head around many of these, and writing helps clarify things. If you're also learning—or just curious—read on. Corrections and insights are always welcome.
A spacecraft in orbit needs to know which way it's facing to carry out its mission. Whether it's pointing a camera at Earth, orienting solar panels toward the Sun, or keeping an antenna aligned with a ground station, attitude determination is essential. This is achieved using a combination of sensors that provide data about the spacecraft's orientation with respect to celestial bodies, the Earth, or its own motion.
Let’s explore how the key sensors—magnetometers, sun sensors, GPS receivers, star trackers, gyros, and Earth horizon sensors—work together to determine attitude.
🧭 1. Magnetometer
A magnetometer measures the strength and direction of the Earth’s magnetic field at the spacecraft’s location. The Earth’s magnetic field is well-mapped and varies predictably with position. By comparing the local magnetic field measurement to a model like the International Geomagnetic Reference Field (IGRF), the spacecraft can determine its orientation relative to the field lines.
Strength: Simple and low power
Limitation: Accuracy depends on orbit altitude and magnetic cleanliness of the spacecraft
Use: Often combined with other sensors like sun sensors to improve estimation
☀️ 2. Sun Sensors
Sun sensors detect the direction of the Sun relative to the spacecraft body.
a. Coarse Sun Sensors
These are simple photodiodes or segmented solar cells arranged around the spacecraft. They can roughly estimate the Sun’s direction by comparing light intensity received from different directions.
Pros: Low-cost, robust
Cons: Low accuracy (typically ~5°)
b. Fine Sun Sensors
These provide much higher precision (in arcminutes or better). They typically use optical elements (like slits and lenses) to cast sunlight onto position-sensitive detectors. The position of the light spot helps determine the Sun vector with fine resolution.
- Use case: When more accurate orientation toward the Sun is required, e.g., for solar panel alignment or as part of high-precision attitude systems
📡 3. GPS Receivers
GPS receivers, commonly used for navigation, can also be used for attitude determination.
In spacecraft with multiple GPS antennas, differences in the signal phase between antennas can be used to infer orientation. This is known as carrier-phase differential GPS.
Use: Medium- to high-accuracy attitude sensing, especially for larger spacecraft or constellations
Limitation: Requires clear view of multiple GPS satellites and complex processing
🌌 4. Star Tracker
A star tracker is a highly accurate sensor that takes images of the star field and compares them with an onboard star catalog to determine the spacecraft’s orientation.
Working: It identifies patterns formed by stars in its field of view and matches them with known constellations using pattern recognition algorithms
Accuracy: Can be as fine as arcseconds
Use: Missions requiring high-precision pointing—e.g., astronomy, Earth observation, or interplanetary probes
🔄 5. Gyroscope (Gyro)
A gyroscope or gyro sensor measures the angular velocity of the spacecraft—how fast it is rotating around its axes.
Types: MEMS gyros (low cost), fiber-optic gyros (mid-range), ring laser gyros (high-end)
Use: Short-term attitude propagation by integrating angular velocity over time
Limitation: Gyros drift over time, so they are usually corrected with absolute sensors like star trackers or sun sensors
🌍 6. Earth Horizon Sensor
An Earth Horizon Sensor (EHS) detects the infrared signature of the Earth’s edge to infer the spacecraft’s orientation with respect to the Earth.
Best for: Low Earth Orbit (LEO)
Limitations: Not useful when the Earth isn’t in view or during eclipses
🧠 Working Together: Sensor Fusion
In practice, no single sensor is perfect. Spacecraft use sensor fusion algorithms, such as Extended Kalman Filters, to combine inputs from multiple sensors. For example:
Gyros provide continuous motion updates but drift
Star trackers and sun sensors correct that drift
Magnetometers help fill in when the Sun or stars aren’t visible
By combining strengths and mitigating weaknesses, spacecraft achieve reliable and accurate attitude determination, enabling them to fulfill their missions across Earth orbit and deep space.
TL;DR – How Spacecraft Know Which Way They’re Facing
To determine orientation in space (aka attitude), spacecraft use a suite of sensors:
Magnetometers measure Earth's magnetic field to infer orientation.
Sun Sensors (coarse and fine) detect the direction of sunlight.
GPS Receivers (with multiple antennas) can estimate attitude via signal phase differences.
Star Trackers identify star patterns for ultra-precise orientation.
Gyroscopes track angular velocity but drift over time.
Earth Horizon Sensors detect the edge of Earth using infrared to estimate pitch and roll.
Each has strengths and limitations. Combined using sensor fusion algorithms (like Kalman filters), they allow the spacecraft to stay correctly oriented—whether pointing cameras, antennas, or solar panels.
Subscribe to my newsletter
Read articles from Madhukara Putty directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
