MRTKLIB 0.7.14
Modernized GNSS Positioning Library
Loading...
Searching...
No Matches
mrtk_rcvraw.c File Reference
#include "mrtklib/mrtk_rcvraw.h"
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "mrtklib/mrtk_bits.h"
#include "mrtklib/mrtk_eph.h"
#include "mrtklib/mrtk_l6.h"
#include "mrtklib/mrtk_madoca.h"
#include "mrtklib/mrtk_nav.h"
#include "mrtklib/mrtk_obs.h"
#include "mrtklib/mrtk_rtcm.h"
#include "mrtklib/mrtk_time.h"
#include "mrtklib/mrtk_trace.h"
Include dependency graph for mrtk_rcvraw.c:

Go to the source code of this file.

Macros

#define SC2RAD   3.1415926535898 /* semi-circle to radian (IS-GPS) */
#define SYS_GPS   0x01
#define SYS_GLO   0x04
#define SYS_GAL   0x08
#define SYS_QZS   0x10
#define SYS_CMP   0x20
#define SYS_IRN   0x40
#define P2_5   0.03125 /* 2^-5 */
#define P2_6   0.015625 /* 2^-6 */
#define P2_11   4.882812500000000E-04 /* 2^-11 */
#define P2_15   3.051757812500000E-05 /* 2^-15 */
#define P2_17   7.629394531250000E-06 /* 2^-17 */
#define P2_19   1.907348632812500E-06 /* 2^-19 */
#define P2_20   9.536743164062500E-07 /* 2^-20 */
#define P2_21   4.768371582031250E-07 /* 2^-21 */
#define P2_23   1.192092895507810E-07 /* 2^-23 */
#define P2_24   5.960464477539063E-08 /* 2^-24 */
#define P2_27   7.450580596923828E-09 /* 2^-27 */
#define P2_29   1.862645149230957E-09 /* 2^-29 */
#define P2_30   9.313225746154785E-10 /* 2^-30 */
#define P2_31   4.656612873077393E-10 /* 2^-31 */
#define P2_32   2.328306436538696E-10 /* 2^-32 */
#define P2_33   1.164153218269348E-10 /* 2^-33 */
#define P2_35   2.910383045673370E-11 /* 2^-35 */
#define P2_38   3.637978807091710E-12 /* 2^-38 */
#define P2_40   9.094947017729280E-13 /* 2^-40 */
#define P2_43   1.136868377216160E-13 /* 2^-43 */
#define P2_50   8.881784197001252E-16 /* 2^-50 */
#define P2_55   2.775557561562891E-17 /* 2^-55 */
#define P2_8   0.00390625 /* 2^-8 */
#define P2_9   0.001953125 /* 2^-9 */
#define P2_14   6.103515625000000E-05 /* 2^-14 */
#define P2_18   3.814697265625000E-06 /* 2^-18 */
#define P2_28   3.725290298461914E-09 /* 2^-28 */
#define P2_34   5.820766091346740E-11 /* 2^-34 */
#define P2_41   4.547473508864641E-13 /* 2^-41 */
#define P2_46   1.421085471520200E-14 /* 2^-46 */
#define P2_51   4.440892098500626E-16 /* 2^-51 */
#define P2_59   1.734723475976810E-18 /* 2^-59 */
#define P2_66   1.355252715606881E-20 /* 2^-66 */
#define P2_68   3.388131789017201E-21 /* 2^-68 */
#define P2P11   2048.0 /* 2^11 */
#define P2P12   4096.0 /* 2^12 */
#define P2P14   16384.0 /* 2^14 */
#define P2P15   32768.0 /* 2^15 */
#define P2P16   65536.0 /* 2^16 */
#define SQR(x)

Functions

