GPS update rate Raspberry pi Jessie Vs. Wheezy

604 Views Asked by At

I have scoured the internet to this problem and am unable to find any kind of answer. Here is the gist of the project and what I have done so far

Project: Our school participates in sounding rocket competitions. I am in charge of payload and part of our payload includes GPS. Our rocket goes up to 2 miles and does not break the sound barrier

GPS module: Adafruit ultime GPS breakout

Raspberry Pi Model: B+ or 2 (we have access to both)

Problem: Since the rocket travels very quickly (arroximately 700-800 ft/s) we need the GPS to update at a faster rate than once per second (default rate). I have 2 raspberry pi's that both use GPSD daemon, and a personal python script. The problem lies within: With debian Wheezy, I can set the update rate from the bash with the following commands

"echo -e "\$PMTK251,57600*2C\r\n" > /dev/ttyUSB0" - updates baudrate

"echo -e "\$PMTK220,200*2C\r\n" > /dev/ttyUSB0" - updates NMEA sentences

"stty -F /dev/ttyUSB0 57600 clocal cread cs8 -cstopb -parenb" - updates baudrate of raspberry pi

On debian Wheezy these commands work and I get GPS coordinates at a rate of 5 times per second. - no problem.

The other pi uses Debian Jessie, which when I run the exact commands they do not work and the GPS unit continues to update at its default rate of once per second.

I am very confused as to why it will work on Wheezy but on Jessie it refuses to cooperate.

Some additional info: - We communicate over USB0, (not AMA0) - Jessie natively does not support GPS functions and one has to manually change how to listen to GPS chips (wheezy natively supports this and no changes are necessary), - we are using full Jessie (not lite). - When I change the baud rate of the Pi Jessie, and I follow up to see what its set at (using: stty -F /dev/ttyUSB0 -a) it tells me the baud rate is whatever the new value i gave it (i.e./ 57600).

So i believe the problem lies with setting the actual GPS units baud rate/NMEA sentencing

I think I have included all pertinent information but if I left something out I apologize and can clarify anything that isn't clear enough.

Any help would be greatly appreciated since we would like to upgrade to Jessie (other chips and programs that we incorporate on the sounding rocket run smoother with Jessie) but the GPS is a major reason not to.

1

There are 1 best solutions below

0
On

I realize that this is an old thread, but since I ran into the same problem I will post my solution so that it possibly may help someone else.

I have a Raspberry 3 B+ running Raspbian Stretch, Adafruit Ultimate GPS attached to ttyAMA0. For RPi3 the bluetooth module needs to be disabled by adding the following line to /boot/config.txt:

dtoverlay=pi3-disable-bt

Anyway, I have previously been able to program the GPS module by echo commands, as described above. However, no success this time. Finally I managed to program it by installing the terminal program CuteCom.

Start the program, change the baud rate under settings, and press Open. The NMEA sentences should then appear in the lower part of the window. Make sure that the line end termination is set to CR/LF, and give the input command directly without hyphens or line terminations. For example to change the baud rate to 57600 write:

$PMTK251,57600*2C

The connection then have to be closed, the baud rate changed accordingly and then opened again. I noticed that sometimes the command needs to be repeated before the change takes place. If the backup battery is installed on the GPS module the settings are kept when power is lost.