Early next year, a Boeing 777 will take off from the company’s airfield near Seattle with a laser shooting out of its nose. It may sound like a novel (and grisly) way to avoid bird strikes, but this isn’t that kind of laser. Rather, it’s part of a new system that Boeing hopes could spot brutal turbulence that can damage aircraft and toss passengers around the cabin—and give crews enough time to hunker down before the going gets tough.

While modern passenger aircraft can withstand even the bumpiest rides, turbulence remains dangerous for the people inside those planes. According to the FAA, 44 people were severely injured by turbulence in 2016, and that doesn’t count the less severe rocking and spilled drinks passengers endure on flights on a daily basis.

Boeing thinks a long-range lidar could be the answer. “We expect to be able to spot clear-air turbulence more than 60 seconds ahead of the aircraft, or about 17.5 kilometers [10.9 miles], giving the crew enough time to secure the cabin and minimize the risk of injuries,” says Stefan Bieniawski, the Boeing program’s lead investigator. (Clear-air turbulence is the sort that strikes without any visual warnings, like moving clouds.)

The lidar is the centerpiece of a new system developed by the Japan Aerospace Exploration Agency, which has been collaborating with Boeing since 2010 to configure it for use on commercial aircraft. It projects a laser in a steady line ahead of the aircraft, while an optical sensor tracks the bits of light reflected back by dust particles along the path of the beam.

Software analyzes the aircraft’s velocity relative to the movement and velocities of particles at different distances. Significant changes in the velocity differentials—like pockets of air moving faster than the stuff around it—are signs of turbulence ahead. When the system detects those deltas, it will alert the flight crews through audible and visual cues integrated into the instrument panel. (The specifics of how to deliver those alerts are still in development.)

Even if it doesn’t give pilots enough time to steer around the threat, a 60-second warning could be a major improvement over conventional methods of turbulence detection, which rely on reports from aircraft flying the same routes and general precautions around active weather systems. At best, those systems can help pilots avoid turbulent areas but not predict when the air gets choppy from one instant to the next. Systems that use radars to bounce radio waves off water droplets don't work for spotting clear-air turbulence. With a minute’s warning, passengers could buckle up. Flight attendants could stow their coffee pots and take their own seats.

Similar ground-based systems can detect turbulence and wind-shear around airports, but they’re the size of trucks. Now that the engineers have downsized their system so it can fit into a commercial jet without adding too much weight (about 185 pounds) or consuming too much power (3.3 watts), they can test it through Boeing’s ecoDemonstrator program. Every 18 months or so, the company selects a bunch of nascent technologies and installs them on an aircraft, which it flies twice daily for six weeks. The 2018 program will have some 30 systems on the 777, a new cargo aircraft FedEx is leasing back to Boeing.

“This is all about accelerating technologies,” said Doug Christensen, a manager in the ecoDemonstrator program. “We want to see if they work and how they integrate into the airplanes.” This year’s tech roster includes a lightweight and compact thrust reverser for the newest generation of massive jet engines, 3-D printed components, cockpit noise reduction systems, and a new biofuel.

If the lidar system proves successful, it could start spotting turbulence for commercial airlines within a few years, Boeing says. Until then, make sure to buckle up—and maybe keep a hand on that cup of joe.