eelcocramer / node-gpsd

Node.js gpsd client for GPS tracking device.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Listening interval

jonathanwiesel opened this issue · comments

Great module, I'm using it inside an RPi and works great.

Is there a way to listen for gpsd sentences every few seconds instead of every second or maybe configure gpsd for such task. I'm storing that data and the database could get kind of big, if I could set it every 5 seconds would be great.

Hi. Thanks for using the node-gpsd module. Its great to get feedback!

There is no way to configure a sample rate in gpsd itself. I had a similar problem as you are facing and decided to just drop a few messages (9 in my case as I wanted a sample rate of only 1 message every 10 seconds).

Yep. I implemented a solution very similar to that at the end with a counter variable.

Thank you.