From afar, methane can be difficult to detect. It’s colorless, toxic, and devastating to the environment, especially when it leaks from natural gas pipelines. Up close, it smells like farts, but by the time people can smell it, there may be a huge problem. It’s visible with infrared cameras, but researchers at NASA’s Jet Propulsion Labs and the University of California, Merced have a better idea: get a sensor designed to detect the gas on Mars, stick it on a drone, and fly it around.

The drone uses NASA’s Open Path Laser Spectrometer (OPLS), an extremely sensitive instrument similar to one JPL uses to test for gases on Mars. The OPLS can detect methane in tiny amounts, down to the parts per billion in the atmosphere, which could help find and fix small leaks before they become major disasters.

The researchers have tried it out on various platforms, but settled on various unmanned air vehicles. Natural gas pipelines are often hundreds of miles long, so the researchers say they plan to begin testing the OPLS on fixed wing unmanned aircraft, which can fly further and longer than a small quadcopter drone. Still, the smaller aircraft, or sUAS devices, could assist human inspectors when checking certain areas of pipeline for leaks.

A tiny hole in one of these bad boys can get real smelly, real quick.

“These tests mark the latest chapter in the development of what we believe will eventually be a universal methane monitoring system for detecting fugitive natural-gas emissions and contributing to studies of climate change,” Lance Christensen, OPLS principal investigator at JPL, said in a press release.

While the drones will be able to sniff out methane in tiny quantities over pipelines, inspectors probably won’t want to fly them near any dairy farms — cow farts are one of the biggest contributors to methane pollution. But let’s just say leaky pipelines are much easier to fix.

Photos via Getty Images, University of California, Merced