35 #include <grass/gis.h>
38 static int format(
char *,
int,
int,
double,
char);
39 static int ll_parts(
double,
int *,
int *,
double *);
48 format(buf, d, m, s, h);
55 return "dd:mm:ss{N|S}";
65 format(buf, d, m, s, h);
71 return "ddd:mm:ss{E|W}";
82 format(buf, d, m, s, h);
92 static int format(
char *buf,
int d,
int m,
double s,
char h)
97 sprintf(temp,
"%f", s);
98 sscanf(temp,
"%lf", &ss);
108 sprintf(temp,
"0%f", ss);
110 sprintf(temp,
"%f", ss);
112 if (strcmp(temp,
"00") != 0 && strcmp(temp,
"0") != 0)
113 sprintf(buf,
"%d:%02d:%s%c", d, m, temp, h);
115 sprintf(buf,
"%d:%02d%c", d, m, h);
117 sprintf(buf,
"%d%c", d, h);
137 ll_parts(lat, d, m, s);
160 ll_parts(lon, d, m, s);
165 static int ll_parts(
double ll,
179 *s = ((ll - *d) * 60 - *m) * 60;
int G_trim_decimal(char *buf)
Removes trailing zeros from decimal number.
tuple h
panel.defaultSize = wx.CheckBox(panel, id = wx.ID_ANY, label = _("Use default size")) panel...