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

Go to the source code of this file.

Classes

union  ENDIAN_TEST
struct  rt17_t

Macros

#define PI   3.1415926535897932 /* pi */
#define D2R   (PI / 180.0) /* deg to rad */
#define R2D   (180.0 / PI) /* rad to deg */
#define CLIGHT   299792458.0 /* speed of light (m/s) */
#define SC2RAD   3.1415926535898 /* semi-circle to radian (IS-GPS) */
#define SYS_NONE   0x00
#define SYS_GPS   0x01
#define SYS_SBS   0x02
#define SYS_GLO   0x04
#define SYS_GAL   0x08
#define SYS_QZS   0x10
#define SYS_CMP   0x20
#define SYS_IRN   0x40
#define TSYS_GPS   0
#define TSYS_UTC   1
#define TSYS_GLO   2
#define TSYS_GAL   3
#define TSYS_QZS   4
#define TSYS_CMP   5
#define TSYS_IRN   6
#define FREQ1   1.57542E9 /* L1/E1/B1C frequency (Hz) */
#define FREQ2   1.22760E9 /* L2 frequency (Hz) */
#define FREQ5   1.17645E9 /* L5/E5a/B2a frequency (Hz) */
#define FREQ6   1.27875E9 /* E6/L6 frequency (Hz) */
#define FREQ7   1.20714E9 /* E5b/B2I frequency (Hz) */
#define FREQ8   1.191795E9 /* E5ab/B2ab frequency (Hz) */
#define FREQ9   2.492028E9 /* S frequency (Hz) */
#define FREQ1_GLO   1.60200E9 /* GLONASS G1 base frequency (Hz) */
#define DFRQ1_GLO   0.56250E6 /* GLONASS G1 bias frequency (Hz/n) */
#define FREQ2_GLO   1.24600E9 /* GLONASS G2 base frequency (Hz) */
#define DFRQ2_GLO   0.43750E6 /* GLONASS G2 bias frequency (Hz/n) */
#define FREQ3_GLO   1.202025E9 /* GLONASS G3 frequency (Hz) */
#define FREQ1a_GLO   1.600995E9 /* GLONASS G1a frequency (Hz) */
#define FREQ2a_GLO   1.248060E9 /* GLONASS G2a frequency (Hz) */
#define FREQ1_CMP   1.561098E9 /* BDS B1I frequency (Hz) */
#define MINPRNGPS   1
#define MAXPRNGPS   32
#define MINPRNSBS   120
#define MAXPRNSBS   158
#define P2_5   0.03125
#define P2_6   0.015625
#define P2_11   4.882812500000000E-04
#define P2_15   3.051757812500000E-05
#define P2_17   7.629394531250000E-06
#define P2_19   1.907348632812500E-06
#define P2_20   9.536743164062500E-07
#define P2_21   4.768371582031250E-07
#define P2_23   1.192092895507810E-07
#define P2_24   5.960464477539063E-08
#define P2_27   7.450580596923828E-09
#define P2_29   1.862645149230957E-09
#define P2_30   9.313225746154785E-10
#define P2_31   4.656612873077393E-10
#define P2_32   2.328306436538696E-10
#define P2_33   1.164153218269348E-10
#define P2_34   5.820766091346740E-11
#define P2_35   2.910383045673370E-11
#define P2_38   3.637978807091710E-12
#define P2_40   9.094947017729280E-13
#define P2_43   1.136868377216160E-13
#define P2_46   1.421085471520200E-14
#define P2_50   8.881784197001252E-16
#define P2_55   2.775557561562891E-17
#define P2_59   1.734723475976810E-18
#define M_BIT0   (1 << 0)
#define M_BIT1   (1 << 1)
#define M_BIT2   (1 << 2)
#define M_BIT3   (1 << 3)
#define M_BIT4   (1 << 4)
#define M_BIT5   (1 << 5)
#define M_BIT6   (1 << 6)
#define M_BIT7   (1 << 7)
#define M_BIT8   (1 << 8)
#define M_BIT9   (1 << 9)
#define M_BIT10   (1 << 10)
#define M_BIT11   (1 << 11)
#define M_BIT12   (1 << 12)
#define M_BIT13   (1 << 13)
#define M_BIT14   (1 << 14)
#define M_BIT15   (1 << 15)
#define STX   2 /* Start of packet character */
#define ETX   3 /* End of packet character */
#define GENOUT   0x40 /* General Serial Output Format (GSOF) */
#define RETSVDATA   0x55 /* Satellite information reports */
#define RAWDATA   0x57 /* Position or real-time survey data report */
#define MBUFF_LENGTH   8192 /* Message buffer length */
#define PBUFF_LENGTH   (4 + 255 + 2) /* Packet buffer length */
#define M_CONCISE   M_BIT0 /* Concise format */
#define M_ENHANCED   M_BIT1 /* Enhanced record with real-time flags and IODE information */
#define M_WEEK_OPTION   M_BIT0 /* GPS week number set by WEEK=n option */
#define M_WEEK_EPH   M_BIT1 /* GPS week number set by ephemeris week */
#define M_WEEK_TIME   M_BIT2 /* GPS week set by computer time */
#define M_WEEK_SCAN   M_BIT3 /* WEEK=n option already looked for, no need to do it again */
#define I1(p)
#define U1(p)
#define I2(p)
#define U2(p)
#define I4(p)
#define U4(p)
#define R4(p)
#define R8(p)

