Changeset 7053 in ntrip for trunk/BNC/src/bncutils.cpp
- Timestamp:
- Jul 16, 2015, 9:43:15 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncutils.cpp
r6812 r7053 867 867 return (type == t_eph::Galileo) ? 255 : 15; 868 868 } 869 870 // Returns CRC24 871 //////////////////////////////////////////////////////////////////////////// 872 unsigned long CRC24(long size, const unsigned char *buf) { 873 unsigned long crc = 0; 874 int ii; 875 while (size--) { 876 crc ^= (*buf++) << (16); 877 for(ii = 0; ii < 8; ii++) { 878 crc <<= 1; 879 if (crc & 0x1000000) { 880 crc ^= 0x01864cfb; 881 } 882 } 883 } 884 return crc; 885 } 886
Note:
See TracChangeset
for help on using the changeset viewer.