|
MRTKLIB 0.7.14
Modernized GNSS Positioning Library
|
MRTKLIB Bits Module — Implementation. More...
Go to the source code of this file.
Macros | |
| #define | POLYCRC32 0xEDB88320u /* CRC32 polynomial */ |
| #define | POLYCRC24Q 0x1864CFBu /* CRC24Q polynomial */ |
Functions | |
| uint32_t | getbitu (const uint8_t *buff, int pos, int len) |
| Extract unsigned bits from byte data. | |
| int32_t | getbits (const uint8_t *buff, int pos, int len) |
| Extract signed bits from byte data. | |
| void | setbitu (uint8_t *buff, int pos, int len, uint32_t data) |
| Set unsigned bits in byte data. | |
| void | setbits (uint8_t *buff, int pos, int len, int32_t data) |
| Set signed bits in byte data. | |
| uint32_t | rtk_crc32 (const uint8_t *buff, int len) |
| Compute CRC-32 parity for NovAtel raw data. | |
| uint32_t | rtk_crc24q (const uint8_t *buff, int len) |
| Compute CRC-24Q parity for SBAS and RTCM3. | |
| uint16_t | rtk_crc16 (const uint8_t *buff, int len) |
| Compute CRC-16 parity for BINEX and NVS. | |
| int | decode_word (uint32_t word, uint8_t *data) |
| Check parity and decode GPS navigation data word. | |
Variables | |
| static const uint16_t | tbl_CRC16 [] |
| static const uint32_t | tbl_CRC24Q [] |
MRTKLIB Bits Module — Implementation.
All functions and static data in this file are cut-and-paste extractions from the legacy rtkcmn.c with zero algorithmic changes.
Definition in file mrtk_bits.c.
| #define POLYCRC24Q 0x1864CFBu /* CRC24Q polynomial */ |
Definition at line 39 of file mrtk_bits.c.
| #define POLYCRC32 0xEDB88320u /* CRC32 polynomial */ |
Definition at line 38 of file mrtk_bits.c.
Referenced by rtk_crc32().
|
extern |
Check parity and decode GPS navigation data word.
| [in] | word | Navigation data word (2+30 bit) (previous word D29*-30* + current word D1-30) |
| [out] | data | Decoded navigation data without parity (8bit x 3) |
Definition at line 224 of file mrtk_bits.c.
References trace().
Referenced by input_rtcm2().
|
extern |
Extract signed bits from byte data.
| [in] | buff | Byte data |
| [in] | pos | Bit position from start of data (bits) |
| [in] | len | Bit length (bits) (len<=32) |
Definition at line 107 of file mrtk_bits.c.
References getbitu().
Referenced by decode_alm_sat(), decode_bds_d1_eph(), decode_bds_d1_ion(), decode_bds_d1_utc(), decode_bds_d2_eph(), decode_bds_d2_utc(), decode_bnx_7f_05(), decode_bnx_7f_05_obs(), decode_cssr_grid(), decode_frame_eph(), decode_frame_ion(), decode_frame_utc(), decode_gal_fnav_eph(), decode_gal_fnav_ion(), decode_gal_fnav_utc(), decode_gal_inav_eph(), decode_gal_inav_ion(), decode_gal_inav_utc(), decode_glostr_utc(), decode_has_clock(), decode_has_clock_subset(), decode_has_codebias(), decode_has_orbit(), decode_has_phasebias(), decode_irn_eph(), decode_irn_ion(), decode_irn_utc(), decode_longcorr0(), decode_longcorr1(), decode_mcssr_cb(), decode_mcssr_cc(), decode_mcssr_oc(), decode_mcssr_pb(), decode_measepoch(), decode_miono_correction(), decode_miono_coverage(), decode_msm4(), decode_msm5(), decode_msm6(), decode_msm7(), decode_sbstype2(), decode_sbstype24(), decode_sbstype9(), decode_ssr1(), decode_ssr2(), decode_ssr3(), decode_ssr4(), decode_ssr6(), decode_ssr7(), decode_sval(), decode_type1(), decode_type1002(), decode_type1004(), decode_type1010(), decode_type1012(), decode_type1019(), decode_type1041(), decode_type1042(), decode_type1044(), decode_type1045(), decode_type1046(), decode_type1230(), decode_type17(), decode_type18(), decode_type22(), decode_type3(), decode_type4050(), getbits2(), getbits3(), and getbits_38().
|
extern |
Extract unsigned bits from byte data.
| [in] | buff | Byte data |
| [in] | pos | Bit position from start of data (bits) |
| [in] | len | Bit length (bits) (len<=32) |
Definition at line 99 of file mrtk_bits.c.
Referenced by check_bit_width_atmos(), check_bit_width_bias(), check_bit_width_combo(), check_bit_width_grid(), check_bit_width_mask(), check_bit_width_si(), check_bit_width_stec(), decode_alm_gps(), decode_alm_qzs(), decode_alm_sat(), decode_bds_d1_eph(), decode_bds_d1_ion(), decode_bds_d1_utc(), decode_bds_d2_eph(), decode_bds_d2_utc(), decode_bdsraw(), decode_bnx_7f_05(), decode_bnx_7f_05_obs(), decode_cnav(), decode_cresgloeph(), decode_cssr_atmos(), decode_cssr_bias(), decode_cssr_combo(), decode_cssr_grid(), decode_cssr_head(), decode_cssr_mask(), decode_cssr_oc(), decode_cssr_pb(), decode_cssr_si(), decode_cssr_stec(), decode_cssr_ura(), decode_enav(), decode_frame_alm(), decode_frame_eph(), decode_frame_ion(), decode_frame_utc(), decode_gal_fnav_eph(), decode_gal_fnav_ion(), decode_gal_fnav_utc(), decode_gal_inav_eph(), decode_gal_inav_ion(), decode_gal_inav_utc(), decode_galrawfnav(), decode_galrawinav(), decode_glorawca(), decode_glostr_eph(), decode_glostr_utc(), decode_gnav(), decode_has_clock(), decode_has_clock_subset(), decode_has_mask(), decode_has_mt1(), decode_has_orbit(), decode_has_phasebias(), decode_head1001(), decode_head1009(), decode_irn_eph(), decode_irn_ion(), decode_irn_utc(), decode_L1nav(), decode_L2nav(), decode_L5nav(), decode_lclhead(), decode_lcliono(), decode_lcltrop(), decode_longcorr0(), decode_longcorr1(), decode_longcorrh(), decode_mcssr_head(), decode_mcssr_mask(), decode_mcssr_oc(), decode_mcssr_pb(), decode_mcssr_ura(), decode_miono_correction(), decode_miono_coverage(), decode_msm4(), decode_msm5(), decode_msm6(), decode_msm7(), decode_msm_head(), decode_nav(), decode_navicraw(), decode_qzs_msg(), decode_qzss_l6dmsg(), decode_qzss_l6emsg(), decode_rawca(), decode_rtcm2(), decode_rtcm3(), decode_rxmsfrb(), decode_sbstype1(), decode_sbstype18(), decode_sbstype2(), decode_sbstype24(), decode_sbstype26(), decode_sbstype6(), decode_sbstype7(), decode_sbstype9(), decode_ssr1(), decode_ssr1_head(), decode_ssr2(), decode_ssr2_head(), decode_ssr3(), decode_ssr4(), decode_ssr5(), decode_ssr6(), decode_ssr7(), decode_ssr7_head(), decode_ssr_epoch(), decode_stqbds(), decode_type1(), decode_type1002(), decode_type1004(), decode_type1005(), decode_type1006(), decode_type1007(), decode_type1008(), decode_type1010(), decode_type1012(), decode_type1019(), decode_type1020(), decode_type1029(), decode_type1033(), decode_type1041(), decode_type1042(), decode_type1044(), decode_type1045(), decode_type1046(), decode_type1230(), decode_type14(), decode_type16(), decode_type17(), decode_type18(), decode_type19(), decode_type22(), decode_type4050(), decode_type4073(), decode_type4076(), detslp_ll(), getbitg(), getbitg(), getbits(), getbits2(), getbits3(), getbits_38(), getbitu2(), getbitu3(), has_input_page(), input_rtcm3(), inputobs(), popcount_field(), save_msm_obs(), sbsupdatecorr(), and test_staid().
|
extern |
Compute CRC-16 parity for BINEX and NVS.
| [in] | buff | Data buffer |
| [in] | len | Data length (bytes) |
Definition at line 199 of file mrtk_bits.c.
References tbl_CRC16, and trace().
Referenced by decode_bnx(), and decode_sbf().
|
extern |
Compute CRC-24Q parity for SBAS and RTCM3.
| [in] | buff | Data buffer |
| [in] | len | Data length (bytes) |
Definition at line 181 of file mrtk_bits.c.
References tbl_CRC24Q, and trace().
Referenced by decode_enav(), decode_galrawfnav(), decode_galrawinav(), gen_rtcm3(), input_rtcm3(), and sbsdecodemsg().
|
extern |
Compute CRC-32 parity for NovAtel raw data.
| [in] | buff | Data buffer |
| [in] | len | Data length (bytes) |
Definition at line 156 of file mrtk_bits.c.
References POLYCRC32, and trace().
Referenced by decode_oem4().
|
extern |
Set signed bits in byte data.
| [in,out] | buff | Byte data |
| [in] | pos | Bit position from start of data (bits) |
| [in] | len | Bit length (bits) (len<=32) |
| [in] | data | Signed data to set |
Definition at line 136 of file mrtk_bits.c.
References setbitu().
Referenced by encode_msm_phrng(), encode_msm_phrng_ex(), encode_msm_psrng(), encode_msm_psrng_ex(), encode_msm_rrate(), encode_ssr1(), encode_ssr2(), encode_ssr3(), encode_ssr4(), encode_ssr6(), encode_ssr7(), encode_type1001(), encode_type1002(), encode_type1003(), encode_type1004(), encode_type1009(), encode_type1010(), encode_type1011(), encode_type1012(), encode_type1019(), encode_type1041(), encode_type1042(), encode_type1044(), encode_type1045(), encode_type1046(), encode_type1230(), encode_type63(), and set38bits().
|
extern |
Set unsigned bits in byte data.
| [in,out] | buff | Byte data |
| [in] | pos | Bit position from start of data (bits) |
| [in] | len | Bit length (bits) (len<=32) |
| [in] | data | Unsigned data to set |
Definition at line 122 of file mrtk_bits.c.
Referenced by clas_input_cssr(), decode_bdsraw(), decode_cnav(), decode_enav(), decode_galrawfnav(), decode_galrawinav(), decode_georawl1(), decode_glorawca(), decode_L1nav(), decode_lD(), decode_nav(), decode_navicraw(), decode_rawca(), decode_rxmsfrb(), decode_snav(), decode_stqbds(), decode_stqglo(), detslp_ll(), encode_head(), encode_lclhead(), encode_lcliono(), encode_lcltrop(), encode_msm_cnr(), encode_msm_cnr_ex(), encode_msm_half_amb(), encode_msm_head(), encode_msm_info(), encode_msm_int_rrng(), encode_msm_lock(), encode_msm_lock_ex(), encode_msm_mod_rrng(), encode_msm_rate(), encode_ssr1(), encode_ssr2(), encode_ssr3(), encode_ssr4(), encode_ssr5(), encode_ssr6(), encode_ssr7(), encode_ssr_head(), encode_type1001(), encode_type1002(), encode_type1003(), encode_type1004(), encode_type1005(), encode_type1006(), encode_type1007(), encode_type1008(), encode_type1009(), encode_type1010(), encode_type1011(), encode_type1012(), encode_type1019(), encode_type1020(), encode_type1033(), encode_type1041(), encode_type1042(), encode_type1044(), encode_type1045(), encode_type1046(), encode_type1230(), encode_type63(), gen_rtcm3(), set38bits(), setbitg(), and setbits().
|
static |
Definition at line 42 of file mrtk_bits.c.
Referenced by rtk_crc16().
|
static |
Definition at line 62 of file mrtk_bits.c.
Referenced by rtk_crc24q().