MRTKLIB 0.7.14
Modernized GNSS Positioning Library
Loading...
Searching...
No Matches
mrtk_sbas.h File Reference

MRTKLIB SBAS Module — SBAS message decoding and corrections. More...

#include <stdint.h>
#include <stdio.h>
#include "mrtklib/mrtk_nav.h"
#include "mrtklib/mrtk_time.h"
Include dependency graph for mrtk_sbas.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int sbsreadmsg (const char *file, int sel, sbs_t *sbs)
 Read SBAS message file.
int sbsreadmsgt (const char *file, int sel, gtime_t ts, gtime_t te, sbs_t *sbs)
 Read SBAS message file with time span.
void sbsoutmsg (FILE *fp, sbsmsg_t *sbsmsg)
 Output SBAS message record.
int sbsdecodemsg (gtime_t time, int prn, const uint32_t *words, sbsmsg_t *sbsmsg)
 Decode SBAS message frame words.
int sbsupdatecorr (const sbsmsg_t *msg, nav_t *nav)
 Update SBAS corrections in navigation data.
int sbssatcorr (gtime_t time, int sat, const nav_t *nav, double *rs, double *dts, double *var)
 SBAS satellite ephemeris and clock correction.
int sbsioncorr (gtime_t time, const nav_t *nav, const double *pos, const double *azel, double *delay, double *var)
 SBAS ionospheric delay correction.
double sbstropcorr (gtime_t time, const double *pos, const double *azel, double *var)
 SBAS tropospheric delay correction.

Variables

const sbsigpband_t igpband1 [9][8]
const sbsigpband_t igpband2 [2][5]

Detailed Description

MRTKLIB SBAS Module — SBAS message decoding and corrections.

This header declares all public SBAS functions extracted from sbas.c.

Note
All functions in this module are pure cut-and-paste extractions from sbas.c with zero algorithmic changes.

Definition in file mrtk_sbas.h.

Function Documentation

◆ sbsdecodemsg()

int sbsdecodemsg ( gtime_t time,
int prn,
const uint32_t * words,
sbsmsg_t * sbsmsg )

Decode SBAS message frame words.

Parameters
[in]timeReception time
[in]prnSBAS satellite PRN number
[in]wordsSBAS message frame words (9 words)
[out]sbsmsgSBAS message
Returns
Status (1:ok, 0:error)

Definition at line 1080 of file mrtk_sbas.c.

References DTTOL, sbsmsg_t::msg, sbsmsg_t::prn, rtk_crc24q(), gtime_t::time, time2gpst(), sbsmsg_t::tow, trace(), and sbsmsg_t::week.

Referenced by decode_rxmsfrb(), and decode_xe5bit().

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

◆ sbsioncorr()

int sbsioncorr ( gtime_t time,
const nav_t * nav,
const double * pos,
const double * azel,
double * delay,
double * var )

SBAS ionospheric delay correction.

Parameters
[in]timeReception time
[in]navNavigation data
[in]posReceiver position {lat, lon, h} (rad, m)
[in]azelAzimuth/elevation angle {az, el} (rad)
[out]delayIonospheric delay (L1) (m)
[out]varVariance of ionospheric delay (m^2)
Returns
Status (1:ok, 0:error)

Definition at line 823 of file mrtk_sbas.c.

References sbsigp_t::delay, ionppp(), R2D, nav_s::sbsion, searchigp(), timediff(), trace(), and varicorr().

Referenced by ionocorr().

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

◆ sbsoutmsg()

void sbsoutmsg ( FILE * fp,
sbsmsg_t * sbsmsg )

Output SBAS message record.

Parameters
[in]fpOutput file pointer
[in]sbsmsgSBAS message

Definition at line 732 of file mrtk_sbas.c.

References sbsmsg_t::msg, sbsmsg_t::prn, sbsmsg_t::tow, trace(), and sbsmsg_t::week.

Referenced by convsbs().

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

◆ sbsreadmsg()

int sbsreadmsg ( const char * file,
int sel,
sbs_t * sbs )

Read SBAS message file.

Parameters
[in]fileSBAS message file path
[in]selSBAS satellite selection (0:all)
[in,out]sbsSBAS messages
Returns
Status (1:ok, 0:error)

Definition at line 719 of file mrtk_sbas.c.

References sbsreadmsgt(), and trace().

Referenced by readpreceph().

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

◆ sbsreadmsgt()

int sbsreadmsgt ( const char * file,
int sel,
gtime_t ts,
gtime_t te,
sbs_t * sbs )

Read SBAS message file with time span.

Parameters
[in]fileSBAS message file path
[in]selSBAS satellite selection (0:all)
[in]tsTime start (ts.time==0: no limit)
[in]teTime end (te.time==0: no limit)
[in,out]sbsSBAS messages
Returns
Status (1:ok, 0:error)

Definition at line 682 of file mrtk_sbas.c.

References cmpmsgs(), expath(), free, malloc, MAXEXFILE, sbs_t::msgs, sbs_t::n, readmsgs(), and trace().

Referenced by sbsreadmsg().

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

◆ sbssatcorr()

int sbssatcorr ( gtime_t time,
int sat,
const nav_t * nav,
double * rs,
double * dts,
double * var )

SBAS satellite ephemeris and clock correction.

Parameters
[in]timeReception time
[in]satSatellite number
[in]navNavigation data
[in,out]rsSatellite position/velocity (corrected)
[out]dtsSatellite clock correction
[out]varVariance of correction
Returns
Status (1:ok, 0:error)

Definition at line 1047 of file mrtk_sbas.c.

◆ sbstropcorr()

double sbstropcorr ( gtime_t time,
const double * pos,
const double * azel,
double * var )

SBAS tropospheric delay correction.

Parameters
[in]timeReception time
[in]posReceiver position {lat, lon, h} (rad, m)
[in]azelAzimuth/elevation angle {az, el} (rad)
[out]varVariance of tropospheric delay (m^2)
Returns
Tropospheric delay (m)

Definition at line 930 of file mrtk_sbas.c.

References getmet(), PI, R2D, time2doy(), and trace().

Referenced by tropcorr().

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

◆ sbsupdatecorr()

int sbsupdatecorr ( const sbsmsg_t * msg,
nav_t * nav )

Update SBAS corrections in navigation data.

Parameters
[in]msgSBAS message
[in,out]navNavigation data
Returns
Message type (0:error)

Definition at line 517 of file mrtk_sbas.c.

References decode_sbstype1(), decode_sbstype18(), decode_sbstype2(), decode_sbstype24(), decode_sbstype25(), decode_sbstype26(), decode_sbstype6(), decode_sbstype7(), decode_sbstype9(), getbitu(), sbsmsg_t::msg, nav_s::sbsion, nav_s::sbssat, trace(), and sbsmsg_t::week.

Referenced by convsbs(), inputobs(), and update_sbs().

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

Variable Documentation

◆ igpband1

const sbsigpband_t igpband1[9][8]
extern

Definition at line 86 of file mrtk_sbas.c.

Referenced by decode_sbstype18().

◆ igpband2

const sbsigpband_t igpband2[2][5]
extern

Definition at line 159 of file mrtk_sbas.c.

Referenced by decode_sbstype18().