Geek Corner – GPS Positioning Algorithms

RaceJoy is the leading mobile app for races for GPS tracking, social interaction, safety and monitoring because of the advanced technology that no one normally sees. One of the really difficult problems to solve is identifying where someone is on a course based on GPS data that is inherently a little inaccurate.

This past week James and Michael, the lead developers on RaceJoy, came up to Philadelphia to test a new algorithm James had designed. They rented bikes and covered parts of the Philadelphia Marathon course in the “Urban Canyon” zones. Urban Canyons are those areas surrounded by tall buildings. GPS works by multiple satellites working together to measure the distance from the satellite to the phone (click on this link if you want a tutorial). The problem is that tall building interfere with the signals and accurate distance between satellites and the phone (click here for a more detailed explanation).

It turns out that the GPS system is pretty smart about this and knows it might be off. When the GPS system delivers coordinates to the phone, it also delivers a radius confidence interval. Michael wrote some software to visualize that confidence radius in the map above. Each yellow drop pin on the map is the estimated center of the phone as they were riding their bikes down Chestnut Street in Philadelphia, and the red circle is the confidence radius for that reading.

Screen Shot 2018-09-14 at 10.04.16 AM.pngLooking a bit more closely at two locations on the image to the right, the pin on the left has a radius of 12 meters.  While the next pin on the right has a radius of 45 meters. The green line marks the course.

Below is part of the segment away from downtown and you can see how consistent the confidence radius is (3 meters):


There are several tricks to the algorithm. The first is to judge the accuracy of that yellow pin to see if it should be used. The second is to sequence the pins so RaceJoy can show the blue dot moving to spectators watching this runner on their own phones. The third is to be smart enough to know when a participant has gone off course (for more than a bio-break) to send notifications.

This is one of the reasons why RaceJoy is very different than a typical app like Strava or RunKeeper or MapMyRun. We base distance on the Race Course Map. This is why we insist race directors and timers upload accurate maps to give participants the best experience possible.

Anyway, the good news is that the new algorithm will help improve RaceJoy’s performance. However, urban canyons (and real canyons for you trail racers!) can cause problems in spite of our best efforts. Sometimes the confidence radius is just too large or there are no reads from the GPS system for a period of time. And of course, the phone may know where it is, but if cellular conditions are jammed because of insufficient cell coverage, others will not know.

As a side note, you may want to reference participants who bring their Garmin watch and argue about the distance of your course. Their software is doing the same thing of making an estimate between each of those little pins – and those estimates can add up…

Leave a Reply

Leave a Reply

%d bloggers like this: