Home › Forums › Forums › Technical Support for BerryGPS and BerryGPS-IMU › Problems getting 10hz
Tagged: GPS 10 Hz Rate increase
- This topic has 4 replies, 3 voices, and was last updated 2 years, 2 months ago by pitickler.
- AuthorPosts
- August 22, 2020 at 10:23 am #16105piticklerParticipant
Hi, I’ve spent ages going round in circles on this one. Any advice appreciated!
Goal: To power the pi on, and gpsd to be automatically configured for 10hz rate.
What does seem to work: Following the page to configure ser2net, and setting baud+rate via U-Center. Then disconnecting, starting gpsd. However this seems to only last until I disconnect power from the Pi?
What doesn’t work: Everything else! I’ve tried the echo commands on the FAQ to set baud, rate. Tried gpsctl -c 0.1 -b 115200. Tried stopping/starting gpsd. It seems to stay at 1 update per second.
Any advice most welcome – I appreciate it’s a little bit of an open ended question but my attempted analysis is reaching a dead end.
August 22, 2020 at 8:23 pm #16106piticklerParticipantRight all this seems to be down to trying to use gpsd as well…
As I as only doing “gpspipe -r” to file I’ve dumped it in favour of cat /dev/serial0 to file, and it seems to be hanging together with the FAQ commands running on start-up.
December 22, 2020 at 8:43 am #16505Sierra-AlphaParticipantHello,
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 115200then, 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/serial0And 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*78December 22, 2020 at 2:04 pm #16506Mark WilliamsKeymasterWhat you are doing above is correct.
I just tested, using your commands;
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
And did a cat on serial0, filtered on RMC and it works.
pi@raspberrypi:~ $ cat /dev/serial0 | grep RMC $GNRMC,025842.80,A,3346.79368,S,15106.72506,E,0.116,,221220,,,A*71 $GNRMC,025842.90,A,3346.79367,S,15106.72505,E,0.023,,221220,,,A*7B $GNRMC,025843.00,A,3346.79368,S,15106.72507,E,0.182,,221220,,,A*74 $GNRMC,025843.10,A,3346.79366,S,15106.72504,E,0.073,,221220,,,A*77 $GNRMC,025843.20,A,3346.79367,S,15106.72505,E,0.091,,221220,,,A*78 $GNRMC,025843.30,A,3346.79366,S,15106.72502,E,0.033,,221220,,,A*77 $GNRMC,025843.40,A,3346.79367,S,15106.72502,E,0.117,,221220,,,A*76 $GNRMC,025843.50,A,3346.79366,S,15106.72501,E,0.105,,221220,,,A*76 $GNRMC,025843.60,A,3346.79367,S,15106.72501,E,0.237,,221220,,,A*76 $GNRMC,025843.70,A,3346.79366,S,15106.72500,E,0.179,,221220,,,A*7E $GNRMC,025843.80,A,3346.79366,S,15106.72499,E,0.215,,221220,,,A*79
Is gdps still running in the background? try and kill it first
sudo killall gpsd
Mark --OzzMaker.com --
March 11, 2021 at 1:04 am #16638piticklerParticipantHello, I have the same issue!
Did you fix your problem? I think I fixed this by having a repeated message send until I received an acceptable response. Scheduling this to run automatically varied in success vs running the commands manually one off. This seems to be working correctly for me now. Let me know if you want me to check my code.
- AuthorPosts
- You must be logged in to reply to this topic.