static uint32_t getbitu2 (const uint8_t *buff, int p1, int l1, int p2, int l2)
static int32_t getbits2 (const uint8_t *buff, int p1, int l1, int p2, int l2)
static uint32_t getbitu3 (const uint8_t *buff, int p1, int l1, int p2, int l2, int p3, int l3)
static int32_t getbits3 (const uint8_t *buff, int p1, int l1, int p2, int l2, int p3, int l3)
static uint32_t merge_two_u (uint32_t a, uint32_t b, int n)
static int32_t merge_two_s (int32_t a, uint32_t b, int n)
static double getbitg (const uint8_t *buff, int pos, int len)
static int decode_irn_eph (const uint8_t *buff, eph_t *eph)
static int decode_irn_ion (const uint8_t *buff, double *ion)
static int decode_irn_utc (const uint8_t *buff, double *utc)
int decode_irn_nav (const uint8_t *buff, eph_t *eph, double *ion, double *utc)
static int decode_gal_inav_eph (const uint8_t *buff, eph_t *eph)
static int decode_gal_inav_ion (const uint8_t *buff, double *ion)
static int decode_gal_inav_utc (const uint8_t *buff, double *utc)
int decode_gal_inav (const uint8_t *buff, eph_t *eph, double *ion, double *utc)
static int decode_gal_fnav_eph (const uint8_t *buff, eph_t *eph)
static int decode_gal_fnav_ion (const uint8_t *buff, double *ion)
static int decode_gal_fnav_utc (const uint8_t *buff, double *utc)
int decode_gal_fnav (const uint8_t *buff, eph_t *eph, double *ion, double *utc)
static int decode_bds_d1_eph (const uint8_t *buff, eph_t *eph)
static int decode_bds_d1_ion (const uint8_t *buff, double *ion)
static int decode_bds_d1_utc (const uint8_t *buff, double *utc)
int decode_bds_d1 (const uint8_t *buff, eph_t *eph, double *ion, double *utc)
static int decode_bds_d2_eph (const uint8_t *buff, eph_t *eph)
static int decode_bds_d2_utc (const uint8_t *buff, double *utc)
int decode_bds_d2 (const uint8_t *buff, eph_t *eph, double *utc)
int test_glostr (const uint8_t *buff)
static int decode_glostr_eph (const uint8_t *buff, geph_t *geph)
static int decode_glostr_utc (const uint8_t *buff, double *utc)
int decode_glostr (const uint8_t *buff, geph_t *geph, double *utc)
static int decode_frame_eph (const uint8_t *buff, eph_t *eph)
static void decode_alm_sat (const uint8_t *buff, int type, alm_t *alm)
static int decode_alm_gps (const uint8_t *buff, int frm, alm_t *alm)
static int decode_alm_qzs (const uint8_t *buff, alm_t *alm)
static int decode_frame_alm (const uint8_t *buff, alm_t *alm)
static int decode_frame_ion (const uint8_t *buff, double *ion)
static int decode_frame_utc (const uint8_t *buff, double *utc)
int decode_frame (const uint8_t *buff, eph_t *eph, alm_t *alm, double *ion, double *utc)
int decode_qzss_l6frame (rtcm_t *rtcm, int is_l6d)
 Route one QZSS L6 frame received in a UBX/SBF container.
int init_raw (raw_t *raw, int format)
 Initialize receiver raw data control struct.
void free_raw (raw_t *raw)
 Free receiver raw data control struct.
int input_raw (raw_t *raw, rtcm_t *rtcm, int format, uint8_t data)
 Input receiver raw data from stream (byte-by-byte).
int input_rawf (raw_t *raw, rtcm_t *rtcm, int format, FILE *fp)
 Input receiver raw data from file.

Macro Definition Documentation

◆ P2_11

#define P2_11   4.882812500000000E-04 /* 2^-11 */

◆ P2_14

#define P2_14   6.103515625000000E-05 /* 2^-14 */

Definition at line 70 of file mrtk_rcvraw.c.

◆ P2_15

#define P2_15   3.051757812500000E-05 /* 2^-15 */

Definition at line 46 of file mrtk_rcvraw.c.

Referenced by decode_gal_fnav_ion(), and decode_gal_inav_ion().

◆ P2_17

#define P2_17   7.629394531250000E-06 /* 2^-17 */

Definition at line 47 of file mrtk_rcvraw.c.

Referenced by decode_alm_sat().

◆ P2_18

#define P2_18   3.814697265625000E-06 /* 2^-18 */

Definition at line 71 of file mrtk_rcvraw.c.

◆ P2_19

◆ P2_20

#define P2_20   9.536743164062500E-07 /* 2^-20 */

Definition at line 49 of file mrtk_rcvraw.c.

Referenced by decode_alm_sat(), decode_glostr_eph(), decode_type1020(), and encode_type1020().

◆ P2_21

#define P2_21   4.768371582031250E-07 /* 2^-21 */

Definition at line 50 of file mrtk_rcvraw.c.

Referenced by decode_alm_sat().

◆ P2_23

#define P2_23   1.192092895507810E-07 /* 2^-23 */

Definition at line 51 of file mrtk_rcvraw.c.

Referenced by decode_alm_sat().

◆ P2_24

#define P2_24   5.960464477539063E-08 /* 2^-24 */

◆ P2_27

#define P2_27   7.450580596923828E-09 /* 2^-27 */

Definition at line 53 of file mrtk_rcvraw.c.

Referenced by decode_bds_d1_ion(), decode_frame_ion(), and decode_irn_ion().

◆ P2_28

#define P2_28   3.725290298461914E-09 /* 2^-28 */

Definition at line 72 of file mrtk_rcvraw.c.