Functions

static int CheckPacketChecksum (uint8_t *PacketBuffer)
static void ClearMessageBuffer (rt17_t *rt17)
static void ClearPacketBuffer (rt17_t *rt17)
static int DecodeBeidouEphemeris (raw_t *Raw)
static int DecodeGalileoEphemeris (raw_t *Raw)
static int DecodeGLONASSEphemeris (raw_t *Raw)
static int DecodeGPSEphemeris (raw_t *Raw)
static int DecodeGSOF (raw_t *Raw)
static int DecodeGSOF1 (raw_t *Raw, uint8_t *p)
static int DecodeGSOF3 (raw_t *Raw, uint8_t *p)
static int DecodeGSOF15 (raw_t *Raw, uint8_t *p)
static int DecodeGSOF16 (raw_t *Raw, uint8_t *p)
static int DecodeGSOF26 (raw_t *Raw, uint8_t *p)
static int DecodeGSOF41 (raw_t *Raw, uint8_t *p)
static int DecodeIONAndUTCData (raw_t *Raw)
static int DecodeQZSSEphemeris (raw_t *Raw)
static int DecodeRawdata (raw_t *Raw)
static int DecodeRetsvdata (raw_t *Raw)
static int DecodeType17 (raw_t *Raw, uint32_t rif)
static int DecodeType29 (raw_t *Raw)
static int GetWeek (raw_t *Raw, double tow)
static int16_t ReadI2 (uint8_t *p)
static int32_t ReadI4 (uint8_t *p)
static float ReadR4 (uint8_t *p)
static double ReadR8 (uint8_t *p)
static uint16_t ReadU2 (uint8_t *p)
static uint32_t ReadU4 (uint8_t *p)
static void SetWeek (raw_t *Raw, int Week, double tow)
static int SyncPacket (rt17_t *rt17, uint8_t Data)
static void UnwrapRawdata (rt17_t *rt17, uint32_t *rif)
static void UnwrapGenout (rt17_t *rt17)
void free_rt17 (raw_t *Raw)
int init_rt17 (raw_t *Raw)
int input_rt17 (raw_t *Raw, uint8_t Data)
int input_rt17f (raw_t *Raw, FILE *fp)

Variables

static const char * GSOFTable []
static const char * RawdataTable []
static const char * RetsvdataTable []

Macro Definition Documentation

◆ CLIGHT

#define CLIGHT   299792458.0 /* speed of light (m/s) */

Definition at line 254 of file mrtk_rcv_rt17.c.

◆ D2R

#define D2R   (PI / 180.0) /* deg to rad */

Definition at line 252 of file mrtk_rcv_rt17.c.

◆ DFRQ1_GLO

#define DFRQ1_GLO   0.56250E6 /* GLONASS G1 bias frequency (Hz/n) */

Definition at line 282 of file mrtk_rcv_rt17.c.

◆ DFRQ2_GLO

#define DFRQ2_GLO   0.43750E6 /* GLONASS G2 bias frequency (Hz/n) */

Definition at line 284 of file mrtk_rcv_rt17.c.

◆ ETX

#define ETX   3 /* End of packet character */

Definition at line 344 of file mrtk_rcv_rt17.c.

Referenced by input_rt17().

◆ FREQ1

#define FREQ1   1.57542E9 /* L1/E1/B1C frequency (Hz) */

Definition at line 274 of file mrtk_rcv_rt17.c.

◆ FREQ1_CMP

#define FREQ1_CMP   1.561098E9 /* BDS B1I frequency (Hz) */

Definition at line 288 of file mrtk_rcv_rt17.c.

◆ FREQ1_GLO

#define FREQ1_GLO   1.60200E9 /* GLONASS G1 base frequency (Hz) */

Definition at line 281 of file mrtk_rcv_rt17.c.

◆ FREQ1a_GLO

#define FREQ1a_GLO   1.600995E9 /* GLONASS G1a frequency (Hz) */

Definition at line 286 of file mrtk_rcv_rt17.c.

◆ FREQ2

#define FREQ2   1.22760E9 /* L2 frequency (Hz) */

Definition at line 275 of file mrtk_rcv_rt17.c.

◆ FREQ2_GLO

#define FREQ2_GLO   1.24600E9 /* GLONASS G2 base frequency (Hz) */

Definition at line 283 of file mrtk_rcv_rt17.c.

◆ FREQ2a_GLO

#define FREQ2a_GLO   1.248060E9 /* GLONASS G2a frequency (Hz) */

Definition at line 287 of file mrtk_rcv_rt17.c.

◆ FREQ3_GLO

#define FREQ3_GLO   1.202025E9 /* GLONASS G3 frequency (Hz) */

Definition at line 285 of file mrtk_rcv_rt17.c.

◆ FREQ5

#define FREQ5   1.17645E9 /* L5/E5a/B2a frequency (Hz) */

Definition at line 276 of file mrtk_rcv_rt17.c.

◆ FREQ6

#define FREQ6   1.27875E9 /* E6/L6 frequency (Hz) */

Definition at line 277 of file mrtk_rcv_rt17.c.

◆ FREQ7

#define FREQ7   1.20714E9 /* E5b/B2I frequency (Hz) */

