13

I have a Jupiter F-2 GPS receiver connected to an STM32 that outputs NMEA messages every second. The GPGSV message indicates that I have 12 satellites in view. At the same time, the GPGSA messsage indicates that I have no fix, either 2D or 3D.

According to the receiver documentation, 5 satellites are sufficient for a 3D fix.

What could explain the discrepancy between the GPGSV and GPGSA messages? Why am I not getting a fix?

Randomblue
  • 10,953
  • 29
  • 105
  • 178
  • 3
    Embedded systems often use GPS, does helping someone debug a module not help this goal? How often does a general user know what an NMEA message is? – Kortuk Jun 20 '12 at 12:50
  • 1
    @Kortuk - OK, no problem. That's why we need the 5 votes, I suppose. OTOH, apart from the NMEA messages this is a problem I also have sometimes on my mobile phone, but nothing to do with electronic design. (The display shows weak reception levels, but no fix) – stevenvh Jun 20 '12 at 12:57
  • 1
    @Kortuk - I think it's a perfectly suited question for this site. I actually clicked on this question because it seemed like a problem I'd run into when designing an embedded system and the answer would be _very_ useful somewhere down the road. We permit RF/Antenna questions and questions on general protocols. This seems ripe with both. – Joel B Jun 20 '12 at 12:58
  • @JoelB, You dont have to convince me, I consider it on topic. I was asking the users whom wanted to close for further discussion. I assumed there had been some misunderstanding of the context of the question. – Kortuk Jun 20 '12 at 13:25

2 Answers2

13

Sattellites "in view" is different from full communication with that satellite. There are a few steps in eventually receiving the GPS data so that position can be found. Due to the modulation scheme, just being able to detect the carrier is not enough. In fact "carrier" is a bit misleading for GPS since the signal power is something like 20 or more dB below the noise floor. As a result, there is a stage where a receiver can see that a satellite signal is present but not be able to decode the information. There is something referred to as "code lock", and one more level that I don't remember the name of.

My car GPS receiver will display a hollow bar with height according to the signal strength, then a filled bar when it is actually decoding the information. Usually after a few seconds, but sometimes up to a minute or two, the hollow bars with reasonable signal strength turn to solid.

If this is the issue, you should get a fix after waiting a while. My camera GPS can take up to 10 minutes to get a fix if I move it to a totally different location and it's been some time since it was last on. If you don't get a fix after sufficient time, then maybe there is local interference.

Olin Lathrop
  • 310,974
  • 36
  • 428
  • 915
  • Yes, it can take a while to achieve a fix initially. The OP should let it run for a while outdoors with a clear view of the sky and see if that eventually gets a fix. – vicatcu Jun 20 '12 at 14:27
  • 1
    Having an up-to-date almanac is also a factor in cold-starting of GPSRs. If your new location is degrees away from your previous one, it can take a long time to solve all those simultaneous equations. Every receiver I've had solves this a different way: my hiking GPS just *asks* you where you are (roughly). My horrible old Windows phone would ask for a net connection to download the almanac from the internet. My current phone just triangulates cell/WiFi signals to get a rough fix while the GPSR is ‘warming up’. Et cetera. This one's a software affair, of course. – Alexios Jun 21 '12 at 00:24
  • The almanac on the American Navstar GPS system takes around 13 minutes to be loaded from the satellites. It is transmitted in a number of data frames that repeat over this time period. The equivalent data in the Russian GLONASS GPS system takes 2.5 minutes to update. – uɐɪ Jun 21 '12 at 06:56
  • Fascinating I never knew older receivers needed to transfer Almanac data - [wikipedia](http://en.wikipedia.org/wiki/GPS_signals#Almanac) has some context. – shuckc Jun 21 '12 at 10:26
  • @Alexios: Actually, your phone probably does more than just cell tower triangulation; it probably downloads an up to date almanac, as well as gets a good, clean time signal, provided by the cell towers. Both are necessary for proper satellite triangulation. – MBraedley Jun 26 '12 at 20:10
3

The number of satellites is not everything.

If you have 4 or more sat in view, but the receiver hasn't yet received the full almanac, the result is exactly what you're seeing. It happens to me often when I play with my GPS indoor...

Axeman
  • 3,498
  • 20
  • 27