MRTKLIB 0.7.14
Modernized GNSS Positioning Library
Loading...
Searching...
No Matches
mrtk_madoca_local_comb.c File Reference
#include "mrtklib/mrtk_madoca_local_comb.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "mrtklib/mrtk_atmos.h"
#include "mrtklib/mrtk_coords.h"
#include "mrtklib/mrtk_mat.h"
#include "mrtklib/mrtk_trace.h"
Include dependency graph for mrtk_madoca_local_comb.c:

Go to the source code of this file.

Macros

#define D2R   (3.1415926535897932 / 180.0)
#define R2D   (180.0 / 3.1415926535897932)
#define GN(gp)

Functions

int strwrite (struct stream_tag *stream, uint8_t *buff, int n)
static void vsub (const double a[3], const double b[3], double c[3])
static int plane (const double p1[3], const double p2[3], const double p3[3], double peq[4])
static int intpt (const double p1[3], const double p2[3], const double p3[3], double t[3])
static double normvz (const double a[3], const double b[3], const double tgt[3])
static int selpersta (const stat_t *stat, const double *llh, int flag, double maxdist, int *id)
static int coldet (const double p1[3], const double p2[3], const double p3[3], const double tgt[3])
static int gettriangledd (const stat_t *stat, const double *llh, int flag, const double maxdist, const int extp, int *staid)
static int corr_trop_plane (const stat_t *stat, gtime_t time, const double *llh, double maxdist, int extp, double *trp, double *std)
static int corr_iono_plane (const stat_t *stat, gtime_t time, const double *llh, double maxdist, int extp, double *ion, double *std, double maxres, int *nrej, int *ncnt)
int initgridsta (const char *setfile, lclblock_t *lclblk, int btype)
 Initialize grid/station settings from a specified file.
void grid_intp_trop (const gtime_t gt, const stat_t *stat, lclblock_t *lclblk)
 Interpolate tropospheric grid data.
void sta_sel_trop (const gtime_t time, const stat_t *stat, lclblock_t *lslblk)
 Select and assign tropospheric data blocks based on station positions.
void grid_intp_iono (const gtime_t gt, const stat_t *stat, lclblock_t *lclblk, double maxres, int *nrej, int *ncnt)
 Interpolate ionospheric grid data.
void sta_sel_iono (const gtime_t gt, const stat_t *stat, lclblock_t *lslblk)
 Select and assign ionospheric data blocks based on station positions.
void output_lclcmb (rtcm_t *rtcm, int btype, struct stream_tag *ostr)
 Generate and output RTCM3 local combination correction messages.

Macro Definition Documentation

◆ D2R

#define D2R   (3.1415926535897932 / 180.0)

Definition at line 29 of file mrtk_madoca_local_comb.c.

◆ GN

#define GN ( gp)
Value:
(gp == 1 ? 64 : 16)

Definition at line 33 of file mrtk_madoca_local_comb.c.

Referenced by grid_intp_iono(), and grid_intp_trop().

◆ R2D

#define R2D   (180.0 / 3.1415926535897932)

Definition at line 30 of file mrtk_madoca_local_comb.c.

Function Documentation

◆ coldet()

int coldet ( const double p1[3],
const double p2[3],
const double p3[3],
const double tgt[3] )
static

Definition at line 124 of file mrtk_madoca_local_comb.c.

References normvz().

Referenced by gettriangledd().

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

◆ corr_iono_plane()

int corr_iono_plane ( const stat_t * stat,
gtime_t time,
const double * llh,
double maxdist,
int extp,
double * ion,
double * std,
double maxres,
int * nrej,
int * ncnt )
static

Definition at line 243 of file mrtk_madoca_local_comb.c.

References spos_t::ecef, ecef2pos(), get_iono_sta(), gettriangledd(), intpt(), siteion_t::iond, MAXSAT, stat_t::sion, siteion_t::site, and TYPE_ION.

Referenced by grid_intp_iono().

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

◆ corr_trop_plane()

int corr_trop_plane ( const stat_t * stat,
gtime_t time,
const double * llh,
double maxdist,
int extp,
double * trp,
double * std )
static

Definition at line 200 of file mrtk_madoca_local_comb.c.