Referenced by decode_irn_eph(), decode_type1041(), and encode_type1041().

◆ P2_29

◆ P2_30

◆ P2_31

◆ P2_32

#define P2_32   2.328306436538696E-10 /* 2^-32 */

◆ P2_33

◆ P2_34

#define P2_34   5.820766091346740E-11 /* 2^-34 */

◆ P2_35

#define P2_35   2.910383045673370E-11 /* 2^-35 */

Definition at line 59 of file mrtk_rcvraw.c.

Referenced by decode_irn_utc().

◆ P2_38

#define P2_38   3.637978807091710E-12 /* 2^-38 */

Definition at line 60 of file mrtk_rcvraw.c.

Referenced by decode_alm_sat().

◆ P2_40

#define P2_40   9.094947017729280E-13 /* 2^-40 */

Definition at line 61 of file mrtk_rcvraw.c.

Referenced by decode_glostr_eph(), decode_type1020(), decode_xp(), and encode_type1020().

◆ P2_41

#define P2_41   4.547473508864641E-13 /* 2^-41 */

Definition at line 74 of file mrtk_rcvraw.c.

Referenced by decode_irn_eph(), decode_type1041(), and encode_type1041().

◆ P2_43

◆ P2_46

#define P2_46   1.421085471520200E-14 /* 2^-46 */

◆ P2_5

◆ P2_50

◆ P2_51

#define P2_51   4.440892098500626E-16 /* 2^-51 */

Definition at line 76 of file mrtk_rcvraw.c.

Referenced by decode_irn_utc().

◆ P2_55

#define P2_55   2.775557561562891E-17 /* 2^-55 */

◆ P2_59

#define P2_59   1.734723475976810E-18 /* 2^-59 */

◆ P2_6

#define P2_6   0.015625 /* 2^-6 */

◆ P2_66

#define P2_66   1.355252715606881E-20 /* 2^-66 */

◆ P2_68

#define P2_68   3.388131789017201E-21 /* 2^-68 */

Definition at line 79 of file mrtk_rcvraw.c.

Referenced by decode_irn_utc().

◆ P2_8

#define P2_8   0.00390625 /* 2^-8 */

Definition at line 68 of file mrtk_rcvraw.c.

Referenced by decode_gal_fnav_ion(), and decode_gal_inav_ion().

◆ P2_9

#define P2_9   0.001953125 /* 2^-9 */

Definition at line 69 of file mrtk_rcvraw.c.

◆ P2P11

#define P2P11   2048.0 /* 2^11 */

Definition at line 80 of file mrtk_rcvraw.c.

Referenced by decode_bds_d1_ion(), decode_frame_ion(), and decode_irn_ion().

◆ P2P12

#define P2P12   4096.0 /* 2^12 */

Definition at line 81 of file mrtk_rcvraw.c.

Referenced by decode_frame_utc().

◆ P2P14

#define P2P14   16384.0 /* 2^14 */

Definition at line 82 of file mrtk_rcvraw.c.

Referenced by decode_bds_d1_ion(), decode_frame_ion(), and decode_irn_ion().

◆ P2P15

#define P2P15   32768.0 /* 2^15 */

Definition at line 83 of file mrtk_rcvraw.c.

◆ P2P16

#define P2P16   65536.0 /* 2^16 */

Definition at line 84 of file mrtk_rcvraw.c.

Referenced by decode_bds_d1_ion(), decode_frame_ion(), and decode_irn_ion().

◆ SC2RAD

◆ SQR

#define SQR ( x)
Value:
((x) * (x))

Definition at line 86 of file mrtk_rcvraw.c.

Referenced by decode_irn_eph().

◆ SYS_CMP

#define SYS_CMP   0x20

Definition at line 39 of file mrtk_rcvraw.c.

◆ SYS_GAL

#define SYS_GAL   0x08

Definition at line 37 of file mrtk_rcvraw.c.

◆ SYS_GLO

#define SYS_GLO   0x04

Definition at line 36 of file mrtk_rcvraw.c.

◆ SYS_GPS

#define SYS_GPS   0x01

Definition at line 35 of file mrtk_rcvraw.c.

◆ SYS_IRN

#define SYS_IRN   0x40

Definition at line 40 of file mrtk_rcvraw.c.

◆ SYS_QZS

#define SYS_QZS   0x10

Definition at line 38 of file mrtk_rcvraw.c.

Function Documentation

◆ decode_alm_gps()

int decode_alm_gps ( const uint8_t * buff,
int frm,
alm_t * alm )
static

Definition at line 1454 of file mrtk_rcvraw.c.

References adjgpsweek(), decode_alm_sat(), getbitu(), gpst2time(), alm_t::sat, satno(), alm_t::svh, SYS_GPS, alm_t::toa, trace(), and alm_t::week.

