We wrote some math to track the position of balls on the field. Our calculation takes various inputs from the cameras and sensors, and outputs two coordinates

$B_X = R_X + \cos( H_{RF} + H_{BR} ) \times D$ $B_Y = R_Y + \sin( H_{RF} + H_{BR} ) \times D$

It's basically a distance equation, A = B + Δ, with some additional trigonometry to squeeze ΔX and ΔY out of angle and direct distance, in millimeters.