Rev 514 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 514 | Rev 515 | ||
---|---|---|---|
Line 5... | Line 5... | ||
5 | // + www.MikroKopter.com |
5 | // + www.MikroKopter.com |
6 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
6 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
7 | // + Software Nutzungsbedingungen (english version: see below) |
7 | // + Software Nutzungsbedingungen (english version: see below) |
8 | // + der Fa. HiSystems GmbH, Flachsmeerstrasse 2, 26802 Moormerland - nachfolgend Lizenzgeber genannt - |
8 | // + der Fa. HiSystems GmbH, Flachsmeerstrasse 2, 26802 Moormerland - nachfolgend Lizenzgeber genannt - |
9 | // + Der Lizenzgeber räumt dem Kunden ein nicht-ausschließliches, zeitlich und räumlich* unbeschränktes Recht ein, die im den |
9 | // + Der Lizenzgeber räumt dem Kunden ein nicht-ausschließliches, zeitlich und räumlich* unbeschränktes Recht ein, die im den |
10 | // + Mikrocontroller verwendete Firmware für die Hardware Flight-Ctrl, Navi-Ctrl, BL-Ctrl, MK3Mag & PC-Programm MikroKopter-Tool |
10 | // + Mikrocontroller verwendete Firmware für die Hardware Flight-Ctrl, Navi-Ctrl, BL-Ctrl, MK3Mag & PC-Programm MikroKopter-Tool |
11 | // + - nachfolgend Software genannt - nur für private Zwecke zu nutzen. |
11 | // + - nachfolgend Software genannt - nur für private Zwecke zu nutzen. |
12 | // + Der Einsatz dieser Software ist nur auf oder mit Produkten des Lizenzgebers zulässig. |
12 | // + Der Einsatz dieser Software ist nur auf oder mit Produkten des Lizenzgebers zulässig. |
13 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
13 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
14 | // + Die vom Lizenzgeber gelieferte Software ist urheberrechtlich geschützt. Alle Rechte an der Software sowie an sonstigen im |
14 | // + Die vom Lizenzgeber gelieferte Software ist urheberrechtlich geschützt. Alle Rechte an der Software sowie an sonstigen im |
15 | // + Rahmen der Vertragsanbahnung und Vertragsdurchführung überlassenen Unterlagen stehen im Verhältnis der Vertragspartner ausschließlich dem Lizenzgeber zu. |
15 | // + Rahmen der Vertragsanbahnung und Vertragsdurchführung überlassenen Unterlagen stehen im Verhältnis der Vertragspartner ausschließlich dem Lizenzgeber zu. |
16 | // + Die in der Software enthaltenen Copyright-Vermerke, Markenzeichen, andere Rechtsvorbehalte, Seriennummern sowie |
16 | // + Die in der Software enthaltenen Copyright-Vermerke, Markenzeichen, andere Rechtsvorbehalte, Seriennummern sowie |
17 | // + sonstige der Programmidentifikation dienenden Merkmale dürfen vom Kunden nicht verändert oder unkenntlich gemacht werden. |
17 | // + sonstige der Programmidentifikation dienenden Merkmale dürfen vom Kunden nicht verändert oder unkenntlich gemacht werden. |
18 | // + Der Kunde trifft angemessene Vorkehrungen für den sicheren Einsatz der Software. Er wird die Software gründlich auf deren |
18 | // + Der Kunde trifft angemessene Vorkehrungen für den sicheren Einsatz der Software. Er wird die Software gründlich auf deren |
19 | // + Verwendbarkeit zu dem von ihm beabsichtigten Zweck testen, bevor er diese operativ einsetzt. |
19 | // + Verwendbarkeit zu dem von ihm beabsichtigten Zweck testen, bevor er diese operativ einsetzt. |
20 | // + Die Haftung des Lizenzgebers wird - soweit gesetzlich zulässig - begrenzt in Höhe des typischen und vorhersehbaren |
20 | // + Die Haftung des Lizenzgebers wird - soweit gesetzlich zulässig - begrenzt in Höhe des typischen und vorhersehbaren |
21 | // + Schadens. Die gesetzliche Haftung bei Personenschäden und nach dem Produkthaftungsgesetz bleibt unberührt. Dem Lizenzgeber steht jedoch der Einwand |
21 | // + Schadens. Die gesetzliche Haftung bei Personenschäden und nach dem Produkthaftungsgesetz bleibt unberührt. Dem Lizenzgeber steht jedoch der Einwand |
22 | // + des Mitverschuldens offen. |
22 | // + des Mitverschuldens offen. |
23 | // + Der Kunde trifft angemessene Vorkehrungen für den Fall, dass die Software ganz oder teilweise nicht ordnungsgemäß arbeitet. |
23 | // + Der Kunde trifft angemessene Vorkehrungen für den Fall, dass die Software ganz oder teilweise nicht ordnungsgemäß arbeitet. |
24 | // + Er wird die Software gründlich auf deren Verwendbarkeit zu dem von ihm beabsichtigten Zweck testen, bevor er diese operativ einsetzt. |
24 | // + Er wird die Software gründlich auf deren Verwendbarkeit zu dem von ihm beabsichtigten Zweck testen, bevor er diese operativ einsetzt. |
25 | // + Der Kunde wird er seine Daten vor Einsatz der Software nach dem Stand der Technik sichern. |
25 | // + Der Kunde wird er seine Daten vor Einsatz der Software nach dem Stand der Technik sichern. |
26 | // + Der Kunde ist darüber unterrichtet, dass der Lizenzgeber seine Daten im zur Vertragsdurchführung erforderlichen Umfang |
26 | // + Der Kunde ist darüber unterrichtet, dass der Lizenzgeber seine Daten im zur Vertragsdurchführung erforderlichen Umfang |
Line 30... | Line 30... | ||
30 | // + Hinweis: Informationen über erweiterte Nutzungsrechte (wie z.B. Nutzung für nicht-private Zwecke) sind auf Anfrage per Email an info(@)hisystems.de verfügbar. |
30 | // + Hinweis: Informationen über erweiterte Nutzungsrechte (wie z.B. Nutzung für nicht-private Zwecke) sind auf Anfrage per Email an info(@)hisystems.de verfügbar. |
31 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
31 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
32 | // + Software LICENSING TERMS |
32 | // + Software LICENSING TERMS |
33 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
33 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
34 | // + of HiSystems GmbH, Flachsmeerstrasse 2, 26802 Moormerland, Germany - the Licensor - |
34 | // + of HiSystems GmbH, Flachsmeerstrasse 2, 26802 Moormerland, Germany - the Licensor - |
35 | // + The Licensor grants the customer a non-exclusive license to use the microcontroller firmware of the Flight-Ctrl, Navi-Ctrl, BL-Ctrl, and MK3Mag hardware |
35 | // + The Licensor grants the customer a non-exclusive license to use the microcontroller firmware of the Flight-Ctrl, Navi-Ctrl, BL-Ctrl, and MK3Mag hardware |
36 | // + (the Software) exclusively for private purposes. The License is unrestricted with respect to time and territory*. |
36 | // + (the Software) exclusively for private purposes. The License is unrestricted with respect to time and territory*. |
37 | // + The Software may only be used with the Licensor's products. |
37 | // + The Software may only be used with the Licensor's products. |
38 | // + The Software provided by the Licensor is protected by copyright. With respect to the relationship between the parties to this |
38 | // + The Software provided by the Licensor is protected by copyright. With respect to the relationship between the parties to this |
39 | // + agreement, all rights pertaining to the Software and other documents provided during the preparation and execution of this |
39 | // + agreement, all rights pertaining to the Software and other documents provided during the preparation and execution of this |
40 | // + agreement shall be the property of the Licensor. |
40 | // + agreement shall be the property of the Licensor. |
Line 206... | Line 206... | ||
206 | Week--; |
206 | Week--; |
207 | Seconds = SECONDS_PER_WEEK - LEAP_SECONDS_FROM_1980 + Seconds; |
207 | Seconds = SECONDS_PER_WEEK - LEAP_SECONDS_FROM_1980 + Seconds; |
208 | } |
208 | } |
209 | else Seconds -= LEAP_SECONDS_FROM_1980; |
209 | else Seconds -= LEAP_SECONDS_FROM_1980; |
Line 210... | Line 210... | ||
210 | 210 | ||
211 | Days = DAYS_FROM_JAN01YEAR0001_TO_JAN6_1980; |
211 | Days = DAYS_FROM_JAN01YEAR0001_TO_JAN6_1980; |
212 | Days += (Week * DAYS_PER_WEEK); |
212 | Days += (Week * DAYS_PER_WEEK); |
Line 213... | Line 213... | ||
213 | Days += Seconds / SECONDS_PER_DAY; // seperate days from GPS seconds of week |
213 | Days += Seconds / SECONDS_PER_DAY; // seperate days from GPS seconds of week |
214 | 214 | ||
Line 229... | Line 229... | ||
229 | Days -= (u32)(YearPart * DAYS_PER_YEAR); |
229 | Days -= (u32)(YearPart * DAYS_PER_YEAR); |
230 | Days += 1; |
230 | Days += 1; |
231 | // check if current year is a leap year |
231 | // check if current year is a leap year |
232 | if(IsLeapYear(pTimeStruct->Year)) MonthDayTab = (u32*)Leap; |
232 | if(IsLeapYear(pTimeStruct->Year)) MonthDayTab = (u32*)Leap; |
233 | else MonthDayTab = (u32*)Normal; |
233 | else MonthDayTab = (u32*)Normal; |
234 | // seperate month and day from days of year |
234 | // seperate month and day from days of year |
235 | for ( i = 0; i < 12; i++ ) |
235 | for ( i = 0; i < 12; i++ ) |
236 | { |
236 | { |
237 | if ( (MonthDayTab[i]< Days) && (Days <= MonthDayTab[i+1]) ) |
237 | if ( (MonthDayTab[i]< Days) && (Days <= MonthDayTab[i+1]) ) |
238 | { |
238 | { |
239 | pTimeStruct->Month = i+1; |
239 | pTimeStruct->Month = i+1; |
Line 281... | Line 281... | ||
281 | static u32 last_itow = 0; |
281 | static u32 last_itow = 0; |
Line 282... | Line 282... | ||
282 | 282 | ||
283 | // if a new set of ubx messages was collected |
283 | // if a new set of ubx messages was collected |
284 | if((UbxSol.Status == NEWDATA) && (UbxPosLlh.Status == NEWDATA) && (UbxVelNed.Status == NEWDATA)) |
284 | if((UbxSol.Status == NEWDATA) && (UbxPosLlh.Status == NEWDATA) && (UbxVelNed.Status == NEWDATA)) |
285 | { // and the itow is equal (same time base) |
285 | { // and the itow is equal (same time base) |
286 | UART_VersionInfo.Flags |= NC_VERSION_FLAG_GPS_PRESENT; |
286 | UART_VersionInfo.Flags |= NC_VERSION_FLAG_GPS_PRESENT; |
287 | if((UbxSol.itow == UbxPosLlh.itow) && (UbxPosLlh.itow == UbxVelNed.itow)) |
287 | if((UbxSol.itow == UbxPosLlh.itow) && (UbxPosLlh.itow == UbxVelNed.itow)) |
288 | { |
288 | { |
289 | UBX_Timeout = SetDelay(UBX_TIMEOUT); |
289 | UBX_Timeout = SetDelay(UBX_TIMEOUT); |
290 | DebugOut.Analog[9]++; |
290 | DebugOut.Analog[9]++; |
291 | // update GPS data only if the status is INVALID or PROCESSED |
291 | // update GPS data only if the status is INVALID or PROCESSED |
292 | if(GPSData.Status != NEWDATA) |
292 | if(GPSData.Status != NEWDATA) |
293 | { // wait for new data at all neccesary ubx messages |
293 | { // wait for new data at all neccesary ubx messages |
294 | GPSData.Status = INVALID; |
294 | GPSData.Status = INVALID; |
295 | // update message cycle time |
295 | // update message cycle time |
296 | GPSData.MsgCycleTime = (u16)(UbxSol.itow-last_itow); |
296 | GPSData.MsgCycleTime = (u16)(UbxSol.itow-last_itow); |
Line 312... | Line 312... | ||
312 | GPSData.Speed_East = UbxVelNed.VEL_E; // in steps of 1cm/s |
312 | GPSData.Speed_East = UbxVelNed.VEL_E; // in steps of 1cm/s |
313 | GPSData.Speed_North = UbxVelNed.VEL_N; // in steps of 1cm/s |
313 | GPSData.Speed_North = UbxVelNed.VEL_N; // in steps of 1cm/s |
314 | GPSData.Speed_Top = -UbxVelNed.VEL_D; // in steps of 1cm/s |
314 | GPSData.Speed_Top = -UbxVelNed.VEL_D; // in steps of 1cm/s |
315 | GPSData.Speed_Ground = UbxVelNed.GSpeed; // in steps of 1cm/s |
315 | GPSData.Speed_Ground = UbxVelNed.GSpeed; // in steps of 1cm/s |
316 | GPSData.Heading = UbxVelNed.Heading; //in steps of 1E-5 deg |
316 | GPSData.Heading = UbxVelNed.Heading; //in steps of 1E-5 deg |
317 | 317 | ||
318 | GPSData.Status = NEWDATA; // new data available |
318 | GPSData.Status = NEWDATA; // new data available |
319 | } // EOF if(GPSData.Status != NEWDATA) |
319 | } // EOF if(GPSData.Status != NEWDATA) |
320 | // set state to collect new data |
320 | // set state to collect new data |
321 | UbxSol.Status = PROCESSED; // ready for new data |
321 | UbxSol.Status = PROCESSED; // ready for new data |
322 | UbxPosLlh.Status = PROCESSED; // ready for new data |
322 | UbxPosLlh.Status = PROCESSED; // ready for new data |
Line 325... | Line 325... | ||
325 | } // EOF all ubx messages received |
325 | } // EOF all ubx messages received |
Line 326... | Line 326... | ||
326 | 326 | ||
327 | 327 | ||
328 | //++++++++++++++++++++++++++++++++ |
328 | //++++++++++++++++++++++++++++++++ |
329 | // Please do not delete |
329 | // Please do not delete |
330 | // This helps me for testing |
330 | // This helps me for testing |
331 | //++++++++++++++++++++++++++++++++ |
331 | //++++++++++++++++++++++++++++++++ |
332 | //GPSData.Position.Longitude = 1517409123L; // Hamilton, Australia |
332 | //GPSData.Position.Longitude = 1517409123L; // Hamilton, Australia |
333 | //GPSData.Position.Latitude = -329294773L; // Hamilton, Australia |
333 | //GPSData.Position.Latitude = -329294773L; // Hamilton, Australia |
Line 343... | Line 343... | ||
343 | //++++++++ |
343 | //++++++++ |
344 | //GPSData.Position.Longitude = 194140605L; // Afrika |
344 | //GPSData.Position.Longitude = 194140605L; // Afrika |
345 | //GPSData.Position.Latitude = -345384656L; // Afrika |
345 | //GPSData.Position.Latitude = -345384656L; // Afrika |
346 | //++++++++ |
346 | //++++++++ |
347 | //GPSData.Position.Longitude =-740443840L; // Liberty Staue davor |
347 | //GPSData.Position.Longitude =-740443840L; // Liberty Staue davor |
348 | //GPSData.Position.Latitude = 406888880L; // Liberty Staue |
348 | //GPSData.Position.Latitude = 406888880L; // Liberty Staue |
Line 349... | Line 349... | ||
349 | 349 | ||
350 | //GPSData.Position.Longitude =-740451660L; // Liberty Staue daneben |
350 | //GPSData.Position.Longitude =-740451660L; // Liberty Staue daneben |
Line 351... | Line 351... | ||
351 | //GPSData.Position.Latitude = 406891880L; // Liberty Staue |
351 | //GPSData.Position.Latitude = 406891880L; // Liberty Staue |
352 | 352 | ||
Line 353... | Line 353... | ||
353 | //GPSData.Position.Longitude =-740446540L; // Liberty Staue direkt |
353 | //GPSData.Position.Longitude =-740446540L; // Liberty Staue direkt |
354 | //GPSData.Position.Latitude = 406891590L; // Liberty Staue 1 |
354 | //GPSData.Position.Latitude = 406891590L; // Liberty Staue 1 |
Line 355... | Line 355... | ||
355 | 355 | ||
356 | //GPSData.Position.Longitude =-1142878694L; // Flori |
356 | //GPSData.Position.Longitude =-1142878694L; // Flori |
357 | //GPSData.Position.Latitude = 483712102L; // |
357 | //GPSData.Position.Latitude = 483712102L; // |
358 | 358 | ||
Line 359... | Line 359... | ||
359 | //GPSData.Position.Longitude =1251674613L; // Bubble |
359 | //GPSData.Position.Longitude =1251674613L; // Bubble |
360 | //GPSData.Position.Latitude = 466058365L; // |
360 | //GPSData.Position.Latitude = 466058365L; // |
Line 408... | Line 408... | ||
408 | 408 | ||
409 | case UBXSTATE_LEN2: // 2nd message length byte |
409 | case UBXSTATE_LEN2: // 2nd message length byte |
410 | RxHdr.Length += ((u16)c)<<8; // high byte last |
410 | RxHdr.Length += ((u16)c)<<8; // high byte last |
411 | if (RxHdr.Length >= UBX_MSG_DATA_SIZE) |
411 | if (RxHdr.Length >= UBX_MSG_DATA_SIZE) |
412 | { |
412 | { |
413 | ubxState = UBXSTATE_IDLE; |
413 | ubxState = UBXSTATE_IDLE; |
414 | } |
414 | } |
415 | else |
415 | else |
416 | { |
416 | { |
417 | cka += c; |
417 | cka += c; |
Line 455... | Line 455... | ||
455 | case UBX_ID_POSLLH: // geodetic position |
455 | case UBX_ID_POSLLH: // geodetic position |
456 | memcpy((u8*)&UbxPosLlh, RxData, RxHdr.Length); |
456 | memcpy((u8*)&UbxPosLlh, RxData, RxHdr.Length); |
457 | UbxPosLlh.Status = NEWDATA; |
457 | UbxPosLlh.Status = NEWDATA; |
458 | break; |
458 | break; |
Line 459... | Line 459... | ||
459 | 459 | ||
460 | case UBX_ID_VELNED: // velocity vector in tangent plane |
460 | case UBX_ID_VELNED: // velocity vector in tangent plane |
461 | memcpy((u8*)&UbxVelNed, RxData, RxHdr.Length); |
461 | memcpy((u8*)&UbxVelNed, RxData, RxHdr.Length); |
462 | UbxVelNed.Status = NEWDATA; |
462 | UbxVelNed.Status = NEWDATA; |
Line 463... | Line 463... | ||
463 | break; |
463 | break; |
Line 470... | Line 470... | ||
470 | default: |
470 | default: |
471 | break; |
471 | break; |
472 | } // EOF switch(Id) |
472 | } // EOF switch(Id) |
473 | Update_GPSData(); |
473 | Update_GPSData(); |
474 | break; |
474 | break; |
475 | 475 | ||
476 | default: |
476 | default: |
477 | break; |
477 | break; |
478 | } // EOF switch(class) |
478 | } // EOF switch(class) |
Line 479... | Line 479... | ||
479 | 479 | ||
480 | // check generic msg filter |
480 | // check generic msg filter |
481 | if(UbxMsg.Status != NEWDATA) |
481 | if(UbxMsg.Status != NEWDATA) |
482 | { // msg buffer is free |
482 | { // msg buffer is free |
483 | if(((UbxMsg.Hdr.Class&UbxMsg.ClassMask) == (RxHdr.Class&UbxMsg.ClassMask)) && ((UbxMsg.Hdr.Id&UbxMsg.IdMask) == (RxHdr.Id&UbxMsg.IdMask))) |
483 | if(((UbxMsg.Hdr.Class&UbxMsg.ClassMask) == (RxHdr.Class&UbxMsg.ClassMask)) && ((UbxMsg.Hdr.Id&UbxMsg.IdMask) == (RxHdr.Id&UbxMsg.IdMask))) |
484 | { // msg matches to the filter criteria |
484 | { // msg matches to the filter criteria |
Line 488... | Line 488... | ||
488 | UbxMsg.Hdr.Length = RxHdr.Length; |
488 | UbxMsg.Hdr.Length = RxHdr.Length; |
489 | if(UbxMsg.Hdr.Length <= UBX_MSG_DATA_SIZE) |
489 | if(UbxMsg.Hdr.Length <= UBX_MSG_DATA_SIZE) |
490 | { // copy data block |
490 | { // copy data block |
491 | memcpy(UbxMsg.Data, RxData, RxHdr.Length); |
491 | memcpy(UbxMsg.Data, RxData, RxHdr.Length); |
492 | UbxMsg.Status = NEWDATA; |
492 | UbxMsg.Status = NEWDATA; |
493 | } |
493 | } |
494 | } // EOF filter matches |
494 | } // EOF filter matches |
495 | } // EOF != INVALID |
495 | } // EOF != INVALID |
496 | }// EOF crc ok |
496 | }// EOF crc ok |
497 | ubxState = UBXSTATE_IDLE; // ready to parse new data |
497 | ubxState = UBXSTATE_IDLE; // ready to parse new data |
498 | break; |
498 | break; |
Line 512... | Line 512... | ||
512 | if(pBuff->Locked == TRUE) return(0); |
512 | if(pBuff->Locked == TRUE) return(0); |
513 | // check if buffer size is sufficient |
513 | // check if buffer size is sufficient |
514 | if(pBuff->Size < 8 + Len) return(0); |
514 | if(pBuff->Size < 8 + Len) return(0); |
515 | // lock the buffer |
515 | // lock the buffer |
516 | pBuff->Locked = TRUE; |
516 | pBuff->Locked = TRUE; |
517 | // start at begin |
517 | // start at begin |
518 | pBuff->Position = 0; |
518 | pBuff->Position = 0; |
519 | pBuff->pData[pBuff->Position++] = UBX_SYNC1_CHAR; |
519 | pBuff->pData[pBuff->Position++] = UBX_SYNC1_CHAR; |
520 | pBuff->pData[pBuff->Position++] = UBX_SYNC2_CHAR; |
520 | pBuff->pData[pBuff->Position++] = UBX_SYNC2_CHAR; |
521 | for(i=0;i<Len;i++) |
521 | for(i=0;i<Len;i++) |
522 | { |
522 | { |
523 | pBuff->pData[pBuff->Position++] = pData[i]; |
523 | pBuff->pData[pBuff->Position++] = pData[i]; |
524 | } |
524 | } |
525 | // calculate checksum |
525 | // calculate checksum |
526 | for(i=2;i<pBuff->Position;i++) |
526 | for(i=2;i<pBuff->Position;i++) |
527 | { |
527 | { |
528 | cka += pBuff->pData[i]; |
528 | cka += pBuff->pData[i]; |
529 | ckb += cka; |
529 | ckb += cka; |
530 | } |
530 | } |
531 | pBuff->pData[pBuff->Position++] = cka; |
531 | pBuff->pData[pBuff->Position++] = cka; |
532 | pBuff->pData[pBuff->Position++] = ckb; |
532 | pBuff->pData[pBuff->Position++] = ckb; |
533 | pBuff->DataBytes = pBuff->Position; |
533 | pBuff->DataBytes = pBuff->Position; |
Line 543... | Line 543... | ||
543 | case UBX_ID_POSLLH: // geodetic position |
543 | case UBX_ID_POSLLH: // geodetic position |
544 | ubxSp = (u8 *)&UbxPosLlh; // data start pointer |
544 | ubxSp = (u8 *)&UbxPosLlh; // data start pointer |
545 | ubxEp = (u8 *)(&UbxPosLlh + 1); // data end pointer |
545 | ubxEp = (u8 *)(&UbxPosLlh + 1); // data end pointer |
546 | ubxStP = (u8 *)&UbxPosLlh.Status; // status pointer |
546 | ubxStP = (u8 *)&UbxPosLlh.Status; // status pointer |
547 | break; |
547 | break; |
548 | |
548 | |
549 | case UBX_ID_SOL: // navigation solution |
549 | case UBX_ID_SOL: // navigation solution |
550 | ubxSp = (u8 *)&UbxSol; // data start pointer |
550 | ubxSp = (u8 *)&UbxSol; // data start pointer |
551 | ubxEp = (u8 *)(&UbxSol + 1); // data end pointer |
551 | ubxEp = (u8 *)(&UbxSol + 1); // data end pointer |
552 | ubxStP = (u8 *)&UbxSol.Status; // status pointer |
552 | ubxStP = (u8 *)&UbxSol.Status; // status pointer |
553 | break; |
553 | break; |
554 | |
554 | |
555 | case UBX_ID_VELNED: // velocity vector in tangent plane |
555 | case UBX_ID_VELNED: // velocity vector in tangent plane |
556 | ubxSp = (u8 *)&UbxVelNed; // data start pointer |
556 | ubxSp = (u8 *)&UbxVelNed; // data start pointer |
557 | ubxEp = (u8 *)(&UbxVelNed + 1); // data end pointer |
557 | ubxEp = (u8 *)(&UbxVelNed + 1); // data end pointer |
558 | ubxStP = (u8 *)&UbxVelNed.Status; // status pointer |
558 | ubxStP = (u8 *)&UbxVelNed.Status; // status pointer |
559 | break; |
559 | break; |
560 | |
560 | |
561 | default: // unsupported identifier |
561 | default: // unsupported identifier |
562 | ubxState = UBXSTATE_IDLE; |
562 | ubxState = UBXSTATE_IDLE; |
563 | return; |
563 | return; |
564 | } |
564 | } |
565 | break; |
565 | break; |
Line 572... | Line 572... | ||
572 | UbxMsg.Hdr.Class = ubxclass; |
572 | UbxMsg.Hdr.Class = ubxclass; |
573 | UbxMsg.Hdr.Id = ubxid; |
573 | UbxMsg.Hdr.Id = ubxid; |
574 | UbxMsg.Hdr.Length = msglen; |
574 | UbxMsg.Hdr.Length = msglen; |
575 | ubxSp = (u8 *)&(UbxMsg.Data); // data start pointer |
575 | ubxSp = (u8 *)&(UbxMsg.Data); // data start pointer |
576 | ubxEp = (u8 *)(&UbxMsg + 1); // data end pointer |
576 | ubxEp = (u8 *)(&UbxMsg + 1); // data end pointer |
577 | ubxStP = (u8 *)&UbxMsg.Status; // status pointer |
577 | ubxStP = (u8 *)&UbxMsg.Status; // status pointer |
578 | } |
578 | } |
579 | else ubxState = UBXSTATE_IDLE; |
579 | else ubxState = UBXSTATE_IDLE; |
580 | break; |
580 | break; |
581 | } |
581 | } |
582 | */ |
582 | */ |