MRTKLIB 0.7.14
Modernized GNSS Positioning Library
Loading...
Searching...
No Matches
mrtk_rtcm2.c File Reference

MRTKLIB RTCM Module — RTCM ver.2 message decoder. More...

#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "mrtklib/mrtk_bits.h"
#include "mrtklib/mrtk_eph.h"
#include "mrtklib/mrtk_rtcm.h"
#include "mrtklib/mrtk_sys.h"
#include "mrtklib/mrtk_trace.h"
Include dependency graph for mrtk_rtcm2.c:

Go to the source code of this file.

Macros

#define SYS_GPS   0x01
#define SYS_GLO   0x04
#define P2_5   0.03125
#define P2_19   1.907348632812500E-06
#define P2_29   1.862645149230957E-09
#define P2_31   4.656612873077393E-10
#define P2_33   1.164153218269348E-10
#define P2_43   1.136868377216160E-13
#define P2_55   2.775557561562891E-17

Functions

static void adjhour (rtcm_t *rtcm, double zcnt)
static int obsindex (obs_t *obs, gtime_t time, int sat)
static int decode_type1 (rtcm_t *rtcm)
static int decode_type3 (rtcm_t *rtcm)
static int decode_type14 (rtcm_t *rtcm)
static int decode_type16 (rtcm_t *rtcm)
static int decode_type17 (rtcm_t *rtcm)
static int decode_type18 (rtcm_t *rtcm)
static int decode_type19 (rtcm_t *rtcm)
static int decode_type22 (rtcm_t *rtcm)
static int decode_type23 (rtcm_t *rtcm)
static int decode_type24 (rtcm_t *rtcm)
static int decode_type31 (rtcm_t *rtcm)
static int decode_type32 (rtcm_t *rtcm)
static int decode_type34 (rtcm_t *rtcm)
static int decode_type36 (rtcm_t *rtcm)
static int decode_type37 (rtcm_t *rtcm)
static int decode_type59 (rtcm_t *rtcm)
int decode_rtcm2 (rtcm_t *rtcm)
 Decode RTCM ver.2 message (called from rtcm.c).

Variables

static const double SC2RAD = 3.1415926535898

Detailed Description

MRTKLIB RTCM Module — RTCM ver.2 message decoder.

Definition in file mrtk_rtcm2.c.

Macro Definition Documentation

◆ P2_19

#define P2_19   1.907348632812500E-06

Definition at line 37 of file mrtk_rtcm2.c.

◆ P2_29

#define P2_29   1.862645149230957E-09

Definition at line 38 of file mrtk_rtcm2.c.

◆ P2_31

#define P2_31   4.656612873077393E-10

Definition at line 39 of file mrtk_rtcm2.c.

◆ P2_33

#define P2_33   1.164153218269348E-10

Definition at line 40 of file mrtk_rtcm2.c.

◆ P2_43

#define P2_43   1.136868377216160E-13

Definition at line 41 of file mrtk_rtcm2.c.

◆ P2_5

#define P2_5   0.03125

Definition at line 36 of file mrtk_rtcm2.c.

◆ P2_55

#define P2_55   2.775557561562891E-17

Definition at line 42 of file mrtk_rtcm2.c.

◆ SYS_GLO

#define SYS_GLO   0x04

Definition at line 32 of file mrtk_rtcm2.c.

◆ SYS_GPS

#define SYS_GPS   0x01

Definition at line 31 of file mrtk_rtcm2.c.

Function Documentation

◆ adjhour()

void adjhour ( rtcm_t * rtcm,
double zcnt )
static

Definition at line 47 of file mrtk_rtcm2.c.

References gpst2time(), rtcm, time2gpst(), timeget(), and utc2gpst().

Referenced by decode_rtcm2().

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

◆ decode_rtcm2()

int decode_rtcm2 ( rtcm_t * rtcm)

Decode RTCM ver.2 message (called from rtcm.c).

Parameters
[in,out]rtcmRTCM control struct
Returns
Status (-1:error, 0:no message, 1:obs, 2:eph, ...)

Definition at line 452 of file mrtk_rtcm2.c.

References adjhour(), decode_type1(), decode_type14(), decode_type16(), decode_type17(), decode_type18(), decode_type19(), decode_type22(), decode_type23(), decode_type24(), decode_type3(), decode_type31(), decode_type32(), decode_type34(), decode_type36(), decode_type37(), decode_type59(), getbitu(), rtcm, and trace().

Referenced by input_rtcm2().

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

◆ decode_type1()

int decode_type1 ( rtcm_t * rtcm)
static

Definition at line 90 of file mrtk_rtcm2.c.

References getbits(), getbitu(), rtcm, satno(), SYS_GPS, and trace().

Referenced by decode_rtcm2().

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

◆ decode_type14()

