Rev 41 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
#ifndef _KML_H
#define _KML_H
#include "fat16.h"
// possible state of an kml-document
typedef enum
{
DOC_CLOSED,
DOC_OPENED,
DOC_PLACEMARK_OPENED,
DOC_LINESTRING_OPENED,
DOC_END
}KML_DocState_t;
// structure of an kml-placemarkt
typedef struct kml_place
{
s8 name[10]; // the name of the placemark
s8 description[40]; // some text as a description to the placemark
} KML_PlaceMark_t;
// structure of an kml-document
typedef struct kml_doc
{
u8 name[40]; // name of the document
KML_DocState_t state; // state of the kml-document
File *file; // filepointer to the file where the data should be saved.
KML_PlaceMark_t place;
} KML_Document_t;
#endif
extern u8 KML_LoggGPSCoordinates(struct str_gps_nav_data , KML_Document_t *);
extern u8 KML_DocumentInit(KML_Document_t *); // Init the new kml-document
extern u8 KML_DocumentOpen(s8 *, KML_Document_t *); // opens a new kml-document. a new file is created on the sd-memorycard
extern u8 KML_DocumentClose(KML_Document_t *doc); // closes the specified document saving remaining data to the file.
extern u8 KML_PlaceMarkOpen(s8 *name, KML_Document_t *doc); // opens a new placemark within the open kml-document
extern u8 KML_PlaceMarkClose(KML_Document_t *doc); // closes the actual placemark
extern u8 KML_LineStringBegin(KML_Document_t *doc); // begins a new linestring within the actual placemark
extern u8 KML_LineStringEnd(KML_Document_t *doc); // close the actual linestring within the actual placemark
extern u8 KML_LineStringAddPoint(struct str_gps_nav_data, KML_Document_t *); // adds a point from the gps (longitude, altitude, height) to the linestring