# Arduino GPS shield giving incorrect altitude readings

I've been playing around with an Arduino and the SparkFun GPS shield. For about a week, it was working well, but it has now developed an interesting error.

While my latitude, longitude, date, time and course are correct, the GPS is telling me that it is 10 000 000 m above sea level. Previously, it was giving readings between 90 and 110 m, which would be correct for my local area.

I have tried everything I can think of to fix the problem; reinstalling the libraries and using a couple of different sketches off the internet, but they all have the same problem.

I'm not sure if the GPS module has gone bad because all other outputs are working, but this being my first GPS project I'm not 100% on how it determines altitude figures. I am willing to pay another $80 to get a new module but I'd rather not if it's not the problem. ## 2 Answers I doubt that you somehow only damaged the logic that determines altitude in your GPS module. My best guess would be that your software is looking at the wrong part of the NMEA sentence the module is transmitting to your Arduino. I'm not sure how the GPS shield is wired (there are seemingly a couple variants on SparkFun, but I'd attach a separate TTL converter (e.g. board with an FTDI chip) and look at what the GPS is actually sending. You don't have to use the TTL converter, just get a glimpse somehow of the raw NMEA data. The reason I suggest that is because I think the GPS uses the serial port that you'd normally use to talk with your PC. The fact it worked before makes me think that either your software was modified initially then all the stock versions you've tried don't have that tweak in them, or you may have reconfigured the GPS module somehow to change the fields it transmits. • an example of the nmea string is below$GPRMC,135908.000,A,3750.8538,S,14515.4185,E,0.34,60.41,181210,,*2C $GPRMC,135909.000,A,3750.8534,S,14515.4187,E,0.59,21.54,181210,,*29$GPRMC,135910.000,A,3750.8530,S,14515.4189,E,0.56,15.31,181210,,*20 \$GPRMC,135911.000,A,3750.8531,S,14515.4187,E,0.09,89.37,181210,,*27 – Nathan Dec 18 '10 at 14:19
• @Nathan: From the linked webpage, and from a brief look at the data, RMC (Recommended Minimum) sentences don't appear to contain altitude information. GGA (Fix info) and other proprietary sentences have it. I'm guessing that you need to request specific info from the GPS receiver (don't know part number so I can't look it up). – Nick T Dec 18 '10 at 18:28

If the GPS module sees only 3 Satellites, the altitude can not be computed (that needs at least 4 SV). So the GPS may just try to tell you that it has no altitude data for you.

But this is just guesswork without the NMEA sentences...