In 2013, when a wildfire changed tack and made a run for the town of Yarnell, Arizona, 19 members of the Granite Mountain Hotshots hiked down from the fireline to try to save a few homes. As the blaze grew closer, the men were forced to flee to their safety zone, a ranch they thought was a 15-minute hike away. But thick chaparral slowed their progress, and flames overtook them before they reached the ranch. All 19 died.

Like Montana’s 1949 Mann Gulch Fire, which killed 13 firefighters, and Colorado’s 1994 South Canyon Fire, with 14 deaths, the Yarnell tragedy was complex. But in all three instances, the loss of life boiled down to two factors: The fire moved more quickly than firefighters anticipated, and the firefighters themselves moved more slowly.

Since the Yarnell Hill Fire, scientists have become increasingly adept at predicting how fire moves across a given landscape. But because they’ve spent far less time studying how humans navigate the same terrain, firefighters can still be caught off-guard. Mickey Campbell, a geoscientist at Colorado’s Fort Lewis College, wondered: If Google Maps can tell us how long it will take to walk to the nearest grocery store, could he create something to help firefighters identify the best escape routes and predict how long it would take them to hike to safety? Instead of factoring in traffic and stoplights, the algorithm would account for slope, vegetation and ground surface conditions. And instead of being restricted to streets or trails, users would be shown a customized route on a topographic map.

This technology is still in the works, but after more than five years, Campbell and a team of researchers are now closing in on the science that will drive it.

The first step was modeling how quickly someone moves through the wilderness — a tricky proposition, it turns out. The most widely used formula was developed by a 19th century Scottish mountaineer, who said you should budget one hour for every three horizontal miles you hike, and one more for every 2,000 feet of ascent. But in a field where one minute can mean the difference between life and death, Campbell wanted something considerably more accurate, based on more than one person’s experiences.

In 2016, he and two colleagues timed 31 participants as they hiked transects in Utah, and measured how terrain, slope and vegetation influenced hiking speed. It was a good start — but Campbell dreamed of the kind of robust model that could only come from a sample size of thousands, covering all the terrain firefighters might encounter, from open scrublands to dense forest. One day while hiking, he realized that such a data set was already at his fingertips: the social network Strava, which 36 million people worldwide use to track trail runs and hikes via their mobile phones’ GPS.

“We thought, if there’s any way to tap into this massive database, we could potentially get a whole new perspective on the relationship between landscape conditions and how people move through the environment,” Campbell said.

Together with a team that included Bret Butler — a U.S. Forest Service engineer responsible for some of the most significant advances in wildland fire safety — Campbell analyzed 421,000 individual Strava records, then used the data to create a model that predicts how long it will take the average person to travel a specific route along a specific slope. The results were published in the peer-reviewed journal Applied Geography in May.

Campbell is now refining the model by testing how hiking speed is affected by firefighters’ heavy packs, fire-retardant uniforms and unique fitness levels. Once that’s done, the Google Maps-style algorithm will be added to an app already being developed by the Forest Service — the Wildfire Safety Evaluator, or WiSE, which will be released later this summer and won’t require a cellphone signal to use. The first version of WiSE will help firefighters calculate how big their safety zone needs to be based on current weather, fire and terrain conditions; Campbell’s mapping component will come later.

Mike Benefield, a retired wildland firefighter and manager, is skeptical that firefighters would be likely to whip out phones with a wildfire bearing down. Still, many wildland firefighters already carry phones into the field, and Benefield agrees that the technology has potential. Rather than firefighters using it in the field, for instance, managers working from a base in town could use the app and radio the information to crews. The technology might also help search and rescue professionals estimate how long it will take to reach an injured person and the best way to get there and back again.

And despite the technology’s limitations, giving firefighters a tool to help guide them to safety could save lives. “We’ve got these really powerful computers in our pockets,” Butler said. “I think we should use them.”

Krista Langlois is a correspondent with High Country News. She writes from Durango, Colorado.