Subversion Repositories NaviCtrl

Rev

Rev 24 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 24 Rev 41
Line 1... Line 1...
1
#ifndef _KML_H
1
#ifndef _KML_H
2
#define _KML_H
2
#define _KML_H
Line 3... Line 3...
3
 
3
 
-
 
4
#include "fat16.h"
Line 4... Line 5...
4
#include "fat16.h"
5
#include "gps.h"
5
 
6
 
6
 
7
 
7
// possible state of an kml-document
8
// possible state of an kml-document
8
typedef enum
9
typedef enum
9
{
10
{
10
        DOC_CLOSED,
11
        DOC_CLOSED,
11
        DOC_OPENED,
12
        DOC_OPENED,
12
        DOC_PLACEMARK_OPENED,
-
 
13
        DOC_LINESTRING_OPENED,
13
        DOC_PLACEMARK_OPENED,
Line 14... Line 14...
14
        DOC_END        
14
        DOC_LINESTRING_OPENED,
15
               
15
        DOC_END
Line 28... Line 28...
28
// structure of an kml-document
28
// structure of an kml-document
29
typedef struct kml_doc
29
typedef struct kml_doc
30
{
30
{
31
        u8 name[40];                                                                                    // name of the document
31
        u8 name[40];                                                                                    // name of the document
32
        KML_DocState_t state;                                                                   // state of the kml-document
32
        KML_DocState_t state;                                                                   // state of the kml-document
33
        File *file;                                                                                             // filepointer to the file where the data should be saved.
33
        File_t *file;                                                                                   // filepointer to the file where the data should be saved.
34
        KML_PlaceMark_t place;
34
        KML_PlaceMark_t place;
35
 
-
 
36
} KML_Document_t;
35
} KML_Document_t;
Line 37... Line -...
37
 
-
 
Line -... Line 36...
-
 
36
 
38
 
37
 
39
#endif
38
 
40
 
39
 
41
extern u8 KML_LoggGPSCoordinates(struct str_gps_nav_data , KML_Document_t *);
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
42
extern u8 KML_DocumentInit(KML_Document_t *);                                                   // Init the new kml-document
41
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
42
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.
43
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
44
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
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