[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-users] Communicating NMEA to gpsd as if my software was a GPS devi

From: Ellon Paiva
Subject: [gpsd-users] Communicating NMEA to gpsd as if my software was a GPS device
Date: Wed, 4 Sep 2019 10:34:58 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0


I'm working in a project where some clients are already configured to get localization data from gpsd. I'm in charge of creating a piece of software that would communicate with gpsd as if it was a GPS device, so these clients would be able to get this information from the same gpsd client interface, and in a frequency slightly higher than 1Hz.

Based on gpsd manual pages, it was decided my "GPS device" would communicate to gpsd through UDP or TCP feed using NMEA sentences. The sentences are:
  • GGA for time, lat, lon
  • ZDA for date, as gpsd expects the date to be informed to be able to use GGA
  • GST for error ellipses
  • VTG for linear speed
  • OHPR for attitude, acceleration and angular speed
This would translate into the following objects being sent to gpsd clients as json reports:
  • TPV
  • ATT
  • GST
So at the end I want something like this:
+-------------------------+  ZDA   +------+  TPV   +--------------+
| my simulated GPS device | -----> | gpsd | -----> | gpsd clients |
+-------------------------+  GST   +------+  GST   +--------------+
                             VTG             ATT

I have a first implementation of this idea, but I'm facing some problems which I would like to discuss. For information, I'm using gpsd-3.17 installed from Fedora 29 default repositories. I'm attaching some log files to help understand the problems.
  1. The time in the GST reports seems to be off and floating with relation to the time in the TPV reports, which seems to be according with the data sent. Does anyone know why I have this behavior?
  2. It seems that OHPR is not being properly parsed as a NMEA sentence by gpsd (there is no ATT output for gpsd clients). I tried to follow logic used by the state machine decode the sentence but it proved to be very hard... Anyone could confirm this parse bug or tell me what am I doing wrong?
  3. man gpsd tells that VTG is supported, but when I looked at the code of gpsd-3.17 it seems that it was not (I found a
    {"VTG", 0,  false, NULL},    /* ignore Velocity Track made Good */
    line on driver_nmea0183.c), although there are other parts of the code that mention VTG. So, is VTG supported on this version or not? and if it is, how can I get it to be used to generate json reports?
  4. In general, what would be a good set of NMEA messages to pass all the information I need to gpsd?



Attachment: logs.tar.gz
Description: application/gzip

reply via email to

[Prev in Thread] Current Thread [Next in Thread]