# libgps.c

Functions:- | The client interface library for the gpsd daemon.
Notes based on code as of Mon Apr 5 21:38:06 2010 -0400
`char *deg_to_str(enum deg_str_type type, double f)` | Convert the absolute value of double degrees to a static string and return a pointer to it. Makes a simple check on invalid degree values (not more than 360) and returns "nan" on error. For valid values, it generates the appropriate string according to the string type enumeration: dd, ddmm or ddmmss. Warning: not thread safe.
`char *deg_to_str2(enum deg_str_type type, double f, char *buf, unsigned int buf_size, const char *suffix_pos, const char *suffix_neg)` | Convert the absolute value of double degrees to a string and place in the buffer "buf". Return a pointer to the buffer. "buf_size" is the size of the buffer. Makes a simple check on invalid degree values (not more than 360) and returns "nan" on error. For valid values, it generates the appropriate string according to the string type enumeration: dd, ddmm or ddmmss. If the degrees are positive, append "suffix_pos", else append "suffix_neg".
`enum unit gpsd_units(void)` | Simple check of the environment to determine what units are required. If all else fails, use compiled in units.