package legacy;

struct gps_data_t
{
    int64_t   utime;  /* microseconds since epoch */

    int64_t    online;    /* NZ if GPS is on line, 0 if not */

    gps_fix_t fix;        /* accumulated PVT data */

    double    separation; /* Geoidal separation, MSL - WGS84 (meters) */
    
    /* GPS status -- always valid */
    int16_t    status;               /* Do we have fix? */
    const int16_t STATUS_NO_FIX=0;   /* no */
    const int16_t STATUS_FIX=1;      /* yes, without DGPS */
    const int16_t STATUS_DGPS_FIX=2; /* yes, with DGPS */

    /* precision of fix -- valid if satellites_used > 0 */
    int16_t satellites_used;         /* Number of satellites used in solution */
    int16_t used[satellites_used];   /* PRNs of satellites used in solution */
    double pdop, hdop, tdop, gdop;   /* Dilution of precision */

    /* redundant with the estimate elements in the fix structure */
    double epe; /* spherical position error, 95% confidence (meters) */

    /* satellite status -- valid when satellites > 0 */
    int16_t satellites;            /* # of satellites in view */
    int16_t PRN[satellites];       /* PRNs of satellites */
    int16_t elevation[satellites]; /* elevation of satellite */
    int16_t azimuth[satellites];   /* azimuth */
    int16_t ss[satellites];        /* signal-to-noise ration (dB) */

    /* where and what gpsd thinks the device is */
    string gps_device; /* only valid if non-null */
    string gps_id;     /* only valid if non-null */

    /* device list */
    int16_t ndevices;             /* count of available devices */
    string  devicelist[ndevices]; /* list of pathnames */

}