int decode_type14 ( rtcm_t * rtcm)
static

Definition at line 146 of file mrtk_rtcm2.c.

References adjgpsweek(), getbitu(), gpst2time(), leaps, rtcm, and trace().

Referenced by decode_rtcm2().

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

◆ decode_type16()

int decode_type16 ( rtcm_t * rtcm)
static

Definition at line 169 of file mrtk_rtcm2.c.

References getbitu(), rtcm, and trace().

Referenced by decode_rtcm2().

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

◆ decode_type17()

int decode_type17 ( rtcm_t * rtcm)
static

Definition at line 184 of file mrtk_rtcm2.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::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, rtcm, eph_t::sat, satno(), SC2RAD, eph_t::sva, eph_t::svh, SYS_GPS, eph_t::tgd, eph_t::toc, eph_t::toe, eph_t::toes, trace(), eph_t::ttr, and eph_t::week.

Referenced by decode_rtcm2().

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

◆ decode_type18()

int decode_type18 ( rtcm_t * rtcm)
static

Definition at line 269 of file mrtk_rtcm2.c.

References CODE_L1C, CODE_L1P, CODE_L2C, CODE_L2P, getbits(), getbitu(), MAXOBS, obsindex(), rtcm, satno(), SYS_GLO, SYS_GPS, timeadd(), timediff(), trace(), and utc2gpst().

Referenced by decode_rtcm2().

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

◆ decode_type19()

int decode_type19 ( rtcm_t * rtcm)
static

Definition at line 335 of file mrtk_rtcm2.c.

References CODE_L1C, CODE_L1P, CODE_L2C, CODE_L2P, getbitu(), MAXOBS, obsindex(), rtcm, satno(), SYS_GLO, SYS_GPS, timeadd(), timediff(), trace(), and utc2gpst().

Referenced by decode_rtcm2().

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

◆ decode_type22()

int decode_type22 ( rtcm_t * rtcm)
static

Definition at line 397 of file mrtk_rtcm2.c.

References getbits(), getbitu(), rtcm, and trace().

Referenced by decode_rtcm2().

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

◆ decode_type23()

int decode_type23 ( rtcm_t * rtcm)
static

Definition at line 436 of file mrtk_rtcm2.c.

References rtcm.

Referenced by decode_rtcm2().

Here is the caller graph for this function:

◆ decode_type24()

int decode_type24 ( rtcm_t * rtcm)
static

Definition at line 438 of file mrtk_rtcm2.c.

References rtcm.

Referenced by decode_rtcm2().

Here is the caller graph for this function:

◆ decode_type3()

int decode_type3 ( rtcm_t * rtcm)
static

Definition at line 128 of file mrtk_rtcm2.c.

References getbits(), rtcm, and trace().

Referenced by decode_rtcm2().

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

◆ decode_type31()

int decode_type31 ( rtcm_t * rtcm)
static

Definition at line 440 of file mrtk_rtcm2.c.

References rtcm.

Referenced by decode_rtcm2().

Here is the caller graph for this function:

◆ decode_type32()

int decode_type32 ( rtcm_t * rtcm)
static

Definition at line 442 of file mrtk_rtcm2.c.

References rtcm.

Referenced by decode_rtcm2().

Here is the caller graph for this function:

◆ decode_type34()

int decode_type34 ( rtcm_t * rtcm)
static

Definition at line 444 of file mrtk_rtcm2.c.

References rtcm.

Referenced by decode_rtcm2().

Here is the caller graph for this function:

◆ decode_type36()

int decode_type36 ( rtcm_t * rtcm)
static

Definition at line 446 of file mrtk_rtcm2.c.

References rtcm.

Referenced by decode_rtcm2().

Here is the caller graph for this function:

◆ decode_type37()

int decode_type37 ( rtcm_t * rtcm)
static

Definition at line 448 of file mrtk_rtcm2.c.

References rtcm.

Referenced by decode_rtcm2().

Here is the caller graph for this function:

◆ decode_type59()

int decode_type59 ( rtcm_t * rtcm)
static

Definition at line 450 of file mrtk_rtcm2.c.

References rtcm.

Referenced by decode_rtcm2().

Here is the caller graph for this function:

◆ obsindex()

int obsindex ( obs_t * obs,
gtime_t time,
int sat )
static

Definition at line 66 of file mrtk_rtcm2.c.

References obsd_t::code, obsd_t::D, obs_t::data, obsd_t::L, obsd_t::LLI, MAXOBS, obs_t::n, obsd_t::P, obsd_t::sat, obsd_t::SNR, and obsd_t::time.

Referenced by decode_type18(), and decode_type19().

Here is the caller graph for this function:

Variable Documentation

◆ SC2RAD

const double SC2RAD = 3.1415926535898
static

Definition at line 34 of file mrtk_rtcm2.c.