gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] decode antenna status in the daemon, how to get it to t


From: Gary E. Miller
Subject: Re: [gpsd-users] decode antenna status in the daemon, how to get it to the clients ?
Date: Tue, 12 Sep 2017 18:18:15 -0700

Yo tom!

On Tue, 12 Sep 2017 12:07:04 +1000
tom <address@hidden> wrote:

> I looked at driver_ubx_c and i do find that there is a good spot to
> handle the message
[...]
> and added a unsigned int ant_status in the ubx driver:

Can you submit this as a patch?

> and this works.. it picks up the values of the Antenna correctly.

[...]

Cool.

> How would i go about forwarding this antenna status back to the
> gpsd-lib client ?

just add ant-status as a variable in the SKY JSON message.

Here is a SKY mesaage right now:

2,"climb":-0.005,"eps":1.52,"epc":121.90}
{"class":"SKY","device":"/dev/ttyUSB0","xdop":1.34,"ydop":2.06,"vdop":2.65,"tdop":2.49,"hdop":2.49,"gdop":4.41,"pdop":3.64,"satellites":[{"PRN":10,"el":62,"az":59,"ss":19,"used":true},{"PRN":14,"el":57,"az":202,"ss":23,"used":true},{"PRN":18,"el":35,"az":82,"ss":13,"used":true},{"PRN":21,"el":13,"az":139,"ss":26,"used":true},{"PRN":27,"el":27,"az":221,"ss":22,"used":true},{"PRN":31,"el":3,"az":169,"ss":26,"used":false},{"PRN":32,"el":75,"az":190,"ss":21,"used":true},{"PRN":138,"el":37,"az":160,"ss":27,"used":true}]}

I would just add this after pdop:

        ,"ant":0

The new code would be just after gpsd_json.c line 289.  Something like:

    if (isnan(datap->ant_status) == 0)
        str_appendf(reply, replylen, "\"ant\":%d,", datap->ant_status);

Then something similar in the decoder.



RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin

Attachment: pgpTV7tvYF5T4.pgp
Description: OpenPGP digital signature


reply via email to

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