Changeset 9195 in ntrip


Ignore:
Timestamp:
Oct 31, 2020, 10:50:07 PM (4 weeks ago)
Author:
stuerze
Message:

minor changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/BNC_2.12/src/RTCM3/clock_and_orbit/clock_orbit.h

    r9051 r9195  
    404404  virtual CodeType    rnxTypeToCodeType(char system, std::string type) = 0;
    405405
    406   static uint32_t CRC24(long size, const unsigned char *buf) {
    407     uint32_t crc = 0;
    408     int ii;
    409     while (size--) {
    410       crc ^= (*buf++) << (16);
    411       for (ii = 0; ii < 8; ii++)  {
    412         crc <<= 1;
    413         if (crc & 0x1000000)
    414           crc ^= 0x01864cfb;
    415       }
    416     }
    417     return crc;
    418   }
    419 
    420406//#ifndef NOENCODE
    421407#define STOREBITS \
     
    454440    if(len > 1023) \
    455441      return 0; \
    456     len = SsrCorr::CRC24(len+3, (const unsigned char *) blockstart); \
     442    len = CRC24(len+3, (const unsigned char *) blockstart); \
    457443    ADDBITS(24, len) \
    458444  }
     
    532518#define T_VTEC_QUALITY_INDICATOR(a)      SCALEADDBITS( 9,       20.0, a) /* DF478, IDF041 */
    533519
     520static uint32_t CRC24(long size, const unsigned char *buf) {
     521  uint32_t crc = 0;
     522  int ii;
     523  while (size--) {
     524    crc ^= (*buf++) << (16);
     525    for (ii = 0; ii < 8; ii++)  {
     526      crc <<= 1;
     527      if (crc & 0x1000000)
     528        crc ^= 0x01864cfb;
     529    }
     530  }
     531  return crc;
     532}
    534533
    535534static double URAToValue(int ura) {
Note: See TracChangeset for help on using the changeset viewer.