Referenced by decode_frame_alm().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_alm_qzs()

int decode_alm_qzs ( const uint8_t * buff,
alm_t * alm )
static

Definition at line 1499 of file mrtk_rcvraw.c.

References adjgpsweek(), decode_alm_sat(), getbitu(), gpst2time(), alm_t::sat, satno(), alm_t::svh, SYS_QZS, alm_t::toa, trace(), and alm_t::week.

Referenced by decode_frame_alm().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_alm_sat()

void decode_alm_sat ( const uint8_t * buff,
int type,
alm_t * alm )
static

Definition at line 1402 of file mrtk_rcvraw.c.

References alm_t::A, alm_t::e, alm_t::f0, alm_t::f1, getbits(), getbitu(), alm_t::i0, alm_t::M0, alm_t::omg, alm_t::OMG0, alm_t::OMGd, P2_11, P2_17, P2_19, P2_20, P2_21, P2_23, P2_38, SC2RAD, alm_t::svh, alm_t::toa, alm_t::toas, trace(), and alm_t::week.

Referenced by decode_alm_gps(), and decode_alm_qzs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_bds_d1()

int decode_bds_d1 ( const uint8_t * buff,
eph_t * eph,
double * ion,
double * utc )
extern

Definition at line 851 of file mrtk_rcvraw.c.

References decode_bds_d1_eph(), decode_bds_d1_ion(), decode_bds_d1_utc(), and trace().

Referenced by decode_bdsraw(), decode_cnav(), and decode_stqbds().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_bds_d1_eph()

int decode_bds_d1_eph ( const uint8_t * buff,
eph_t * eph )
static

Definition at line 713 of file mrtk_rcvraw.c.

References eph_t::A, bdt2gpst(), bdt2time(), eph_t::cic, eph_t::cis, eph_t::code, eph_t::crc, eph_t::crs, eph_t::cuc, eph_t::cus, eph_t::deln, eph_t::e, eph_t::f0, eph_t::f1, eph_t::f2, eph_t::flag, getbits(), getbits2(), getbitu(), getbitu2(), eph_t::i0, eph_t::idot, eph_t::iodc, eph_t::iode, eph_t::M0, merge_two_u(), eph_t::omg, eph_t::OMG0, eph_t::OMGd, P2_19, P2_31, P2_33, P2_43, P2_50, P2_6, P2_66, SC2RAD, eph_t::sva, eph_t::svh, eph_t::tgd, eph_t::toc, eph_t::toe, eph_t::toes, trace(), eph_t::ttr, eph_t::type, and eph_t::week.

Referenced by decode_bds_d1().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_bds_d1_ion()

int decode_bds_d1_ion ( const uint8_t * buff,
double * ion )
static

Definition at line 789 of file mrtk_rcvraw.c.

References getbits(), getbits2(), getbitu(), P2_24, P2_27, P2_30, P2P11, P2P14, P2P16, and trace().

Referenced by decode_bds_d1().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_bds_d1_utc()

int decode_bds_d1_utc ( const uint8_t * buff,
double * utc )
static

Definition at line 810 of file mrtk_rcvraw.c.

References getbits(), getbits2(), getbitu(), getbitu2(), P2_30, P2_50, and trace().

Referenced by decode_bds_d1().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_bds_d2()

int decode_bds_d2 ( const uint8_t * buff,
eph_t * eph,
double * utc )
extern

Definition at line 1026 of file mrtk_rcvraw.c.

References decode_bds_d2_eph(), decode_bds_d2_utc(), and trace().

Referenced by decode_bdsraw(), decode_cnav(), and decode_stqbds().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_bds_d2_eph()

int decode_bds_d2_eph ( const uint8_t * buff,
eph_t * eph )
static

Definition at line 866 of file mrtk_rcvraw.c.

References eph_t::A, bdt2gpst(), bdt2time(), eph_t::cic, eph_t::cis, eph_t::code, eph_t::crc, eph_t::crs, eph_t::cuc, eph_t::cus, eph_t::deln, eph_t::e, eph_t::f0, eph_t::f1, eph_t::f2, eph_t::flag, getbits(), getbits2(), getbits3(), getbitu(), getbitu2(), getbitu3(), eph_t::i0, eph_t::idot, eph_t::iodc, eph_t::iode, eph_t::M0, merge_two_s(), eph_t::omg, eph_t::OMG0, eph_t::OMGd, P2_19, P2_31, P2_33, P2_43, P2_50, P2_6, P2_66, SC2RAD, eph_t::sva, eph_t::svh, eph_t::tgd, eph_t::toc, eph_t::toe, eph_t::toes, trace(), eph_t::ttr, eph_t::type, and eph_t::week.