Definition at line 278 of file mrtk_rcv_rt17.c.

◆ FREQ8

#define FREQ8   1.191795E9 /* E5ab/B2ab frequency (Hz) */

Definition at line 279 of file mrtk_rcv_rt17.c.

◆ FREQ9

#define FREQ9   2.492028E9 /* S frequency (Hz) */

Definition at line 280 of file mrtk_rcv_rt17.c.

◆ GENOUT

#define GENOUT   0x40 /* General Serial Output Format (GSOF) */

Definition at line 345 of file mrtk_rcv_rt17.c.

Referenced by input_rt17(), and SyncPacket().

◆ I1

#define I1 ( p)
Value:
(*((int8_t*)(p))) /* One byte signed integer */

Definition at line 362 of file mrtk_rcv_rt17.c.

◆ I2

#define I2 ( p)
Value:
ReadI2(p) /* Two byte signed integer */
static int16_t ReadI2(uint8_t *p)

Definition at line 364 of file mrtk_rcv_rt17.c.

Referenced by decode_cresionutc(), decode_eph(), decode_gloephem(), decode_gpsephem(), decode_x4btime(), decode_xd(), decode_xr(), DecodeGSOF1(), DecodeGSOF16(), DecodeGSOF26(), DecodeGSOF41(), DecodeType29(), and ReadI2().

◆ I4

◆ M_BIT0

#define M_BIT0   (1 << 0)

◆ M_BIT1

#define M_BIT1   (1 << 1)

Definition at line 326 of file mrtk_rcv_rt17.c.

Referenced by DecodeType17().

◆ M_BIT10

#define M_BIT10   (1 << 10)

Definition at line 335 of file mrtk_rcv_rt17.c.

Referenced by DecodeBeidouEphemeris(), DecodeGPSEphemeris(), and DecodeQZSSEphemeris().

◆ M_BIT11

#define M_BIT11   (1 << 11)

Definition at line 336 of file mrtk_rcv_rt17.c.

◆ M_BIT12

#define M_BIT12   (1 << 12)

Definition at line 337 of file mrtk_rcv_rt17.c.

◆ M_BIT13

#define M_BIT13   (1 << 13)

Definition at line 338 of file mrtk_rcv_rt17.c.

◆ M_BIT14

#define M_BIT14   (1 << 14)

Definition at line 339 of file mrtk_rcv_rt17.c.

◆ M_BIT15

#define M_BIT15   (1 << 15)

Definition at line 340 of file mrtk_rcv_rt17.c.

◆ M_BIT2

#define M_BIT2   (1 << 2)

Definition at line 327 of file mrtk_rcv_rt17.c.

Referenced by DecodeType17().

◆ M_BIT3

#define M_BIT3   (1 << 3)

Definition at line 328 of file mrtk_rcv_rt17.c.

◆ M_BIT4

#define M_BIT4   (1 << 4)

Definition at line 329 of file mrtk_rcv_rt17.c.

Referenced by DecodeType17().

◆ M_BIT5

#define M_BIT5   (1 << 5)

Definition at line 330 of file mrtk_rcv_rt17.c.

Referenced by DecodeType17().

◆ M_BIT6

#define M_BIT6   (1 << 6)

Definition at line 331 of file mrtk_rcv_rt17.c.

Referenced by DecodeType17().

◆ M_BIT7

#define M_BIT7   (1 << 7)

Definition at line 332 of file mrtk_rcv_rt17.c.

◆ M_BIT8

#define M_BIT8   (1 << 8)

Definition at line 333 of file mrtk_rcv_rt17.c.

◆ M_BIT9

#define M_BIT9   (1 << 9)

Definition at line 334 of file mrtk_rcv_rt17.c.

◆ M_CONCISE

#define M_CONCISE   M_BIT0 /* Concise format */

Definition at line 352 of file mrtk_rcv_rt17.c.

Referenced by DecodeType17().

◆ M_ENHANCED

#define M_ENHANCED   M_BIT1 /* Enhanced record with real-time flags and IODE information */

Definition at line 353 of file mrtk_rcv_rt17.c.

Referenced by DecodeType17().

◆ M_WEEK_EPH

#define M_WEEK_EPH   M_BIT1 /* GPS week number set by ephemeris week */

Definition at line 357 of file mrtk_rcv_rt17.c.

Referenced by DecodeGPSEphemeris(), and GetWeek().

◆ M_WEEK_OPTION

#define M_WEEK_OPTION   M_BIT0 /* GPS week number set by WEEK=n option */

Definition at line 356 of file mrtk_rcv_rt17.c.

Referenced by DecodeGPSEphemeris(), GetWeek(), and SetWeek().

◆ M_WEEK_SCAN

#define M_WEEK_SCAN   M_BIT3 /* WEEK=n option already looked for, no need to do it again */

Definition at line 359 of file mrtk_rcv_rt17.c.

Referenced by GetWeek().

◆ M_WEEK_TIME

#define M_WEEK_TIME   M_BIT2 /* GPS week set by computer time */

Definition at line 358 of file mrtk_rcv_rt17.c.

Referenced by DecodeGPSEphemeris(), and GetWeek().

◆ MAXPRNGPS

#define MAXPRNGPS   32

Definition at line 291 of file mrtk_rcv_rt17.c.

