39 |
#define MODE_NO_FIX 1 /* none */ |
#define MODE_NO_FIX 1 /* none */ |
40 |
#define MODE_2D 2 /* good for latitude/longitude */ |
#define MODE_2D 2 /* good for latitude/longitude */ |
41 |
#define MODE_3D 3 /* good for altitude/climb too */ |
#define MODE_3D 3 /* good for altitude/climb too */ |
42 |
double ept; /* Expected time uncertainty */ |
pos_t pos; /* Latitude/Longitude in degrees (valid if mode >= 2) */ |
43 |
// double latitude; /* Latitude in degrees (valid if mode >= 2) */ |
float eph; /* Horizontal position uncertainty, meters */ |
44 |
// double longitude; /* Longitude in degrees (valid if mode >= 2) */ |
float track; /* Course made good (relative to true north) */ |
|
pos_t pos; /* Latitude/Longitude in degrees (valid if mode >= 2) */ |
|
|
double eph; /* Horizontal position uncertainty, meters */ |
|
|
double altitude; /* Altitude in meters (valid if mode == 3) */ |
|
|
double track; /* Course made good (relative to true north) */ |
|
|
double epd; /* Track uncertainty, degrees */ |
|
|
double speed; /* Speed over ground, meters/sec */ |
|
|
double eps; /* Speed uncertainty, meters/sec */ |
|
|
double climb; /* Vertical speed, meters/sec */ |
|
|
double epc; /* Vertical speed uncertainty */ |
|
45 |
}; |
}; |
46 |
|
|
47 |
typedef unsigned int gps_mask_t; |
typedef unsigned int gps_mask_t; |
48 |
|
|
49 |
struct gps_data_t { |
struct gps_data_t { |
50 |
gps_mask_t set; /* has field been set since this was last cleared? */ |
gps_mask_t set; /* has field been set since this was last cleared? */ |
|
#define ONLINE_SET 0x00000001u |
|
|
#define TIME_SET 0x00000002u |
|
|
#define TIMERR_SET 0x00000004u |
|
51 |
#define LATLON_SET 0x00000008u |
#define LATLON_SET 0x00000008u |
|
#define ALTITUDE_SET 0x00000010u |
|
52 |
#define SPEED_SET 0x00000020u |
#define SPEED_SET 0x00000020u |
53 |
#define TRACK_SET 0x00000040u |
#define TRACK_SET 0x00000040u |
|
#define CLIMB_SET 0x00000080u |
|
54 |
#define STATUS_SET 0x00000100u |
#define STATUS_SET 0x00000100u |
55 |
#define MODE_SET 0x00000200u |
#define MODE_SET 0x00000200u |
|
#define HDOP_SET 0x00000400u |
|
|
#define VDOP_SET 0x00000800u |
|
|
#define PDOP_SET 0x00001000u |
|
|
#define TDOP_SET 0x00002000u |
|
|
#define GDOP_SET 0x00004000u |
|
|
#define DOP_SET (HDOP_SET|VDOP_SET|PDOP_SET|TDOP_SET|GDOP_SET) |
|
56 |
#define HERR_SET 0x00008000u |
#define HERR_SET 0x00008000u |
|
#define VERR_SET 0x00010000u |
|
|
#define PERR_SET 0x00020000u |
|
|
#define ERR_SET (HERR_SET | VERR_SET | PERR_SET) |
|
57 |
#define SATELLITE_SET 0x00040000u |
#define SATELLITE_SET 0x00040000u |
|
#define PSEUDORANGE_SET 0x00080000u |
|
|
#define USED_SET 0x00100000u |
|
|
#define SPEEDERR_SET 0x00200000u |
|
|
#define TRACKERR_SET 0x00400000u |
|
|
#define CLIMBERR_SET 0x00800000u |
|
|
#define DEVICE_SET 0x01000000u |
|
|
#define DEVICELIST_SET 0x02000000u |
|
|
#define DEVICEID_SET 0x04000000u |
|
|
#define ERROR_SET 0x08000000u |
|
|
#define CYCLE_START_SET 0x10000000u |
|
|
#define RTCM_SET 0x20000000u |
|
|
#define FIX_SET (TIME_SET|MODE_SET|TIMERR_SET|LATLON_SET|HERR_SET|ALTITUDE_SET|VERR_SET|TRACK_SET|TRACKERR_SET|SPEED_SET|SPEEDERR_SET|CLIMB_SET|CLIMBERR_SET) |
|
|
double online; /* NZ if GPS is on line, 0 if not. |
|
|
* |
|
|
* Note: gpsd clears this flag when sentences |
|
|
* fail to show up within the GPS's normal |
|
|
* send cycle time. If the host-to-GPS |
|
|
* link is lossy enough to drop entire |
|
|
* sentences, this flag will be |
|
|
* prone to false negatives. |
|
|
*/ |
|
|
|
|
58 |
struct gps_fix_t fix; /* accumulated PVT data */ |
struct gps_fix_t fix; /* accumulated PVT data */ |
59 |
|
|
|
double separation; /* Geoidal separation, MSL - WGS84 (Meters) */ |
|
|
|
|
60 |
/* GPS status -- always valid */ |
/* GPS status -- always valid */ |
61 |
int status; /* Do we have a fix? */ |
int status; /* Do we have a fix? */ |
62 |
#define STATUS_NO_FIX 0 /* no */ |
#define STATUS_NO_FIX 0 /* no */ |
66 |
/* precision of fix -- valid if satellites_used > 0 */ |
/* precision of fix -- valid if satellites_used > 0 */ |
67 |
int satellites_used; /* Number of satellites used in solution */ |
int satellites_used; /* Number of satellites used in solution */ |
68 |
int used[MAXCHANNELS]; /* PRNs of satellites used in solution */ |
int used[MAXCHANNELS]; /* PRNs of satellites used in solution */ |
|
double pdop, hdop, vdop, tdop, gdop; /* Dilution of precision */ |
|
69 |
|
|
70 |
/* satellite status -- valid when satellites > 0 */ |
/* satellite status -- valid when satellites > 0 */ |
71 |
int satellites; /* # of satellites in view */ |
int satellites; /* # of satellites in view */ |
73 |
int elevation[MAXCHANNELS]; /* elevation of satellite */ |
int elevation[MAXCHANNELS]; /* elevation of satellite */ |
74 |
int azimuth[MAXCHANNELS]; /* azimuth */ |
int azimuth[MAXCHANNELS]; /* azimuth */ |
75 |
int ss[MAXCHANNELS]; /* signal-to-noise ratio (dB) */ |
int ss[MAXCHANNELS]; /* signal-to-noise ratio (dB) */ |
|
|
|
|
/* compass status -- TrueNorth (and any similar) devices only */ |
|
|
char headingStatus; |
|
|
char pitchStatus; |
|
|
char rollStatus; |
|
|
double horzField; /* Magnitude of horizontal magnetic field */ |
|
76 |
}; |
}; |
77 |
|
|
78 |
#ifdef USE_MAEMO |
#ifdef USE_MAEMO |
120 |
LocationGPSDControl *control; |
LocationGPSDControl *control; |
121 |
guint idd_changed; |
guint idd_changed; |
122 |
int fields; |
int fields; |
123 |
double latitude, longitude; |
|
124 |
double heading, eph; |
struct gps_fix_t fix; |
125 |
gps_sat_t sats; |
gps_sat_t sats; |
126 |
#endif |
#endif |
127 |
|
|