Rev 41 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
24 | StephanB | 1 | #ifndef _KML_H |
2 | #define _KML_H |
||
3 | |||
4 | #include "fat16.h" |
||
5 | |||
6 | |||
7 | // possible state of an kml-document |
||
8 | typedef enum |
||
9 | { |
||
10 | DOC_CLOSED, |
||
11 | DOC_OPENED, |
||
12 | DOC_PLACEMARK_OPENED, |
||
13 | DOC_LINESTRING_OPENED, |
||
14 | DOC_END |
||
15 | |||
16 | }KML_DocState_t; |
||
17 | |||
18 | |||
19 | // structure of an kml-placemarkt |
||
20 | typedef struct kml_place |
||
21 | { |
||
22 | s8 name[10]; // the name of the placemark |
||
23 | s8 description[40]; // some text as a description to the placemark |
||
24 | } KML_PlaceMark_t; |
||
25 | |||
26 | |||
27 | |||
28 | // structure of an kml-document |
||
29 | typedef struct kml_doc |
||
30 | { |
||
31 | u8 name[40]; // name of the document |
||
32 | KML_DocState_t state; // state of the kml-document |
||
33 | File *file; // filepointer to the file where the data should be saved. |
||
34 | KML_PlaceMark_t place; |
||
35 | |||
36 | } KML_Document_t; |
||
37 | |||
38 | |||
39 | #endif |
||
40 | |||
41 | extern u8 KML_LoggGPSCoordinates(struct str_gps_nav_data , KML_Document_t *); |
||
42 | extern u8 KML_DocumentInit(KML_Document_t *); // Init the new kml-document |
||
43 | extern u8 KML_DocumentOpen(s8 *, KML_Document_t *); // opens a new kml-document. a new file is created on the sd-memorycard |
||
44 | extern u8 KML_DocumentClose(KML_Document_t *doc); // closes the specified document saving remaining data to the file. |
||
45 | extern u8 KML_PlaceMarkOpen(s8 *name, KML_Document_t *doc); // opens a new placemark within the open kml-document |
||
46 | extern u8 KML_PlaceMarkClose(KML_Document_t *doc); // closes the actual placemark |
||
47 | extern u8 KML_LineStringBegin(KML_Document_t *doc); // begins a new linestring within the actual placemark |
||
48 | extern u8 KML_LineStringEnd(KML_Document_t *doc); // close the actual linestring within the actual placemark |
||
49 | extern u8 KML_LineStringAddPoint(struct str_gps_nav_data, KML_Document_t *); // adds a point from the gps (longitude, altitude, height) to the linestring |