◆ MAXPRNSBS

#define MAXPRNSBS   158

Definition at line 293 of file mrtk_rcv_rt17.c.

◆ MBUFF_LENGTH

#define MBUFF_LENGTH   8192 /* Message buffer length */

Definition at line 348 of file mrtk_rcv_rt17.c.

Referenced by free_rt17(), init_rt17(), and input_rt17().

◆ MINPRNGPS

#define MINPRNGPS   1

Definition at line 290 of file mrtk_rcv_rt17.c.

◆ MINPRNSBS

#define MINPRNSBS   120

Definition at line 292 of file mrtk_rcv_rt17.c.

◆ P2_11

#define P2_11   4.882812500000000E-04

Definition at line 298 of file mrtk_rcv_rt17.c.

◆ P2_15

#define P2_15   3.051757812500000E-05

Definition at line 299 of file mrtk_rcv_rt17.c.

◆ P2_17

#define P2_17   7.629394531250000E-06

Definition at line 300 of file mrtk_rcv_rt17.c.

◆ P2_19

#define P2_19   1.907348632812500E-06

Definition at line 301 of file mrtk_rcv_rt17.c.

◆ P2_20

#define P2_20   9.536743164062500E-07

Definition at line 302 of file mrtk_rcv_rt17.c.

◆ P2_21

#define P2_21   4.768371582031250E-07

Definition at line 303 of file mrtk_rcv_rt17.c.

◆ P2_23

#define P2_23   1.192092895507810E-07

Definition at line 304 of file mrtk_rcv_rt17.c.

◆ P2_24

#define P2_24   5.960464477539063E-08

Definition at line 305 of file mrtk_rcv_rt17.c.

◆ P2_27

#define P2_27   7.450580596923828E-09

Definition at line 306 of file mrtk_rcv_rt17.c.

◆ P2_29

#define P2_29   1.862645149230957E-09

Definition at line 307 of file mrtk_rcv_rt17.c.

◆ P2_30

#define P2_30   9.313225746154785E-10

Definition at line 308 of file mrtk_rcv_rt17.c.

◆ P2_31

#define P2_31   4.656612873077393E-10

Definition at line 309 of file mrtk_rcv_rt17.c.

◆ P2_32

#define P2_32   2.328306436538696E-10

Definition at line 310 of file mrtk_rcv_rt17.c.

◆ P2_33

#define P2_33   1.164153218269348E-10

Definition at line 311 of file mrtk_rcv_rt17.c.

◆ P2_34

#define P2_34   5.820766091346740E-11

Definition at line 312 of file mrtk_rcv_rt17.c.

◆ P2_35

#define P2_35   2.910383045673370E-11

Definition at line 313 of file mrtk_rcv_rt17.c.

◆ P2_38

#define P2_38   3.637978807091710E-12

Definition at line 314 of file mrtk_rcv_rt17.c.

◆ P2_40

#define P2_40   9.094947017729280E-13

Definition at line 315 of file mrtk_rcv_rt17.c.

◆ P2_43

#define P2_43   1.136868377216160E-13

Definition at line 316 of file mrtk_rcv_rt17.c.

◆ P2_46

#define P2_46   1.421085471520200E-14

Definition at line 317 of file mrtk_rcv_rt17.c.

◆ P2_5

#define P2_5   0.03125

Definition at line 296 of file mrtk_rcv_rt17.c.

◆ P2_50

#define P2_50   8.881784197001252E-16

Definition at line 318 of file mrtk_rcv_rt17.c.

◆ P2_55

#define P2_55   2.775557561562891E-17

Definition at line 319 of file mrtk_rcv_rt17.c.

◆ P2_59

#define P2_59   1.734723475976810E-18

Definition at line 320 of file mrtk_rcv_rt17.c.

◆ P2_6

#define P2_6   0.015625

Definition at line 297 of file mrtk_rcv_rt17.c.

◆ PBUFF_LENGTH

#define PBUFF_LENGTH   (4 + 255 + 2) /* Packet buffer length */

Definition at line 349 of file mrtk_rcv_rt17.c.

Referenced by free_rt17(), and init_rt17().

◆ PI

#define PI   3.1415926535897932 /* pi */

Definition at line 251 of file mrtk_rcv_rt17.c.

◆ R2D

#define R2D   (180.0 / PI) /* rad to deg */

Definition at line 253 of file mrtk_rcv_rt17.c.

◆ R4

◆ R8

◆ RAWDATA

#define RAWDATA   0x57 /* Position or real-time survey data report */

Definition at line 347 of file mrtk_rcv_rt17.c.

Referenced by input_rt17(), and SyncPacket().

◆ RETSVDATA

#define RETSVDATA   0x55 /* Satellite information reports */

Definition at line 346 of file mrtk_rcv_rt17.c.

Referenced by input_rt17(), and SyncPacket().

◆ SC2RAD

#define SC2RAD   3.1415926535898 /* semi-circle to radian (IS-GPS) */

Definition at line 255 of file mrtk_rcv_rt17.c.

◆ STX

#define STX   2 /* Start of packet character */

Definition at line 343 of file mrtk_rcv_rt17.c.

Referenced by SyncPacket().

◆ SYS_CMP

#define SYS_CMP   0x20

Definition at line 263 of file mrtk_rcv_rt17.c.

