How Stratux AHRS works: sensors, fusion and calibration

November 4, 2026 · 4 min read

Stratux AHRS reads a gyro, an accelerometer and a magnetometer on a small board, combines them with GPS track and vertical speed on the Raspberry Pi, and sends pitch, roll and heading to your EFB about 20 times a second. An AHRS (attitude and heading reference system) is the box that tells a display which way the aircraft is pointing. This guide covers what the Stratux software does with those readings, so you know why the setup steps matter.

Green Stratux AHRS board plugged onto a Raspberry Pi on a workbench
An illustrative scene made from photos of the real parts. It is not a photo of a finished build.

What the AHRS board measures

The board holds three kinds of sensor, and each one covers a weakness of the others. A gyro measures how fast the unit is turning. An accelerometer senses which way gravity pulls and helps correct gyro drift. A magnetometer senses the Earth's magnetic field and gives heading (FLYING magazine, 2016).

The AHRS board plugs onto the Pi's GPIO header, not USB. The Stratux code recognizes several chips. For motion it looks for a BMX160, an ICM-20948 or an MPU-9250-family part. For air pressure it looks for a BMP-388, BMP-280 or BMP-58x. It checks the I2C bus at two addresses and tries again every 4 seconds if nothing answers (Stratux source, main/sensors.go, read 2026-11-02). Which chip is on your board depends on the board revision. The web interface's GPS/AHRS page shows whether the sensor was found.

How the software turns readings into attitude

Stratux feeds the sensor readings into an AHRS library called goflying and sends the result out about 20 times a second. The attitude loop runs on a 50 ms timer. Besides gyro, accelerometer and magnetometer data, the code also passes in GPS ground track and vertical speed, taken from the barometer or from GPS (Stratux source, main/sensors.go, read 2026-11-02).

Sensor readings and GPS track feed the fusion step on the Raspberry Pi, which sends pitch, roll and heading about 20 times a second to your EFB over Wi-Fi
From sensor to EFB.

Which fusion algorithm goflying uses isn't stated in the code we read, so we won't name one. What the inputs tell you is enough: GPS gives the filter a second opinion about where the aircraft is going, which is why the AHRS needs a good GPS fix to work properly. That is what the "Ground test mode" message is about.

If the unit stops answering, the code closes the sensor after 50 failed reads and tries to reconnect. It also throws out barometer readings that disagree wildly with GPS altitude.

What calibration actually does

Calibration records two things: how the gyro reads when it is still, and which way is level. Both steps wait for good data before they store anything, and the gyro step retries about once a second (Stratux source, main/sensors.go, read 2026-11-02).

  1. Gyro calibration loops until the gyro readings settle, then stores them as offsets. If you move the unit, it keeps trying. Do it parked, not taxiing.
  2. Level calibration loops until the accelerometer reads close to 1 G in total (within 0.15 G), then stores that attitude as level and resets the filter.

Orientation is a separate step. The orientation prompts find which of the unit's axes gravity points along most strongly, and build the mounting rotation from that. If no axis clearly dominates, the step fails. That is why the prompts want the unit held still and flat, with the face that points forward in normal use facing up. The full procedure is in AHRS on Stratux.

What this means in the cockpit

AHRS accuracy depends on mounting, calibration and GPS, and it is a backup, not a primary instrument. It is not certified for IFR, and no portable AHRS from any maker is. A few practical consequences follow from how the software works:

  • Re-run orientation when you change the mount. The rotation is computed from how the unit sat during the prompts.
  • Calibrate on the ground, still and level. Both steps reject movement.
  • Expect nothing on the ramp. Without a good GPS fix and some motion, the display can look dead.
  • Not for you if you need a certified attitude source. Use your panel instruments.

Frequently asked questions

Which sensors does Stratux support for AHRS? BMX160, ICM-20948 and MPU-9250-family motion sensors, plus BMP-388, BMP-280 and BMP-58x pressure sensors, per the source.

How often does Stratux update attitude? About 20 times a second. The loop runs on a 50 ms timer.

Why does calibration ask me to keep the unit still? Both steps wait for stable readings before they store anything.

Can I use it as a primary attitude instrument? No. It is a backup for situational awareness.

Next step

Open the web interface at 192.168.10.1 on the ground, go to GPS/AHRS, and confirm the attitude indicator moves when you tilt the unit. If it doesn't, start with AHRS on Stratux.