Subversion Repositories NaviCtrl

Rev

Rev 85 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 85 Rev 345
1
#ifndef _GPX_H
1
#ifndef _GPX_H
2
#define _GPX_H
2
#define _GPX_H
3
 
3
 
4
#include "fat16.h"
4
#include "fat16.h"
5
#include "gps.h"
5
#include "gps.h"
6
 
6
 
7
 
7
 
8
// possible state of a gpx-document
8
// possible state of a gpx-document
9
typedef enum
9
typedef enum
10
{
10
{
11
        GPX_DOC_CLOSED,
11
        GPX_DOC_CLOSED,
12
        GPX_DOC_OPENED,
12
        GPX_DOC_OPENED,
13
        GPX_DOC_TRACK_OPENED,
13
        GPX_DOC_TRACK_OPENED,
14
        GPX_DOC_TRACKSEGMENT_OPENED,
14
        GPX_DOC_TRACKSEGMENT_OPENED,
15
        GPX_DOC_END
15
        GPX_DOC_END
16
}GPX_DocState_t;
16
}GPX_DocState_t;
17
 
17
 
18
 
18
 
19
// structure of an gpx-document
19
// structure of an gpx-document
20
typedef struct gpx_doc
20
typedef struct gpx_doc
21
{
21
{
22
        GPX_DocState_t state;                                                                   // state of the gpx-document
22
        GPX_DocState_t state;                                                                   // state of the gpx-document
23
        File_t *file;                                                                                   // filepointer to the file where the data should be saved.
23
        File_t *file;                                                                                   // filepointer to the file where the data should be saved.
24
} GPX_Document_t;
24
} GPX_Document_t;
25
 
25
 
26
u8 GPX_LoggGPSCoordinates(GPX_Document_t *);                            // intializes the gpx-document with standard filename and adds points to the file
26
u8 GPX_LoggGPSCoordinates(GPX_Document_t *,unsigned char part);                                 // intializes the gpx-document with standard filename and adds points to the file
27
u8 GPX_DocumentInit(GPX_Document_t *);                                          // Init the new gpx-document
27
u8 GPX_DocumentInit(GPX_Document_t *);                                          // Init the new gpx-document
28
u8 GPX_DocumentOpen(s8 *, GPX_Document_t *);                            // opens a new gpx-document. a new file is created on the sd-memorycard
28
u8 GPX_DocumentOpen(s8 *, GPX_Document_t *);                            // opens a new gpx-document. a new file is created on the sd-memorycard
29
u8 GPX_DocumentClose(GPX_Document_t *doc);                                      // closes the specified document saving remaining data to the file.
29
u8 GPX_DocumentClose(GPX_Document_t *doc);                                      // closes the specified document saving remaining data to the file.
30
u8 GPX_TrackBegin(GPX_Document_t *doc);                                         // opens a new track within the open gpx-document
30
u8 GPX_TrackBegin(GPX_Document_t *doc);                                         // opens a new track within the open gpx-document
31
u8 GPX_TrackEnd(GPX_Document_t *doc);                                           // ends the actual track
31
u8 GPX_TrackEnd(GPX_Document_t *doc);                                           // ends the actual track
32
u8 GPX_TrackSegmentBegin(GPX_Document_t *doc);                          // begins a new tracksegment within the actual track
32
u8 GPX_TrackSegmentBegin(GPX_Document_t *doc);                          // begins a new tracksegment within the actual track
33
u8 GPX_TrackSegmentEnd(GPX_Document_t *doc);                            // ends the actual track segment within the actual track
33
u8 GPX_TrackSegmentEnd(GPX_Document_t *doc);                            // ends the actual track segment within the actual track
34
u8 GPX_TrackSegmentAddPoint(GPX_Document_t *);                          // adds a point to the tracksegment
34
u8 GPX_TrackSegmentAddPoint(GPX_Document_t *,unsigned char part);                               // adds a point to the tracksegment
35
 
35
 
36
#endif //_GPX_H
36
#endif //_GPX_H
37
 
37