gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] Where should I start from?


From: Gary E. Miller
Subject: Re: [gpsd-users] Where should I start from?
Date: Fri, 14 Jun 2019 18:36:11 -0700

Yo raaj!

On Sat, 15 Jun 2019 09:18:34 +0800
raaj lokanathan <address@hidden> wrote:

> Let me just recap for my own understanding. Correct me if I am wrong.

I suggest that you run gpsd with a high debug level and watch it
work.
 
> 1. the gpsd.c runs first in a tight loop waiting for input from
> packet.c

Nope.  gpsd.c runs in a tight loop waiting for input from many
things: GPS, PPS, NTRIP, clients, etc.

Data from the GPS gets sent to packet.c

> 2. packet.c get the GPS sensor data and pack it up

Nope.  packet.c just takes the single chars as they come in and
puts them into single sentences.  If it can determine the packet
type it sends the sentence to the correct driver.

> 3. it sends the packets in the form of structures to the
> libgps_core.c and libgpsd_core send it to the respective driver

Nope.  The driver returns structures to the main loop which sends
the to libgpsd_core.c for deciding when to send them to 
libgpsd_json.c for outputting.

> 4. the driver.c processes and pass it to (ex: driver_geostar.c) to
> decode the message before sending it to the gpsd client

Nope.  No such file as driver.c.  drivers.c nostly sets up structures
used elsewhere to dispatch to the proper driver.

> 5. the output is passed in the form of the JSON format. gps_json.c
> formats the data.

Nope. gpsd_json.c just converts from JSON back to structures like
gpsd_data_t.  Formatting is only done in clients.

> It would be great if there is a visualization such as drawing of the
> flow.

Maybe.  Veryu few would need it.  Not at all required to write a
driver.  Feel free to contribute one to us.

> Now, I need to understand the final part of how these extracted
> data will be sent to the gpsd client.

Nope.  You do not need to understand.  That is what libgps.a is for.
Just use it.  But that is for clients.  Are you also writing a client?

> SO now I believe it sends as
> JSON output if I am not mistaken.

Yup.  JSON is the primary output.  But the client can request NMEA or
raw binary as well.  No need to understand that, just use one of the
exiting clients.

What GPS do you intend to write a client for?  Then I can suggest a
driver for you to just copy and tweak.

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: pgpdUimNCbHZ5.pgp
Description: OpenPGP digital signature


reply via email to

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