◆ SYS_GAL

#define SYS_GAL   0x08

Definition at line 261 of file mrtk_rcv_rt17.c.

◆ SYS_GLO

#define SYS_GLO   0x04

Definition at line 260 of file mrtk_rcv_rt17.c.

◆ SYS_GPS

#define SYS_GPS   0x01

Definition at line 258 of file mrtk_rcv_rt17.c.

◆ SYS_IRN

#define SYS_IRN   0x40

Definition at line 264 of file mrtk_rcv_rt17.c.

◆ SYS_NONE

#define SYS_NONE   0x00

Definition at line 257 of file mrtk_rcv_rt17.c.

◆ SYS_QZS

#define SYS_QZS   0x10

Definition at line 262 of file mrtk_rcv_rt17.c.

◆ SYS_SBS

#define SYS_SBS   0x02

Definition at line 259 of file mrtk_rcv_rt17.c.

◆ TSYS_CMP

#define TSYS_CMP   5

Definition at line 271 of file mrtk_rcv_rt17.c.

◆ TSYS_GAL

#define TSYS_GAL   3

Definition at line 269 of file mrtk_rcv_rt17.c.

◆ TSYS_GLO

#define TSYS_GLO   2

Definition at line 268 of file mrtk_rcv_rt17.c.

◆ TSYS_GPS

#define TSYS_GPS   0

Definition at line 266 of file mrtk_rcv_rt17.c.

◆ TSYS_IRN

#define TSYS_IRN   6

Definition at line 272 of file mrtk_rcv_rt17.c.

◆ TSYS_QZS

#define TSYS_QZS   4

Definition at line 270 of file mrtk_rcv_rt17.c.

◆ TSYS_UTC

#define TSYS_UTC   1

Definition at line 267 of file mrtk_rcv_rt17.c.

◆ U1

#define U1 ( p)
Value:
(*((uint8_t*)(p))) /* One byte uint32_teger */

Definition at line 363 of file mrtk_rcv_rt17.c.

Referenced by DecodeBeidouEphemeris(), DecodeGalileoEphemeris(), DecodeGPSEphemeris(), DecodeGSOF16(), DecodeQZSSEphemeris(), and DecodeType17().

◆ U2

◆ U4

#define U4 ( p)
Value:
ReadU4(p) /* Four byte uint32_teger */
static uint32_t ReadU4(uint8_t *p)

Definition at line 367 of file mrtk_rcv_rt17.c.

Referenced by decode_bdsephemerisb(), decode_bdsnav(), decode_bdsraw(), decode_bnx_00(), decode_bnx_01_02(), decode_bnx_01_03(), decode_bnx_01_05(), decode_bnx_7f(), decode_cnav(), decode_creseph(), decode_cresgloeph(), decode_cresgloraw(), decode_cresionutc(), decode_cresraw(), decode_cresraw2(), decode_creswaas(), decode_enav(), decode_eph(), decode_ET(), decode_frmb(), decode_galclockb(), decode_galephemerisb(), decode_galinavephemerisb(), decode_galnav(), decode_galrawcnav(), decode_galrawfnav(), decode_galrawinav(), decode_georawl1(), decode_gloephemerisb(), decode_glonav(), decode_glorawca(), decode_gpsephemb(), decode_gpsnav(), decode_ionutcb(), decode_L1nav(), decode_lD(), decode_measepoch(), decode_nav(), decode_navicephemerisb(), decode_navicraw(), decode_navsol(), decode_navtime(), decode_nd(), decode_oem3(), decode_oem4(), decode_px(), decode_qzsrawl6(), decode_qzssephemerisb(), decode_qzssionutcb(), decode_qzssnav(), decode_qzssrawephemb(), decode_qzssrawsubframeb(), decode_rangeb(), decode_rangecmpb(), decode_rawca(), decode_rawephemb(), decode_rawwaasframeb(), decode_repb(), decode_rgeb(), decode_rged(), decode_RT(), decode_rxmqzssl6(), decode_rxmraw(), decode_rxmsfrb(), decode_sbf(), decode_snav(), decode_ss2eph(), decode_ss2meas(), decode_ss2sbas(), decode_stqrawx(), decode_stqtime(), decode_UO(), decode_utcb(), decode_WD(), decode_WE(), decode_xe5bit(), DecodeBeidouEphemeris(), DecodeGalileoEphemeris(), DecodeGPSEphemeris(), DecodeGSOF15(), DecodeQZSSEphemeris(), I4(), I8(), input_oem3(), input_oem3f(), R4(), R8(), ReadR4(), and ReadU4().

Function Documentation

◆ CheckPacketChecksum()

int CheckPacketChecksum ( uint8_t * PacketBuffer)
static

Definition at line 811 of file mrtk_rcv_rt17.c.

Referenced by input_rt17().

Here is the caller graph for this function:

◆ ClearMessageBuffer()

void ClearMessageBuffer ( rt17_t * rt17)
static

Definition at line 831 of file mrtk_rcv_rt17.c.

References rt17_t::MessageBuffer, rt17_t::MessageBytes, rt17_t::MessageLength, and rt17_t::Reply.

Referenced by input_rt17().

Here is the caller graph for this function:

◆ ClearPacketBuffer()

void ClearPacketBuffer ( rt17_t * rt17)
static

