gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] Passing metadata through gpsd


From: Ed Simmons
Subject: Re: [gpsd-users] Passing metadata through gpsd
Date: Tue, 15 Apr 2014 07:31:57 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

Hi Roy,

On 15/04/14 04:39, Roy Barkas wrote:
Some time ago Eric said that it is possible to pass metadata through gpsd and have the metadata appear as (I hope) an element of the gpsd json output.

I now need to implement this in order to pass some ais message metadata through to the end user.

The AIS messages that I receive are wrapped in a non-standard format that includes some info that I need to preserve and pass along.

If I was correct that this is possible, how can I do it? It isn't obvious to me how I should go about packaging the desired metadata and sending it to gpsd so that it comes out the other end.

Cheers;

RoyHB

p.s.: The split24 functionality that was released with 3.9 works beautifully - thanks for adding it.
It's some time since I played with the innards of GPSD...

What I did was to add to the parser so that the data of interest is understood by GPSD itself, then modify the json code to be aware of these new variables that are collected by the parser.

packet.c contains the state machine for understanding the packets.

I added the variables I needed to struct attitude_t in gps.h as this was the appropriate place for my attitude related data to be stored.

You would need to ensure the packet sniffer correctly identifies your messages and hands them on to driver_ais.c - here you'd need to add the code to parse the data you want and store it.

In gpsd_json.c you would then need to add appropriate code to output your newly added variables contents...

I hope that helps... I'm a little rusty on this, thanks to our SVN I can tell you what I did!

Best,
Ed




reply via email to

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