Ultimate GPS - Speed value delay

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
NatePiVision
 
Posts: 7
Joined: Wed Nov 09, 2016 8:09 am

Ultimate GPS - Speed value delay

Post by NatePiVision »

Hi Everyone,

I'm using the Adafruit Ultimate GPS with a Raspberry Pi 3 and a C++ application I've written with the gpsmm.h library. Application works well getting data, however I have 1 hz limitation which I've outlined here:

viewtopic.php?f=31&t=106208

But more of an issue is the long delay in the speed value in the gps_struct that is returned. To me it appears to be a 1 minute average or longer, but I cannot verify this. Is it possibly this can be changed with any of the PMTK or other commands? The delay is much to large for my application, I need relatively instantaneous (~10 second average or less would due fine) speed.

Thanks,
-Nate

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

Re: Ultimate GPS - Speed value delay

Post by Franklin97355 »

If you are reading the raw data does the speed value change faster? How fast are you moving when you are testing this?

User avatar
NatePiVision
 
Posts: 7
Joined: Wed Nov 09, 2016 8:09 am

Re: Ultimate GPS - Speed value delay

Post by NatePiVision »

It's in my car, so I'm going anywhere from 0-80 mph. It's definitely accurate, usually within 2 mp of my speed, but only after ive been going a constant speed for a few minutes, and I'm looking directly at the raw data. Also it is updating once a second and the number isn't stale. It lags slowing down and speeding up.

I didn't time it to see how long it took because I assumed it was a default time average, but are you saying this value as is should be instantaneous?

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

Re: Ultimate GPS - Speed value delay

Post by Franklin97355 »

You might try experimenting with some of the settings. Packet 314 may do something and the update rate and baud rate can change things. When changing the update rate or baud rate the other value must be set to support it first. For example to increase the update rate the baud rate needs to be fast enough to support the data transfer. The PMTK codes are in here.

User avatar
NatePiVision
 
Posts: 7
Joined: Wed Nov 09, 2016 8:09 am

Re: Ultimate GPS - Speed value delay

Post by NatePiVision »

Yeah, I didn't want to improve the poll rate but as you can see by the other thread I'm stuck on that too. I do not understand how other people are sending the PMTK messages. I am sending them with gpsmm.h's gps_send() function, which returns successful, but I see no change in behavior.

However, I have not yet changed 314. I guess I should set the 'supported frequency setting' to 1, so it allows an output every fix, maybe by default it is higher and the fixes are just not coming fast enough? But I'm confused by the NMEA sentence I want, is the default -1 as shown below?

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

Re: Ultimate GPS - Speed value delay

Post by Franklin97355 »

Using our library you would do this:

Code: Select all

  GPS.begin(9600);
  
  // uncomment this line to turn on RMC (recommended minimum) and GGA (fix data) including altitude
  GPS.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCGGA);
  // uncomment this line to turn on only the "minimum recommended" data
  //GPS.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCONLY);
  // For parsing data, we don't suggest using anything but either RMC only or RMC+GGA since
  // the parser doesn't care about other sentences at this time
  
  // 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

  // Request updates on antenna status, comment out to keep quiet
  GPS.sendCommand(PGCMD_ANTENNA);
you might ask the author about that library's usage if there is no example code.

User avatar
NatePiVision
 
Posts: 7
Joined: Wed Nov 09, 2016 8:09 am

Re: Ultimate GPS - Speed value delay

Post by NatePiVision »

This library?

https://github.com/adafruit/Adafruit_GPS

I'll have to give that a try instead of the gpsmm libraries that I've been working with. Thanks

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

Return to “Arduino Shields from Adafruit”