sixfab / Sixfab_RPi_3G-4G-LTE_Base_HAT

MIT License
10 stars 11 forks source link

No satellite data available, and when available crash. #1

Closed kashalls closed 3 years ago

kashalls commented 3 years ago

Using the Raspberry Pi Cellular Hat, running GPS.py encounters the following:

$GPGSV,4,1,16,02,23,182,34,06,47,144,29,13,08,208,36,17,51,045,29,1*6B
$GPGSV,4,2,16,19,75,026,28,24,50,289,31,01,,,,03,01,060,,1*56
$GPGSV,4,3,16,12,22,293,,14,23,094,,15,09,243,,22,,,,1*5E
$GPGSV,4,4,16,28,32,088,,30,,,,32,,,,46,,,36,1*5D
$GPVTG,,T,,M,,N,,K,N*2C
$GPGSA,A,1,,,,,,,,,,,,,,,,*32
$GPGGA,,,,,,0,,,,,,,,*66
$GPRMC,,V,,,,,,,,,,N,V*29

No satellite data available.

$GPVTG,,T,,M,,N,,K,N*2C
$GPGSA,A,1,,,,,,,,,,,,,,,,*32
$GPGGA,,,,,,0,,,,,,,,*66
$GPRMC,,V,,,,,,,,,,N,V*29

No satellite data available.

$GPGSV,4,1,13,02,28,184,34,06,52,140,29,12,20,296,28,13,12,209,36,1*67
$GPGSV,4,2,13,14,24,091,26,17,47,039,30,19,70,016,28,24,48,296,31,1*64
$GPGSV,4,3,13,30,03,147,27,03,,,,15,11,244,,28,32,084,,1*54
$GPGSV,4,4,13,46,,,35,1*62
$GPGGA,010802.94,3605.317982,N,11902.534195,W,1,09,1.0,109.8,M,-17.0,M,,*59
$GPVTG,,T,345.8,M,0.0,N,0.0,K,A*07
$GPRMC,010802.94,A,3605.317982,N,11902.534195,W,0.0,,100221,14.2,E,A,V*40
-----Parsing GPRMC-----
Traceback (most recent call last):
  File "GPS.py", line 66, in <module>
    parseGPS(data)
  File "GPS.py", line 31, in parseGPS
    checksum = dc[1]      #checksum
IndexError: list index out of range

I have not been able to get this HAT working at all for the whole day that I have had it today. This hat is in clear line of the sky. No obstructions around it for 3 feet.

hiagofranco commented 3 years ago

Hello!

You need to change "degreeChecksum = sdata[12]" to "degreeChecksum = sdata[13]" in GPS.py . Or you can view my pull request here: https://github.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_HAT/pull/2/commits/cfecddb942c6bd983689554ae9150e22d240dd0b Where I fixed this error.

Best regards