Ultimate GPS breakout: failing to get positions at 5Hz / 10Hz

Hello,

tl; dr: can anyone provide a working example of code for Arduino+Ultimate GPS breakout which delivers positions at a rate of 5Hz or 10Hz, including altitudes?

Full story: my project goal is to build a GPS data logger out of an Arduino Uno + Adafruit SD shield + Adafruit Ultimate GPS breakout, and to get positions at a rate of 5Hz or, better, 10Hz. Software so far are the Adafruit GPS and SD libraries. Using the examples provided I managed to cut & paste pieces from the GPS and SD card examples to log positions at the standard rate of 1Hz. The GPS board is connected to the Arduino at 9600 baud and once a fix is found data are written to SD card and I can analyse things later on. So in principle everything is working. Positions etc are extracted from the GPS board using the "GPS.latitude" et al functions of the GPS library.

Problem 1: when I change the GPS's update rate from 1Hz to 5Hz using "GPS.sendCommand(PMTK_SET_NMEA_UPDATE_1HZ)", I get positions at a rate of 5Hz only in the serial monitor (which I have set to 115200 baud). Time stamps in the file on the SD card suggest a rate closer to 3Hz. I suppose that the bottleneck is the 9600 baud rate connection between Arduino and GPS module, but I am at a loss how to change it (see further down).

Problem 2: When the update rate is set to 5Hz the altitude written to SD card is always 0. How come?

Re changing the baud rate to the GPS module: I tried the approach outlined at http://www.camelsoftware.com/firetail/blog/electronics/adafruit-ultimate-gps-update-rate/ but failed miserably. All I get is gibberish in the serial monitor, which persists after power cycling / reprogramming / resetting everything. The only way out I found was removing the coin cell from the GPS board, which presumably resets the GPS board to factory settings of 9600 baud.

I'd be really grateful if someone could provide some sample code which demonstrates how to get a higher-than-default rate of positions and altitudes from my setup. For reference I have attached the code I'm using.

Regards,

Enno

gps_logger.ino (8.99 KB)