Rev 41 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 41 | Rev 85 | ||
---|---|---|---|
1 | #ifndef _KML_H |
1 | #ifndef _KML_H |
2 | #define _KML_H |
2 | #define _KML_H |
3 | 3 | ||
4 | #include "fat16.h" |
4 | #include "fat16.h" |
5 | #include "gps.h" |
5 | #include "gps.h" |
6 | 6 | ||
7 | 7 | ||
8 | // possible state of an kml-document |
8 | // possible state of an kml-document |
9 | typedef enum |
9 | typedef enum |
10 | { |
10 | { |
11 | DOC_CLOSED, |
11 | KML_DOC_CLOSED, |
12 | DOC_OPENED, |
12 | KML_DOC_OPENED, |
13 | DOC_PLACEMARK_OPENED, |
13 | KML_DOC_PLACEMARK_OPENED, |
14 | DOC_LINESTRING_OPENED, |
14 | KML_DOC_LINESTRING_OPENED, |
15 | DOC_END |
15 | KML_DOC_END |
16 | }KML_DocState_t; |
16 | }KML_DocState_t; |
17 | 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 | 18 | ||
28 | // structure of an kml-document |
19 | // structure of an kml-document |
29 | typedef struct kml_doc |
20 | typedef struct kml_doc |
30 | { |
21 | { |
31 | u8 name[40]; // name of the document |
- | |
32 | KML_DocState_t state; // state of the kml-document |
22 | KML_DocState_t state; // state of the kml-document |
33 | File_t *file; // filepointer to the file where the data should be saved. |
23 | File_t *file; // filepointer to the file where the data should be saved. |
34 | KML_PlaceMark_t place; |
- | |
35 | } KML_Document_t; |
24 | } KML_Document_t; |
36 | 25 | ||
37 | - | ||
38 | - | ||
39 | 26 | ||
40 | u8 KML_LoggGPSCoordinates(GPS_Pos_t* pGPS_Position , KML_Document_t *); // intializes the kml-document with standard filename and adds points to the file |
27 | u8 KML_LoggGPSCoordinates(KML_Document_t *); // intializes the kml-document with standard filename and adds points to the file |
41 | u8 KML_DocumentInit(KML_Document_t *); // Init the new kml-document |
28 | u8 KML_DocumentInit(KML_Document_t *); // Init the new kml-document |
42 | u8 KML_DocumentOpen(s8 *, KML_Document_t *); // opens a new kml-document. a new file is created on the sd-memorycard |
29 | u8 KML_DocumentOpen(s8 *, KML_Document_t *); // opens a new kml-document. a new file is created on the sd-memorycard |
43 | u8 KML_DocumentClose(KML_Document_t *doc); // closes the specified document saving remaining data to the file. |
30 | u8 KML_DocumentClose(KML_Document_t *doc); // closes the specified document saving remaining data to the file. |
44 | u8 KML_PlaceMarkOpen(s8 *name, KML_Document_t *doc); // opens a new placemark within the open kml-document |
31 | u8 KML_PlaceMarkOpen(KML_Document_t *doc); // opens a new placemark within the open kml-document |
45 | u8 KML_PlaceMarkClose(KML_Document_t *doc); // closes the actual placemark |
32 | u8 KML_PlaceMarkClose(KML_Document_t *doc); // closes the actual placemark |
46 | u8 KML_LineStringBegin(KML_Document_t *doc); // begins a new linestring within the actual placemark |
33 | u8 KML_LineStringBegin(KML_Document_t *doc); // begins a new linestring within the actual placemark |
47 | u8 KML_LineStringEnd(KML_Document_t *doc); // close the actual linestring within the actual placemark |
34 | u8 KML_LineStringEnd(KML_Document_t *doc); // close the actual linestring within the actual placemark |
48 | u8 KML_LineStringAddPoint(GPS_Pos_t* pGPS_Position, KML_Document_t *); // adds a point from the gps (longitude, altitude, height) to the linestring |
35 | u8 KML_LineStringAddPoint(KML_Document_t *); // adds a point from the gps (longitude, altitude, height) to the linestring |
49 | 36 | ||
50 | #endif //_KML_H |
37 | #endif //_KML_H |
51 | 38 |