From 59935603ccb54f12758672f2c077109523aeeaa7 Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Fri, 22 Feb 2019 18:17:57 -0800 Subject: deg_to_str2(): Add new function. Thread safe, handles suffix. --- doc/explan_gpsdclient.c.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'doc') diff --git a/doc/explan_gpsdclient.c.xml b/doc/explan_gpsdclient.c.xml index babd2499..4825fd3d 100644 --- a/doc/explan_gpsdclient.c.xml +++ b/doc/explan_gpsdclient.c.xml @@ -32,6 +32,24 @@ 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. -- cgit v1.2.1