The main engines of the space shuttle Discovery were given the green light yesterday for an Aug. 24 launch, despite the premature shutdown of the previous shuttle's engine, which forced it into a brief emergency that nearly ended the mission and sent it into a lower-than-normal orbit when it was launched July 29.

Laboratory tests and a thorough examination of the engine that shut itself down showed that it was not damaged during launch and that the shutdown was caused by a pair of heat sensors that mistakenly indicated that the engine had overheated. Discovery's three main engines have been fitted with new heat sensors that engineers believe are vastly superior to the ones that failed last month on Challenger.

"Our analysis has verified what we felt right along was the probable failure mechanism," said Dominick Sanchini, executive vice president of Rocketdyne, which builds the hydrogen-fueled engines. "We're convinced that the sensors we have now have resolved the problem we saw on the last flight."

Meanwhile, crew members who flew Challenger into orbit said yesterday that they could not endorse either the Coca-Cola or Pepsi-Cola they carried into space for the first time. Both carbonated drinks were warm, fizzy and full of froth whenever the crew tried to drink them.

"They both failed miserably, mainly becase we had no refrigerator. Warm cola is not on anybody here's favorite list of things . . . . They just weren't at the right temperature and we had no desire to drain the cans the two drinks came in," mission commander C. Gordon Fullerton told a news conference at Houston's Johnson Space Center.

Fullerton said that although the crew suffered no gastric distress from drinking the two colas, "I just can't extrapolate to any great desire to want them." When the seven crew members were asked if they would forsake the fruit juices they usually drink for the colas if the colas were refrigerated, they all shook their heads.

"The drinks we have on board now are quite attractive," said astronaut Anthony England.

While Challenger's crew discussed the pros and cons of colas in orbit, workers at the General Dynamics Corp. rocket plant cheered as two Centaur rockets built to carry unmanned spacecraft to the planets rolled off the assembly line in San Diego.

The new rockets are the first versions of the hydrogen-fueled Centaur that can be deployed out of the shuttle's cargo bay in Earth orbit before blasting off for the outer planets.

The Centaur is to be used for the first time in the shuttle next year when it takes the Galileo spacecraft toward Jupiter and the International Solar-Polar Mission on a journey that takes it by Jupiter and back around the north and south poles of the sun.

The Centaur has been the upper-stage workhorse of the space agency's expendable launch vehicles for years, flying atop the Atlas and Titan rockets to take unmanned spacecraft in the last decade to Mars, Jupiter and Saturn.