Referenced by decode_bds_d2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_bds_d2_utc()

int decode_bds_d2_utc ( const uint8_t * buff,
double * utc )
static

Definition at line 987 of file mrtk_rcvraw.c.

References getbits(), getbits2(), getbitu(), P2_30, P2_50, and trace().

Referenced by decode_bds_d2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_frame()

int decode_frame ( const uint8_t * buff,
eph_t * eph,
alm_t * alm,
double * ion,
double * utc )
extern

Definition at line 1643 of file mrtk_rcvraw.c.

References decode_frame_alm(), decode_frame_eph(), decode_frame_ion(), decode_frame_utc(), and trace().

Referenced by decode_alm1(), decode_alm2(), decode_creseph(), decode_eph(), decode_eph(), decode_ephem(), decode_ionutc(), decode_ionutc(), decode_L1eph(), decode_L1ionutc(), decode_qzssrawephemb(), decode_qzssrawsubframeb(), decode_rawephemb(), decode_repb(), and decode_ss2eph().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_frame_alm()

int decode_frame_alm ( const uint8_t * buff,
alm_t * alm )
static

Definition at line 1535 of file mrtk_rcvraw.c.

References decode_alm_gps(), decode_alm_qzs(), getbitu(), and trace().

Referenced by decode_frame().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_frame_eph()

int decode_frame_eph ( const uint8_t * buff,
eph_t * eph )
static

Definition at line 1290 of file mrtk_rcvraw.c.

References eph_t::A, adjgpsweek(), eph_t::cic, eph_t::cis, eph_t::code, eph_t::crc, eph_t::crs, eph_t::cuc, eph_t::cus, eph_t::deln, eph_t::e, eph_t::f0, eph_t::f1, eph_t::f2, eph_t::fit, eph_t::flag, getbits(), getbitu(), gpst2time(), eph_t::i0, eph_t::idot, eph_t::iodc, eph_t::iode, eph_t::M0, eph_t::omg, eph_t::OMG0, eph_t::OMGd, P2_19, P2_29, P2_31, P2_33, P2_43, P2_5, P2_55, SC2RAD, eph_t::sva, eph_t::svh, eph_t::tgd, eph_t::toc, eph_t::toe, eph_t::toes, trace(), eph_t::ttr, eph_t::type, and eph_t::week.

Referenced by decode_frame().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_frame_ion()

int decode_frame_ion ( const uint8_t * buff,
double * ion )
static

Definition at line 1555 of file mrtk_rcvraw.c.

References getbits(), getbitu(), P2_24, P2_27, P2_30, P2P11, P2P14, P2P16, and trace().

Referenced by decode_frame().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_frame_utc()

int decode_frame_utc ( const uint8_t * buff,
double * utc )
static

Definition at line 1589 of file mrtk_rcvraw.c.

References getbits(), getbitu(), P2_30, P2_50, P2P12, and trace().

Referenced by decode_frame().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_gal_fnav()

int decode_gal_fnav ( const uint8_t * buff,
eph_t * eph,
double * ion,
double * utc )
extern

Definition at line 698 of file mrtk_rcvraw.c.

References decode_gal_fnav_eph(), decode_gal_fnav_ion(), decode_gal_fnav_utc(), and trace().

Referenced by decode_galrawfnav().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_gal_fnav_eph()

int decode_gal_fnav_eph ( const uint8_t * buff,
eph_t * eph )
static

Definition at line 512 of file mrtk_rcvraw.c.

References eph_t::A, eph_t::cic, eph_t::cis, eph_t::code, eph_t::crc, eph_t::crs, eph_t::cuc, eph_t::cus, eph_t::deln, eph_t::e, eph_t::f0, eph_t::f1, eph_t::f2, getbits(), getbitu(), gst2time(), eph_t::i0, eph_t::idot, eph_t::iodc, eph_t::iode, eph_t::M0, eph_t::omg, eph_t::OMG0, eph_t::OMGd, P2_19, P2_29, P2_31, P2_32, P2_33, P2_34, P2_43, P2_46, P2_5, P2_59, eph_t::sat, satno(), SC2RAD, eph_t::sva, eph_t::svh, SYS_GAL, eph_t::tgd, timediff(), eph_t::toc, eph_t::toe, eph_t::toes, trace(), eph_t::ttr, eph_t::type, and eph_t::week.

Referenced by decode_gal_fnav().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_gal_fnav_ion()

int decode_gal_fnav_ion ( const uint8_t * buff,
double * ion )
static

Definition at line 636 of file mrtk_rcvraw.c.

References getbits(), getbitu(), P2_15, P2_8, and trace().

Referenced by decode_gal_fnav().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_gal_fnav_utc()