Definition at line 844 of file mrtk_rcv_rt17.c.

References rt17_t::PacketBuffer, rt17_t::PacketBytes, and rt17_t::PacketLength.

Referenced by input_rt17().

Here is the caller graph for this function:

◆ DecodeBeidouEphemeris()

int DecodeBeidouEphemeris ( raw_t * Raw)
static

Definition at line 865 of file mrtk_rcv_rt17.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, nav_s::eph, raw_t::ephsat, eph_t::f0, eph_t::f1, eph_t::f2, eph_t::fit, eph_t::flag, eph_t::i0, I4, eph_t::idot, eph_t::iodc, eph_t::iode, eph_t::M0, M_BIT0, M_BIT10, raw_t::nav, eph_t::omg, eph_t::OMG0, eph_t::OMGd, raw_t::opt, rt17_t::PacketBuffer, rt17_t::PacketLength, R8, raw_t::rcv_data, eph_t::sat, satno(), SC2RAD, eph_t::sva, eph_t::svh, SYS_CMP, eph_t::tgd, eph_t::toc, eph_t::toe, eph_t::toes, tracet(), eph_t::ttr, U1, U2, U4, and eph_t::week.

Referenced by DecodeRetsvdata().

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

◆ DecodeGalileoEphemeris()

int DecodeGalileoEphemeris ( raw_t * Raw)
static

Definition at line 996 of file mrtk_rcv_rt17.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, nav_s::eph, raw_t::ephsat, eph_t::f0, eph_t::f1, eph_t::f2, gst2time(), eph_t::i0, I4, eph_t::idot, eph_t::iodc, eph_t::iode, eph_t::M0, raw_t::nav, eph_t::omg, eph_t::OMG0, eph_t::OMGd, raw_t::opt, rt17_t::PacketBuffer, rt17_t::PacketLength, R8, raw_t::rcv_data, eph_t::sat, satno(), SC2RAD, SYS_GAL, eph_t::toc, eph_t::toe, eph_t::toes, tracet(), eph_t::ttr, U1, U2, U4, and eph_t::week.

Referenced by DecodeRetsvdata().

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

◆ DecodeGLONASSEphemeris()

int DecodeGLONASSEphemeris ( raw_t * Raw)
static

Definition at line 1100 of file mrtk_rcv_rt17.c.

References tracet().

Referenced by DecodeRetsvdata().

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

◆ DecodeGPSEphemeris()

int DecodeGPSEphemeris ( raw_t * Raw)
static

Definition at line 1116 of file mrtk_rcv_rt17.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, nav_s::eph, raw_t::ephsat, eph_t::f0, eph_t::f1, eph_t::f2, eph_t::fit, eph_t::flag, rt17_t::Flags, gpst2time(), eph_t::i0, I4, eph_t::idot, eph_t::iodc, eph_t::iode, eph_t::M0, M_BIT0, M_BIT10, M_WEEK_EPH, M_WEEK_OPTION, M_WEEK_TIME, raw_t::nav, eph_t::omg, eph_t::OMG0, eph_t::OMGd, raw_t::opt, rt17_t::PacketBuffer, rt17_t::PacketLength, R8, raw_t::rcv_data, 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, tracet(), eph_t::ttr, U1, U2, U4, rt17_t::Week, and eph_t::week.

Referenced by DecodeRetsvdata().

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

◆ DecodeGSOF()

int DecodeGSOF ( raw_t * Raw)
static

Definition at line 1265 of file mrtk_rcv_rt17.c.

References DecodeGSOF1(), DecodeGSOF15(), DecodeGSOF16(), DecodeGSOF26(), DecodeGSOF3(), DecodeGSOF41(), GSOFTable, rt17_t::MessageBuffer, rt17_t::MessageLength, raw_t::rcv_data, tracet(), and UnwrapGenout().

Referenced by input_rt17().

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

◆ DecodeGSOF1()

int DecodeGSOF1 ( raw_t * Raw,
uint8_t * p )
static

Definition at line 1328 of file mrtk_rcv_rt17.c.

References I2, I4, SetWeek(), and tracet().

Referenced by DecodeGSOF().

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

◆ DecodeGSOF15()

int DecodeGSOF15 ( raw_t * Raw,
uint8_t * p )
static

Definition at line 1359 of file mrtk_rcv_rt17.c.

References sta_t::recsno, raw_t::sta, tracet(), and U4.

Referenced by DecodeGSOF().

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

◆ DecodeGSOF16()

int DecodeGSOF16 ( raw_t * Raw,
uint8_t * p )
static

Definition at line 1370 of file mrtk_rcv_rt17.c.

References I2, I4, M_BIT0, SetWeek(), tracet(), and U1.

Referenced by DecodeGSOF().

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

◆ DecodeGSOF26()

int DecodeGSOF26 ( raw_t * Raw,
uint8_t * p )
static

Definition at line 1381 of file mrtk_rcv_rt17.c.

References I2, I4, SetWeek(), and tracet().

Referenced by DecodeGSOF().

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

◆ DecodeGSOF3()

int DecodeGSOF3 ( raw_t * Raw,
uint8_t * p )
static

Definition at line 1339 of file mrtk_rcv_rt17.c.

References sta_t::del, sta_t::deltype, sta_t::hgt, sta_t::pos, R8, raw_t::sta, and tracet().

