perjantai 1. maaliskuuta 2019

Waiting for GPS fix...


Continuing on previous post.

You've got your GPS module working and it's returning the location, great! Now, the only problem is that whenever power goes out (for whatever reason) the module loses its location fix and it takes really long for it to regain it afterwards. Which may or may not be a major problem for your application.

GPS, while a nice system overall, has a weakness there. A receiver (and I do mean that literally; GPS is completely listen-only system; no data is ever transmitted out to satellites) receives data from satellites, but when receiver has no history information available, it takes a long time to find itself. I haven't studied the details myself, so it's a bit fuzzy for me too, so please, just take my word for it for now.

The more you know about where or when you are, the faster GPS can lock on.

Depending on module you are using this might be less an issue. Network-assisted GPS, like phones are using, can fall back to network provided data to start, so this generally isn't an issue.

Many GPS modules also remember their history, even after power loss, so they have rough idea where and/or when they are. Unfortunately, some lose their data after some time (week or so without power - using capacitor as back-up power source) and then you're in square one again.

If your system has its own clock and non-volatile storage, you can also hand this data to GPS module you're using yourself. Many GPS chips can take location and/or time data in to make the initial fix quicker, generally in format of NMEA message. In this specific case, I'm using SirfStar chip, which has proprietary $PSRF101 message for this specific purpose. Provide the chip with initial location and time data and the time-to-fix will drop down significantly!

Of course, every chip has a bit different commands for this, and for example the command above uses ECEF coordinates and GPS week/seconds numbers, instead of lat/lon pairs and real time you might be tempted to use. But at this points, it is just data transformation and easily searchable so I don't provide any links here. Especially since your module might use completely different chipset with different commands.

May your module find itself in record time now!

Ei kommentteja:

Lähetä kommentti