|
MRTKLIB 0.7.14
Modernized GNSS Positioning Library
|
RINEX translator for RTCM and receiver raw data log. More...
#include "mrtklib/rtklib.h"Go to the source code of this file.
Classes | |
| struct | stas_tag |
| struct | halfc_tag |
| struct | strfile_t |
Macros | |
| #define | NOUTFILE 9 /* number of output files */ |
| #define | NSATSYS 7 /* number of satellite systems */ |
| #define | TSTARTMARGIN 60.0 /* time margin for file name replacement */ |
| #define | EVENT_STARTMOVE 2 /* rinex event start moving antenna */ |
| #define | EVENT_NEWSITE 3 /* rinex event new site occupation */ |
| #define | EVENT_HEADER 4 /* rinex event header info follows */ |
| #define | EVENT_EXTERNAL 5 /* rinex event external event */ |
Typedefs | |
| typedef struct stas_tag | stas_t |
| typedef struct halfc_tag | halfc_t |
Functions | |
| static void | convcode (int rnxver, int sys, char *type) |
| static strfile_t * | gen_strfile (int format, const char *opt) |
| static void | free_strfile (strfile_t *str) |
| static int | input_strfile (strfile_t *str) |
| static int | open_strfile (strfile_t *str, const char *file) |
| static void | close_strfile (strfile_t *str) |
| static void | setopt_file (int format, char **paths, int n, const int *mask, rnxopt_t *opt) |
| static void | unsetopt_file (rnxopt_t *opt) |
| static void | sort_obstype (uint8_t *codes, uint8_t *types, int n, int sys) |
| static void | setopt_obstype (const uint8_t *codes, const uint8_t *types, int sys, rnxopt_t *opt) |
| static void | setopt_phshift (rnxopt_t *opt) |
| static void | setopt_sta_list (const strfile_t *str, rnxopt_t *opt) |
| static void | setopt_sta (const strfile_t *str, rnxopt_t *opt) |
| static void | update_stas (strfile_t *str) |
| static void | update_stainf (strfile_t *str) |
| static void | dump_stas (const strfile_t *str) |
| static int | add_halfc (strfile_t *str, int sat, int idx, gtime_t time) |
| static void | update_halfc (strfile_t *str, obsd_t *obs) |
| static void | dump_halfc (const strfile_t *str) |
| static void | resolve_halfc (const strfile_t *str, obsd_t *data, int n) |
| static int | scan_file (char **files, int nf, rnxopt_t *opt, strfile_t *str, int *mask) |
| static void | write_header (FILE **ofp, int idx, const rnxopt_t *opt, const nav_t *nav) |
| static int | openfile (FILE **ofp, char *files[], const char *file, const rnxopt_t *opt, const nav_t *nav) |
| static void | closefile (FILE **ofp, const rnxopt_t *opt, nav_t *nav) |
| static void | outrnxevent (FILE *fp, const rnxopt_t *opt, gtime_t time, int event, const stas_t *stas, int staid) |
| static void | save_slips (strfile_t *str, obsd_t *data, int n) |
| static void | rest_slips (strfile_t *str, obsd_t *data, int n) |
| static int | screent_ttol (gtime_t time, gtime_t ts, gtime_t te, double tint, double ttol) |
| static void | convobs (FILE **ofp, rnxopt_t *opt, strfile_t *str, int *n, gtime_t *tend, int *staid) |
| static void | convnav (FILE **ofp, rnxopt_t *opt, strfile_t *str, int *n) |
| static void | convsbs (FILE **ofp, rnxopt_t *opt, strfile_t *str, int *n, gtime_t *tend) |
| static void | setopt_apppos (strfile_t *str, rnxopt_t *opt) |
| static int | showstat (int sess, gtime_t ts, gtime_t te, int *n) |
| static int | convrnx_s (int sess, int format, rnxopt_t *opt, const char *file, char **ofile) |
| int | convrnx (int format, rnxopt_t *opt, const char *file, char **ofile) |
Variables | |
| static const int | navsys [] |
| static const char | vercode [][MAXCODE] |
RINEX translator for RTCM and receiver raw data log.
version :
history : 2009/04/10 1.0 new 2009/06/02 1.1 support glonass 2009/12/18 1.2 add check return of init_rtcm()/init_raw() 2010/07/15 1.3 support wildcard expansion of input file support rinex 3.00 support rinex as input format support output of geo navigation message support rtcm antenna and receiver info changed api: convrnx() 2011/05/27 1.4 support GW10, Javad, LEX receiver support lex message conversion change api convrnx() 2012/10/18 1.5 support multiple codes in a frequency 2012/10/29 1.6 fix bug on scanning obs types support output of compass navigation data add supported obs types for rinex input 2013/03/11 1.7 support binex and rinex 3.02 add approx position in rinex obs header if blank 2014/05/24 1.8 support beidou B1 2014/08/26 1.9 support input format rt17 2015/05/24 1.10 fix bug on setting antenna delta in rtcm2opt() 2016/07/04 1.11 support IRNSS 2016/10/10 1.12 support event output by staid change in rtcm support separated navigation files for ver.3 2017/06/06 1.13 fix bug on array overflow in set_obstype() and scan_obstype() 2018/10/10 1.14 add trace of half-cycle ambiguity status fix bug on missing navigation data 2020/11/30 1.15 force scanning receiver log for obs-types (2-pass) delete scanobs in RINEX options (rnxopt_t) add phase shift option (phshift) in rnxopt_t sort obs-types by freq-index and code priority add test obs-types supportted by RINEX versions support receiver/antenna info in raw data fix bug on writing BDS/IRN nav header in closefile() fix bug on screening time in screent_ttol() fix bug on screening QZS L1S messages as SBAS use integer types in stdint.h
Definition in file mrtk_convrnx.c.
| #define EVENT_EXTERNAL 5 /* rinex event external event */ |
Definition at line 63 of file mrtk_convrnx.c.
Referenced by outrnxevent().
| #define EVENT_HEADER 4 /* rinex event header info follows */ |
Definition at line 62 of file mrtk_convrnx.c.
| #define EVENT_NEWSITE 3 /* rinex event new site occupation */ |
Definition at line 61 of file mrtk_convrnx.c.
Referenced by convobs(), and outrnxevent().
| #define EVENT_STARTMOVE 2 /* rinex event start moving antenna */ |
Definition at line 60 of file mrtk_convrnx.c.
Referenced by outrnxevent().
| #define NOUTFILE 9 /* number of output files */ |
Definition at line 56 of file mrtk_convrnx.c.
Referenced by closefile(), convrnx_s(), convsbs(), openfile(), and showstat().
| #define NSATSYS 7 /* number of satellite systems */ |
Definition at line 57 of file mrtk_convrnx.c.
Referenced by scan_file(), and setopt_phshift().
| #define TSTARTMARGIN 60.0 /* time margin for file name replacement */ |
Definition at line 58 of file mrtk_convrnx.c.
Definition at line 588 of file mrtk_convrnx.c.
References calloc, strfile_t::halfc, halfc_tag::next, halfc_tag::stat, halfc_tag::te, and halfc_tag::ts.
Referenced by update_halfc().
|
static |
Definition at line 304 of file mrtk_convrnx.c.
References strfile_t::format, strfile_t::fp, MAXRCVFMT, STRFMT_RINEX, STRFMT_RTCM2, STRFMT_RTCM3, and trace().
Referenced by convrnx_s(), and scan_file().
Definition at line 839 of file mrtk_convrnx.c.
References NOUTFILE, trace(), and write_header().
Referenced by convrnx_s().
|
static |
Definition at line 115 of file mrtk_convrnx.c.
References SYS_CMP, SYS_GLO, SYS_GPS, SYS_QZS, and SYS_SBS.
Referenced by setopt_obstype().
Definition at line 986 of file mrtk_convrnx.c.
References nav_s::eph, strfile_t::ephsat, strfile_t::ephset, rnxopt_t::exsats, nav_s::geph, MAXDTOE, MAXDTOE_CMP, MAXDTOE_GAL, MAXDTOE_GLO, MAXDTOE_IRN, MAXDTOE_QZS, MAXDTOE_SBS, MAXSAT, MINPRNSBS, strfile_t::nav, rnxopt_t::navsys, outrnxgnavb(), outrnxhnavb(), outrnxnavb(), rnxopt_t::rnxver, satsys(), screent(), rnxopt_t::sep_nav, nav_s::seph, SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_IRN, SYS_QZS, SYS_SBS, rnxopt_t::te, gtime_t::time, strfile_t::time, timeadd(), trace(), and rnxopt_t::ts.
Referenced by convrnx_s().
|
static |
Definition at line 936 of file mrtk_convrnx.c.
References obs_t::data, EVENT_NEWSITE, rnxopt_t::halfcyc, obsd_t::L, obsd_t::LLI, LLI_SLIP, obs_t::n, strfile_t::obs, outrnxevent(), outrnxobsb(), resolve_halfc(), rest_slips(), save_slips(), screent_ttol(), strfile_t::staid, strfile_t::stas, rnxopt_t::te, rnxopt_t::tend, gtime_t::time, obsd_t::time, strfile_t::time, timediff(), rnxopt_t::tint, trace(), rnxopt_t::ts, rnxopt_t::tstart, and rnxopt_t::ttol.
Referenced by convrnx_s().
|
extern |
Definition at line 1310 of file mrtk_convrnx.c.
References convrnx_s(), rnxopt_t::freqtype, gpst2time(), rnxopt_t::navsys, rnxopt_t::rnxver, showmsg(), SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_QZS, SYS_SBS, rnxopt_t::te, rnxopt_t::tend, gtime_t::time, time2gpst(), timeadd(), timediff(), trace(), rnxopt_t::trtcm, rnxopt_t::ts, rnxopt_t::tstart, rnxopt_t::ttol, and rnxopt_t::tunit.
|
static |
Definition at line 1164 of file mrtk_convrnx.c.
References rnxopt_t::apppos, rnxopt_t::autopos, close_strfile(), closefile(), convnav(), convobs(), convsbs(), expath(), free, free_strfile(), gen_strfile(), nav_s::glo_fcn, rnxopt_t::glofcn, input_strfile(), malloc, MAXEXFILE, MAXPRNGLO, strfile_t::nav, norm(), NOUTFILE, open_strfile(), openfile(), rnxopt_t::rcvopt, reppath(), scan_file(), setopt_apppos(), setopt_file(), showmsg(), showstat(), rnxopt_t::staid, STRFMT_RT17, STRFMT_RTCM2, STRFMT_RTCM3, rnxopt_t::te, rnxopt_t::tend, gtime_t::time, strfile_t::time, timeadd(), timediff(), trace(), rnxopt_t::trtcm, rnxopt_t::ts, rnxopt_t::tstart, strfile_t::tstart, rnxopt_t::ttol, and unsetopt_file().
Referenced by convrnx().
Definition at line 1081 of file mrtk_convrnx.c.
References rnxopt_t::exsats, gpst2time(), MAXPRNQZS_S, MAXPRNSBS, MINPRNQZS_S, MINPRNSBS, strfile_t::nav, rnxopt_t::navsys, NOUTFILE, outrnxhnavb(), sbsmsg_t::prn, strfile_t::raw, rnxopt_t::rnxver, satno(), raw_t::sbsmsg, sbsoutmsg(), sbsupdatecorr(), screent(), rnxopt_t::sep_nav, nav_s::seph, SYS_QZS, SYS_SBS, rnxopt_t::te, gtime_t::time, timediff(), sbsmsg_t::tow, trace(), rnxopt_t::ts, rnxopt_t::ttol, and sbsmsg_t::week.
Referenced by convrnx_s().
|
static |
Definition at line 630 of file mrtk_convrnx.c.
References strfile_t::halfc, MAXSAT, halfc_tag::next, satno2id(), halfc_tag::stat, halfc_tag::te, time2str(), trace(), and halfc_tag::ts.
Referenced by scan_file().
|
static |
Definition at line 565 of file mrtk_convrnx.c.
References sta_t::antdes, sta_t::del, sta_t::deltype, ecef2pos(), sta_t::name, stas_tag::next, sta_t::pos, R2D, sta_t::rectype, stas_tag::sta, stas_tag::staid, strfile_t::stas, stas_tag::te, time2str(), trace(), and stas_tag::ts.
Referenced by scan_file().
|
static |
Definition at line 204 of file mrtk_convrnx.c.
References strfile_t::format, free, free_raw(), free_rnxctr(), free_rtcm(), strfile_t::halfc, MAXRCVFMT, MAXSAT, halfc_tag::next, stas_tag::next, strfile_t::raw, strfile_t::rnx, strfile_t::rtcm, strfile_t::stas, STRFMT_RINEX, STRFMT_RTCM2, STRFMT_RTCM3, and trace().
Referenced by convrnx_s().
|
static |
Definition at line 142 of file mrtk_convrnx.c.
References calloc, strfile_t::ephsat, strfile_t::ephset, strfile_t::format, strfile_t::fp, free, strfile_t::halfc, init_raw(), init_rnxctr(), init_rtcm(), MAXRCVFMT, MAXSAT, raw_t::nav, rnxctr_t::nav, rtcm_t::nav, strfile_t::nav, raw_t::obs, rnxctr_t::obs, rtcm_t::obs, strfile_t::obs, raw_t::opt, rnxctr_t::opt, rtcm_t::opt, strfile_t::raw, strfile_t::rnx, strfile_t::rtcm, showmsg(), strfile_t::slips, raw_t::sta, rnxctr_t::sta, rtcm_t::sta, strfile_t::sta, strfile_t::staid, strfile_t::stas, STRFMT_RINEX, STRFMT_RTCM2, STRFMT_RTCM3, raw_t::time, rnxctr_t::time, rtcm_t::time, strfile_t::time, trace(), and strfile_t::tstart.
Referenced by convrnx_s().
|
static |
Definition at line 232 of file mrtk_convrnx.c.
References raw_t::ephsat, rnxctr_t::ephsat, rtcm_t::ephsat, strfile_t::ephsat, raw_t::ephset, rnxctr_t::ephset, rtcm_t::ephset, strfile_t::ephset, strfile_t::format, strfile_t::fp, input_rawf(), input_rnxctr(), input_rtcm2f(), input_rtcm3f(), MAXRCVFMT, strfile_t::raw, strfile_t::rnx, strfile_t::rtcm, rtcm_t::staid, strfile_t::staid, STRFMT_RINEX, STRFMT_RTCM2, STRFMT_RTCM3, gtime_t::time, raw_t::time, rnxctr_t::time, rtcm_t::time, strfile_t::time, time_str(), trace(), and strfile_t::tstart.
Referenced by convrnx_s(), and scan_file().
|
static |
Definition at line 273 of file mrtk_convrnx.c.
References strfile_t::format, strfile_t::fp, MAXRCVFMT, open_rnxctr(), strfile_t::raw, strfile_t::rnx, strfile_t::rtcm, showmsg(), STRFMT_RINEX, STRFMT_RTCM2, STRFMT_RTCM3, raw_t::time, rnxctr_t::time, rtcm_t::time, strfile_t::time, and trace().
Referenced by convrnx_s(), and scan_file().
|
static |
Definition at line 810 of file mrtk_convrnx.c.
References createdir(), NOUTFILE, showmsg(), trace(), and write_header().
Referenced by convrnx_s().
|
static |
Definition at line 855 of file mrtk_convrnx.c.
References sta_t::antdes, sta_t::antsno, sta_t::del, sta_t::deltype, ecef2enu(), ecef2pos(), EVENT_EXTERNAL, EVENT_NEWSITE, EVENT_STARTMOVE, sta_t::hgt, rnxopt_t::marker, sta_t::name, norm(), sta_t::pos, sta_t::recsno, sta_t::rectype, sta_t::recver, rnxopt_t::rnxver, stas_tag::sta, stas, time2epoch(), timediff(), and trace().
Referenced by convobs().
Definition at line 651 of file mrtk_convrnx.c.
References DTTOL, strfile_t::halfc, obsd_t::L, obsd_t::LLI, LLI_HALFA, LLI_HALFC, LLI_HALFS, halfc_tag::next, obsd_t::sat, halfc_tag::stat, halfc_tag::te, timediff(), and halfc_tag::ts.
Referenced by convobs().
Definition at line 917 of file mrtk_convrnx.c.
References obsd_t::LLI, LLI_SLIP, obsd_t::sat, and strfile_t::slips.
Referenced by convobs().
Definition at line 908 of file mrtk_convrnx.c.
References LLI_SLIP, obsd_t::sat, and strfile_t::slips.
Referenced by convobs().
Definition at line 674 of file mrtk_convrnx.c.
References close_strfile(), obsd_t::code, code2obs(), obsd_t::D, obs_t::data, dump_halfc(), dump_stas(), nav_s::eph, geph_t::frq, nav_s::geph, nav_s::glo_fcn, rnxopt_t::halfcyc, input_strfile(), obsd_t::L, nav_s::n, obs_t::n, strfile_t::nav, navsys, rnxopt_t::navsys, nav_s::ng, nav_s::ns, NSATSYS, strfile_t::obs, open_strfile(), obsd_t::P, rnxopt_t::phshift, geph_t::sat, obsd_t::sat, satsys(), nav_s::seph, setopt_obstype(), setopt_phshift(), setopt_sta(), showmsg(), obsd_t::SNR, sort_obstype(), SYS_GLO, rnxopt_t::te, gtime_t::time, strfile_t::time, time_str(), timediff(), trace(), rnxopt_t::ts, rnxopt_t::ttol, update_halfc(), update_stainf(), and update_stas().
Referenced by convrnx_s().
Definition at line 929 of file mrtk_convrnx.c.
References DTTOL, gtime_t::time, time2gpst(), and timediff().
Referenced by convobs().
Definition at line 1124 of file mrtk_convrnx.c.
References rnxopt_t::apppos, obs_t::data, matcpy(), obs_t::n, strfile_t::nav, prcopt_t::navsys, rnxopt_t::navsys, strfile_t::obs, pntpos(), prcopt_default, sol_t::rr, and trace().
Referenced by convrnx_s().
|
static |
Definition at line 316 of file mrtk_convrnx.c.
References rnxopt_t::comment, formatstrs, and MAXCOMMENT.
Referenced by convrnx_s().
|
static |
Definition at line 361 of file mrtk_convrnx.c.
References code2freq_idx(), code2obs(), convcode(), rnxopt_t::freqtype, rnxopt_t::mask, MAXOBSTYPE, navsys, rnxopt_t::navsys, rnxopt_t::nobs, rnxopt_t::obstype, rnxopt_t::rnxver, rnxopt_t::tobs, trace(), and vercode.
Referenced by scan_file().
|
static |
Definition at line 414 of file mrtk_convrnx.c.
References CODE_L1C, CODE_L1L, CODE_L1N, CODE_L1P, CODE_L1S, CODE_L1W, CODE_L1X, CODE_L2C, CODE_L2L, CODE_L2P, CODE_L2S, CODE_L2X, CODE_L3Q, CODE_L5P, CODE_L5Q, CODE_L6C, CODE_L6Q, CODE_L7P, CODE_L7Q, CODE_L8Q, navsys, rnxopt_t::nobs, NSATSYS, obs2code(), rnxopt_t::shift, SYS_CMP, SYS_GAL, SYS_GLO, SYS_GPS, SYS_QZS, and rnxopt_t::tobs.
Referenced by scan_file().
Definition at line 482 of file mrtk_convrnx.c.
References rnxopt_t::ant, rnxopt_t::antdel, sta_t::antdes, sta_t::antsetup, sta_t::antsno, rnxopt_t::apppos, rnxopt_t::autopos, sta_t::del, sta_t::deltype, ecef2enu(), ecef2pos(), sta_t::hgt, rnxopt_t::marker, sta_t::marker, rnxopt_t::markerno, matcpy(), sta_t::name, stas_tag::next, norm(), sta_t::pos, rnxopt_t::rec, sta_t::recsno, sta_t::rectype, sta_t::recver, setopt_sta_list(), stas_tag::sta, strfile_t::sta, strfile_t::stas, stas_tag::te, gtime_t::time, timediff(), trace(), and rnxopt_t::ts.
Referenced by scan_file().
Definition at line 459 of file mrtk_convrnx.c.
References rnxopt_t::comment, MAXCOMMENT, stas_tag::next, stas_tag::staid, strfile_t::stas, stas_tag::te, time2str(), and stas_tag::ts.
Referenced by setopt_sta().
Definition at line 1139 of file mrtk_convrnx.c.
References NOUTFILE, showmsg(), gtime_t::time, time2str(), and timediff().
Referenced by convrnx_s().
|
static |
Definition at line 341 of file mrtk_convrnx.c.
References code2freq_idx(), getcodepri(), and navsys.
Referenced by scan_file().
|
static |
Definition at line 331 of file mrtk_convrnx.c.
References rnxopt_t::comment, and MAXCOMMENT.
Referenced by convrnx_s().
Definition at line 599 of file mrtk_convrnx.c.
References add_halfc(), strfile_t::halfc, obsd_t::L, obsd_t::LLI, LLI_HALFA, LLI_HALFC, LLI_HALFS, LLI_SLIP, obsd_t::sat, halfc_tag::stat, halfc_tag::te, obsd_t::time, and halfc_tag::ts.
Referenced by scan_file().
|
static |
Definition at line 559 of file mrtk_convrnx.c.
References stas_tag::sta, strfile_t::sta, stas_tag::staid, strfile_t::staid, and strfile_t::stas.
Referenced by scan_file().
|
static |
Definition at line 545 of file mrtk_convrnx.c.
References calloc, stas_tag::next, stas_tag::staid, strfile_t::staid, strfile_t::stas, stas_tag::te, strfile_t::time, and stas_tag::ts.
Referenced by scan_file().
Definition at line 781 of file mrtk_convrnx.c.
References outrnxcnavh(), outrnxgnavh(), outrnxhnavh(), outrnxinavh(), outrnxlnavh(), outrnxnavh(), outrnxobsh(), and outrnxqnavh().
Referenced by closefile(), and openfile().
|
static |
Definition at line 99 of file mrtk_convrnx.c.
Referenced by outobstype_ver3(), outrnx_phase_shift(), scan_file(), setopt_obstype(), setopt_phshift(), and sort_obstype().
|
static |
Definition at line 101 of file mrtk_convrnx.c.
Referenced by setopt_obstype().