Changing Ultimate GPS logging frequency

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
sqaure
 
Posts: 26
Joined: Thu Sep 19, 2013 12:01 pm

Changing Ultimate GPS logging frequency

Post by sqaure »

It is advertised that it can do 10Hz logging.
https://www.adafruit.com/product/746

But from following the gps install guide for a raspberry pi it seems to output 1Hz by default.

Can I increase the sampling rate?

Thanks!

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: Changing Ultimate GPS logging frequency

Post by Franklin97355 »

You can increase the sample rate by using the code in your program by adding the line

Code: Select all

 // Set the update rate
  GPS.sendCommand(PMTK_SET_NMEA_UPDATE_1HZ);   // 1 Hz update rate
  // For the parsing code to work nicely and have time to sort thru the data, and
  // print it out we don't suggest using anything higher than 1 Hz
The #defines are in the Adafruit_GPS.h file:

Code: Select all

#define PMTK_SET_NMEA_UPDATE_1HZ  "$PMTK220,1000*1F"
#define PMTK_SET_NMEA_UPDATE_5HZ  "$PMTK220,200*2C"
#define PMTK_SET_NMEA_UPDATE_10HZ "$PMTK220,100*2F"

User avatar
sqaure
 
Posts: 26
Joined: Thu Sep 19, 2013 12:01 pm

Re: Changing Ultimate GPS logging frequency

Post by sqaure »

This appears to be in C. The code posted here is in python:
https://learn.adafruit.com/adafruit-ult ... g-your-gps

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”