Subversion Repositories NaviCtrl

Rev

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
{
85 killagreg 11
        KML_DOC_CLOSED,
12
        KML_DOC_OPENED,
13
        KML_DOC_PLACEMARK_OPENED,
14
        KML_DOC_LINESTRING_OPENED,
15
        KML_DOC_END
24 StephanB 16
}KML_DocState_t;
17
 
18
 
19
// structure of an kml-document
20
typedef struct kml_doc
21
{
22
        KML_DocState_t state;                                                                   // state of the kml-document
41 ingob 23
        File_t *file;                                                                                   // filepointer to the file where the data should be saved.
24 StephanB 24
} KML_Document_t;
25
 
26
 
85 killagreg 27
u8 KML_LoggGPSCoordinates(KML_Document_t *);                            // intializes the kml-document with standard filename and adds points to the file
28
u8 KML_DocumentInit(KML_Document_t *);                                          // Init the new kml-document
29
u8 KML_DocumentOpen(s8 *, KML_Document_t *);                            // opens a new kml-document. a new file is created on the sd-memorycard
30
u8 KML_DocumentClose(KML_Document_t *doc);                                      // closes the specified document saving remaining data to the file.
31
u8 KML_PlaceMarkOpen(KML_Document_t *doc);                                      // opens a new placemark within the open kml-document
32
u8 KML_PlaceMarkClose(KML_Document_t *doc);                                     // closes the actual placemark
33
u8 KML_LineStringBegin(KML_Document_t *doc);                            // begins a new linestring within the actual placemark
34
u8 KML_LineStringEnd(KML_Document_t *doc);                                      // close the actual linestring within the actual placemark
35
u8 KML_LineStringAddPoint(KML_Document_t *);                            // adds a point from the gps (longitude, altitude, height) to the linestring
24 StephanB 36
 
41 ingob 37
#endif //_KML_H