The GPS chip has a series of messages it sends to the Tessel, some of which are sent once per second and some of which are sent every five seconds. Either way, this means that you should be seeing at least one of each type of message over any given five-second window. If you're not seeing any messages for 7-15 seconds at a time, then something's up.
Something I'll suggest as a general observation is that you may simply be overwhelming the Tessel if your code has too much going on. If the problem goes away when the device has less on its plate (i.e. more time to do things/longer times for
setInterval), then you should see if you can lighten the load in practice.
The easiest way to see if you're getting messages on time is to turn on debug mode for the module by setting the
DEBUG variable on line 15 of GPS'
true. That will let you see the raw messages from the GPS chip, most of which contain timestamps (note that they're in GPS time, which is its own thing).
If everything is coming in at the right rate, my guess is that the module can see satellites but has yet to decode their signal. I talk about this a little bit on an old GitHub issue, but the punchline is that there are a bunch of steps to getting a 3D fix from a GPS chip, most of which you can see evidence of in the
satellite-list-partial messages. All of the following happen automatically, but need to happen in order for the module to achieve a fix:
- Find 4+ satellites (technically 3 are sufficient, but 4+ is better)
- Download the manifest (Not sure if the name is right, but there's a step here where the GPS module learns about the state of the GPS network so it knows which satellites it should be looking for)
- Identify visible satellites. You'll see the reported ID numbers go from sequential placeholders (1,2,3...) in the
satellite-list-partial message to the satellites' true ID numbers.
- Get a good enough signal from the satellites such that their signal power can be reported in dBm
- Get a good enough signal from each of the the satellites such that the module can calculate azimuth and elevation of each satellite
- Do lots of math to get a 3D fix
Because we're just listening to the GPS chip's NMEA stream over UART, I don't think we can set the actual rate at which you receive updates from the GPS module (again, SiRF might let you do this, but we have not explored and do not foresee supporting this in the near future), but you could write something that saves state so that a valid (but possibly old) fix is available on demand.