gps issue

i am using adafruit gps shield and i tried to upload blank sketch to it and the serial return the gps values and every thing is good but when i yried to run this code, only one sentabce came up which is the wrong one and i expect a stream od data i got nothing

[//Make sure to install the adafruit GPS library from https://github.com/adafruit/Adafruit-GPS-Library
#include <Adafruit_GPS.h> //Load the GPS Library. Make sure you have installed the library form the adafruit site above
#include <SoftwareSerial.h> //Load the Software Serial Library. This library in effect gives the arduino additional serial ports
SoftwareSerial mySerial(7, 8); //Initialize SoftwareSerial, and tell it you will be connecting through pins 2 and 3
Adafruit_GPS GPS(&mySerial); //Create GPS object

String NMEA1;  //We will use this variable to hold our first NMEA sentence
String NMEA2;  //We will use this variable to hold our second NMEA sentence
char c;       //Used to read the characters spewing from the GPS module

void setup()  
{
  Serial.begin(115200);  //Turn on the Serial Monitor
  GPS.begin(9600);       //Turn GPS on at baud rate of 9600
  GPS.sendCommand("$PGCMD,33,0*6D"); // Turn Off GPS Antenna Update
  GPS.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCGGA); //Tell GPS we want only $GPRMC and $GPGGA NMEA sentences
  GPS.sendCommand(PMTK_SET_NMEA_UPDATE_1HZ);   // 1 Hz update rate
  delay(1000);  //Pause
}


void loop()                     // run over and over again
{
readGPS();  //This is a function we define below which reads two NMEA sentences from GPS

}
void readGPS(){  //This function will read and remember two NMEA sentences from GPS
  clearGPS();    //Serial port probably has old or corrupt data, so begin by clearing it all out
  while(!GPS.newNMEAreceived()) { //Keep reading characters in this loop until a good NMEA sentence is received
  c=GPS.read(); //read a character from the GPS
  }
GPS.parse(GPS.lastNMEA());  //Once you get a good NMEA, parse it
NMEA1=GPS.lastNMEA();      //Once parsed, save NMEA sentence into NMEA1
while(!GPS.newNMEAreceived()) {  //Go out and get the second NMEA sentence, should be different type than the first one read above.
  c=GPS.read();
  }
GPS.parse(GPS.lastNMEA());
NMEA2=GPS.lastNMEA();
  Serial.println(NMEA1);
  Serial.println(NMEA2);
  Serial.println("");
}
void clearGPS() {  //Since between GPS reads, we still have data streaming in, we need to clear the old data by reading a few sentences, and discarding these
while(!GPS.newNMEAreceived()) {
  c=GPS.read();
  }
GPS.parse(GPS.lastNMEA());
while(!GPS.newNMEAreceived()) {
  c=GPS.read();
  }
GPS.parse(GPS.lastNMEA());

}] 




my serial output is ,0.00,060180,,,N*48
$GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32


any ideas??
  clearGPS();    //Serial port probably has old or corrupt data, so begin by clearing it all out

That comment is a load of crap. Get rid of this function call, and function.

Why do you not print the character you read from the GPS? Perhaps a clue-by-four is lurking there.

while(!GPS.newNMEAreceived())

Whoooah there - that's a blocking loop and can cause indefinite delays in your code. Best to take those bad boys out and replace them with if statements instead

PaulS:

  clearGPS();    //Serial port probably has old or corrupt data, so begin by clearing it all out

That comment is a load of crap. Get rid of this function call, and function.

Why do you not print the character you read from the GPS? Perhaps a clue-by-four is lurking there.

well sir how you call it a crap , the gps first nema sintances are not correct and loudly corept so i have to get ride of them , the variable c is well be used in another use , and the code is already been tested on adafruit gps module and work just fine but im using the shield

If the Arduino starts listening to the GPS at the beginning or, or in the middle of a sentence, GPS.read() will collect the data. If the sentence is complete, and is valid, the lastNMEA field will be set with the contents of the sentence. If the Arduino started listening in the middle, the sentence will be complete, but not valid, so the lastNMEA field will not be set.

The Arduino doesn't need your ham-fisted help to read the GPS data correctly.

and the code is already been tested on adafruit gps module and work just fine but im using the shield

You are not interested in debugging (or you WOULD be printing the character you read), so why ARE you here?