int decode_gal_fnav_utc ( const uint8_t * buff,
double * utc )
static

Definition at line 655 of file mrtk_rcvraw.c.

References getbits(), getbitu(), P2_30, P2_50, and trace().

Referenced by decode_gal_fnav().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_gal_inav()

int decode_gal_inav ( const uint8_t * buff,
eph_t * eph,
double * ion,
double * utc )
extern

Definition at line 497 of file mrtk_rcvraw.c.

References decode_gal_inav_eph(), decode_gal_inav_ion(), decode_gal_inav_utc(), and trace().

Referenced by decode_enav(), and decode_galrawinav().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_gal_inav_eph()

int decode_gal_inav_eph ( const uint8_t * buff,
eph_t * eph )
static

Definition at line 311 of file mrtk_rcvraw.c.

References eph_t::A, eph_t::cic, eph_t::cis, eph_t::code, eph_t::crc, eph_t::crs, eph_t::cuc, eph_t::cus, eph_t::deln, eph_t::e, eph_t::f0, eph_t::f1, eph_t::f2, getbits(), getbitu(), gst2time(), eph_t::i0, eph_t::idot, eph_t::iodc, eph_t::iode, eph_t::M0, eph_t::omg, eph_t::OMG0, eph_t::OMGd, P2_19, P2_29, P2_31, P2_32, P2_33, P2_34, P2_43, P2_46, P2_5, P2_59, eph_t::sat, satno(), SC2RAD, eph_t::sva, eph_t::svh, SYS_GAL, eph_t::tgd, timediff(), eph_t::toc, eph_t::toe, eph_t::toes, trace(), eph_t::ttr, eph_t::type, and eph_t::week.

Referenced by decode_gal_inav().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_gal_inav_ion()

int decode_gal_inav_ion ( const uint8_t * buff,
double * ion )
static

Definition at line 434 of file mrtk_rcvraw.c.

References getbits(), getbitu(), P2_15, P2_8, and trace().

Referenced by decode_gal_inav().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_gal_inav_utc()

int decode_gal_inav_utc ( const uint8_t * buff,
double * utc )
static

Definition at line 453 of file mrtk_rcvraw.c.

References getbits(), getbitu(), P2_30, P2_50, and trace().

Referenced by decode_gal_inav().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_glostr()

int decode_glostr ( const uint8_t * buff,
geph_t * geph,
double * utc )
extern

Definition at line 1278 of file mrtk_rcvraw.c.

References decode_glostr_eph(), decode_glostr_utc(), and trace().

Referenced by decode_cresgloeph(), decode_glorawca(), decode_gnav(), decode_lD(), and decode_stqglo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_glostr_eph()

int decode_glostr_eph ( const uint8_t * buff,
geph_t * geph )
static

Definition at line 1130 of file mrtk_rcvraw.c.

References geph_t::acc, geph_t::age, geph_t::dtaun, geph_t::flags, geph_t::frq, geph_t::gamn, getbitg(), getbitu(), gpst2time(), gpst2utc(), geph_t::iode, NT, P2_11, P2_20, P2_30, P2_40, geph_t::pos, geph_t::sat, satno(), geph_t::sva, geph_t::svh, SYS_GLO, geph_t::taun, time2gpst(), geph_t::toe, geph_t::tof, trace(), utc2gpst(), and geph_t::vel.

Referenced by decode_glostr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_glostr_utc()

int decode_glostr_utc ( const uint8_t * buff,
double * utc )
static

Definition at line 1242 of file mrtk_rcvraw.c.

References getbits(), getbitu(), P2_30, P2_31, and trace().

Referenced by decode_glostr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_irn_eph()

int decode_irn_eph ( const uint8_t * buff,
eph_t * eph )
static

Definition at line 119 of file mrtk_rcvraw.c.

References eph_t::A, adjgpsweek(), eph_t::cic, eph_t::cis, eph_t::crc, eph_t::crs, eph_t::cuc, eph_t::cus, eph_t::deln, eph_t::e, eph_t::f0, eph_t::f1, eph_t::f2, getbits(), getbitu(), gpst2time(), eph_t::i0, eph_t::idot, eph_t::iodc, eph_t::iode, eph_t::M0, eph_t::omg, eph_t::OMG0, eph_t::OMGd, P2_19, P2_28, P2_31, P2_33, P2_41, P2_43, P2_55, SC2RAD, SQR, eph_t::sva, eph_t::svh, eph_t::tgd, eph_t::toc, eph_t::toe, eph_t::toes, trace(), eph_t::ttr, eph_t::type, and eph_t::week.

Referenced by decode_irn_nav().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_irn_ion()

int decode_irn_ion ( const uint8_t * buff,
double * ion )
static

