GPS reports isValid() == false

I have left my carloop pro on for several hours, and can not get past the isvalid check. Here’s my code lifted from the github repo.

if (!carloop.gps().location.isValid()) {
	Particle.publish("GPS", "invalid, giving up");
	return false;

float flat = carloop.gps();
float flng = carloop.gps().location.lng();

Did my carloop pro come with a GPS? Are there other special calls that need to be made to activate the GPS?

You need to connect a GPS unit. Take a look at the store for the carloop pro. You can see clearly that there is a separate GPS receiver that gets plugged into the GPS connector on the carloop.

If you do have a GPS, the GPS needs to get clear signals from the satellites. Make sure the GPS is not blocked from the sky by things such as the metal roof of your car or being inside a house. Trees and clouds can make it difficult to get a signal sometimes.

I bought the Carloop Pro, it comes with a GPS.

This is the ultimate programmable 3G OBD-II dongle. Comes with GPS, 3G cellular connectivity and it’s programmable in Particle’s easy to use IDE.

I have not actually used it with a GPS.

I suggest the following:

  • check for any GPS setup code in the setup() section
  • try running it outdoors with clear view of the sky
  • give it plenty of time to acquire that first signal

(once you get the first signal, subsequent times will be much faster. Also, keeping power to the GPS keeps its satellite library alive, which makes reconnection much faster.)

If that does not work, contact carloop support and see if they can help out.

Not sure why these methods are in carloop. I found this in Particle for doing GPS things. I think these are needed for the carloop() calls to work.