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" |
||
41 | ingob | 5 | #include "gps.h" |
24 | StephanB | 6 | |
7 | |||
8 | // possible state of an kml-document |
||
41 | ingob | 9 | typedef enum |
24 | StephanB | 10 | { |
11 | DOC_CLOSED, |
||
12 | DOC_OPENED, |
||
13 | DOC_PLACEMARK_OPENED, |
||
14 | DOC_LINESTRING_OPENED, |
||
41 | ingob | 15 | DOC_END |
24 | StephanB | 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 |
||
41 | ingob | 33 | File_t *file; // filepointer to the file where the data should be saved. |
24 | StephanB | 34 | KML_PlaceMark_t place; |
35 | } KML_Document_t; |
||
36 | |||
37 | |||
38 | |||
41 | ingob | 39 | |
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 |
||
41 | 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 |
||
43 | 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 |
||
45 | 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 |
||
47 | 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 |
||
49 | |||
50 | #endif //_KML_H |