v1.0.0 · Free & open source

Sua Geometry

Measure angles with your phone.

Orientation as a quaternion and Euler angles, angle in a plane with your own zero, bubble and plumb level, a real-time scope and CSV logging. A native C++ engine fuses the gyroscope, accelerometer and magnetometer at the sensor rate. No accounts, no ads, no internet and no permissions.

Android 8.0 or later · version 1.0.0 · 0.8 MB · How to install it

Sua Geometry icon: a turtle whose shell is a protractor

What it measures

🧭

Orientation

Attitude of the phone with respect to the local East–North–Up frame: unit quaternion, Euler angles Z-Y′-X″ (yaw, pitch, roll) and compass heading.

📐

Angle in a plane

Lay the phone on any surface — table, ramp or wall — set the zero and read the turn around the axis perpendicular to the screen, from 0 to 360°.

🫧

Level and plumb

Circular bubble level plus two linear single-angle levels. On an edge it becomes a plumb line. Reversal calibration and a differential reference.

📈

Real-time scope

The three absolute Euler angles over the last 60 seconds, each with its own automatic scale so you can see even the sensor noise.

🗂️

CSV logging

One row per sample with a UTC timestamp and every variable. Save it with the system file picker or share it; the app keeps no history.

⚙️

1 to 50 Hz output

The fusion always runs at 200 Hz. Each output value is the average of its whole window (anti-aliasing) followed by a dynamic SLERP filter.

How it works, in one picture

The sensors are read by a dedicated native thread. A quaternion complementary filter predicts the orientation with the gyroscope and corrects tilt with the accelerometer and heading with the magnetometer, separately. The output stage averages every sample of each window before decimating, so vibrations do not fold into the result, and a SLERP low-pass filter smooths the rotation without leaving the sphere of unit quaternions.

Sensors gyro · accel · mag Fusion quaternion filter Window mean anti-aliasing SLERP filter dynamic low-pass Measurements Euler · plane · level Screen · CSV 1–50 Hz 200 Hz output rate Everything runs in C++17 without external libraries; the Kotlin interface only displays the result.

Read the full mathematics →

≈ 0.02°level noise at rest at 3 Hz, in tests with typical phone sensor noise
≈ 67samples averaged for each value at 3 Hz
0permissions, accounts, ads or network access
< 1 MBsigned APK with the native engine for three architectures

Principles

  • Precision first. The orientation is estimated at the sensor rate and averaged before it is shown; the guide documents every formula and its source.
  • Small and self-contained. Native C++17 with the Android NDK sensor API and the C++ standard library only; the interface uses the Android platform SDK without AndroidX.
  • Private. No permissions and no internet access. Records exist only until you save or share them.
  • Transparent. Open source under the MIT license, with the engine tested on a PC with synthetic sensor data.

Why “Sua”?

Sua — also written Sué, Xué or Zuhe — is the Sun in the Muisca culture of Colombia, revered in the Temple of the Sun of Sogamoso as the father of life. In the Chibcha language, sua means “sun”. The name is a tribute to that cultural heritage; this project does not claim to represent the deity or to speak for the Muisca people.

More about the name and its sources on the About page.

Free to use, free to share

Sua Geometry is free software under the MIT license: you can use it, study it, modify it and redistribute it, including commercially, as long as the copyright notice is kept.