# Epley Coach — Phone-guided treatment for BPPV vertigo

It won’t start the timer until your head is actually in position.

By Anuj Ojha. Status: Open source · Android. Page: https://anujojha.com/work/epley/

## What it is

Epley Coach turns your phone into the angle gauge for the five-minute vertigo treatment. It talks you through the five head positions of the Epley manoeuvre, and it will not start the timer until your head is actually in position.

## The problem

BPPV is the most common cause of vertigo, and the Epley manoeuvre treats it for free in about five minutes, but only at the right angles and on the right ear. Done at home, head angles were off by 40 to 51.5° in a 2023 pilot study, against 13.7 to 24.4° when a specialist guided it.

## How it works

A safety check runs first, every time, and any stroke warning sign stops the app. Six questions from a 585-patient trial work out which ear to treat. Each position is shown on a 3D head while the phone measures head rotation and neck extension live, and the hold timer only counts while the head is inside the band and still. By the fourth position you are lying down, so voice and vibration carry every instruction.

## The engineering

The angle maths is pure Kotlin with no Android dependency: quaternions and swing-twist decomposition instead of Euler angles, so the manoeuvre passes straight through the point where Euler pitch flips. Angles are measured against a calibration taken on your own head, so a fixed sensor error cancels out. 212 automated tests, including screenshot tests of 72 screen states, day and night.

## Honest limits

Not a medical device, and no trial of this app exists. The six questions agree with a specialist about 71% of the time, and the app says so on screen. Nothing that treats you is behind the paywall: the one paid thing is a doctor’s PDF of your runs, a one-time purchase.

## Where it is now

Built for RevenueCat Shipaton 2026, Next Gen track. Open source on GitHub, with a demo video; the Android app builds from source.

## Numbers

- 212: automated tests, no emulator and no device farm
- < 1e-6°: how far the guided angles move when 3°, 9.2° and 15° sensor offsets are pushed through the real code
- 0.006°: drift at rest over 107 s, measured on a Motorola Edge 40 Neo
- 72: screen states screenshot-tested, day and night

## Said plainly

- Not a medical device: it claims angle accuracy, measured on one phone, and nothing about cure rates; no trial of this app exists
- About 71%: how often its six questions agree with a specialist, and the app says so on screen

Stack: Kotlin · Jetpack Compose · RevenueCat · three.js · Robolectric + Roborazzi

## Questions

**What is Epley Coach?**
An Android app that turns your phone into the angle gauge for the Epley manoeuvre, the five-minute treatment for BPPV vertigo. The hold timer only counts while your head is in position and still.

**Is Epley Coach a medical device?**
No. It claims angle accuracy, measured on one phone, and nothing about cure rates; no trial of this app exists. A safety check runs first, every time, and any stroke warning sign stops the app.

**Is it free?**
Everything that treats you is free. The one paid feature is a doctor's PDF of your runs, a one-time purchase.

**How accurate is it?**
Its six questions agree with a specialist about 71% of the time, and the app says so on screen. Angles are measured against a calibration taken on your own head, so a fixed sensor error cancels out.

Links: [Repo](https://github.com/Anuj7411/epley-coach), [Demo](https://youtu.be/F9ePwouzgn4)
