Skylab SKM 53 GPS Module

hi all,

im facing a problem to receive gps data (latitude and longitude) from my gps module. im using the Skylab SKM 53 GPS module and Romeo V2 board. the data displayed in serial monitor was like this (Latitude: 0.0000000 :: Longitude: 0.0000000). below is my code for gps

#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);

  getGPS();
  Serial.print("Latitude : ");
  Serial.print(LAT/100000,7);
  Serial.print(" :: Longitude : ");
  Serial.println(LON/100000,7);
  delay(1000);
}

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
  }
}

do you guys know what is the problem here? help me please…

do you guys know what is the problem here?

You have more than one.

  gps.get_position(&lat, &lon, &fix_age);

  getGPS();

Get the position data from the gps data. Then get some GPS data. You’ve got the cart before the horse.

  while (millis() - start & 1000)
  {
    if (feedgps ()){
      newdata = true;
    }
  }

Absolutely useless. Get rid of the while loop. Get whatever data is available on the serial port. If it’s enough to complete a sentence, use it.

Consistent placement of {s will make your code more readable. Using two different styles does not help anyone read the code.

You should then, in loop(), pay attention to the newdata flag. Don’t try to extract data from the GPS data unless there is GPS data.

oh really. but i didnt understand. im really appreciate if you can correct my code.i read on website they said it is because of power.some arduino cannot provide power from the same source.is it true?

is it true?

It must be. It was on the internet.

Which web site were you reading? What, specifically, did it say? Which Arduino do you have? How are you powering it? You are doing this testing outside, right?

im really appreciate if you can correct my code.

I'm not sure how difficult it is to understand that you need to, at a minimum change this:

  gps.get_position(&lat, &lon, &fix_age);
  getGPS();

to this:

  getGPS();
  gps.get_position(&lat, &lon, &fix_age);

Get some data first, THEN parse it.

Dump that whole f**ked up sketch. Run the TinyGPS example. When you have the GPS working, and are getting good data, THEN you can think about doing something more (or less) than the example does.

im referring to this website http://competefornothing.com/?p=113#comment-2282. he said that i have problem with power. im powering this module through arduino 5V pin. the skylab Vcc pin on arduino 5V pin.im using the Romeo v2 board actually. yup, i testing this outside. waiting almost 20 min but still nothing appear instead of zero.

im already test with the tinyGPS example code but still the same. i have no idea what to do. do you have another code?let me test with your code. im afraid that something wrong with the module. it could be damage already because i've tried with many code but still not working.

im powering this module through arduino 5V pin.

You've researched how much power that pin can provide, right?

You've researched how much power the GPS module requires, right?

it could be damage already because i've tried with many code but still not working.

The code hasn't damaged it.

i tested this module on Uno and run the TinyGPS example code. finally i can get the coordinates. then i realize that the problem is the library. i should use the newsoftserial library instead of software serial. thanks for your help.

ady88:
i tested this module on Uno and run the TinyGPS example code. finally i can get the coordinates. then i realize that the problem is the library. i should use the newsoftserial library instead of software serial. thanks for your help.

Really? Which version of Arduino IDE are you using? After 1.0, newsoftserial replaced SoftwareSerial, according to its author.

Can you help me. i have been trying to read gps skm 53 with this code but isn’t work. then iam use the program above, the longitude n latitude always “0”. i use promini 3,3 volt…??

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

TinyGPS gps;
SoftwareSerial ss(9, 8); // RX, TX

void setup() {

ss.begin(9600);
Serial.begin(9600);
}

void loop() {
if (ss.available()>1){
while (ss.available()>1) {
int c = ss.read();
Serial.print(c);
delay (100);
}
}
else {
delay (100);
Serial.println(“out”);
}
}

ady88:
i tested this module on Uno and run the TinyGPS example code. finally i can get the coordinates. then i realize that the problem is the library. i should use the newsoftserial library instead of software serial. thanks for your help.

Hi
Can you post your code? I've tried the example but I receive always 0

Thanks a lot

I had an issue with my Skylab GPS SKM53 where I was getting ***** for data, or no data at all when setting it up with a monitor program on the serial port. Turns out that the data pins want 3.3V although the VCC is 5V! some how even though the Tx would not care about sending 3.3v to the arduino, it wanted a voltage divider. A resistor is stated in the datasheet of the GPS module, but I got it to work with a voltage divider so do this if you get **** or 00000...

5V VCC to GPS
Beween the RX pin of the Arduino (set by the software you choose) to a 10K resistor to the Tx pin on GPS module
(RX arduino - 10k - Tx pin GPS)
20k resistor to GND connected to above TX-resistor point of GPS cable.

I was having a similar issue. It seemed to take a very long time to get satellites. Your voltage divider has no impact on this so I'm wondering if it's just good practice?