Definition at line 206 of file mrtk_rcvraw.c.

References getbits(), getbitu(), P2_24, P2_27, P2_30, P2P11, P2P14, P2P16, and trace().

Referenced by decode_irn_nav().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_irn_nav()

int decode_irn_nav ( const uint8_t * buff,
eph_t * eph,
double * ion,
double * utc )
extern

Definition at line 296 of file mrtk_rcvraw.c.

References decode_irn_eph(), decode_irn_ion(), decode_irn_utc(), and trace().

Referenced by decode_navicraw().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_irn_utc()

int decode_irn_utc ( const uint8_t * buff,
double * utc )
static

Definition at line 242 of file mrtk_rcvraw.c.

References getbits(), getbitu(), P2_35, P2_51, P2_68, and trace().

Referenced by decode_irn_nav().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_qzss_l6frame()

int decode_qzss_l6frame ( rtcm_t * rtcm,
int is_l6d )
extern

Route one QZSS L6 frame received in a UBX/SBF container.

The service is taken from the L6 header (vendor ID + MADOCA CSID), not from the PRN or the receiver's L6D/L6E channel. MADOCA-PPP frames are decoded into rtcm->ssr; other services are left in rtcm->buff for the caller.

Parameters
[in,out]rtcmRTCM control struct; rtcm->buff holds the 250-byte frame.
[in]is_l6d1 if the receiver reports the L6D signal (only used for null messages).
Returns
10: CLAS frame, 15: MADOCA SSR decoded, 16: MADOCA iono frame, 17: QZNMA frame, 0: no message / reserved vendor, -1: error.

Definition at line 1661 of file mrtk_rcvraw.c.

References decode_qzss_l6emsg(), l6_parse_header(), l6_service_expected(), l6_service_name(), L6_SVC_CLAS, L6_SVC_MADOCA, L6_SVC_MADOCA_IONO, L6_SVC_NULL, L6_SVC_QZNMA, l6_header_t::prn, rtcm, l6_header_t::svc, and trace().

Referenced by decode_qzsrawl6(), and decode_rxmqzssl6().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ free_raw()

void free_raw ( raw_t * raw)
extern

Free receiver raw data control struct.

Parameters
[in,out]rawReceiver raw data control struct

Definition at line 1812 of file mrtk_rcvraw.c.

References nav_s::alm, obs_t::data, nav_s::eph, raw_t::format, free, free_rt17(), nav_s::geph, nav_s::n, obs_t::n, nav_s::na, raw_t::nav, nav_s::ng, nav_s::ns, raw_t::obs, raw_t::obuf, raw_t::rcv_data, nav_s::seph, STRFMT_RT17, and trace().

Referenced by free_strfile(), init_raw(), readbnxfp(), rtksvrthread(), and strconvfree().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getbitg()

double getbitg ( const uint8_t * buff,
int pos,
int len )
static

Definition at line 114 of file mrtk_rcvraw.c.

References getbitu().

Referenced by decode_glostr_eph().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getbits2()

int32_t getbits2 ( const uint8_t * buff,
int p1,
int l1,
int p2,
int l2 )
static

Definition at line 92 of file mrtk_rcvraw.c.

References getbits(), getbitu(), and getbitu2().

Referenced by decode_bds_d1_eph(), decode_bds_d1_ion(), decode_bds_d1_utc(), decode_bds_d2_eph(), and decode_bds_d2_utc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getbits3()

int32_t getbits3 ( const uint8_t * buff,
int p1,
int l1,
int p2,
int l2,
int p3,
int l3 )
static

Definition at line 103 of file mrtk_rcvraw.c.

References getbits(), getbitu(), and getbitu3().

Referenced by decode_bds_d2_eph().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getbitu2()

uint32_t getbitu2 ( const uint8_t * buff,
int p1,
int l1,
int p2,
int l2 )
static

Definition at line 89 of file mrtk_rcvraw.c.

References getbitu().

Referenced by decode_bds_d1_eph(), decode_bds_d1_utc(), decode_bds_d2_eph(), and getbits2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getbitu3()

uint32_t getbitu3 ( const uint8_t * buff,
int p1,
int l1,
int p2,
int l2,
int p3,
int l3 )
static

Definition at line 100 of file mrtk_rcvraw.c.

References getbitu().

Referenced by decode_bds_d2_eph(), and getbits3().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_raw()

int init_raw ( raw_t * raw,
int format )
extern

Initialize receiver raw data control struct.

Parameters
[out]rawReceiver raw data control struct
[in]formatStream format (STRFMT_???)
Returns
Status (1:ok, 0:memory allocation error)

Definition at line 1702 of file mrtk_rcvraw.c.

