gpsd-users
[Top][All Lists]
Advanced

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

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


From: Bhavna Harani
Subject: How to read status and NMEA standard message string(RMC,GGA..)
Date: Tue, 2 Aug 2022 13:12:13 +0530


Hello all,

I have below questions:

1) I am able to read lat/long/mode but when I have tried to read status, every time I was getting zero but I can see it was actually one. Below is a snippet.

if (-1 != gps_read(&gpsd_gps_data, buffer, 256)) 
{
if (isfinite(gpsd_gps_data.fix.latitude) && isfinite( gpsd_gps_data.fix.longitude))
{
gnss_data.latitude = gpsd_gps_data.fix.latitude;

gnss_data.longitude = gpsd_gps_data.fix.longitude;

gnss_data.speed = gpsd_gps_data.fix.speed * MPS_TO_KPH;

gnss_data.settelite_used = gpsd_gps_data.satellites_used;

gnss_data.hdop = gpsd_gps_data.dop.hdop;

gnss_data.mode = gpsd_gps_data.fix.mode;

gnss_data.satellites_visible = gpsd_gps_data.satellites_visible;

gnss_data.status = gpsd_gps_data.log.status;

status = gpsd_gps_data.fix.status;
}
}

logs in which I can see status is one.

gpsd:IO: <= GPS: $GNGGA,065504.00,1833.657360,N,07347.067868,E,1,20,2.4,562.4,M,-67.4,M,,*51
gpsd:DATA: NMEA0183: GNGGA: registers fractional time  65504.000000000
gpsd:DATA: NMEA0183: GGA: hhmmss=065504.00 lat=18.56 lon=73.78 altMSL=562.40 mode=3 status=1
gpsd:DATA: NMEA0183: GNGGA newtime is  1659423304.000000000 = 2022-08-02T06:55:04.000Z
gpsd:DATA: NMEA0183: GNGGA time  65504.000000000 last  65504.00

Is there anything wrong I am doing here? 

2) How can I know the respective NEMA string type like GGA,RMC,etc in a client code?

 
Thanks & Regards,
Bhavna

reply via email to

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