By Paul Rincon
BBC News science reporter, Houston
Shuttle Discovery astronauts undertook a second spacewalk on Monday.
Soichi Noguchi moves the faulty gyro towards the shuttle loading bay
Soichi Noguchi's and Steve Robinson's extravehicular activity (EVA) to fix faulty gear on the International Space Station lasted about seven hours.
Their main objective was to remove and replace a control moment gyroscope that had not worked properly on the ISS since June 2002.
The orbiting platform has four gyroscopes that maintain its proper position relative to Earth.
Each CMG weighs 300kg (660lbs) and is about the size of a washing machine.
The station needs only two of them to control its "attitude", or orientation; but with the work completed by Noguchi and Robinson, the ISS now has its full complement.
Mission controllers in Houston, Texas, confirmed the new gyro was performing well.
Nasa engineers are now confident the Discovery shuttle can return to Earth on 8 August without risking the lives of its crew.
A detailed investigation of its exterior surfaces shows there are no major defects caused by foam falling off the orbiter's external tank during the flight to orbit last week.
However, mission managers must decide what to do about a pair of ceramic filler strips that have popped out from between heatshield tiles along the shuttle's belly.
Any material dangling from the orbiter could increase heating on tiles downstream of it as Discovery re-enters Earth's atmosphere.
It is possible Nasa will instruct either Noguchi and Robinson to go under the shuttle to trim the fillers, or simply pull them out.
Any such repair would most likely take place on the third and final planned EVA of the mission, which occurs on Wednesday.
More technical information was required and the risks of causing further damage by going underneath the shuttle needed to be considered, Nasa said.
Astronauts will spend one extra day at the space station - they were due back on Earth on 7 August.
The additional day will be used to transfer supplies and equipment, a matter made more urgent by the decision to ground all shuttle flights until the problem of foam shedding from the external tank on launch is fixed.
"The Columbia accident made us realise we had been playing Russian roulette with the shuttle crews," said deputy shuttle programme manager Wayne Hale.
A suitcase-sized piece of foam fell away from the Columbia orbiter during its launch, punching a hole through heatshield panels in the left wing.
The damage did not present problems in orbit, but as the vehicle tried to re-enter Earth's atmosphere on 1 February 2003, super-heated gases entered the wing and tore the ship apart.