On Wed, Feb 6, 2013 at 1:28 PM, Eric S. Raymond
<address@hidden> wrote:
Roy Barkas <address@hidden>:
> My proposal is to add a feature to gpsd that will allow metadata to be
> transparently passed through gpsd so that it can appear on the translated
> output
> along with the AIVDM data.
>
> One way to do this would be to allow the gpsd input to take an alternative
> form in addition to the current text string format.
> For instance, gpsd could interpret an AIVDM string in the way it currently
> does, or alternatively it could accept a json string
> that contained (for example)
>
> {
> "payload":"the AIVDM string",
> "datetime":"2013-01-23 23:00:04"
> "satellite":"24B"
> }
You're overcomplicating things, I think. Nothing prevents us from
simply adding the JSON for the metadata to the AIVDM string as an
additional field. The only new gpsd rule would be that if you see a
trailing field beginning with '{' you treat it as JSON to be passed
through to the client and ignore additional field separators until the
balancing }.
> It might be wise to enforce some naming convention on the added data
> elements to avoid collisions with native
> gpsd names - perhaps the names could require 2 starting underscores - i.e.
> "__datetime" or some such mechanism.
A detail.
None of this would be difficult.
--
<a href="" href="http://www.catb.org/~esr/" target="_blank">http://www.catb.org/~esr/">Eric S. Raymond</a>