References nav_s::alm, sta_t::antdes, sta_t::antsetup, sta_t::antsno, raw_t::buff, obs_t::data, sta_t::del, sta_t::deltype, raw_t::dpCA, nav_s::eph, raw_t::ephsat, raw_t::ephset, raw_t::flag, raw_t::format, free_raw(), raw_t::freqn, nav_s::geph, raw_t::halfc, sta_t::hgt, raw_t::icpc, raw_t::icpp, init_rt17(), raw_t::iod, sta_t::itrf, raw_t::len, raw_t::lockt, malloc, sta_t::marker, MAXOBS, MAXRAWLEN, MAXSAT, raw_t::msgtype, nav_s::n, obs_t::n, nav_s::na, sta_t::name, raw_t::nav, raw_t::nbyte, nav_s::ng, nav_s::ns, NSATGLO, NSATSBS, raw_t::obs, raw_t::obuf, raw_t::off, raw_t::opt, raw_t::outtype, sta_t::pos, raw_t::prCA, raw_t::rcv_data, sta_t::recsno, sta_t::rectype, sta_t::recver, raw_t::sbsmsg, nav_s::seph, raw_t::sigcfg, raw_t::sigcfg_set, raw_t::sta, STRFMT_RT17, raw_t::subfrm, raw_t::tbase, raw_t::time, raw_t::tobs, raw_t::tod, and trace().

Referenced by gen_strfile(), readbnxfp(), rtksvrstart(), and strconvnew().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ input_raw()

int input_raw ( raw_t * raw,
rtcm_t * rtcm,
int format,
uint8_t data )
extern

Input receiver raw data from stream (byte-by-byte).

Parameters
[in,out]rawReceiver raw data control struct
[in,out]rtcmRTCM control struct
[in]formatReceiver raw data format (STRFMT_???)
[in]dataStream data (1 byte)
Returns
Status (-1:error, 0:no message, 1:obs data, 2:ephemeris, 3:sbas message, 9:ion/utc parameter, 10:ssr message, or (UBX/SBF) CLAS L6 frame in rtcm->buff, 13:Galileo HAS page staged in raw->has_page/has_prn/has_time, 15:MADOCA-PPP L6E SSR decoded (UBX/SBF), 16:MADOCA-PPP iono L6 frame in rtcm->buff (UBX/SBF), 17:QZNMA L6 frame in rtcm->buff (UBX/SBF))

Definition at line 1852 of file mrtk_rcvraw.c.

References input_bnx(), input_cres(), input_javad(), input_nvs(), input_oem3(), input_oem4(), input_rt17(), input_sbf(), input_ss2(), input_stq(), input_ubx(), rtcm, STRFMT_BINEX, STRFMT_CRES, STRFMT_JAVAD, STRFMT_NVS, STRFMT_OEM3, STRFMT_OEM4, STRFMT_RT17, STRFMT_SEPT, STRFMT_SS2, STRFMT_STQ, STRFMT_UBX, and trace().

Referenced by decoderaw(), and strconv().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ input_rawf()

int input_rawf ( raw_t * raw,
rtcm_t * rtcm,
int format,
FILE * fp )
extern

Input receiver raw data from file.

Parameters
[in,out]rawReceiver raw data control struct
[in,out]rtcmRTCM control struct
[in]formatReceiver raw data format (STRFMT_???)
[in]fpFile pointer
Returns
Status (-2:end of file, -1...31:same as input_raw)

Definition at line 1889 of file mrtk_rcvraw.c.

References input_bnxf(), input_cresf(), input_javadf(), input_nvsf(), input_oem3f(), input_oem4f(), input_rt17f(), input_sbff(), input_ss2f(), input_stqf(), input_ubxf(), rtcm, STRFMT_BINEX, STRFMT_CRES, STRFMT_JAVAD, STRFMT_NVS, STRFMT_OEM3, STRFMT_OEM4, STRFMT_RT17, STRFMT_SEPT, STRFMT_SS2, STRFMT_STQ, STRFMT_UBX, and trace().

Referenced by input_strfile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ merge_two_s()

int32_t merge_two_s ( int32_t a,
uint32_t b,
int n )
static

Definition at line 112 of file mrtk_rcvraw.c.

Referenced by decode_bds_d2_eph().

Here is the caller graph for this function:

◆ merge_two_u()

uint32_t merge_two_u ( uint32_t a,
uint32_t b,
int n )
static

Definition at line 111 of file mrtk_rcvraw.c.

Referenced by decode_bds_d1_eph().

Here is the caller graph for this function:

◆ test_glostr()

int test_glostr ( const uint8_t * buff)
extern

Definition at line 1046 of file mrtk_rcvraw.c.

Referenced by decode_gnav().

Here is the caller graph for this function: