While earning a degree in aeronautical engineering at Pennsylvania State University, he was commissioned an ensign in the Reserve Officers Training Corps, and in 1964 he received a master’s degree at the Naval Postgraduate School in Monterey, Calif.
He was stationed in Jacksonville, Fla., when, on a training flight, the plane he was in clipped wings with another plane. The other plane landed safely, but he and his instructor had to bail out.
“It wasn’t uncomfortable except that I went through the top of a Florida pine tree,” he said.
Mr. Weitz, known by the nickname P. J., served as a pilot in the Navy in Vietnam before being selected by NASA for the astronaut corps in 1966.
He was the pilot on the 1973 mission to the Skylab space station, working under Commander Charles Conrad Jr., with Joseph P. Kerwin rounding out the crew. Skylab, the first American space station, had been sent up on May 14, and the three men were to blast off the next day and board it. But a heat shield designed to protect the lab from the sun was damaged during launch, so the crew waited while NASA engineers devised a makeshift repair for them to implement.
Ellen Ochoa, director of the Johnson Space Center, said in a statement, “P. J.’s role on the first Skylab mission helped save NASA’s first space station.”
Two other manned missions visited the station later that year, conducting experiments involving solar observation, the effects of microgravity on humans, and much more. After the last astronauts left in February 1974, Skylab continued to orbit until 1979, when it took a much-publicized but ultimately harmless dive back to Earth, disintegrating as it re-entered the atmosphere.
Mr. Weitz’s wife, the former Suzanne Berry, whom he had married in 1956, was not surprised at the fix-it abilities he demonstrated on the Skylab mission.
“He’s very handy around the house,” she told The New York Times in an interview in June 1973. Shortly before he blasted off for the space station, she said, he was on the roof replacing shingles.
Mr. Weitz returned to the military after that flight and retired in 1976. But he returned to NASA as the space shuttle era began.
On April 4, 1983, Mr. Weitz led a crew of four that took Challenger on its maiden voyage, landing it successfully at Edwards Air Force Base in California on April 9. After the ship exploded almost three years later, the shuttle program was suspended while NASA investigated the cause and did a lot of soul searching about its processes and structure.
Mr. Weitz was among several idle astronauts given management responsibilities; he became a deputy director of the Johnson Space Center, retiring from that post in 1994.
One concern after the Challenger explosion was that NASA had been undertaking too many flights too quickly. Mr. Weitz acknowledged that problem in an interview on the CBS News program “Face the Nation” in 1986.
“In the past I firmly believe that the system has come to succumb, probably subconsciously, to the pressures of schedule,” he said. “And I think one of the things we ought to see that we don’t do again in the future is set ourselves up where we are susceptible to such pressures.”
Suzanne Weitz died last year. Mr. Weitz’s survivors include a daughter, Cindy Difranco; a son, Matt; and a sister, Evelyn Richards.
During his two missions, Mr. Weitz spent 33 days in space, always with a touch of awe. In a 1983 interview with The Times, he recalled that during his Skylab stay, he never tired of looking at the view of Earth.
“Nearly all my time was spent at the window,” he said.