They use some of the worlds biggest parabolic antennas. That means that they can send out very powerful signals from the Earth in a very tight beam so that almost all of the energy hits the target spacecraft. Similarly when they are receiving signals they will collect all the energy over the huge area of the antenna and only collect the energy coming directly from the spacecraft. It also helps that they have dedicated frequencies that nobody else is allowed to use so that they do not accidentally receive a domestic radio station or someones wifi. But even this may not be enough. They usually have to slow down the transfer rate to reduce errors, the longer you spend sending out each bit the more likely you are of receiving the correct value. There are also a lot of error correcting codes used such as sending all the data in double or even triple to make sure it is received properly.
Latest Answers