having trouble recieving usable data from gps

hey guys i am making an autonomous car guided by gps with a sensor to avoid obstacles. i am using this gps
( GNSS Receiver - EM-506N5 - GPS-19629 - SparkFun Electronics )

i have it connected to power, ground, and the rx pin on my arduino uno.

the code that seems to be giving me the problem is as follows

if(gps.gprmc_status() != 'A'){
char c = Serial.read();
gps.decode(c);
Serial.println(c);
}

also i am using the nmea library and looking for gprmc

for some reason i cannot receive any active/valid sentences. i display c to the serial monitor so i can watch the data and i receive what seem to be useless, non gprmc sentences.

i realize i am probably not telling you anywhere near the amount of thigns you need to help me but i can answer any questions you guys have to the best of my ability.

thanks, chad

Try this code based on the the example code that Sparkfun provides:

#include <nmea.h>

// create a GPS data connection to GPRMC sentence type
NMEA gps(GPRMC);

void setup() {
  Serial.begin(4800);  // Start serial communication with GPS
  pinMode(13, OUTPUT);  // Arduino LED
}

void loop() {
  if (Serial.available() > 0 ) {
    // read incoming character from GPS
    char c = Serial.read();
    Serial.write(c);  // Send out to Serial Monitor at the GPS baudrate.

    // check if the character completes a valid GPS sentence
    if (gps.decode(c)) {
      // check if GPS positioning was active
      if (gps.gprmc_status() == 'A') {
        digitalWrite(13, HIGH);  // Show the GPS IS ACTIVE light

        // check if you are in Colorado, USA
        boolean inColorado = (gps.gprmc_latitude() > 37.0)
                          && (gps.gprmc_latitude() < 41.0)
                          && (gps.gprmc_longitude() < -102.05)
                          && (gps.gprmc_longitude() > -109.05);
     if (inColorado)
           Serial.println("Your GPS is in Colorado!");
    else
          Serial.println("Your GPS is not currently in Colorado");
      } // GPS Active
    else
        digitalWrite(13, LOW);
    }
  }
}

You have to do the decode BEFORE you can check to see if the GPS was ACTIVE. Until it receives the message it can't interpret the message.

i figured because i put it in an if it would go in because its not active yet because it hasnt decoded anything then it will decode and when it becomes active it will leave.

I'm trying to do the same thing but I can't get the code to compile. I'm a newbie so I'm not too sure what I'm doing but I've tried adding the following line
#include <wprogram.h>
as someone suggested but it still doesn't work. I'm using a Duemilanove so it may not have enough memory but that shouldn't prevent the code from compiling should it? Does an Uno have any more memory?
The errors I'm getting are as follows

In file included from
/usr/share/arduino/hardware/arduino/cores/arduino/WProgram.h:6,
from sketch_aug19c.cpp:2:
/usr/lib/gcc/avr/4.3.5/../../../avr/include/math.h:426: error:
expected unqualified-id before 'double'
/usr/lib/gcc/avr/4.3.5/../../../avr/include/math.h:426: error:
expected ')' before 'double'
/usr/lib/gcc/avr/4.3.5/../../../avr/include/math.h:426: error:
expected ')' before 'double'

I'm using Ubuntu and arduino-0022