summaryrefslogtreecommitdiff
path: root/navit/coord.c
diff options
context:
space:
mode:
authorsleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220>2014-10-11 23:12:40 +0000
committersleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220>2014-10-11 23:12:40 +0000
commit556eb9b7d9ceafa83bee894c059410f04adcbaec (patch)
treeb925bdedfb0cf1ea4abaadf4f8795cbf02538142 /navit/coord.c
parent8830d2bc2bcd4b9b85257ae29a687bfc9c8a1f02 (diff)
downloadnavit-556eb9b7d9ceafa83bee894c059410f04adcbaec.tar.gz
Refactor:core:Improve comments for coord_parse&pcoord_parse.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5905 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/coord.c')
-rw-r--r--navit/coord.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/navit/coord.c b/navit/coord.c
index 23f74d64b..af6fc8823 100644
--- a/navit/coord.c
+++ b/navit/coord.c
@@ -146,17 +146,18 @@ coord_rect_extend(struct coord_rect *r, struct coord *c)
}
/**
- * Parses \c char \a *c_str and writes back the coordinates to \c coord \a *c_ret. Uses \c projection \a pro if no projection is given in \c char \a *c_str.
+ * Parses \c char \a *c_str and writes back the coordinates to \c coord \a *c_ret, using \c projection \a pro.
+ * \a *c_str may specify its projection at the beginning.
* The format for \a *c_str can be:
- * \li [Proj:]-0xX [-]0xX
- * - where Proj can be mg/garmin, defaults to mg
- * \li [Proj:][D][D]Dmm.ss[S][S] N/S [D][D]DMM.ss[S][S]... E/W
- * \li [Proj:][-][D]D.d[d]... [-][D][D]D.d[d]
- * - where Proj can be geo
+ * \li [Proj:][-]0xXX.... [-]0xXX... - Mercator coordinates, hex integers (XX), Proj can be "mg" or "garmin", defaults to mg
+ * \li [Proj:][D][D]Dmm.mm.. N/S [D][D]DMM.mm... E/W - lat/long (WGS 84), integer degrees (DD) and minutes as decimal fraction (MM), Proj must be "geo" or absent
+ * \li [Proj:][-][D]D.d[d]... [-][D][D]D.d[d] - long/lat (WGS 84, note order!), degrees as decimal fraction, Proj does not matter
+ * \li utm[zoneinfo]:[-][D]D.d[d]... [-][D][D]D.d[d] - UTM coordinates, as decimal fraction, with optional zone information (?)
+ * Note that the spaces are relevant for parsing.
*
* @param *c_str String to be parsed
- * @param pro Projection of the string
- * @param *pc_ret Where the \a pcoord should get stored
+ * @param pro Desired projection of the result
+ * @param *c_ret For returning result
* @returns The lenght of the parsed string
*/
@@ -279,11 +280,8 @@ out:
}
/**
- * A wrapper for pcoord_parse that also return the projection
- * @param *c_str String to be parsed
- * @param pro Projection of the string
- * @param *pc_ret Where the \a pcoord should get stored
- * @returns The lenght of the parsed string
+ * A wrapper for coord_parse that also returns the projection.
+ * For parameters see coord_parse.
*/
int