gpsd-users
[Top][All Lists]
Advanced

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

Re: How to read status and NMEA standard message string(RMC,GGA..)


From: Gary E. Miller
Subject: Re: How to read status and NMEA standard message string(RMC,GGA..)
Date: Wed, 3 Aug 2022 10:45:30 -0700

Yo Bhavna!

On Wed, 3 Aug 2022 19:37:46 +0530
Bhavna Harani <haranibhavna111@gmail.com> wrote:

> What version of gpsd?  : 3.24 release

Good.

> What model GNSS receiver? - LC79D Quectl

Bad.  The Quectetl firmware has many known bugs and "querks".  Except the
unexpected with Quectetl.

> How are you "reading" gpsd? - using a sample application which I have
> attached.

Still short on details.  Using a library, or your own?  What method:
SHM, JSON, etc.  From the code you attached, looks like you are
using libgps, in TCP JSON mode.

> I have attached a log file also.

I have no idea what "Application log" is, or from where.  And What is
"GPS Quality"?  gpsd has no such variable.

> In which I am getting status 0 (
> STATUS_UNK ).

That is 100% normal.  Did you read the doc I included last time?
"status" is random.  "status" tells you nothing.  Do not use "status"
except in very special circumstances, like PPP, DGPS, simulation, etc.

> I have also attached a log from gpsd ,which shows status
> 1(STATUS_GPS). Both status are conflicting .

Yup.  If you read my last message, you would know why.

Why do you even use status?  As explained in my last email: 
    status has almsot no valid use case.

> Is there any way to get the only first field of a NEMA packet using
> libgps API ?

Nope.  If you are going to parse NMEA, you have to get the raw NMEA
from gpsd and do it all yourself.  But there is no point to doing that
as gpsd decodes things for you into the JSON.

If you are going to parse your own NMEA, why even use gpsd?

> For example, In below packet , how to get GNRMC or RMC ?
> $GNRMC,141325.359,A,1834.587127,N,07353.248946,E,21.4,82.7,240722,,,*2C

Well, set WATCH_NMEA, then parse the raw NMEA.  But why would you ever
do such a thing?

I looked at your code.  You are still nenglecting to check doubles with
isfinite() before using them.

From include.gps.h, starting at line 148:

 * All double values use NAN to indicate data not available.
 * WARNING: Check all floats and doubles with isfinite() before using them!
 * isnan() is not sufficient.


RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        gem@rellim.com  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: pgp82Ssj_ARhR.pgp
Description: OpenPGP digital signature


reply via email to

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