High Frequency GPS updates

TL;DR: need to sync positions of my fleet every 1 or 2 seconds.

So I’ve been back and forth in the docs and attempts to make the GPS work the way I wanted/expected. I want to confirm this here if possible.

My use case is to read a position every 1 or 2 seconds, so the Notecard GPS would need to be able to do so. Between calls of {“req”: “card.location.track”, “start”: true} and subsequent {“req”: “card.location”} calls, it seems like the Notehub behaves like:

  1. Enable tracking
  2. Get a fix/postion
  3. Disable/idle GPS

I couldn’t find anything in the documents that would clearly direct me. Can you please help me clarify what can I do here? Is the Notehub not suitable for this frequency?

Thanks,
H. Cabral

Hi @hcabral and welcome to the Blues community!

When you consider using Notecard for both cellular and GPS service, it’s important to remember that they cannot both be enabled simultaneously. It’s also important to note that the GPS location will not update if the Notecard doesn’t sense any motion with its onboard accelerometer (it’s a nifty battery-saving technique). If you haven’t read it yet, I’d read our short guide on diagnosing GPS issues.

TL;DR: need to sync positions of my fleet every 1 or 2 seconds.

You can gather and store, but not gather AND sync, positions of your fleet every 1-2 seconds. You can get the location, store it on Notecard, then sync that data every 30+ minutes. If you need to both gather AND sync, you’ll have to use a separate external GPS. Here’s a good blog post that covers that topic.

If you want to perform the former (gather and store frequently), you can set the card.location.mode’s mode argument to continuous. Just note that every time the Notecard switches over to transmit data over cellular, it’ll take a minute or so to bring down the GPS and bring up the cellular connection (and back again).

A lot of this is also covered in our Asset Tracking with GPS guide too.

Hope that helps!
Rob

Hi @RobLauer, thanks for your response.

Yes, what you says matches with what I slowly found out, I just wish that this information was slightly more obvious or upfront in the documentation. The accelerometer functionality is nice for asset tracking, indeed, but my use case is more sailing/regatta related, so almost-real-time is what I need.

Moving forward with my proof of concept, I will study more the note/sync mechanism. I anticipate needing to sync each device every 5 to 10 seconds, and I could expect to have anything from 20 to 400 devices in the same area, calling syncs to Notehub, so I need to make sure that cost and capacity would work for me.

Best regards,
Henrique

Hi @hcabral,

We’re always looking to improve our documentation, so we’ll take a close look at how we relay this info going forward!

If you’re syncing with the cloud every 5-10 seconds, you’ll definitely want to utilize an external GPS (and keep your Notecards in continuous mode to maintain their cellular connections with Notehub).

Thanks,
Rob

1 Like

Thanks @RobLauer!

I’m prototyping with a Pi 2 W. Just trying to figure out my connections, shouldn’t I be able to connect the Notecarrier X to my Pi using Qwiic/I2C? Thus I could follow the blog post idea where the AdaFruit GPS is connected to the Notecarrier via serial aux, and the Pi would simply read the i2c connection (as it does now) and send the requests to the Notecard.

Thanks,
Henrique

Hi @hcabral,

Due to numerous clock-stretching issues on the Pi, I’d recommend connecting the Pi 2 W to your Notecarrier X over serial TX/RX instead of I2C. You can still connect to the Adafruit GPS receiver over AUXTX/AUXRX then too.

Rob

Hi Rob,

Got it, it makes sense. I will try the RX/TX simple serial comm with the Pi. So if the GPS will use AUXRX/AUXTX, setting up the RX/TX between the Notecarrier and the Pi 2 W, I would need to setup the card comm interface via which API? card.io, card.aux?

Thansk!
Henrique

Hi @hcabral,

No Notecard APIs required to use a serial interface, it’s all in firmware. Here is an example using the note-python SDK: note-python/examples/notecard-basics/serial_example.py at main · blues/note-python · GitHub

Thanks,
Rob

1 Like

Sounds good! Thanks, will proceed with some more tests. =)

1 Like