58#define TSTARTMARGIN 60.0
60#define EVENT_STARTMOVE 2
61#define EVENT_NEWSITE 3
63#define EVENT_EXTERNAL 5
106 "00000000...0.0000000000000..........................................",
107 "00...........0....0..........44.4..........222...................444",
108 "0........0000..........0000000000...000.............................",
109 "2.....22...22..222.....222......2422....................4444........",
110 "0......................000..........................................",
111 ".4...4...4.4.....1.......41114..1.....41111............444..44444...",
112 ".........................3......................3333333............."
115static void convcode(
int rnxver,
int sys,
char* type) {
116 if (rnxver >= 212 && (sys ==
SYS_GPS || sys ==
SYS_QZS || sys ==
SYS_SBS) && !strcmp(type + 1,
"1C")) {
117 strcpy(type + 1,
"A");
119 (!strcmp(type + 1,
"1S") || !strcmp(type + 1,
"1L") || !strcmp(type + 1,
"1X"))) {
120 strcpy(type + 1,
"B");
122 (!strcmp(type + 1,
"2S") || !strcmp(type + 1,
"2L") || !strcmp(type + 1,
"2X"))) {
123 strcpy(type + 1,
"C");
124 }
else if (rnxver >= 212 && sys ==
SYS_GLO && !strcmp(type + 1,
"1C")) {
125 strcpy(type + 1,
"A");
126 }
else if (rnxver >= 212 && sys ==
SYS_GLO && !strcmp(type + 1,
"2C")) {
127 strcpy(type + 1,
"D");
129 (!strcmp(type + 1,
"2I") || !strcmp(type + 1,
"2Q") || !strcmp(type + 1,
"2X"))) {
130 strcpy(type + 1,
"2");
131 }
else if (!strcmp(type,
"C1P") || !strcmp(type,
"C1W") || !strcmp(type,
"C1Y") ||
132 !strcmp(type,
"C1N")) {
134 }
else if (!strcmp(type,
"C2P") || !strcmp(type,
"C2W") || !strcmp(type,
"C2Y") || !strcmp(type,
"C2N") ||
135 !strcmp(type,
"C2D")) {
147 trace(NULL, 3,
"init_strfile:\n");
177 strcpy(str->
raw.
opt, opt);
188 strcpy(str->
rnx.
opt, opt);
195 for (i = 0; i <
MAXSAT; i++)
196 for (j = 0; j < NFREQ + NEXOBS; j++) {
197 str->
slips[i][j] = 0;
198 str->
halfc[i][j] = NULL;
209 trace(NULL, 3,
"free_strfile:\n");
218 for (sp = str->
stas; sp; sp = sp_next) {
222 for (i = 0; i <
MAXSAT; i++)
223 for (j = 0; j < NFREQ + NEXOBS; j++) {
224 for (hp = str->
halfc[i][j]; hp; hp = hp_next) {
235 trace(NULL, 4,
"input_strfile:\n");
269 trace(NULL, 4,
"input_strfile: time=%s type=%d\n",
time_str(str->
time, 3), type);
274 trace(NULL, 3,
"open_strfile: file=%s\n", file);
277 if (!(str->
fp = fopen(file,
"rb"))) {
278 showmsg(
"rtcm open error: %s", file);
283 if (!(str->
fp = fopen(file,
"rb"))) {
284 showmsg(
"log open error: %s", file);
289 if (!(str->
fp = fopen(file,
"r"))) {
290 showmsg(
"rinex open error: %s", file);
295 showmsg(
"no rinex file: %s", file);
305 trace(NULL, 3,
"close_strfile:\n");
308 if (str->
fp) fclose(str->
fp);
310 if (str->
fp) fclose(str->
fp);
312 if (str->
fp) fclose(str->
fp);
326 if (!mask[j])
continue;
327 sprintf(opt->
comment[i++],
"log: %.58s", paths[j]);
334 for (i =
MAXCOMMENT - 1; i >= 0 && !brk; i--) {
335 if (!*opt->
comment[i])
continue;
336 if (!strncmp(opt->
comment[i],
"format: ", 8)) brk = 1;
341static void sort_obstype(uint8_t* codes, uint8_t* types,
int n,
int sys) {
343 int i, j, idx1, idx2, pri1, pri2;
345 for (i = 0; i < n - 1; i++)
346 for (j = i + 1; j < n; j++) {
351 if (idx1 < idx2 || (idx1 == idx2 && pri1 >= pri2))
continue;
362 const char type_str[] =
"CLDS";
363 char type[16], *id, ver;
366 trace(NULL, 3,
"setopt_obstype: sys=%d\n", sys);
372 for (i = 0; codes[i]; i++) {
376 if (!(opt->
freqtype & (1 << idx)) || opt->
mask[sys][codes[i] - 1] ==
'0') {
380 ver =
vercode[sys][codes[i] - 1];
381 if (ver <
'0' || ver >
'0' + opt->
rnxver - 300) {
382 trace(NULL, 2,
"unsupported obs type: rnxver=%.2f sys=%d code=%s\n", opt->
rnxver / 100.0, sys,
387 for (j = 0; j < 4; j++) {
388 if (!(opt->
obstype & (1 << j)))
continue;
389 if (types && !(types[i] & (1 << j)))
continue;
392 sprintf(type,
"%c%s", type_str[j],
id);
393 if (type[0] ==
'C' && type[2] ==
'N')
continue;
401 for (k = 0; k < opt->
nobs[0]; k++) {
402 if (!strcmp(opt->
tobs[0][k], type))
break;
405 strcpy(opt->
tobs[0][opt->
nobs[0]++], type);
408 strcpy(opt->
tobs[sys][opt->
nobs[sys]++], type);
419 for (j = 0; j < opt->
nobs[i]; j++) {
420 if (opt->
tobs[i][j][0] !=
'L')
continue;
426 opt->
shift[i][j] = 0.25;
429 opt->
shift[i][j] = -0.25;
433 opt->
shift[i][j] = 0.25;
437 opt->
shift[i][j] = 0.5;
439 opt->
shift[i][j] = -0.25;
441 opt->
shift[i][j] = -0.5;
445 opt->
shift[i][j] = 0.25;
447 opt->
shift[i][j] = -0.25;
451 opt->
shift[i][j] = -0.25;
453 opt->
shift[i][j] = 0.25;
464 for (p = str->
stas; p; p = p->
next) {
472 sprintf(opt->
comment[i++],
"%5s %22s %22s",
"STAID",
"TIME OF FIRST OBS",
"TIME OF LAST OBS");
474 for (p = str->
stas, n--; p && n >= 0; p = p->
next, n--) {
478 sprintf(opt->
comment[i + n],
" %04d %s %s", p->
staid, s1, s2);
485 double pos[3], enu[3];
487 trace(NULL, 3,
"setopt_sta:\n");
490 for (p = str->
stas; p; p = p->
next) {
506 if (!*opt->
rec[0] && !*opt->
rec[1] && !*opt->
rec[2]) {
511 if (!*opt->
ant[0] && !*opt->
ant[1] && !*opt->
ant[2]) {
526 }
else if (
norm(sta->
del, 3) > 0.0) {
531 }
else if (
norm(sta->
pos, 3) > 0.0) {
571 trace(NULL, 2,
"# STATION LIST\n");
572 trace(NULL, 2,
"# %17s %19s %5s %6s %16s %16s %12s %13s %9s %2s %6s %6s %6s\n",
"TIME",
"STAID",
"MARKER",
573 "ANTENNA",
"RECEIVER",
"LATITUDE",
"LONGITUDE",
"HIGHT",
"DT",
"DEL1",
"DEL2",
"DEL3");
575 for (p = str->
stas; p; p = p->
next) {
580 "%s %s %04d %-6.6s %-16.16s %-16.16s %12.8f %13.8f %9.3f %2d "
581 "%6.3f %6.3f %6.3f\n",
592 p->
ts = p->
te = time;
595 str->
halfc[sat - 1][idx] = p;
600 int i, sat = obs->
sat;
602 for (i = 0; i < NFREQ + NEXOBS; i++) {
603 if (obs->
L[i] == 0.0)
continue;
605 if (!str->
halfc[sat - 1][i]) {
617 }
else if (str->
halfc[sat - 1][i]->
stat == 1) {
633 char s0[32],s1[32],s2[32],*stats[]={
"ADD",
"SUB",
"NON"};
636 trace(NULL,2,
"# HALF-CYCLE AMBIGUITY CORRECTIONS\n");
637 trace(NULL,2,
"# %20s %22s %4s %3s %3s\n",
"START",
"END",
"SAT",
"FRQ",
"COR");
639 for (i=0;i<
MAXSAT;i++)
for (j=0;j<NFREQ+NEXOBS;j++) {
641 if (p->
stat<=1)
continue;
645 trace(NULL,2,
"%s %s %4s %3d %3s\n",s1,s2,s0,j+1,stats[p->
stat-2]);
655 for (i = 0; i < n; i++)
656 for (j = 0; j < NFREQ + NEXOBS; j++) {
659 for (p = str->
halfc[sat - 1][j]; p; p = p->
next) {
660 if (p->
stat <= 1)
continue;
665 }
else if (p->
stat == 4) {
675 eph_t eph0 = {0, -1, -1};
678 uint8_t codes[
NSATSYS][33] = {{0}};
679 uint8_t types[
NSATSYS][33] = {{0}};
681 int i, j, k, l, m, c = 0, type, sys, prn, abort = 0, n[
NSATSYS] = {0};
683 trace(NULL, 3,
"scan_file: nf=%d\n", nf);
685 for (m = 0; m < nf && !abort; m++) {
695 for (i = 0; i < str->
obs->
n; i++) {
697 if (!(sys & opt->
navsys))
continue;
698 for (l = 0;
navsys[l]; l++)
699 if (
navsys[l] == sys)
break;
703 for (j = 0; j < NFREQ + NEXOBS; j++) {
706 for (k = 0; k < n[l]; k++) {
707 if (codes[l][k] == str->
obs->
data[i].
code[j])
break;
709 if (k >= n[l] && n[l] < 32) {
713 if (str->
obs->
data[i].
P[j] != 0.0) types[l][k] |= 1;
714 if (str->
obs->
data[i].
L[j] != 0.0) types[l][k] |= 2;
715 if (str->
obs->
data[i].
D[j] != 0.0) types[l][k] |= 4;
716 if (str->
obs->
data[i].
SNR[j] != 0) types[l][k] |= 8;
726 }
else if (type == 5) {
730 if (++c % 11)
continue;
732 sprintf(msg,
"scanning: %s %s%s%s%s%s%s%s",
time_str(str->
time, 0), n[0] ?
"G" :
"", n[1] ?
"R" :
"",
733 n[2] ?
"E" :
"", n[3] ?
"J" :
"", n[4] ?
"S" :
"", n[5] ?
"C" :
"", n[6] ?
"I" :
"");
734 if ((abort =
showmsg(msg)))
break;
741 trace(NULL, 2,
"aborted in scan\n");
745 for (j = 0; j < n[i]; j++) {
746 trace(NULL, 2,
"scan_file: sys=%d code=%s type=%d\n", i,
code2obs(codes[i][j]), types[i][j]);
749 for (i = 0; i <
NSATSYS; i++) {
753 for (j = 0; j < n[i]; j++) {
754 trace(NULL, 3,
"scan_file: sys=%d code=%s\n", i,
code2obs(codes[i][j]));
765 for (i = 0; i < str->
nav->
n; i++) {
768 for (i = 0; i < str->
nav->
ng; i++) {
773 for (i = 0; i < str->
nav->
ns; i++) {
814 trace(NULL, 3,
"openfile:\n");
817 if (!*files[i])
continue;
819 strcpy(path, files[i]);
822 if (!strcmp(path, file)) strcat(path,
"_");
827 if (!(ofp[i] = fopen(path,
"w"))) {
828 showmsg(
"file open error: %s", path);
829 for (i--; i >= 0; i--)
830 if (ofp[i]) fclose(ofp[i]);
842 trace(NULL, 3,
"closefile:\n");
845 if (!ofp[i])
continue;
856 const stas_t *p = NULL, *q;
857 double ep[6], pos[3], enu[3], del[3];
859 trace(NULL, 3,
"outrnxevent: event=%d\n", event);
862 fprintf(fp,
"%*s%d%3d\n", (opt->
rnxver >= 300) ? 31 : 28,
"", event, 2);
863 fprintf(fp,
"%-60s%-20s\n",
"EVENT: START MOVING ANTENNA",
"COMMENT");
864 fprintf(fp,
"%-60s%-20s\n", opt->
marker,
"MARKER NAME");
866 for (q =
stas; q; q = q->next) {
867 if (q->staid == staid &&
timediff(time, q->te) <= 0.0) p = q;
869 fprintf(fp,
"%*s%d%3d\n", (opt->
rnxver >= 300) ? 31 : 28,
"", event, 6);
870 fprintf(fp,
"%-60s%-20s\n",
"EVENT: NEW SITE OCCUPATION",
"COMMENT");
872 fprintf(fp,
"%04d%56s%-20s\n", staid,
"",
"MARKER NAME");
875 fprintf(fp,
"%-60s%-20s\n", p->
sta.
name,
"MARKER NAME");
877 "REC # / TYPE / VERS");
878 fprintf(fp,
"%-20.20s%-20.20s%-20.20s%-20s\n", p->
sta.
antsno, p->
sta.
antdes,
"",
"ANT # / TYPE");
879 fprintf(fp,
"%14.4f%14.4f%14.4f%-18s%-20s\n", p->
sta.
pos[0], p->
sta.
pos[1], p->
sta.
pos[2],
"",
880 "APPROX POSITION XYZ");
897 del[1] = del[2] = 0.0;
899 fprintf(fp,
"%14.4f%14.4f%14.4f%-18s%-20s\n", del[0], del[1], del[2],
"",
"ANTENNA: DELTA H/E/N");
902 fprintf(fp,
"%s %02d %02.0f %02.0f %02.0f %02.0f %010.7f %d%3d\n", (opt->
rnxver >= 300) ?
">" :
"",
903 (opt->
rnxver >= 300) ? (
int)ep[0] : (
int)ep[0] % 100, ep[1], ep[2], ep[3], ep[4], ep[5], event, 1);
904 fprintf(fp,
"%-60s%-20s\n",
"EXTERNAL EVENT",
"COMMENT");
911 for (i = 0; i < n; i++)
912 for (j = 0; j < NFREQ + NEXOBS; j++) {
920 for (i = 0; i < n; i++)
921 for (j = 0; j < NFREQ + NEXOBS; j++) {
922 if (data[i].L[j] != 0.0 && str->
slips[data[i].
sat - 1][j]) {
930 if (ttol <= 0.0) ttol =
DTTOL;
932 return (tint <= 0.0 || fmod(
time2gpst(time, NULL) + ttol, tint) <= ttol * 2.0) &&
940 trace(NULL, 3,
"convobs :\n");
942 if (!ofp[0] || str->
obs->
n <= 0)
return;
958 if (str->
staid != *staid) {
966 for (i = 0; i < str->
obs->
n; i++)
967 for (j = 0; j < NFREQ + NEXOBS; j++) {
968 if (str->
obs->
data[i].
L[j] != 0.0) {
989 int sat, set, sys, prn, sep_nav = (opt->
rnxver <= 299 || opt->
sep_nav);
991 trace(NULL, 3,
"convnav :\n");
996 if (!(sys & opt->
navsys) || opt->
exsats[sat - 1])
return;
1031 if (ofp[1] && !sep_nav) {
1034 }
else if (ofp[2] && sep_nav) {
1039 if (ofp[1] && !sep_nav) {
1042 }
else if (ofp[3] && sep_nav) {
1047 if (ofp[1] && !sep_nav) {
1050 }
else if (ofp[4] && sep_nav) {
1055 if (ofp[1] && !sep_nav) {
1058 }
else if (ofp[5] && sep_nav) {
1063 if (ofp[1] && !sep_nav) {
1066 }
else if (ofp[6] && sep_nav) {
1071 if (ofp[1] && !sep_nav) {
1074 }
else if (ofp[7] && sep_nav) {
1083 int prn, sat, sys, sep_nav = opt->
rnxver <= 299 || opt->
sep_nav;
1085 trace(NULL, 3,
"convsbs :\n");
1089 if (!
screent(time, opt->
ts, opt->
te, 0.0))
return;
1102 trace(NULL, 2,
"sbas message satellite error: prn=%d\n", prn);
1105 if (!(sat =
satno(sys, prn)) || opt->
exsats[sat - 1] == 1)
return;
1114 if (ofp[1] && !sep_nav) {
1117 }
else if (ofp[3] && sep_nav) {
1133 trace(NULL, 2,
"point position error (%s)\n", msg);
1140 const char type[] =
"ONGHQLCISE";
1141 char msg[1024] =
"", *p = msg, s[64];
1145 p += sprintf(p,
"(%d) ", sess);
1149 p += sprintf(p,
"%s", s);
1153 p += sprintf(p,
"-%s", s + 5);
1155 p += sprintf(p,
": ");
1157 for (i = 0; i <
NOUTFILE + 1; i++) {
1158 if (n[i] == 0)
continue;
1159 p += sprintf(p,
"%c=%d%s", type[i], n[i], i <
NOUTFILE ?
" " :
"");
1168 int i, j, nf, type, n[
NOUTFILE + 1] = {0}, mask[
MAXEXFILE] = {0}, staid = -1, abort = 0;
1173 "convrnx_s: sess=%d format=%d file=%s ofile=%s %s %s %s %s %s %s "
1175 sess, format, file, ofile[0], ofile[1], ofile[2], ofile[3], ofile[4], ofile[5], ofile[6], ofile[7], ofile[8]);
1178 if (
reppath(file, path, opt->
ts, staname,
"") < 0) {
1179 showmsg(
"no time for input file: %s", file);
1184 if (!(epath[i] = (
char*)
malloc(1024))) {
1190 showmsg(
"no input file: %s", path);
1200 }
else if (opt->
ts.
time) {
1208 if (!
scan_file(epath, nf, opt, str, mask)) {
1220 showmsg(
"no time for output path: %s", ofile[i]);
1234 for (i = 0; i < nf && !abort; i++) {
1235 if (!mask[i])
continue;
1250 convobs(ofp, opt, str, n, tend, &staid);
1256 convsbs(ofp, opt, str, n, tend + 1);
1275 if (ofp[i] && n[i] <= 0) remove(paths[i]);
1285 return abort ? -1 : 1;
1316 trace(NULL, 3,
"convrnx: format=%d file=%s ofile=%s %s %s %s %s %s %s %s %s\n", format, file, ofile[0], ofile[1],
1317 ofile[2], ofile[3], ofile[4], ofile[5], ofile[6], ofile[7], ofile[8]);
1324 else if (opt->
rnxver <= 211)
1326 else if (opt->
rnxver <= 212)
1328 else if (opt->
rnxver <= 300)
1330 else if (opt->
rnxver <= 301)
1332 else if (opt->
rnxver <= 302)
1341 stat =
convrnx_s(0, format, &opt_, file, ofile);
1344 tu = opt->
tunit < 86400.0 ? opt->
tunit : 86400.0;
1345 ts = tu * (int)floor(
time2gpst(opt->
ts, &week) / tu);
1358 if ((stat =
convrnx_s(i + 1, format, &opt_, file, ofile)) < 0)
break;
void satno2id(int sat, char *id)
uint8_t obs2code(const char *obs)
char * code2obs(uint8_t code)
static int openfile(FILE **ofp, char *files[], const char *file, const rnxopt_t *opt, const nav_t *nav)
static int scan_file(char **files, int nf, rnxopt_t *opt, strfile_t *str, int *mask)
static int open_strfile(strfile_t *str, const char *file)
static void unsetopt_file(rnxopt_t *opt)
static void setopt_file(int format, char **paths, int n, const int *mask, rnxopt_t *opt)
static strfile_t * gen_strfile(int format, const char *opt)
static void convsbs(FILE **ofp, rnxopt_t *opt, strfile_t *str, int *n, gtime_t *tend)
static const char vercode[][MAXCODE]
static void write_header(FILE **ofp, int idx, const rnxopt_t *opt, const nav_t *nav)
static void save_slips(strfile_t *str, obsd_t *data, int n)
static void closefile(FILE **ofp, const rnxopt_t *opt, nav_t *nav)
int convrnx(int format, rnxopt_t *opt, const char *file, char **ofile)
static void convcode(int rnxver, int sys, char *type)
static void setopt_apppos(strfile_t *str, rnxopt_t *opt)
static void dump_stas(const strfile_t *str)
static void convobs(FILE **ofp, rnxopt_t *opt, strfile_t *str, int *n, gtime_t *tend, int *staid)
static const int navsys[]
static void setopt_phshift(rnxopt_t *opt)
static int convrnx_s(int sess, int format, rnxopt_t *opt, const char *file, char **ofile)
static int input_strfile(strfile_t *str)
static void setopt_sta(const strfile_t *str, rnxopt_t *opt)
static void close_strfile(strfile_t *str)
static void sort_obstype(uint8_t *codes, uint8_t *types, int n, int sys)
static int add_halfc(strfile_t *str, int sat, int idx, gtime_t time)
static int screent_ttol(gtime_t time, gtime_t ts, gtime_t te, double tint, double ttol)
static void outrnxevent(FILE *fp, const rnxopt_t *opt, gtime_t time, int event, const stas_t *stas, int staid)
static void resolve_halfc(const strfile_t *str, obsd_t *data, int n)
static void free_strfile(strfile_t *str)
static void update_halfc(strfile_t *str, obsd_t *obs)
static void setopt_sta_list(const strfile_t *str, rnxopt_t *opt)
static int showstat(int sess, gtime_t ts, gtime_t te, int *n)
static void dump_halfc(const strfile_t *str)
static void setopt_obstype(const uint8_t *codes, const uint8_t *types, int sys, rnxopt_t *opt)
static void convnav(FILE **ofp, rnxopt_t *opt, strfile_t *str, int *n)
static void update_stas(strfile_t *str)
static void rest_slips(strfile_t *str, obsd_t *data, int n)
static void update_stainf(strfile_t *str)
void ecef2pos(const double *r, double *pos)
Transform ECEF position to geodetic position.
void ecef2enu(const double *pos, const double *r, double *e)
Transform ECEF vector to local tangential coordinate.
int satsys(int sat, int *prn)
void matcpy(double *A, const double *B, int n, int m)
Copy matrix.
double norm(const double *a, int n)
Euclidean norm of vector.
int satno(int sys, int prn)
Convert satellite system+prn/slot number to satellite number.
int getcodepri(int sys, uint8_t code, const char *opt)
Get code priority for multiple codes in a frequency.
int code2freq_idx(int sys, uint8_t code)
Convert system and obs code to frequency index (obsdef-based).
int screent(gtime_t time, gtime_t ts, gtime_t te, double tint)
Screen data by time range and interval.
const prcopt_t prcopt_default
static sta_t stas[MAXRCV]
int showmsg(const char *format,...)
void free_raw(raw_t *raw)
Free receiver raw data control struct.
int input_rawf(raw_t *raw, rtcm_t *rtcm, int format, FILE *fp)
Input receiver raw data from file.
int init_raw(raw_t *raw, int format)
Initialize receiver raw data control struct.
int outrnxobsh(FILE *fp, const rnxopt_t *opt, const nav_t *nav)
Output RINEX observation data file header.
int init_rnxctr(rnxctr_t *rnx)
Initialize RINEX control struct.
int outrnxlnavh(FILE *fp, const rnxopt_t *opt, const nav_t *nav)
Output RINEX Galileo navigation data file header.
int outrnxgnavh(FILE *fp, const rnxopt_t *opt, const nav_t *nav)
Output RINEX GLONASS navigation data file header.
int outrnxnavh(FILE *fp, const rnxopt_t *opt, const nav_t *nav)
Output RINEX navigation data file header.
int open_rnxctr(rnxctr_t *rnx, FILE *fp)
Open RINEX data (read header).
int outrnxqnavh(FILE *fp, const rnxopt_t *opt, const nav_t *nav)
Output RINEX QZSS navigation data file header.
int outrnxhnavh(FILE *fp, const rnxopt_t *opt, const nav_t *nav)
Output RINEX GEO navigation data file header.
int outrnxnavb(FILE *fp, const rnxopt_t *opt, const eph_t *eph)
Output RINEX navigation data file body.
int outrnxobsb(FILE *fp, const rnxopt_t *opt, const obsd_t *obs, int n, int flag)
Output RINEX observation data body.
int outrnxgnavb(FILE *fp, const rnxopt_t *opt, const geph_t *geph)
Output RINEX GLONASS navigation data file body.
int input_rnxctr(rnxctr_t *rnx, FILE *fp)
Input RINEX control (read next message).
int outrnxinavh(FILE *fp, const rnxopt_t *opt, const nav_t *nav)
Output RINEX NavIC/IRNSS navigation data file header.
int outrnxcnavh(FILE *fp, const rnxopt_t *opt, const nav_t *nav)
Output RINEX BDS navigation data file header.
void free_rnxctr(rnxctr_t *rnx)
Free RINEX control struct buffers.
int outrnxhnavb(FILE *fp, const rnxopt_t *opt, const seph_t *seph)
Output RINEX GEO navigation data file body.
void free_rtcm(rtcm_t *rtcm)
Free RTCM control struct.
int input_rtcm3f(rtcm_t *rtcm, FILE *fp)
Input RTCM 3 message from file.
int init_rtcm(rtcm_t *rtcm)
Initialize RTCM control struct.
int input_rtcm2f(rtcm_t *rtcm, FILE *fp)
Input RTCM 2 message from file.
void sbsoutmsg(FILE *fp, sbsmsg_t *sbsmsg)
Output SBAS message record.
int sbsupdatecorr(const sbsmsg_t *msg, nav_t *nav)
Update SBAS corrections in navigation data.
int pntpos(mrtk_ctx_t *ctx, const obsd_t *obs, int n, const nav_t *nav, const prcopt_t *opt, sol_t *sol, double *azel, ssat_t *ssat, char *msg)
Compute receiver position, velocity, clock bias by single-point positioning with pseudorange and dopp...
const char * formatstrs[32]
int expath(const char *path, char *paths[], int nmax)
Expand file path with wild-card (*) in file.
void createdir(const char *path)
Create directory if not exists (recursively).
int reppath(const char *path, char *rpath, gtime_t time, const char *rov, const char *base)
Replace keywords in file path with date, time, rover and base station id.
gtime_t gpst2time(int week, double sec)
Convert GPS week/tow to gtime_t.
void time2epoch(gtime_t t, double *ep)
Convert gtime_t struct to calendar day/time.
void time2str(gtime_t t, char *s, int n)
Convert gtime_t struct to string.
double timediff(gtime_t t1, gtime_t t2)
Compute time difference (t1 - t2).
double time2gpst(gtime_t t, int *week)
Convert gtime_t to GPS week/tow.
gtime_t timeadd(gtime_t t, double sec)
Add seconds to gtime_t.
char * time_str(gtime_t t, int n)
Get time string (not reentrant).
void trace(mrtk_ctx_t *ctx, int level, const char *format,...)
Output trace message.
GPS/GAL/QZS/BDS/IRN broadcast ephemeris type.
GLONASS broadcast ephemeris type.
GNSS time representation.
Observation data collection.
Receiver raw data control type.
RINEX control struct type.
double shift[7][MAXOBSTYPE]
char comment[MAXCOMMENT][64]
char tobs[7][MAXOBSTYPE][4]
RTCM control struct type.
halfc_t * halfc[MAXSAT][5+5]
uint8_t slips[MAXSAT][5+5]