What I do in my home-brew S-port GPS sensor for my modelairplanes is this:
I connect the GPS module to the hardware serial port.
First define the command strings that you want to send to the GPS.
//format hex command strings for sending to UBLOX
const static char velned[] = {0xb5, 0x62, 0x06, 0x01, 0x03, 0x00, 0x01, 0x12, 0x01, 0x1e, 0x67};
const static char posllh[] = {0xb5, 0x62, 0x06, 0x01, 0x03, 0x00, 0x01, 0x02, 0x01, 0x0e, 0x47};
const static char sol[] = {0xb5, 0x62, 0x06, 0x01, 0x08, 0x00, 0x01, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x17, 0xDa};
const static char airborne[] = {0xb5, 0x62, 0x06, 0x24, 0x24, 0x00, 0xff, 0xff, 0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x27,
0x00, 0x00, 0x05, 0x00, 0xfa, 0x00, 0xfa, 0x00, 0x64, 0x00, 0x2c, 0x01, 0x00, 0x3c, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x0b, 0xb5, 0x62, 0x06, 0x24,
0x00, 0x00, 0x2a, 0x84
};
const static char rate_a[] = {0xb5, 0x62, 0x06, 0x08, 0x06, 0x00, 0x90, 0x01, 0x01, 0x00, 0x01, 0x00, 0xa7, 0x1f}; // 2.5 Hz
const static char rate_b[] = {0xb5, 0x62, 0x06, 0x08, 0x00, 0x00, 0x0e, 0x30}; // 2.5 Hz
Then in the setup section I first turn off all default messages, Then I set the GPS unit to "airborne 4G" mode, as using it in a model airplane gives a lot of sudden high-g turns. I increase the nav rate from 1Hz to 2.5Hz and then I activate the POSLLH, VELNED and SOL messages.
delay (1000); wait for the GPS to come to its senses.
Serial.begin(9600);
// First turn off the default NMEA messages that come out of the GPS module by default.
delay(100);
Serial.println(F("$PUBX,40,RMC,0,0,0,0*47")); //RMC OFF
delay(100);
Serial.println(F("$PUBX,40,VTG,0,0,0,0*5E")); //VTG OFF
delay(100);
Serial.println(F("$PUBX,40,GGA,0,0,0,0*5A")); //GGA OFF
delay(100);
Serial.println(F("$PUBX,40,GSA,0,0,0,0*4E")); //GSA OFF
delay(100);
Serial.println(F("$PUBX,40,GSV,0,0,0,0*59")); //GSV OFF
delay(100);
Serial.println(F("$PUBX,40,GLL,0,0,0,0*5C")); //GLL OFF
delay(100);
//Now write the configuration commands to the GPS module
Serial.write(airborne, sizeof(airborne)); //set GPS mode to airborne < 4g
delay(100);
Serial.write(rate_a, sizeof(rate_a)); //set GPS update rate to 2.5Hz (1st string)
delay(100);
Serial.write(rate_b, sizeof(rate_b)); //set GPS update rate to 2.5Hz (2nd string)
delay(100);
Serial.write(velned, sizeof(velned)); // VELNED (VELocity, North, East, Down) message ON
delay(100);
Serial.write(posllh, sizeof(posllh)); // POSLLH (POSition Latitude Longitude Height) message ON
delay(100);
Serial.write(sol, sizeof(sol)); // Navigation SOLution message ON
} // end setup
With this example you should be able to configure your module.