gps problem

i brought Skylab UART GPS Module for the my arduino uno and i followed this tutorial http://www.fut-electronics.com/wp-content/plugins/fe_downloads/Uploads/Connecting%20Skylab%20SKM53%20GPS%20module%20with%20Arduino%20and%20Demo%20code.pdf but all i get is Latitude : 0.0000000 :: Longitude : 0.0000000 Latitude : 0.0000000 :: Longitude : 0.0000000 and iam in bahrain so what is reason of this error?

thanks :)

Hi There, I have had a few serial gps's over the years connected directly a serial port. One obvious thing that probably needs saying. Do you have the antenna out with a clear view of the sky? Does the doco tell you what the output will be if the gps has not synced with enough satellites for a good fix?

While testing can you output the raw Nmea codes straight to the serial monitor? Good luck David

i tried running the program in an open space and it didn’t work also, and there is the code i tried what can i change to output the Nmea code?

/*
This Sketch will run with the SkyNav SKM53 GPS if.....
 RXD Arduino Pin 3
 TXD Arduino Pin 2
 RST Leave Open ? (Connect to a N/O momentary switch pulled low to reset?)
 NC Leave Open
 GND Ground
 VCC +5
 This is not a great program but it will tell wyou where you are in the world.
 Make sure you download and save to your Arduino/Libraries folder TinyGPS.h
 and SoftwareSerial.h files.
*/
/* http://www.scribd.com/doc/48759166/SKM53-Communication < That's where I got
the original code, thanks a lot man! He's also the guy I bought the SKM53 from,
which I got in working state (14/03/2011) :) */

#include <TinyGPS.h>
#include <SoftwareSerial.h>

unsigned long fix_age;

SoftwareSerial GPS(2,3);
TinyGPS gps;
void gpsdump(TinyGPS &gps);
bool feedgps();
void getGPS();
long lat, lon;
float LAT, LON;

void setup(){
  GPS.begin(9600);
  Serial.begin(115200);
}

void loop(){
  long lat, lon;
  unsigned long fix_age, time, date, speed, course;
  unsigned long chars;
  unsigned short sentences, failed_checksum;

  // retrieves +/- lat/long in 100000ths of a degree
  gps.get_position(&lat, &lon, &fix_age);

  // time in hh:mm:ss, date in dd/mm/yy
/*gps.get_datetime(&date, &time, &fix_age);
  year = date % 100;
  month = (date / 100) % 100;
  day = date / 10000;
  hour = time / 1000000;
  minute =  (time / 10000) % 100;
  second = (time / 100) % 100;
  Serial.print("Date: ");
  Serial.print(year); Serial.print("/");
  Serial.print(month); Serial.print("/");
  Serial.print(day);
  Serial.print(" :: Time: ");
  Serial.print(hour); Serial.print(":");
  Serial.print(minute); Serial.print(":");
  Serial.println(second);
*/
  getGPS();
  Serial.print("Latitude : ");
  Serial.print(LAT/100000,7);
  Serial.print(" :: Longitude : ");
  Serial.println(LON/100000,7);
}

void getGPS(){
  bool newdata = false;
  unsigned long start = millis();
  // Every 1 seconds we print an update
  while (millis() - start < 1000)
  {
    if (feedgps ()){
      newdata = true;
    }
  }
  if (newdata)
  {
    gpsdump(gps);
  }
}

bool feedgps(){
  while (GPS.available())
  {
    if (gps.encode(GPS.read()))
      return true;
  }
  return 0;
}

void gpsdump(TinyGPS &gps)
{
  //byte month, day, hour, minute, second, hundredths;
  gps.get_position(&lat, &lon);
  LAT = lat;
  LON = lon;
  {
    feedgps(); // If we don't feed the gps during this long routine, we may drop characters and get checksum errors
  }
}

PS: also i tried a friend’s GPS and it keeps telling me that number of satellite found is 0
this is the GPS and its tutorial
http://www.cooking-hacks.com/documentation/tutorials/arduino-gps

and how to know if the place iam in has a coverage or not

thanks again :slight_smile:

Write yourself a much simpler sketch that just reads from the gps and echoes to the serial port; no point trying to interpret what it’s sending until you know it’s getting good data.

As to figuring out whether you have coverage, as long as you’re in an open space with a good view of the sky and you have an appropriate antenna (if required), there should be satellites in view. Nearby buildings can obscure your view; try with a gps equipped cell phone & see whether it can get a lock.