gpsutils.c
Functions:-Code shared between low-level and
high-level interfaces. Most of them do exactly what they say on the
tin.
Notes based on code as of Mon Apr 5 21:38:06 2010 -0400.
void gps_clear_fix(struct gps_fix_t *fixp)
Stuff a fix structure with recognizable out-of-band values.
unsigned int gps_valid_fields(struct gps_fix_t *fixp)
Clears certain status flags, depending if the associated fields are invalid.
time_t mkgmtime(register struct tm *t)
Convert a struct tm {} (see time.h) to seconds since UNIX Epoch.
timespec_t iso8601_to_timespec(char *isotime)
Convert an ISO8601 UTC string (like 2006-01-25T13:15:22.9Z) to a
timespec_t (time_t,long).
char *timespec_to_iso8601(timespec_t ts, char isotime[], int len)
Convert a struct timepsec into an ISO8601 UTC string (like 2006-01-25T13:15:22.9Z).
static double CalcRad(double lat)
Return the earth's radius of curvature in meters at specified latitude.
double earth_distance(double lat1, double lon1, double lat2, double lon2)
Return the distance in meters between two points specified in degrees.
static int invert(double mat[4][4], double inverse[4][4])
Try and invert an array. If it is possible, fill the inverted array and return a 1. Return a 0 if it is not possible.
gps_mask_t dop(struct gps_data_t *gpsdata)
Take a gps data structure and try to calculate the DOP values from the other data in it. Return 0 if it is not possible or update the appropriate DOP fields in the structure and set a mask which tells which fields were updated.