gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] Getting fixes without polling


From: Lisandro Damián Nicanor Pérez Meyer
Subject: Re: [gpsd-users] Getting fixes without polling
Date: Thu, 02 Feb 2017 14:44:41 -0300
User-agent: KMail/5.2.3 (Linux/4.9.0-1-amd64; KDE/5.28.0; x86_64; ; )

On jueves, 2 de febrero de 2017 14:34:56 ART Lisandro Damián Nicanor Pérez 
Meyer wrote:
> On miércoles, 1 de febrero de 2017 10:23:17 ART Gary E. Miller wrote:
> > Yo Lisandro!
> 
> Yo Gary!
> 
> > On Wed, 01 Feb 2017 10:57:31 -0300
> 
> [snip]
> 
> > > > Lisandro Damián Nicanor Pérez Meyer <address@hidden> wrote:
> > > > > Is there any way to get fixes without the need to poll? I guess
> > > > > dbus might help here, but...
> > > > 
> > > > Open the gpsd port, 2947, and tell it to stream JSON at you.
> > > 
> > > I think that's what I'm doing:
> > > 
> > > result = gps_open("localhost", 37455, &mGPSData);
> > > [check result...]
> > > result = gps_stream(&mGPSData,WATCH_ENABLE|WATCH_JSON, NULL);
> > > [check result...]
> > 
> > No, you are using libgps, a big layer of complexity.  I'm saying just
> > use fopen() and then wait on a select().
> 
> Ah, you mean handling the connection myself. If I'm right I have to somehow
> send the right JSON to gpsd and then get the data and use gps_unpack to
> parse it into the struct gps_data_t, right?
> 
> If I'm right: is there an API to create the right JSON to correctly connect
> to gpsd? Or I need to manually craft it?

gps_data_t has gps_fd, so I can use gps_open and then handle the rest myself. 
I think.

-- 
Sobre Argentina: "sé que es uno de los países mas hospitalarios del mundo"
 Albert Einstein

Lisandro Damián Nicanor Pérez Meyer
http://perezmeyer.com.ar/
http://perezmeyer.blogspot.com/

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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