References D2R, spos_t::ecef, ecef2pos(), get_trop_sta(), gettriangledd(), intpt(), sitetrp_t::site, stat_t::strp, tropmodel(), sitetrp_t::trpd, and TYPE_TRP.

Referenced by grid_intp_trop().

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

◆ gettriangledd()

int gettriangledd ( const stat_t * stat,
const double * llh,
int flag,
const double maxdist,
const int extp,
int * staid )
static

Definition at line 137 of file mrtk_madoca_local_comb.c.

References coldet(), ecef2pos(), MAXSITES, R2D, selpersta(), stat_t::sion, siteion_t::site, sitetrp_t::site, stat_t::strp, trace(), and TYPE_TRP.

Referenced by corr_iono_plane(), and corr_trop_plane().

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

◆ grid_intp_iono()

void grid_intp_iono ( const gtime_t gt,
const stat_t * stat,
lclblock_t * lclblk,
double maxres,
int * nrej,
int * ncnt )
extern

Interpolate ionospheric grid data.

Parameters
[in]gtTime
[in]statStation data
[in,out]lclblkLocal block information struct
[in]maxresMaximum residual
[out]nrejNumber of rejections
[out]ncntNumber of counts

Definition at line 475 of file mrtk_madoca_local_comb.c.

References corr_iono_distwgt(), corr_iono_plane(), lclblock_t::extp, GN, blkinf_t::gp, blkinf_t::gpitch, blkinf_t::grid, lclblock_t::iblkinf, lclblock_t::idist, lclblock_t::interp, lclblock_t::inum, ion_t::ion, siteion_t::iond, lclblock_t::istat, blkinf_t::mask, MAXSAT, MODE_PLANE, blkinf_t::n, ion_t::std, and ion_t::time.

Here is the call graph for this function:

◆ grid_intp_trop()

void grid_intp_trop ( const gtime_t gt,
const stat_t * stat,
lclblock_t * lclblk )
extern

Interpolate tropospheric grid data.

Parameters
[in]gtTime
[in]statStation data
[in,out]lclblkLocal block information

Definition at line 390 of file mrtk_madoca_local_comb.c.

References corr_trop_distwgt(), corr_trop_plane(), lclblock_t::extp, GN, blkinf_t::gp, blkinf_t::gpitch, blkinf_t::grid, lclblock_t::interp, blkinf_t::mask, MODE_PLANE, blkinf_t::n, trp_t::std, lclblock_t::tblkinf, lclblock_t::tdist, trp_t::time, lclblock_t::tnum, trp_t::trp, sitetrp_t::trpd, and lclblock_t::tstat.

Here is the call graph for this function:

◆ initgridsta()

int initgridsta ( const char * setfile,
lclblock_t * lclblk,
int btype )
extern

Initialize grid/station settings from a specified file.

Parameters
[in]setfileGrid/station setting file path
[in,out]lclblkLocal block information struct
[in]btypeBlock type (BTYPE_GRID or BTYPE_STA)
Returns
Status (0: error, 1: success)

Definition at line 308 of file mrtk_madoca_local_comb.c.

References blkinf_t::bn, blkinf_t::bs, blkinf_t::btype, BTYPE_GRID, blkinf_t::gpitch, lclblock_t::iblkinf, initblkinf(), lclblock_t::inum, ION_BLKSIZE, blkinf_t::mask, lclblock_t::tblkinf, lclblock_t::tnum, trace(), and TRP_BLKSIZE.

Here is the call graph for this function:

◆ intpt()

int intpt ( const double p1[3],
const double p2[3],
const double p3[3],
double t[3] )
static

Definition at line 60 of file mrtk_madoca_local_comb.c.

References plane().

Referenced by corr_iono_plane(), and corr_trop_plane().

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

◆ normvz()

double normvz ( const double a[3],
const double b[3],
const double tgt[3] )
static

Definition at line 69 of file mrtk_madoca_local_comb.c.

References vsub().

Referenced by coldet().

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

◆ output_lclcmb()

void output_lclcmb ( rtcm_t * rtcm,
int btype,
stream_t * ostr )
extern