Referenced by DecodeGSOF().

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

◆ DecodeGSOF41()

int DecodeGSOF41 ( raw_t * Raw,
uint8_t * p )
static

Definition at line 1392 of file mrtk_rcv_rt17.c.

References I2, I4, SetWeek(), and tracet().

Referenced by DecodeGSOF().

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

◆ DecodeIONAndUTCData()

int DecodeIONAndUTCData ( raw_t * Raw)
static

Definition at line 1415 of file mrtk_rcv_rt17.c.

References GetWeek(), nav_s::ion_gps, raw_t::nav, rt17_t::PacketBuffer, rt17_t::PacketLength, R8, raw_t::rcv_data, tracet(), and nav_s::utc_gps.

Referenced by DecodeRetsvdata().

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

◆ DecodeQZSSEphemeris()

int DecodeQZSSEphemeris ( raw_t * Raw)
static

Definition at line 1467 of file mrtk_rcv_rt17.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, nav_s::eph, raw_t::ephsat, eph_t::f0, eph_t::f1, eph_t::f2, eph_t::fit, eph_t::flag, gpst2time(), eph_t::i0, I4, eph_t::idot, eph_t::iodc, eph_t::iode, eph_t::M0, M_BIT0, M_BIT10, raw_t::nav, eph_t::omg, eph_t::OMG0, eph_t::OMGd, raw_t::opt, rt17_t::PacketBuffer, rt17_t::PacketLength, R8, raw_t::rcv_data, 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, tracet(), eph_t::ttr, U1, U2, U4, and eph_t::week.

Referenced by DecodeRetsvdata().

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

◆ DecodeRawdata()

int DecodeRawdata ( raw_t * Raw)
static

Definition at line 1600 of file mrtk_rcv_rt17.c.

References DecodeType17(), DecodeType29(), rt17_t::MessageBuffer, rt17_t::MessageLength, RawdataTable, raw_t::rcv_data, tracet(), and UnwrapRawdata().

Referenced by input_rt17().

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

◆ DecodeRetsvdata()

int DecodeRetsvdata ( raw_t * Raw)
static

Definition at line 1650 of file mrtk_rcv_rt17.c.

References DecodeBeidouEphemeris(), DecodeGalileoEphemeris(), DecodeGLONASSEphemeris(), DecodeGPSEphemeris(), DecodeIONAndUTCData(), DecodeQZSSEphemeris(), rt17_t::PacketBuffer, rt17_t::PacketLength, raw_t::rcv_data, RetsvdataTable, and tracet().

Referenced by input_rt17().

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

◆ DecodeType17()

int DecodeType17 ( raw_t * Raw,
uint32_t rif )
static

Definition at line 1706 of file mrtk_rcv_rt17.c.

References CLIGHT, obsd_t::code, CODE_L1C, CODE_L1P, CODE_L2C, CODE_L2P, CODE_L2W, CODE_NONE, obsd_t::D, obs_t::data, FREQ1, FREQ2, GetWeek(), gpst2time(), obsd_t::L, obsd_t::LLI, M_BIT0, M_BIT1, M_BIT2, M_BIT4, M_BIT5, M_BIT6, M_CONCISE, M_ENHANCED, MAXOBS, rt17_t::MessageBuffer, obs_t::n, raw_t::obs, obsd_t::P, R4, R8, raw_t::rcv_data, obsd_t::sat, satno(), obsd_t::SNR, SNR_UNIT, SYS_GPS, obsd_t::time, raw_t::time, traceobs(), tracet(), and U1.

Referenced by DecodeRawdata().

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

◆ DecodeType29()

int DecodeType29 ( raw_t * Raw)
static

Definition at line 1949 of file mrtk_rcv_rt17.c.

References I2, I4, rt17_t::MessageBuffer, raw_t::rcv_data, SetWeek(), and tracet().

Referenced by DecodeRawdata().

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

◆ free_rt17()

void free_rt17 ( raw_t * Raw)

Definition at line 515 of file mrtk_rcv_rt17.c.

References raw_t::format, free, MBUFF_LENGTH, rt17_t::MessageBuffer, rt17_t::PacketBuffer, PBUFF_LENGTH, raw_t::rcv_data, and STRFMT_RT17.

Referenced by free_raw(), and init_rt17().

Here is the caller graph for this function:

◆ GetWeek()

int GetWeek ( raw_t * Raw,
double tow )
static

Definition at line 1971 of file mrtk_rcv_rt17.c.

References rt17_t::Flags, gpst2time(), M_WEEK_EPH, M_WEEK_OPTION, M_WEEK_SCAN, M_WEEK_TIME, raw_t::opt, raw_t::rcv_data, gtime_t::sec, gtime_t::time, raw_t::time, time2gpst(), timeget(), rt17_t::Tow, tracet(), and rt17_t::Week.

Referenced by DecodeIONAndUTCData(), and DecodeType17().

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

◆ init_rt17()

int init_rt17 ( raw_t * Raw)

Definition at line 542 of file mrtk_rcv_rt17.c.

References calloc, raw_t::format, free_rt17(), MBUFF_LENGTH, rt17_t::MessageBuffer, rt17_t::PacketBuffer, PBUFF_LENGTH, raw_t::rcv_data, STRFMT_RT17, and tracet().

