The compass is the magnetic sensor. It's thrown off by being near almost anything with iron in it. I can calibrate mine, walk around the house for 10 minutes and it's uncalibrated. That's not the phone, it's the fact that almost anything that can be magnetized has thousands of times the strength of the magnetism we get from the planet, so the sensor is constantly being "recalibrated". If you calibrate it in the woods, where there's almost nothing ferric, it should hold long enough to get you out of the woods, but don't count on it if you're in a populated area. (Even overhead power lines and phone lines can miscalibrate it.)
But that has nothing to do with the GPS. That's a radio receiver, receiving signals from satellites. There are no adjustments except, inside the phone, the springiness of the contact from the radio to the antenna. If the contacts aren't pressing on the antenna wires hard enough, you get no signal - to GPS Status or to a navigation app. If you get green bars in GPS status (you need at least 5 - more than that just make the accuracy a little better), the GPS radio is working. If Maps isn't working, it's a problem with the app. Install any other app, like Mapquest, and it should work. (They may not have street-level maps for South America, I've never looked - but it will show you where you are as closely as the map's resolution is.)
If there are no green bars in GPS status, then if there are yellow bars, it's going to take a while to get your first fix since you turned the GPS on. You're not getting AGPRS data (pseudo-GPS data from the phone towers). If all you get are brown bars after 5 minutes or so, there's something wrong with the antenna (it's a different antenna than the one the phone itself uses), the antenna contacts or the GPS radio. Brown bars mean no satellite signal is being received. Yellow bars are signals that have been received, but the GPS firmware hasn't figured out which satellite that one is yet. It has to receive an entire transmission from the satellite to figure that out. If there's a burst of noise, or you walk under a metal overhang or a wet tree when it's trying to receive that signal, it's going to have to start again at the beginning of that satellite's next transmission. A green bar means that it knows which satellite that one is, and it's using that data to figure out your location. Once it knows the satellite, all it has to receive from it is the time at the satellite (which is down to about 3 billionths of a second). The difference between the time the satellite says it is and the time the firmware has figured out it is tells it exactly how far away the satellite is, Since it knows where the satellite is relative to the planet, it knows, with 3 satellites, where it is on the planet. The 4th one adds elevation. (Draw 3 circles on a map. Where they all overlap is your location. A 4th circle, "drawn" at right angles to the map, will locate your elevation. The example is simplified almost to the point of being useless, but if I posted a long list of equations here, no one would read them, and almost no one would understand them.) It needs 5 to figure out exactly what time it's supposed to be. (The time you get from the cell towers doesn't have fine enough resolution to determine your location more accurately than about what continent you're on. The difference between the time received from the satellite and the time determined from all 5 of them - the time it "actually" is - is measured in the hundred millionths of a second at most. Radio signals, like light, travel pretty fast.)