Generate and output RTCM3 local combination correction messages.

Parameters
[in,out]rtcmRTCM control struct
[in]btypeBlock type (BTYPE_GRID or BTYPE_STA)
[in]ostrOutput stream

Definition at line 579 of file mrtk_madoca_local_comb.c.

References BTYPE_GRID, BTYPE_STA, gen_rtcm3(), rtcm, and strwrite().

Here is the call graph for this function:

◆ plane()

int plane ( const double p1[3],
const double p2[3],
const double p3[3],
double peq[4] )
static

Definition at line 47 of file mrtk_madoca_local_comb.c.

References cross3(), normv3(), and vsub().

Referenced by intpt().

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

◆ selpersta()

int selpersta ( const stat_t * stat,
const double * llh,
int flag,
double maxdist,
int * id )
static

Definition at line 77 of file mrtk_madoca_local_comb.c.

References spos_t::ecef, ecef2pos(), MAXSITES, stat_t::nsi, stat_t::nst, pos2ecef(), posdist(), R2D, stat_t::sion, siteion_t::site, sitetrp_t::site, stat_t::strp, trace(), and TYPE_TRP.

Referenced by gettriangledd().

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

◆ sta_sel_iono()

void sta_sel_iono ( const gtime_t gt,
const stat_t * stat,
lclblock_t * lslblk )
extern

Select and assign ionospheric data blocks based on station positions.

Parameters
[in]gtTime
[in]statStation data
[in,out]lslblkLocal block information struct

Definition at line 528 of file mrtk_madoca_local_comb.c.

References blkinf_t::bpos, blkinf_t::bs, D2R, spos_t::ecef, ecef2pos(), blkinf_t::grid, lclblock_t::iblkinf, ion_t::ion, siteion_t::iond, lclblock_t::istat, MAXSAT, blkinf_t::n, stat_t::nsi, stat_t::sion, siteion_t::site, sitetrp_t::site, ion_t::std, stat_t::strp, ion_t::time, timediff(), and lclblock_t::tnum.

Here is the call graph for this function:

◆ sta_sel_trop()

void sta_sel_trop ( const gtime_t time,
const stat_t * stat,
lclblock_t * lslblk )
extern

Select and assign tropospheric data blocks based on station positions.

Parameters
[in]timeTime
[in]statStation data
[in,out]lslblkLocal block information struct

Definition at line 432 of file mrtk_madoca_local_comb.c.

References blkinf_t::bpos, blkinf_t::bs, D2R, spos_t::ecef, ecef2pos(), blkinf_t::grid, blkinf_t::n, stat_t::nst, sitetrp_t::site, stat_t::strp, lclblock_t::tblkinf, lclblock_t::tnum, sitetrp_t::trpd, and lclblock_t::tstat.

Here is the call graph for this function:

◆ strwrite()

int strwrite ( struct stream_tag * stream,
uint8_t * buff,
int n )
extern

Definition at line 3394 of file mrtk_stream.c.

References stream_tag::mode, stream_tag::msg, stream_tag::outb, stream_tag::outbt, stream_tag::outr, stream_tag::port, STR_FILE, STR_FTP, STR_HTTP, STR_MEMBUF, STR_MODE_W, STR_NTRIPCAS, STR_NTRIPCLI, STR_NTRIPSVR, STR_SERIAL, STR_TCPCLI, STR_TCPSVR, STR_UDPCLI, strlock(), strunlock(), stream_tag::tact, stream_tag::tick_o, tickget(), tirate, tracet(), stream_tag::type, writefile(), writemembuf(), writentrip(), writentripc(), writeserial(), writetcpcli(), writetcpsvr(), and writeudpcli().

Referenced by output_lclcmb(), rtksvrmark(), rtksvrstart(), rtksvrthread(), strsvrstart(), strsvrthread(), write_nav(), write_nav_cycle(), write_obs(), write_rtcm3_msm(), write_sta_cycle(), writesol(), and writesolhead().

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

◆ vsub()

void vsub ( const double a[3],
const double b[3],
double c[3] )
static

Definition at line 39 of file mrtk_madoca_local_comb.c.

Referenced by normvz(), and plane().

Here is the caller graph for this function: