* Counts the number of set bits in a value (population count). * Used to determine the number of satellites in a satellite mask.
(value)
| 119 | * Used to determine the number of satellites in a satellite mask. |
| 120 | */ |
| 121 | function countBits(value) { |
| 122 | var count = 0; |
| 123 | while (value) { |
| 124 | count += value & 1; |
| 125 | value >>= 1; |
| 126 | } |
| 127 | return count; |
| 128 | } |
| 129 | |
| 130 | /** |
| 131 | * Validates the RTCM CRC-24Q checksum. |