Rev 724 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 724 | Rev 726 | ||
---|---|---|---|
Line 69... | Line 69... | ||
69 | uint32_t CAcc; // deg Course / Heading Accuracy Estimate |
69 | uint32_t CAcc; // deg Course / Heading Accuracy Estimate |
70 | uint8_t Status; |
70 | uint8_t Status; |
71 | } GPS_VELNED_t; |
71 | } GPS_VELNED_t; |
Line 72... | Line 72... | ||
72 | 72 | ||
73 | 73 | ||
74 | GPS_STATUS_t GpsStatus; |
74 | GPS_STATUS_t GpsStatus = {0,0,0,0,0,0,0, INVALID}; |
75 | GPS_POSLLH_t GpsPosLlh; |
75 | GPS_POSLLH_t GpsPosLlh = {0,0,0,0,0,0,0, INVALID}; |
- | 76 | GPS_POSUTM_t GpsPosUtm = {0,0,0,0,0,0, INVALID}; |
|
Line 76... | Line 77... | ||
76 | GPS_POSUTM_t GpsPosUtm; |
77 | GPS_VELNED_t GpsVelNed = {0,0,0,0,0,0,0,0,0, INVALID}; |
Line 77... | Line 78... | ||
77 | GPS_VELNED_t GpsVelNed; |
78 | GPS_INFO_t GPSInfo = {0,0,0,0,0,0,0,0,0,0, INVALID}; |
78 | 79 | ||
79 | GPS_INFO_t GPSInfo; |
80 | volatile uint8_t GPSTimeout = 0; |
80 | 81 | ||
Line 110... | Line 111... | ||
110 | { |
111 | { |
111 | GPSInfo.status = VALID; // set valid if data are updated |
112 | GPSInfo.status = VALID; // set valid if data are updated |
112 | } |
113 | } |
113 | } |
114 | } |
Line 114... | Line -... | ||
114 | - | ||
115 | void ubx_init(void) |
- | |
116 | { |
- | |
117 | GpsStatus.Status = INVALID; |
- | |
118 | GpsPosLlh.Status = INVALID; |
- | |
119 | GpsPosUtm.Status = INVALID; |
- | |
120 | GpsVelNed.Status = INVALID; |
- | |
121 | GPSInfo.status = INVALID; |
- | |
Line 122... | Line 115... | ||
122 | } |
115 | |
123 | 116 | ||
124 | // this function should be called within the UART RX ISR |
117 | // this function should be called within the UART RX ISR |
125 | void ubx_parser(uint8_t c) |
118 | void ubx_parser(uint8_t c) |
Line 226... | Line 219... | ||
226 | if (c == ckb) |
219 | if (c == ckb) |
227 | { |
220 | { |
228 | *ubxSp = VALID; // new data are valid |
221 | *ubxSp = VALID; // new data are valid |
229 | ROT_FLASH; |
222 | ROT_FLASH; |
230 | UpdateGPSInfo(); //update GPS info respectively |
223 | UpdateGPSInfo(); //update GPS info respectively |
- | 224 | GPSTimeout = 255; |
|
231 | } |
225 | } |
232 | else |
226 | else |
233 | { // if checksum not fit then set data invalid |
227 | { // if checksum not fit then set data invalid |
234 | *ubxSp = INVALID; |
228 | *ubxSp = INVALID; |
235 | } |
229 | } |