Increasing numbers of drones in the sky raises the risk to people and property below being hit when those devices have mechanical problems. That’s why NASA researchers are building technology to help drones automatically spot the best places to crash-land without hurting anyone on the ground.
Patricia Glaab, an aerospace technologist at NASA Langley Research Center, said she and her fellow NASA colleague and husband, Lou Glaab, have developed crash-landing software for drones. Based on eight test flights, the technology has successfully spotted safer landing zones like swamps or drainage ditches to crash instead of on top of people’s cars, Glaab said.
Get Data Sheet, Fortune’s technology newsletter.
She first got the idea for the technology in 2015, and received just under $10,000 from NASA to work on it. The initiative comes as businesses increasingly use drones for things like inspecting rooftops or power lines, raising the risk of in-flight mechanical and software problems that could put people below and the drones themselves in danger.
Many companies like China-based drone maker DJI install drones with software that helps the devices sense and avoid obstacles while in flight. But these technologies are not designed for emergency situations, Glaab explained.
“No one wants to think about it,” she said of potential drone crashes. “People are much more interested in the capabilities" and less so in "what happens when the thing is going down.”
The software links on-board drone components like batteries and motors to monitor their health. The goal is to identify when something on the drone goes haywire and, if so, put the drone in a sort-of crash-landing mode.
When triggered, the software checks a pre-installed database of nearby safe zones that it can then pilot itself toward. Big airlines already use such a national database for emergencies.
NASA's crash-landing software also incorporates software developed from Brigham Young University researchers that lets drones recognize and avoid objects on the ground using on-board cameras, she explained.
Still, NASA’s technology is far from finished.
For instance, Glaab's team must manually upload the safe-landing database in the drones they test for each location. Although not a laborious process, she said, it is an extra step.
Eventually, it may be possible for the drones to connect wirelessly to a national database of safe landing zones, but that's unlikely to be anytime soon.
For more about technology and finance, watch:
Glaab is still refining the drone technology and plans on doing more test flights this summer. The space agency does not plan to sell the technology, she said, but instead hopes to license it to drone companies.