Because the spacecraft had to fit within the nose cone, or payload fairing, during launch, large parts like the high-gain antenna and the solar arrays were designed to be folded up. As soon as the launch vehicle put the spacecraft on course to leave Earth orbit for its journey to Mars, it disconnected itself from the spacecraft.