--- trunk/src/gps.h 2009/12/07 16:22:17 232 +++ trunk/src/gps.h 2009/12/09 19:45:36 233 @@ -39,71 +39,24 @@ #define MODE_NO_FIX 1 /* none */ #define MODE_2D 2 /* good for latitude/longitude */ #define MODE_3D 3 /* good for altitude/climb too */ - double ept; /* Expected time uncertainty */ - // double latitude; /* Latitude in degrees (valid if mode >= 2) */ - // double longitude; /* Longitude in degrees (valid if mode >= 2) */ - 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 */ + pos_t pos; /* Latitude/Longitude in degrees (valid if mode >= 2) */ + float eph; /* Horizontal position uncertainty, meters */ + float track; /* Course made good (relative to true north) */ }; typedef unsigned int gps_mask_t; struct gps_data_t { 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 #define LATLON_SET 0x00000008u -#define ALTITUDE_SET 0x00000010u #define SPEED_SET 0x00000020u #define TRACK_SET 0x00000040u -#define CLIMB_SET 0x00000080u #define STATUS_SET 0x00000100u #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) #define HERR_SET 0x00008000u -#define VERR_SET 0x00010000u -#define PERR_SET 0x00020000u -#define ERR_SET (HERR_SET | VERR_SET | PERR_SET) #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. - */ - struct gps_fix_t fix; /* accumulated PVT data */ - double separation; /* Geoidal separation, MSL - WGS84 (Meters) */ - /* GPS status -- always valid */ int status; /* Do we have a fix? */ #define STATUS_NO_FIX 0 /* no */ @@ -113,7 +66,6 @@ /* precision of fix -- valid if satellites_used > 0 */ int satellites_used; /* Number of satellites used in solution */ int used[MAXCHANNELS]; /* PRNs of satellites used in solution */ - double pdop, hdop, vdop, tdop, gdop; /* Dilution of precision */ /* satellite status -- valid when satellites > 0 */ int satellites; /* # of satellites in view */ @@ -121,12 +73,6 @@ int elevation[MAXCHANNELS]; /* elevation of satellite */ int azimuth[MAXCHANNELS]; /* azimuth */ 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 */ }; #ifdef USE_MAEMO @@ -174,8 +120,8 @@ LocationGPSDControl *control; guint idd_changed; int fields; - double latitude, longitude; - double heading, eph; + + struct gps_fix_t fix; gps_sat_t sats; #endif