#ifndef _VIKING_COORDS_H
#define _VIKING_COORDS_H
+#include <glib.h>
+
+G_BEGIN_DECLS
+
struct UTM {
gdouble northing;
gdouble easting;
gdouble lon;
};
+#define COORDS_STR_BUFFER_SIZE 24
+
int a_coords_utm_equal( const struct UTM *utm1, const struct UTM *utm2 );
void a_coords_latlon_to_utm ( const struct LatLon *latlon, struct UTM *utm );
void a_coords_utm_to_latlon ( const struct UTM *utm, struct LatLon *latlon );
*/
char *a_coords_dtostr ( double d );
+/**
+ * Similar to a_coords_dtostr() above, but uses an existing allocated
+ * buffer thus avoiding the need for malloc/free
+ * Ideal for use where this may be called a lot (e.g. in file saving)
+ */
+void a_coords_dtostr_buffer ( double d, char buffer[COORDS_STR_BUFFER_SIZE] );
+
+/**
+ * Convert a LatLon to strings.
+ *
+ * Use the prefered representation.
+ */
+void a_coords_latlon_to_string ( const struct LatLon *latlon, gchar **lat, gchar **lon );
+G_END_DECLS
#endif