Home › Forums › Forums › Technical Support for BerryGPS and BerryGPS-IMU › Problems getting 10hz › Reply To: Problems getting 10hz
Hello,
I have the same issue!
I have a BerryGPS-IMU connected to a Raspberry Pi4; everything works very well. I am using Pyhton code, using your examples. I would like to to increase the NMEA sentence update rate to 10Hz. Nevertheless, I am a little bit confused/lost on how to do it.
Using the FAQ (https://ozzmaker.com/berrygps_imu-faq/) I understand that, when increasing the update rate, I will also need to increase the baud rate
With the basic program provided with the BerryGPS-IMU and using the baudrate of 9600, everything works well and I am able to recored the NMEA frame.
So, to change the baud rate to 115200, I typed the following in a terminal:
echo -e -n “\xB5\x62\x06\x00\x14\x00\x01\x00\x00\x00\xD0\x08\x00\x00\x00\xC2\x01\x00\x07\x00\x03\x00\x00\x00\x00\x00\xC0\x7E” > /dev/serial0
stty -F /dev/serial0 115200
then, from the same terminal, I launched my python program, on which I have changed the line of code, from:
ser = serial.Serial(port, baudrate = 9600, timeout = 0.5)
to:
ser = serial.Serial(port, baudrate = 115200, timeout = 0.5)
It didn’t work; the GPS is working, but the $GNRMC sentence, the time stamp is always every seconds.
So, I tried the following, with minicom. In detail, what I did:
sudo killall gpsd
echo -e -n “\xB5\x62\x06\x00\x14\x00\x01\x00\x00\x00\xD0\x08\x00\x00\x00\xC2\x01\x00\x07\x00\x03\x00\x00\x00\x00\x00\xC0\x7E” > /dev/serial0
echo -e “\xB5\x62\x06\x08\x06\x00\x64\x00\x01\x00\x01\x00\x7A\x12” > /dev/serial0
stty -F /dev/serial0 115200
minicom -b 115200 -o -D /dev/serial0
And minicom is showing me NMEA sentences (below). However, when looking at the $GNRMC sentence, the time stamp is always every seconds; I was expecting a time stamp something like 144941.00; 144941.10; 144941.20; 144941.30, but not 144941.00; 144942.00; 144943.00, etc…
Any idea where I am doing wrong?
Any one expert could confirm me that my step by step actions to increasing the GPS update rate is correct? or point me in the right direction?
Thank you so much!
Sierra-Alpha
$GNRMC,144941.00,A,3249.42406,N,09703.23679,W,0.086,,111020,,,A*70
$GNVTG,,T,,M,0.086,N,0.159,K,A*3E
$GNGGA,144941.00,3249.42406,N,09703.23679,W,1,07,1.08,167.1,M,-25.1,M,,*75
$GNGSA,A,3,29,05,25,02,15,18,13,,,,,,2.89,1.08,2.69*1F
$GNGSA,A,3,,,,,,,,,,,,,2.89,1.08,2.69*1B
$GPGSV,3,1,11,02,32,074,23,05,52,040,27,12,19,194,17,13,34,120,30*7D
$GPGSV,3,2,11,15,32,165,28,18,23,290,28,20,12,236,18,23,09,230,08*72
$GPGSV,3,3,11,25,33,230,21,26,06,318,,29,64,325,34*4E
$GLGSV,1,1,00*65
$GNGLL,3249.42406,N,09703.23679,W,144941.00,A,A*64
$GNGST,144941.00,32,,,,4.6,3.4,10*6F
$GNZDA,144941.00,11,10,2020,00,00*74
$GNGBS,144941.00,4.6,3.4,10.2,,,,*64
$GNRMC,144942.00,A,3249.42400,N,09703.23688,W,0.127,,111020,,,A*71
$GNVTG,,T,,M,0.127,N,0.236,K,A*3E
$GNGGA,144942.00,3249.42400,N,09703.23688,W,1,07,1.08,167.3,M,-25.1,M,,*7C
$GNGSA,A,3,29,05,25,02,15,18,13,,,,,,2.89,1.08,2.69*1F
$GNGSA,A,3,,,,,,,,,,,,,2.89,1.08,2.69*1B
$GPGSV,3,1,11,02,32,074,23,05,52,040,26,12,19,194,17,13,34,120,30*7C
$GPGSV,3,2,11,15,32,165,28,18,23,290,27,20,12,236,18,23,09,230,09*7C
$GPGSV,3,3,11,25,33,230,22,26,06,318,,29,64,325,35*4C
$GLGSV,1,1,00*65
$GNGLL,3249.42400,N,09703.23688,W,144942.00,A,A*6F
$GNGST,144942.00,32,,,,4.6,3.5,10*6D
$GNZDA,144942.00,11,10,2020,00,00*77
$GNGBS,144942.00,4.6,3.5,10.3,,,,*67
$GNRMC,144943.00,A,3249.42393,N,09703.23696,W,0.172,,111020,,,A*72
$GNVTG,,T,,M,0.172,N,0.318,K,A*33
$GNGGA,144943.00,3249.42393,N,09703.23696,W,1,07,1.08,167.5,M,-25.1,M,,*79
$GNGSA,A,3,29,05,25,02,15,18,13,,,,,,2.89,1.08,2.69*1F
$GNGSA,A,3,,,,,,,,,,,,,2.89,1.08,2.69*1B
$GPGSV,3,1,11,02,32,074,20,05,52,040,25,12,19,194,17,13,34,120,31*7D
$GPGSV,3,2,11,15,32,165,28,18,23,290,28,20,12,236,18,23,09,230,08*72
$GPGSV,3,3,11,25,33,230,21,26,06,318,,29,64,325,35*4F
$GLGSV,1,1,00*65
$GNGLL,3249.42393,N,09703.23696,W,144943.00,A,A*6C
$GNGST,144943.00,34,,,,4.6,3.5,10*6A
$GNZDA,144943.00,11,10,2020,00,00*76
$GNGBS,144943.00,4.6,3.5,10.3,,,,*66
$GNRMC,144944.00,A,3249.42390,N,09703.23700,W,0.026,,111020,,,A*78