TrackFlow movement/timing

Hi, I’m using a GPS simulator to drive our ‘vehicle’ – with it, I can set the initial position (as Lat/Lon), speed & direction. The simulator is treated as an “external GPS”. Our goal is to set the collection ‘rate’ based on our speed. Could the notecard use the NMEA “GPVTG” field to determine speed (possibly determining the “Seconds” field?

J *req = NoteNewRequest(“card.location.mode”);
if (req != NULL)
{
//
// how often tracks (_track.qo) are created – update with time

JAddStringToObject(req, "mode", "periodic");
JAddIntToObject(req, "seconds", 60);		// change this value based on speed.
success = NoteRequest(req);

}
Here are the track mode settings/command … the heartbeat is currently set at 5 minutes.

J *req = NoteNewRequest("card.location.track");
if (req != NULL)
{
	JAddBoolToObject(req, "start", true);
	JAddBoolToObject(req, "heartbeat", true);
	JAddBoolToObject(req, "sync", true);
	
	JAddIntToObject(req, "minutes", 5);	// alway update at this rate (minus for seconds)
	JAddStringToObject(req, "file", "_track.qo" );
	
	J *rsp = NoteRequestResponse(req);
}

At powerup, with the GPS simulating “moving”, in Notehub, I get one ‘body’ showing .. movement.

“body”: {
“distance”: 56.366486,
“dop”: 1.0996094,
“jcount”: 3,
“journey”: 1752511756,
“seconds”: 7,
“temperature”: 25.625,
“time”: 1752511779,
“velocity”: 8.052356,
“voltage”: 5.1328125
},

From then on, I just get ‘heartbeat’ feedback .. without any change in speed

“body”: {
“status”: “heartbeat”,
“temperature”: 25.4375,
“time”: 1752511779,
“voltage”: 5.2070312
},

So, my questions ..

  1. How does the Notecard determine “movement” – that would trigger a collection vs heartbeat event?
  2. Could the Notecard accept & use the “GPVTG” NMEA sentence for speed?
  3. What “card.location.mode” timing values would you suggest for the ‘fastest’ and ‘slowest’ vehicle settings?
  4. Our ‘actual’ GPS feed may have an update rate slower that 1Hz – is that OK?
  5. Can I assume that the “accelerometer” is not relevant for external GPS?
  6. Our external GPS is run at 38,400 baud? That appears to be working OK - if not, we could slow it down.

As always, thanks for the help

regards, Rich ..

Hi @richf

This is a really cool application and testing technique. As of right now, the Notecard doesn’t use the GPVTG field and only makes use of the GGA and RMC NMEA sentences. Perhaps the closest thing to what you are trying to achieve is to use the Notecard’s accelerometer via card.motion.mode and card.location.mode (specifically the threshold field).

To answer your specific questions:-

How does the Notecard determine “movement” – that would trigger a collection vs heartbeat event?
[YS] The Notecard uses its onboard accelerometer to determine movement. When motion is detected and card.motion.mode is configured, this can trigger a location collection event. You can fine-tune the motion sensitivity and duration to suit your application.

Could the Notecard accept & use the “GPVTG” NMEA sentence for speed?
[YS] At the moment, the Notecard only parses the GGA and RMC NMEA sentences. GPVTG is not currently supported or used to determine speed or trigger behaviour.

What “card.location.mode” timing values would you suggest for the ‘fastest’ and ‘slowest’ vehicle settings?
[YS] The best values here will depend on your specific use case and what level of detail or latency you’re targeting. Testing is key here as this is all relative. As a starting point, you can maybe set a value of 10 for a fast-moving vehicle. For slower or stationary assets, seconds: 300 or longer is often fine. You can fine tune these values later on and can even have them to be configurable via Notehub.

Our ‘actual’ GPS feed may have an update rate slower than 1Hz – is that OK?
[YS] Yes, that’s acceptable. The Notecard buffers incoming GPS NMEA sentences and processes them as they arrive.

Can I assume that the “accelerometer” is not relevant for external GPS?
[YS] The accelerometer is still relevant when using an external GPS. Whether you’re using the onboard or external GPS, the Notecard continues to use its internal accelerometer for motion detection. This helps enable features like conditional tracking or syncing only when motion is detected, regardless of where the location data originates.

Our external GPS is run at 38,400 baud? That appears to be working OK - if not, we could slow it down.
[YS] Our recommendation is to use 9600 baud, as this is what we test and document. If everything is stable, you’re likely fine to continue, but do keep this in mind if you run into odd behaviour.

If you haven’t done so already, I also recommend checking out our Asset Tracking Guide. It focuses on the Notecard’s internal GPS but covers many of the concepts that still apply when using an external GPS (especially around tracking and motion-based sync behaviour). In fact, for dynamic and mobile environments, using an external GPS is usually preferred, since it allows the Notecard to use cellular and GPS at the same time.

Let me know if this answers your questions or if there’s anything else we can help with.

Thanks
Youssif

2 Likes

Hi Youssif,
Thx a lot for the quick response and information. It turns out that I had not enabled the accelerometer .. once that was done (with suggested/default settings), I was able to collect the track points as expected.

regards, Rich ..

1 Like