Skip to content

Commit

Permalink
ECEF: jiggle the ECEF data structure, add missing accuracies to client.
Browse files Browse the repository at this point in the history
  • Loading branch information
garyemiller committed Feb 16, 2018
1 parent 7e0e8f0 commit 89251b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gps.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ struct gps_fix_t {
/* ECEF data, all data in meters, and meters/second, or NaN */
struct {
double x, y, z; /* ECEF x, y, z */
double pAcc; /* 3D Position Accuracy Estimate, likely SEP */
double vx, vy, vz; /* ECEF x, y, z velocity */
double pAcc; /* 3D Position Accuracy Estimate, probably SEP */
double vAcc; /* Velocity Accuracy Estimate, probably SEP */
} ecef;
};
Expand Down
8 changes: 4 additions & 4 deletions libgps_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ PERMISSIONS
***************************************************************************/

/* Ubuntu isfinite() needs _XOPEN_SOURCE, 600 means X/Open 2004 */
/* Ubuntu man page says _POSIX_C_SOURCE 200112L should work, it fails */
#define _XOPEN_SOURCE 600

#include <stdbool.h>
#include <math.h>
#include <string.h>
Expand Down Expand Up @@ -78,6 +74,10 @@ static int json_tpv_read(const char *buf, struct gps_data_t *gpsdata,
.dflt.real = NAN},
{"ecefvz", t_real, .addr.real = &gpsdata->fix.ecef.vz,
.dflt.real = NAN},
{"ecefpAcc", t_real, .addr.real = &gpsdata->fix.ecef.vAcc,
.dflt.real = NAN},
{"ecefvAcc", t_real, .addr.real = &gpsdata->fix.ecef.pAcc,
.dflt.real = NAN},
{"mode", t_integer, .addr.integer = &gpsdata->fix.mode,
.dflt.integer = MODE_NOT_SEEN},
{"status", t_integer, .addr.integer = &gpsdata->status,
Expand Down

0 comments on commit 89251b8

Please sign in to comment.