NEO-6m GPS gives me 0.0000 for long and lat. Is it working or not?

I am using an ESP32 microcontroller and I am trying to get my data uploaded to my database as I am trying to make an emergency alert system. The problem is that the module is already blinking every second and It has been 1 hour but my data is still 0.0000

This is my getGPS() function

void getGps() {
  String check = "Newdata available";
  boolean newData = false;
  for (unsigned long start = millis(); millis() - start < 2000;) {
    while (neogps.available()) {
      if (gps.encode(neogps.read())) {
        newData = true;
        break;
      }
    }
  }

    if (newData) //If newData is true
    {
      latitude = String(gps.location.lat(), 6);
      longitude = String(gps.location.lng(), 6);
      newData = false;
    }
    else {
      Serial.println("No GPS data is available");
      latitude = "";
      longitude = "";
    }

  Serial.print("Latitude= ");
  Serial.println(latitude);
  Serial.print("Longitude= ");
  Serial.println(longitude);
}

@slashplusdash

Your topic was moved to its current location as it is more suitable.

Could you also take a few moments to Learn How To Use The Forum.

It will help you get the best out of the forum in the future.

Thank you

If the GPS LED is flashing it usually means its getting a fix.

That you seeing 0s for Long and Lat either means your in a fairly unique location or there is a problem with tyour code (any of it) or how you have the GPS connected.

sounds like a classic case of not enough signal strength. in my house that would be caused by the steel roof, if I did not have an outdoor antenna

You need to be outside, with a clear view of the sky, to receive GPS position information.

1 Like

What do your raw NMEA sentences look like?

Ya know I have heard that before. Now I am sitting in the South East Cleveland Ohio USA suburbs in a two story wood frame house with overcast skies.

Using one of these GPS modules I have it connected to both an Arduino UNO and direct USB to PC. The Arduino is using com 8 and the direct USB to PC using com 13. Power up and within s few min I have the 1 sec pulse out and am seeing 10 or 11 satellites in view and using 6 or 7. I get about the same results using a PA1010D RTC module.

The building and clear view seem to have no effect?

GPS3

The building and overcast skies seem to have no effect. These were last night.

Ron

Exactly the opposite, you can clearly see the GPS signals are very weak and marginal.

And that is another indication of weak signals. With a good clear view of the sky the GPS should get a fix in circa 45 seconds, but it needs good strong signals for that.

Well alrighty then. I did notice the serial port data was not last nights. So outside on a clear night I would get faster lock up and maybe more satellites.

Actually my wife's truck is an older 1999 Tahoe so we just tossed a Garmin GPS in it. That boots up and runs pretty quickly. Never gave it much thought.

So thanks for sharing.

Ron

I am not aware of any GPS fix diferences between day and night.

A faster lock up is a good indication of better reception, so more satellites would be understandable.

Indoors typically tracking 6 to 7 satellites with 11 or 12 in view. The numbers are good. I just figure the thread starter should be seeing something unless he is in a cave or Faraday cage. :slight_smile: That assumes everything is wired correctly.

Ron

Or lives in a multistory building, has a thicker roof, etc.

Nevermind got it fixed but thanks anyways. Just had to wait like for another 30 minutes and I got my data :slight_smile:

Or wood framed house with foil backed plasterboard on the walls.

So 90 minutes for a fix.

And no way of knowing from that whether the GPS\Antenna combination is faulty or not. If the initial fix takes that long, it could well drop out when the satellites are in a different configuration.

If a 90minute fix is acceptable then fine .........

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.