Taking pilots out of the cockpit could save airlines billions. But would anyone buy a ticket?

The aviation industry could save $35 billion a year by moving to pilotless planes, according to a new report from UBS. Just one problem: The same report warns that only 17% of travelers are willing to fly without a pilot.

UBS said that the technology required to operate remote-controlled planes could appear by 2025. Further advances beyond 2030 might result in automated business jets and helicopters, and finally commercial aircraft without pilots.

"The technologies in development today will enable the aircraft to assist and back up the pilot in all the flight phases, removing the pilot from manual control and systems operations in all types of situations," the report said.

Commercial flights already land with the assistance of on-board computers, and pilots manually fly the aircraft for only a few minutes on average.

However, contrary to popular belief, airliners do not fly themselves, even when they're on autopilot. Pilots are continually monitoring and adjusting aircraft navigation and systems, communicating with air traffic control and preparing for the next phase of the flight.

The UBS analysts said the transition to pilotless planes is likely to happen over many years. Cargo planes would likely be first to incorporate the new technology, with commercial flights being the last to go pilotless. The number of pilots needed for each flight could be reduced along the way.

Related: What happens when automation comes for highly paid doctors

The shift has the potential to save the aviation industry huge amounts of money. Airlines typically employ 10 pilots per aircraft, and reducing their number would result in less spending on training, salaries and other staffing costs.

It could also help alleviate an expected pilot shortage over the coming decades.

An annual forecast released by Boeing last month said passenger and cargo airlines around the world are expected to buy 41,000 new airliners between 2017 and 2036. That means they will need to find and train 637,000 new pilots to fly them.

Airlines in the Middle East and China, where air traffic is growing fast, are offering huge paychecks to attract more pilots and salaries in the U.S. are rising too.

A move to pilotless planes would boost industry profitability, UBS said. Alternatively, if the cost savings were entirely passed to consumers, tickets could cost much less (11% cheaper in the U.S.). That would be about $40 a ticket, according to the $369 round trip average in the first half of 2016, which included $23 in fees.

Still, there is likely to be major resistance to taking pilots out of the cockpit.

A survey of 8,000 people commissioned by UBS found that 54% of respondents were unlikely to take a pilotless flight. Just 17% of respondents, who were from the U.S., U.K., France, Germany and Australia, said they would buy the ticket.

Related: The U.S. will face a staggering shortage of pilots

Major regulatory changes would also be required and any reduction in cockpit staffing would face huge opposition from pilots unions.

Air traffic laws in most of the world require "four-eye-rule" in the cockpit. Two pilots should be present at all times, and if one of them needs to take a break, another member of the crew has to take his or her spot.

-- Jon Ostrower contributed reporting.