Work in progress This site is under construction — content, figures and specifications are provisional.
Features

Six instruments, one trustworthy picture.

Every element is drawn in OpenGL ES 3 from a single per-frame state snapshot — a crisp, low-latency display that stays readable in direct sunlight.

Fig.01 — The displayschematic
FlySys PFD showing attitude, tapes and heading band
The instruments

Attitude first.

Artificial horizon
bank + pitch, pitch ladder
Ground-speed tape
GPS, km/h
Altitude tape
barometric, knob-set
Vertical speed
dedicated VSI
Heading band
magnetic, IMU-fused
Slip & turn
coordinate the turn
§3 · Principles

How the attitude is computed.

No single sensor gives a trustworthy attitude. The gyroscope is fast but drifts; the accelerometer and magnetometer are stable on average but noisy and disturbed by manoeuvre. Every estimator below resolves the same conflict — trust the gyro over short intervals, correct it toward gravity and magnetic north over long ones — and they differ only in how they strike that balance.

Fig.02 — Error-state Kalman filterESKF · default
GYRO ω ACCEL g · GPS v 1 · PREDICT propagate state x̂ propagate covariance P 2 · UPDATE Kalman gain K error δx from innovation 3 · INJECT + RESET apply error δx reset δx ATTITUDE q · gyro bias corrected nominal state x̂ fed back each step — error-state stays small, linearisation holds
The gyro propagates a nominal state openly; the Kalman filter tracks only the small error it accumulates, then injects the correction and resets — keeping the error small is what keeps the linearisation valid.

Gravity from the accelerometer drives the update — with GPS-derived acceleration removed first, so a sustained turn isn't mistaken for a tilt. The payoff: clean, true bank angles under load. This is the default estimator.

Predict — nominal state & covariance
\hat{x} \leftarrow f(\hat{x},\, \omega\,\Delta t) \qquad P \leftarrow F\,P\,F^{\mathsf{T}} + Q
Update — gravity, with GPS acceleration removed
a_{\text{grav}} = a_{\text{meas}} - \dot{v}_{\text{GPS}} \qquad K = P\,H^{\mathsf{T}} \bigl(H P H^{\mathsf{T}} + R\bigr)^{-1}
\delta x = K \bigl(z - h(\hat{x})\bigr)
Inject & reset
x \leftarrow \hat{x} \oplus \delta x \qquad \delta x \leftarrow 0
Fig.03 — Complementary · Mahony-MARGCF
GYRO ω fast, drifts INTEGRATE gyro propagation ATTITUDE roll · pitch · yaw ACCEL+MAG gravity & north ERROR e measured vs estimated CORRECTION P + I feedback Ki also cancels gyro bias

Splits the signal by frequency: the gyro supplies the fast motion, accel and mag the slow reference. The correction is the rotation error between measured and estimated gravity/north, fed back through a proportional and an integral gain — and the integral term also learns and cancels gyro bias. Cheap, robust and predictable — the simple, dependable fallback.

Rotation error, then corrected propagation
e \;=\; \hat{v}_g \times v_g \;+\; \hat{v}_m \times v_m
\dot{q} \;=\; \tfrac{1}{2}\, q \otimes \Bigl(\omega + K_p\, e + K_i \!\!\int e\, dt \Bigr)
Fig.04 — MadgwickMG · gradient
GYRO ω orientation rate FUSE gyro + gradient ATTITUDE roll · pitch · yaw ACCEL+MAG gravity & north OBJECTIVE f alignment error GRADIENT STEP descent rate β pulls toward gravity & north

Frames orientation as an optimisation: the gyro gives the rate, while a single gradient-descent step nudges the estimate toward the orientation that best matches measured gravity and north — at one tunable rate, β. Smooth and responsive for very little compute.

Objective, gradient, and the fused rate
f(q) \;=\; R(q)^{\mathsf{T}}\, \hat{g} \;-\; a \qquad \nabla f = J^{\mathsf{T}} f
\dot{q} \;=\; \tfrac{1}{2}\, q \otimes \omega \;-\; \beta\, \frac{\nabla f}{\lVert \nabla f \rVert}
Fig.05 — Internal · firmware quaternionFW · pass-through
IMU SENSOR on-board fusion QUATERNION q already fused PASS-THROUGH no phone-side filter ATTITUDE

When the IMU already publishes its own fused quaternion, this mode passes it straight to the display — a useful reference, and the right choice when you trust the sensor's on-board fusion over the phone's.

Pass-through — no phone-side estimation
q \;=\; q_{\text{IMU}}
§4 · Data sources

Fly it, sim it, or replay it.

Run-time sources — selectable in Settings
BLE Waveshare 10-DOFexternal IMU — primary
Internal sensorsphone accel / gyro / mag / baro
X-Plane UDPsimulator feed
FlySys TCPTCP gateway
Replayrecorded CSV from Documents/PFD/
Demosynthetic motion — no hardware
§5 · Calibration

Three independent calibrations.

01

Magnetometer

Hard- and soft-iron fit so heading stays honest near metal and avionics.

02

Accelerometer

A guided 6-face procedure recovers per-axis offset and scale, applied before the filters.

03

Gyro offset

A short static "Align" window zeroes gyro bias the moment you power up on the ground.