+ if ( dec > 0 )
+ sign_c = pos_c;
+ else if ( dec < 0 )
+ sign_c = neg_c;
+ else /* Nul value */
+ sign_c = ' ';
+
+ /* Degree */
+ val_d = fabs(dec);
+
+ /* Format */
+ result = g_strdup_printf ( "%c%f" DEGREE_SYMBOL, sign_c, val_d );
+ return result;
+}
+
+gchar *convert_lat_dec_to_ddd(gdouble lat)
+{
+ return convert_dec_to_ddd(lat, 'N', 'S');
+}
+
+gchar *convert_lon_dec_to_ddd(gdouble lon)
+{
+ return convert_dec_to_ddd(lon, 'E', 'W');
+}
+
+/**
+ * @param pos_c char for positive value
+ * @param neg_c char for negative value
+ */
+static gchar *convert_dec_to_dmm(gdouble dec, gchar pos_c, gchar neg_c)
+{
+ gdouble tmp;
+ gchar sign_c = ' ';
+ gint val_d;
+ gdouble val_m;
+ gchar *result = NULL;
+
+ if ( dec > 0 )
+ sign_c = pos_c;
+ else if ( dec < 0 )
+ sign_c = neg_c;
+ else /* Nul value */
+ sign_c = ' ';
+
+ /* Degree */
+ tmp = fabs(dec);
+ val_d = (gint)tmp;
+
+ /* Minutes */
+ val_m = (tmp - val_d) * 60;
+
+ /* Format */
+ result = g_strdup_printf ( "%c%d" DEGREE_SYMBOL "%f'",
+ sign_c, val_d, val_m );
+ return result;
+}
+
+gchar *convert_lat_dec_to_dmm(gdouble lat)
+{
+ return convert_dec_to_dmm(lat, 'N', 'S');
+}
+
+gchar *convert_lon_dec_to_dmm(gdouble lon)
+{
+ return convert_dec_to_dmm(lon, 'E', 'W');
+}