As if a night filled with 480-foot home runs wasn’t exciting enough, ESPN introduced its much-hyped Ball Tracker technology during Monday’s Home Run Derby, giving balls a digital comet trail that indicated whether or not it could clear the fences.

While superimposing graphics in post-processing has been around longer than steroids, the system unveiled last night has some truly cool tech powering it, relying on Doppler radar to instantly track and predict the ball’s path in real time, just 400 milliseconds after it leaves the bat.

The Ball Tracker utilizes low-power Doppler radar operating at 2000 Hz to monitor the speed, location and spin of the ball. That data is fed to an algorithm which calculates the projected path of the ball based on its current location. This allows ESPN to continuously display the distance traveled on the screen during flight and to calculate the total home run length as soon as the ball lands (previous methods took seconds or minutes to get the same information).

While knowing the home run’s distance immediately is great, it’s the ability of the Tracker to predict a result in mid-flight that has greater promise. The estimated range is communicated via a comet tail was placed behind the ball in real-time. On a big hit, that tail would turn from yellow to green–before the ball landed=–if the data suggested the hit was going to be a home run.

“We’re showing in real time if the ball is going to be a home run or not,” said Dave Casamona, principal emerging technology engineer at ESPN. “But the determination of if it’s going to be a home run is a hard number to calculate because there’s a lot of environmental factors that come into play.”

The radar hardware is contained in a small box box mounted in the upper deck behind home plate. The pitched ball trips a velocity threshold confirming the device is tracking what it wants just 400ms into the flight of the ball. Incredibly, the stitching on the ball is even detected allowing calculations of rotational velocity and axis of rotation of the ball which improves the algorithm’s predictions. All that data is then placed in a preexisting 3-D model of the stadium to determine if it will get above a wall or stay in fair territory.

Once calibrated, the system calculates the data automatically, only requiring an operator to handle the on-screen graphics.

The whole package was developed by the German firm Trackman. ESPN has previously dabbled with similar tech during golf broadcasts, but using it for baseball poses its own challenges: less predictable trajectories for the ball, the fact that it’s pitched first and not hit from a tee, and the real-time calculation of its potential to clear the fences all require more stringent data processing.

During Monday night’s Home Run Derby, the first use of the system went brilliantly. Commentator Chris Berman was still asking whether a ball in mid-flight would “have enough legs” well after the comet tail had turned green suggesting the question had already been answered.

But there are still kinks to work out. Unfortunately, both the comet tail and the distance counter were a bit inconsistent as the homers continued. Casamona believes there were two key factors that contributed to the complications: a significant amount of radio frequency noise was apparent at the stadium, muddling the radar signal, and the radar’s conical beam’s inability to track high-flying pop-ups, which explained why certain hits, which reached up to 135 feet, were lost in mid-air. The solution could be multiple radar systems pointing in different directions or radar with a wider beam.

“I viewed it (last night) as a success, but we’re committed to making this a perfect working technology and that’s our next step,” said Casamona. “We got a lot of great data, and we know what we need to do to make this a bulletproof system. We had no way to fully test it without going to something like the home run derby.”

Once perfected, ESPN could easily superimpose an estimated landing point on the field, or in the stands, immediately after contact is made–just like in baseball video games. This could help viewers track the ball better and give commentators something else to play with other than their tired Telestrators.

For Casamona, it’s back to testing in Orlando at Disney’s Wide World of Sports. To date the most difficult part has been “finding ways to reliably hit the ball 400 feet.” Pitching machines, college players and even those guns used to launch t-shirts were used to help test the system. ESPN seems aware that a bit more practice is needed to reach perfection. We’ve heard Barry Bonds isn’t busy?