Rev 726 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
717 | holgerb | 1 | #ifndef _TRIG_H |
2 | #define _TRIG_H |
||
3 | |||
4 | #include "fat16.h" |
||
5 | #include "gps.h" |
||
722 | ingob | 6 | #include "logging.h" |
717 | holgerb | 7 | |
8 | |||
9 | // possible state of an kml-document |
||
10 | typedef enum |
||
11 | { |
||
12 | TRIG_DOC_CLOSED, |
||
13 | TRIG_DOC_OPENED, |
||
14 | TRIG_DOC_PLACEMARK_OPENED, |
||
15 | TRIG_DOC_LINESTRING_OPENED, |
||
16 | TRIG_DOC_END |
||
17 | }TRIG_DocState_t; |
||
18 | |||
19 | |||
20 | // structure of an kml-document |
||
21 | typedef struct trig_doc |
||
22 | { |
||
23 | TRIG_DocState_t state; // state of the kml-document |
||
24 | File_t *file; // filepointer to the file where the data should be saved. |
||
25 | } TRIG_Document_t; |
||
26 | |||
721 | holgerb | 27 | |
717 | holgerb | 28 | |
29 | typedef struct |
||
30 | { |
||
31 | s32 Longitude; |
||
32 | s32 Latitude; |
||
33 | s32 AltiBaro; // in cm |
||
34 | s32 AltiGPS; |
||
35 | s16 Yaw; |
||
36 | u16 Count; |
||
726 | holgerb | 37 | u16 CountExternal; |
717 | holgerb | 38 | u16 ShutterCounter; |
39 | u8 Hour; |
||
40 | u8 Min; |
||
41 | u8 Sec; |
||
42 | u16 mSec; |
||
43 | u16 ServoControlNick; |
||
44 | u16 ServoControlPoi; |
||
45 | u8 NewData; |
||
46 | } TrigLog_t; |
||
47 | extern TrigLog_t TrigLogging; |
||
48 | |||
722 | ingob | 49 | extern logfilestate_t LoggingTrigger(u32); |
717 | holgerb | 50 | u8 TRIG_LoggGPSCoordinates(TRIG_Document_t *); // intializes the kml-document with standard filename and adds points to the file |
51 | u8 TRIG_DocumentInit(TRIG_Document_t *); // Init the new kml-document |
||
52 | u8 TRIG_DocumentOpen(s8 *, TRIG_Document_t *); // opens a new kml-document. a new file is created on the sd-memorycard |
||
53 | u8 TRIG_DocumentClose(TRIG_Document_t *doc); // closes the specified document saving remaining data to the file. |
||
54 | u8 TRIG_PlaceMarkOpen(TRIG_Document_t *doc); // opens a new placemark within the open kml-document |
||
55 | u8 TRIG_PlaceMarkClose(TRIG_Document_t *doc); // closes the actual placemark |
||
56 | u8 TRIG_LineStringBegin(TRIG_Document_t *doc); // begins a new linestring within the actual placemark |
||
57 | u8 TRIG_LineStringEnd(TRIG_Document_t *doc); // close the actual linestring within the actual placemark |
||
58 | u8 TRIG_LineStringAddPoint(TRIG_Document_t *); // adds a point from the gps (longitude, altitude, height) to the linestring |
||
59 | |||
60 | extern u16 Logged_TRIG_Counter; |
||
61 | extern u8 BlitzSchuhConnected; |
||
62 | |||
63 | extern void TriggerInput(void); // triggerinput on IO2 |
||
64 | #endif //_TRIG_H |