gpsd-users
[Top][All Lists]
Advanced

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

gps_data_t->status information of gpsd 3.19


From: Appelt Andreas
Subject: gps_data_t->status information of gpsd 3.19
Date: Tue, 10 Dec 2019 09:53:09 +0000

Hello Everyone,

 

We are using gpsd since version 2.95 and are in general quite happy with it, great application.

The only thing that we found missing was the ability to signalize if RTK or float RTK is received.

 

We were very happy to see the ‘Added values for gps_data_t->status’ in the 3.19 version of gpsd.

    /* GPS status -- always valid */

    int    status;                 /* Do we have a fix? */

#define STATUS_NO_FIX        0     /* no */

#define STATUS_FIX           1     /* yes, GPS, without DGPS */

#define STATUS_DGPS_FIX     2     /* yes, with DGPS */

#define STATUS_RTK_FIX       3     /* yes, with RTK Fixed */

#define STATUS_RTK_FLT       4     /* yes, with RTK Float */

#define STATUS_DR            5     /* yes, with dead reckoning */

#define STATUS_GNSSDR        6     /* yes, with GNSS + dead reckoning */

#define STATUS_TIME          7     /* yes, time only (surveyed in, manual) */

#define STATUS_SIM           8     /* yes, simulated */

 

 

Is there a reason why you did not use the nmea0183 status values?

    switch (fix) {

    case 0:     /* no fix */

     newstatus = STATUS_NO_FIX;

     break;

    case 1:

     /* could be 2D, 3D, GNSSDR */

     newstatus = STATUS_FIX;

     break;

    case 2:     /* differential */

     newstatus = STATUS_DGPS_FIX;

     break;

    case 3:

     /* GPS PPS, fix valid, could be 2D, 3D, GNSSDR */

     newstatus = STATUS_FIX;

     break;

    case 4:     /* RTK integer */

     newstatus = STATUS_RTK_FIX;

     break;

    case 5:     /* RTK float */

     newstatus = STATUS_RTK_FLT;

     break;

    case 6:

     /* dead reckoning, could be valid or invalid */

     newstatus = STATUS_DR;

     break;

    case 7:

     /* manual input, surveyed */

     newstatus = STATUS_TIME;

     break;

    case 8:

     /* simulated mode */

     /* Garmin GPSMAP and Gecko sends an 8, but undocumented why */

     newstatus = STATUS_SIM;

     break;

    default:

     newstatus = -1;

     break;

    }

 

Meaning, why not using that status as is?

And set

#define STATUS_RTK_FIX       4     /* yes, with RTK Fixed */

#define STATUS_RTK_FLT       5     /* yes, with RTK Float */

#define STATUS_DR            6     /* yes, with dead reckoning */

...

 

Is there any downside that I am no seeing?

(I am asking because our customers are used to and familiar with the GGA notation.)

 

I also noticed that the new status in the driver_nmea2000.c file was not adapted:

//  printf("mode %x %x\n", (bu[31] >> 4) & 0x0f, bu[31]);

    switch ((bu[31] >> 4) & 0x0f) {

    case 0:

        session->gpsdata.status      = STATUS_NO_FIX;

     break;

    case 1:

        session->gpsdata.status      = STATUS_FIX;

     break;

    case 2:

        session->gpsdata.status      = STATUS_DGPS_FIX;

     break;

    case 3:

    case 4:

    case 5:

        session->gpsdata.status      = STATUS_FIX; /* Is this correct ? */

     break;

    default:

        session->gpsdata.status      = STATUS_NO_FIX;

     break;

    }

 

Are there plans to adapted that in the future in order to support RTK and float RTK?

 

Many thanks in advance.

Andreas

 


reply via email to

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