Referenced by init_raw().

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

◆ input_rt17()

int input_rt17 ( raw_t * Raw,
uint8_t Data )

Definition at line 588 of file mrtk_rcv_rt17.c.

References CheckPacketChecksum(), ClearMessageBuffer(), ClearPacketBuffer(), DecodeGSOF(), DecodeRawdata(), DecodeRetsvdata(), ETX, GENOUT, MBUFF_LENGTH, rt17_t::MessageBuffer, rt17_t::MessageBytes, rt17_t::MessageLength, raw_t::msgtype, raw_t::outtype, rt17_t::PacketBuffer, rt17_t::PacketBytes, rt17_t::PacketLength, rt17_t::Page, RAWDATA, raw_t::rcv_data, rt17_t::Reply, RETSVDATA, SyncPacket(), and tracet().

Referenced by input_raw(), and input_rt17f().

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

◆ input_rt17f()

int input_rt17f ( raw_t * Raw,
FILE * fp )

Definition at line 783 of file mrtk_rcv_rt17.c.

References input_rt17().

Referenced by input_rawf().

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

◆ ReadI2()

int16_t ReadI2 ( uint8_t * p)
static

Definition at line 2022 of file mrtk_rcv_rt17.c.

References ENDIAN_TEST::c, I2, and ENDIAN_TEST::u2.

◆ ReadI4()

int32_t ReadI4 ( uint8_t * p)
static

Definition at line 2043 of file mrtk_rcv_rt17.c.

References ENDIAN_TEST::c, and ENDIAN_TEST::u2.

◆ ReadR4()

float ReadR4 ( uint8_t * p)
static

Definition at line 2067 of file mrtk_rcv_rt17.c.

References R4, and U4.

◆ ReadR8()

double ReadR8 ( uint8_t * p)
static

Definition at line 2077 of file mrtk_rcv_rt17.c.

References ENDIAN_TEST::c, R8, and ENDIAN_TEST::u2.

◆ ReadU2()

uint16_t ReadU2 ( uint8_t * p)
static

Definition at line 2107 of file mrtk_rcv_rt17.c.

References ENDIAN_TEST::c, U2, and ENDIAN_TEST::u2.

◆ ReadU4()

uint32_t ReadU4 ( uint8_t * p)
static

Definition at line 2128 of file mrtk_rcv_rt17.c.

References ENDIAN_TEST::c, ENDIAN_TEST::u2, and U4.

◆ SetWeek()

void SetWeek ( raw_t * Raw,
int Week,
double tow )
static

Definition at line 2156 of file mrtk_rcv_rt17.c.

References rt17_t::Flags, gpst2time(), M_WEEK_OPTION, raw_t::rcv_data, raw_t::time, tracet(), and rt17_t::Week.

Referenced by DecodeGSOF1(), DecodeGSOF16(), DecodeGSOF26(), DecodeGSOF41(), and DecodeType29().

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

◆ SyncPacket()

int SyncPacket ( rt17_t * rt17,
uint8_t Data )
static

Definition at line 2182 of file mrtk_rcv_rt17.c.

References GENOUT, rt17_t::PacketBuffer, RAWDATA, RETSVDATA, and STX.

Referenced by input_rt17().

Here is the caller graph for this function:

◆ UnwrapGenout()

void UnwrapGenout ( rt17_t * rt17)
static

Definition at line 2210 of file mrtk_rcv_rt17.c.

References rt17_t::MessageBuffer, rt17_t::MessageBytes, and rt17_t::MessageLength.

Referenced by DecodeGSOF().

Here is the caller graph for this function:

◆ UnwrapRawdata()

void UnwrapRawdata ( rt17_t * rt17,
uint32_t * rif )
static

Definition at line 2240 of file mrtk_rcv_rt17.c.

References rt17_t::MessageBuffer, rt17_t::MessageBytes, rt17_t::MessageLength, and tracet().

Referenced by DecodeRawdata().

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

Variable Documentation

◆ GSOFTable

const char* GSOFTable[]
static

Definition at line 378 of file mrtk_rcv_rt17.c.

Referenced by DecodeGSOF().

◆ RawdataTable

const char* RawdataTable[]
static
Initial value:
= {
"Real-time GPS Survey Data, type 17",
"Position Record, type 11",
"Event Mark",
NULL,
NULL,
NULL,
"Real-time GNSS Survey Data, type 27",
"Enhanced Position Record, type 29"}

Definition at line 423 of file mrtk_rcv_rt17.c.

Referenced by DecodeRawdata().

◆ RetsvdataTable

const char* RetsvdataTable[]
static
Initial value:
= {
"SV Flags",
"GPS Ephemeris",
"GPS Almanac",
"ION / UTC Data",
"Disable Satellite, depreciated",
"Enable Satellite, depreciated",
NULL,
"Extended GPS Almanac",
"GLONASS Almanac",
"GLONASS Ephemeris",
NULL,
"Galileo Ephemeris",
"Galileo Almanac",
NULL,
"QZSS Ephemeris",
NULL,
"QZSS Almanac",
NULL,
NULL,
NULL,
"SV Flags",
"BeiDou Ephemeris",
"BeiDou Almanac"}

Definition at line 434 of file mrtk_rcv_rt17.c.

Referenced by DecodeRetsvdata().