Subversion Repositories FlightCtrl

Rev

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

Rev 393 Rev 459
Line 29... Line 29...
29
struct str_DebugOut    DebugOut;
29
struct str_DebugOut    DebugOut;
30
struct str_Debug       DebugIn;
30
struct str_Debug       DebugIn;
31
struct str_VersionInfo VersionInfo;
31
struct str_VersionInfo VersionInfo;
32
int Debug_Timer;
32
int Debug_Timer;
Line -... Line 33...
-
 
33
 
-
 
34
char newData_navPosUtm = 0;  // Flag, wenn neue PosUtm-Daten vorliegen (211007Kr)
33
 
35
 
34
static uint8_t  gpsState;
36
static uint8_t  gpsState;
35
#define                 GPS_EMPTY       0
37
#define                 GPS_EMPTY       0
36
#define                 GPS_SYNC1       1
38
#define                 GPS_SYNC1       1
37
#define                 GPS_SYNC2       2
39
#define                 GPS_SYNC2       2
38
#define                 GPS_CLASS       3
40
#define                 GPS_CLASS       3
39
#define                 GPS_LEN1        4
41
#define                 GPS_LEN1        4
40
#define                 GPS_LEN2        5
42
#define                 GPS_LEN2        5
41
#define                 GPS_FILLING     6
43
#define                 GPS_FILLING     6
42
#define                 GPS_CKA         7
44
#define                 GPS_CKA         7
-
 
45
#define                 GPS_CKB         8
43
#define                 GPS_CKB         8
46
 
Line 44... Line 47...
44
gpsInfo_t               actualPos;                      // measured position (last gps record)
47
gpsInfo_t               actualPos;                      // measured position (last gps record)
45
 
48
 
Line 67... Line 70...
67
} NAV_STATUS_t;
70
} NAV_STATUS_t;
Line 68... Line 71...
68
 
71
 
69
 
72
 
70
typedef struct {
-
 
71
        unsigned long   ITOW;           // time of week
-
 
72
        long                    LON;            // longitude in 1e-07 deg
-
 
73
        long                    LAT;            // lattitude
-
 
74
        long                    HEIGHT;         // height in mm
-
 
75
        long                    HMSL;           // height above mean sea level im mm
-
 
76
        unsigned long   Hacc;           // horizontal accuracy in mm
-
 
77
        unsigned long   Vacc;           // vertical accuracy in mm
-
 
78
        uint8_t                 packetStatus;
-
 
79
} NAV_POSLLH_t;
-
 
80
 
-
 
81
 
-
 
82
typedef struct {
73
typedef struct {
83
        unsigned long   ITOW;           // time of week
74
        unsigned long   ITOW;           // time of week
84
        long                    EAST;           // cm  UTM Easting  
75
        long                    EAST;           // cm  UTM Easting  
85
        long                    NORTH;          // cm  UTM Nording  
76
        long                    NORTH;          // cm  UTM Nording  
86
        long                    ALT;            // cm  altitude
77
        long                    ALT;            // cm  altitude
Line 134... Line 125...
134
volatile unsigned short msgLen;
125
volatile unsigned short msgLen;
135
volatile uint8_t                msgID;
126
volatile uint8_t                msgID;
136
volatile uint8_t                ignorePacket;           // true when previous packet was not processed
127
volatile uint8_t                ignorePacket;           // true when previous packet was not processed
Line 137... Line -...
137
 
-
 
138
 
-
 
139
// distance to target position
-
 
140
long                    rollOffset;                     // in 10cm
-
 
141
long                    nickOffset;
-
 
142
 
-
 
143
#define GPS_INTCYCLES 100
-
 
144
#define GPS_I_LIMIT             (long)(40 * MAINLOOPS_PER_SEC)
128
 
145
 
129
 
146
#ifdef GPS_DEBUG                        // if set then the GPS data is transfered to display
130
#ifdef GPS_DEBUG                        // if set then the GPS data is transfered to display
147
extern volatile uint8_t v24state;
131
extern volatile uint8_t v24state;
148
char buf[200];
132
char buf[200];
Line 203... Line 187...
203
        {
187
        {
204
                actualPos.northing = navPosUtm.NORTH;  
188
                actualPos.northing = navPosUtm.NORTH;  
205
                actualPos.easting = navPosUtm.EAST;  
189
                actualPos.easting = navPosUtm.EAST;  
206
                actualPos.altitude = navPosUtm.ALT;
190
                actualPos.altitude = navPosUtm.ALT;
207
                navPosUtm.packetStatus = 0;
191
                navPosUtm.packetStatus = 0;
-
 
192
                newData_navPosUtm = 1;  // (211007Kr)
208
        }
193
        }
Line 209... Line 194...
209
 
194
 
210
               
195