In the most nightmarish drone scenarios, one of the little whirlybirds flies into an airliner, or wanders into military airspace, or swoops down on the White House. At best, such things are mild annoyances. At worst, they pose a grave threat to safety and security. The sky is a big, open place, with a great many no-go zones that aren't clearly delineated. That makes it easy for a drone, or its pilot, to cause trouble.

Geofencing helps reduce the odds of a malicious attack or an innocent "oops" moment, but NASA thinks it has a better idea: Drone suicide.

It works like this: A software system called Safeguard monitors the drone’s proximity to FAA-designated no-fly-zones like airports, military installations, and stadiums. If the drone gets too close (however close authorities decide that to be), Safeguard instructs it to land. Should it continue flying, the software—which works independently of the drone’s flight controls—assumes a system failure and cuts off power. The drone falls from the sky like a stone.

The folks at NASA's Langley Research Center pitched this idea a few years ago, and it recently completed NASA's stringent software compliance process. Passing that milestone means the agency has determined that Safeguard is, well, safe. That clears researchers to use flight-qualified prototypes in tests and demonstrations.

Many drones already rely on conventional geofencing to avoid restricted airspace. But the technology isn’t foolproof, let alone secure enough for professional and commercial-grade aircraft. For one thing, most geofencing systems rely on GPS, which is prone to signal loss or interference.

Safeguard uses algorithms to track a drone’s movement relative to the geofences. That increases precision and reliability because the software does not rely upon external data streams. Of course, cutting power to the props is a last resort---the technology was developed to keep drones (and their pilots) out of trouble to begin with.

Granted, a drone tumbling earthward seems less than ideal. Kelly Hayhurst, the NASA researcher who invented Safeguard, says the system is not intended for hobbyists flying over a city park, but for professionals using commercial drones for tasks near no-fly zones with few people around. Like, say, an aerial inspection of power lines near an airport, or a search-and-rescue mission near a military base.

With safety certification in the bag, the next step is bringing Safeguard to market. Nothing requires drones to use the technology, but that could change as the feds take a closer look at regulating drones of all kinds. If successful, the system could be one fewer reason for drone-safety advocates to stay up at night—and one more incentive for drone manufacturers to make sure their systems stay away from no-fly zones on their own. Because no one wants see their drone come tumbling out of the sky.