Arduino Mega + SIM28 GPS

I'm using sample code to dump out specifically MPH from GPS. It works but the refresh is too slow to keep up. IE: I could be driving and speed up and it lags about 5-10mph and starts catching up.

The GPS I'm using is the Grove GPS with a SIM28 with a default baud rate of 9600. When I use the NeoGPS "NMEAdiagnostic", it returns data saying the baud rate is 9600. If I force it to anything over 9600, I get no data/garbage data.

I used some sample code and am only dumping MPH. How do I get a MUCH QUICKER refresh rate? This thing does 10hz so I would like at least 5hz update at minimum.

#include <NMEAGPS.h>


#include <GPSport.h>

#define gpsPort Serial2

NMEAGPS  gps; // This parses the GPS characters
gps_fix  fix; // This holds on to the latest values

void setup()
{
  DEBUG_PORT.begin(9600);
  while (!Serial)
    ;
  DEBUG_PORT.print( F("NMEAsimple.INO: started\n") );

  gpsPort.begin(9600);
}

//--------------------------

void loop()
{
  while (gps.available( gpsPort )) {
    fix = gps.read();
    DEBUG_PORT.println("MPH=" +  String(fix.speed_mph()));
  }
}

A have an Ardusimple simpleRTK2B based GPS system and it only updates every second. You may want to check on how fast your receiver can transmit updates. Just to clarify, I don't mean how fast it can send data (baud rate), I mean it may only be able finish calculating data and then send that data every 10Hz in your case.

I dunno.

Looking for someone who has experience with this GPS / Library to see if I'm missing enabling something etc.

You can do it without using any GPS library. It's pretty straight forward and you will have more control over the processes.

Not really sure what to reply with. lol

Anyone else:
Am I missing something obvious in my sample code that isnt enabling 5hz or 10hz which would allow MUCH QUICKER updates to my speedo?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.