Unraveling AirTags and UWB – Part 3: Solving for the Intersection

In the previous parts, we established that a TDOA measurement between two anchors (let's call them A and B) places our tag on a specific hyperbola. We even derived its mathematical equation. While powerful, it still leaves us with an infinite number of possible locations along that curve.

Introducing the Third Anchor

To get a precise location, we need to create a second, independent curve that also contains our tag. The simplest way to do this is to add a third anchor, C.

Now, the system can perform a TDOA measurement using a different pair of anchors—for example, anchors A and C. This new time difference will generate a second, different hyperbola.

Since the tag must lie on the first hyperbola (from A and B) AND on the second hyperbola (from A and C), its true location must be where the two curves intersect.

The Math: Solving a System of Equations

Finding this intersection point isn't magic; it's algebra. We now have two separate hyperbola equations, and we need to find the `(x, y)` coordinate that satisfies both of them simultaneously. This is called solving a system of non-linear equations.

Let's say our two equations are:

Hyperbola 1 (from A & B): (x²/a₁²) - (y²/b₁²) = 1

Hyperbola 2 (from A & C): (x²/a₂²) - (y²/b₂²) = 1

While these look complex, we can solve them using a method called substitution. The goal is to combine the two equations into one equation with only one variable.

The Algorithm

  1. Isolate a Variable: Take the first equation and algebraically rearrange it to solve for one of the squared variables. Let's solve for y²:

    y² = b₁² * ( (x²/a₁²) - 1 )

  2. Substitute: Now, take this entire expression for y² and substitute it into the second equation in place of its y² term. This eliminates `y` from the second equation, leaving only `x`.

    (x²/a₂²) - ( [the expression for y²] / b₂² ) = 1

  3. Solve for x: The resulting equation looks messy, but it only contains `x` and known constants (`a₁`, `b₁`, `a₂`, `b₂`). After simplifying, this typically becomes a quadratic equation in terms of x², which we can solve to find the value of `x`.
  4. Back-substitute for y: Once you have the correct `x` coordinate, plug it back into the rearranged equation from Step 1 to find the value of `y`.

With the `(x, y)` pair, you've found the intersection—the precise 2D location of the tag!

What's Next: Into the Third Dimension

Congratulations! We've pinpointed our tag on a 2D plane using nothing but tiny time differences and some clever math.

But the real world isn't flat. How do we account for an object's height? In the next and final part of our TDOA exploration, we'll see what it takes to move from hyperbolas to hyperboloids to achieve true 3D tracking.

BACK TO BLOG