[Top][All Lists]

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

Re: [gpsd-dev] Example code for libgps using shared memory

From: Gary E. Miller
Subject: Re: [gpsd-dev] Example code for libgps using shared memory
Date: Wed, 8 Nov 2017 10:46:04 -0800

Yo David!

On Wed, 8 Nov 2017 21:12:46 +0800
David Huichen Dai <address@hidden> wrote:

> Below is my code. However, I am unable to obtain the coordinates. How
> do I achieve this?

Your code was corrupted by your emai client.  I cleaned it up, fixed
a warning.  Works for me.  See attached.

My gpsd is built locally from git head.

My gpsd is started this way: gpsd -n /dev/ttyS0

cgps says I have a good fix.

Here is how I built and ran it.  Sorry for the run together:

# gcc test.c -lgps -o test
# ./test
latitude: 44.068688, longitude: -121.314101, speed: 0.392819,
timestamp: 1510166605.000000


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: test.c
Description: Text Data

Attachment: pgpdIU6uqVM0e.pgp
Description: OpenPGP digital signature

reply via email to

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