Subversion Repositories Projects

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
406 joko 1
#ifndef _KML_H
2
#define _KML_H
3
 
4
#include "fat16.h"
5
#include "gps.h"
6
 
7
 
8
// possible state of an kml-document
9
typedef enum
10
{
11
        KML_DOC_CLOSED,
12
        KML_DOC_OPENED,
13
        KML_DOC_PLACEMARK_OPENED,
14
        KML_DOC_LINESTRING_OPENED,
15
        KML_DOC_END
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
23
        File_t *file;                                                                                   // filepointer to the file where the data should be saved.
24
} KML_Document_t;
25
 
26
 
27
uint8_t KML_LoggGPSCoordinates(KML_Document_t *);                               // intializes the kml-document with standard filename and adds points to the file
28
uint8_t KML_DocumentInit(KML_Document_t *);                                             // Init the new kml-document
29
uint8_t KML_DocumentOpen(int8_t *, KML_Document_t *);                           // opens a new kml-document. a new file is created on the sd-memorycard
30
uint8_t KML_DocumentClose(KML_Document_t *doc);                                 // closes the specified document saving remaining data to the file.
31
uint8_t KML_PlaceMarkOpen(KML_Document_t *doc);                                 // opens a new placemark within the open kml-document
32
uint8_t KML_PlaceMarkClose(KML_Document_t *doc);                                        // closes the actual placemark
33
uint8_t KML_LineStringBegin(KML_Document_t *doc);                               // begins a new linestring within the actual placemark
34
uint8_t KML_LineStringEnd(KML_Document_t *doc);                                 // close the actual linestring within the actual placemark
35
uint8_t KML_LineStringAddPoint(KML_Document_t *);                               // adds a point from the gps (longitude, altitude, height) to the linestring
36
 
37
#endif //_KML_H